diff --git a/CHANGELOG.md b/CHANGELOG.md
index de82dd54de58476ecf1035dbe7e9669f10043eae..d32ee5e749d955add479cd49f0e06e62c2f4c088 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,26 @@
+2.0.0.0-dev62
+=============
+* Modularity improvements:
+  * Moved all Grouped Product functionality to newly created module GroupedProduct
+  * Moved Multishipping functionality to newly created module Multishipping
+  * Extracted Product duplication behavior from Product model to Product\Copier model
+  * Replaced event "catalog_model_product_duplicate" with composite Product\Copier model
+  * Replaced event "catalog_product_prepare_save" with controller product initialization helper that can be customozed via plugins
+  * Consolidated Authorize.Net functionality in single module Authorizenet
+  * Eliminated dependency of Sales module on Shipping and Usa modules
+  * Eliminated dependency of Shipping module on Customer module
+  * Improved accuracy and quality of Module Dependency Test
+* Fixed bugs:
+  * Fixed an issue when order was sent to PayPal in USD regardless of currency used during order creation
+  * Fixed an issue with 404 error when clicking any button on a Recurring Billing Profile in the backend
+  * Fixed an issue with synchronization with Google Shopping on product update caused by missed service property
+  * Fixed ability to submit order in the backend when Authorize.Net Direct Post is used
+  * Fixed an issue with notice that _attribute_set column is missing during Import/Export
+* Removed the deprecated service-calls and data source functionality
+* Request\Response workflow improvements:
+  * Added Console\Response
+  * Changed behavior of AppInterface to return ResponseInterface instead of sending it
+
 2.0.0.0-dev61
 =============
 * Introduced a new layout block attribute - cacheable
@@ -147,6 +170,10 @@
   * Fixed date resetting to 1 Jan 1970 after saving a design change in the admin panel in case date format is DD/MM/YY
   * Fixed CAPTCHA on multi-address checkout flow
   * Fixed view files population tool
+  * Fixed DHL functionality of generation shipping labels
+  * Fixed target rule if it is applied for specific customer segment
+  * Fixed product importing that cleared price and weight
+  * Fixed fatal error when a file reference is added to HTML head
 * GitHub requests:
   * [#122](https://github.com/magento/magento2/pull/122) -- Added support of federal units of Brazil with 27 states
   * [#184](https://github.com/magento/magento2/issues/184) -- Removed unused blocks and methods in Magento_Wishlist module
diff --git a/app/code/Magento/AdminNotification/Block/Window.php b/app/code/Magento/AdminNotification/Block/Window.php
index a05b2427dc77485d7e8d557ad2e510296933e4cc..4568f8177c8ad7d4d8e9dda905ba792f56f11077 100644
--- a/app/code/Magento/AdminNotification/Block/Window.php
+++ b/app/code/Magento/AdminNotification/Block/Window.php
@@ -60,6 +60,14 @@ class Window extends \Magento\Backend\Block\Template
      */
     protected $_latestItem;
 
+    /**
+     * The property is used to define content-scope of block. Can be private or public.
+     * If it isn't defined then application considers it as false.
+     *
+     * @var bool
+     */
+    protected $_isScopePrivate;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Backend\Model\Auth\Session $authSession
@@ -75,6 +83,7 @@ class Window extends \Magento\Backend\Block\Template
         parent::__construct($context, $data);
         $this->_authSession = $authSession;
         $this->_criticalCollection = $criticalCollection;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Paygate/Block/Authorizenet/Form/Cc.php b/app/code/Magento/Authorizenet/Block/Authorizenet/Form/Cc.php
similarity index 86%
rename from app/code/Magento/Paygate/Block/Authorizenet/Form/Cc.php
rename to app/code/Magento/Authorizenet/Block/Authorizenet/Form/Cc.php
index b8dc87d0de0b2b18e582f82b9cbad244af72f166..e4322a426001f4a8d212b87d72b0a0106d729794 100644
--- a/app/code/Magento/Paygate/Block/Authorizenet/Form/Cc.php
+++ b/app/code/Magento/Authorizenet/Block/Authorizenet/Form/Cc.php
@@ -19,16 +19,16 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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\Paygate\Block\Authorizenet\Form;
+namespace Magento\Authorizenet\Block\Authorizenet\Form;
 
 class Cc extends \Magento\Payment\Block\Form
 {
-    protected $_template = 'Magento_Paygate::form/cc.phtml';
+    protected $_template = 'Magento_Authorizenet::form/cc.phtml';
 
     /**
      * Retrieve payment method form html
@@ -48,7 +48,7 @@ class Cc extends \Magento\Payment\Block\Form
      */
     public function getCardsBlock()
     {
-        return $this->getLayout()->createBlock('Magento\Paygate\Block\Authorizenet\Info\Cc')
+        return $this->getLayout()->createBlock('Magento\Authorizenet\Block\Authorizenet\Info\Cc')
             ->setMethod($this->getMethod())
             ->setInfo($this->getMethod()->getInfoInstance())
             ->setCheckoutProgressBlock(false)
@@ -62,7 +62,7 @@ class Cc extends \Magento\Payment\Block\Form
      */
     public function getCancelUrl()
     {
-        return $this->getUrl('paygate/authorizenet_payment/cancel');
+        return $this->getUrl('authorizenet/authorizenet_payment/cancel');
     }
 
     /**
@@ -72,7 +72,7 @@ class Cc extends \Magento\Payment\Block\Form
      */
     public function getAdminCancelUrl()
     {
-        return $this->_urlBuilder->getUrl('adminhtml/paygate_authorizenet_payment/cancel');
+        return $this->_urlBuilder->getUrl('adminhtml/authorizenet_payment/cancel');
     }
 
     /**
@@ -107,10 +107,10 @@ class Cc extends \Magento\Payment\Block\Form
     public function getPartialAuthorizationConfirmationMessage()
     {
         $lastActionState = $this->getMethod()->getPartialAuthorizationLastActionState();
-        if ($lastActionState == \Magento\Paygate\Model\Authorizenet::PARTIAL_AUTH_LAST_SUCCESS) {
+        if ($lastActionState == \Magento\Authorizenet\Model\Authorizenet::PARTIAL_AUTH_LAST_SUCCESS) {
             $this->getMethod()->unsetPartialAuthorizationLastActionState();
             return __('You don\'t have enough on your credit card to pay for this purchase. To complete your purchase, click "OK" and add a credit card to use for the balance. Otherwise, you can cancel the purchase and release the partial payment we are holding.');
-        } elseif ($lastActionState == \Magento\Paygate\Model\Authorizenet::PARTIAL_AUTH_LAST_DECLINED) {
+        } elseif ($lastActionState == \Magento\Authorizenet\Model\Authorizenet::PARTIAL_AUTH_LAST_DECLINED) {
             $this->getMethod()->unsetPartialAuthorizationLastActionState();
             return __('Your credit card has been declined. You can click OK to add another credit card to complete your purchase. Or you can cancel this credit transaction and pay a different way.');
         }
@@ -127,13 +127,13 @@ class Cc extends \Magento\Payment\Block\Form
         $lastActionState = $this->getMethod()->getPartialAuthorizationLastActionState();
         $message = false;
         switch ($lastActionState) {
-            case \Magento\Paygate\Model\Authorizenet::PARTIAL_AUTH_ALL_CANCELED:
+            case \Magento\Authorizenet\Model\Authorizenet::PARTIAL_AUTH_ALL_CANCELED:
                 $message = __('We canceled your payment and released any money we were holding.');
                 break;
-            case \Magento\Paygate\Model\Authorizenet::PARTIAL_AUTH_CARDS_LIMIT_EXCEEDED:
+            case \Magento\Authorizenet\Model\Authorizenet::PARTIAL_AUTH_CARDS_LIMIT_EXCEEDED:
                 $message = __('You can\'t use any more credit cards for this payment, and you don\'t have enough to pay for this purchase. Sorry, but we\'ll have to cancel your transaction.');
                 break;
-            case \Magento\Paygate\Model\Authorizenet::PARTIAL_AUTH_DATA_CHANGED:
+            case \Magento\Authorizenet\Model\Authorizenet::PARTIAL_AUTH_DATA_CHANGED:
                 $message = __('Your order has not been placed, because the contents of the shopping cart and/or your address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process to purchase your cart contents.');
                 break;
         }
diff --git a/app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php b/app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php
similarity index 93%
rename from app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php
rename to app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php
index c457f3a33026e8840c7f9554db8be05b1ba8f351..c27e8af2f703a753677dc2457801d4ac9d191276 100644
--- a/app/code/Magento/Paygate/Block/Authorizenet/Info/Cc.php
+++ b/app/code/Magento/Authorizenet/Block/Authorizenet/Info/Cc.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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\Paygate\Block\Authorizenet\Info;
+namespace Magento\Authorizenet\Block\Authorizenet\Info;
 
 use Magento\Payment\Block\Info;
 
@@ -37,7 +37,7 @@ class Cc extends \Magento\Payment\Block\Info\Cc
      */
     protected $_isCheckoutProgressBlockFlag = true;
 
-    protected $_template = 'Magento_Paygate::info/cc.phtml';
+    protected $_template = 'Magento_Authorizenet::info/cc.phtml';
 
     /**
      * @var \Magento\Core\Helper\Data
@@ -67,7 +67,7 @@ class Cc extends \Magento\Payment\Block\Info\Cc
      */
     public function toPdf()
     {
-        $this->setTemplate('Magento_Paygate::info/pdf.phtml');
+        $this->setTemplate('Magento_Authorizenet::info/pdf.phtml');
         return $this->toHtml();
     }
 
@@ -90,7 +90,7 @@ class Cc extends \Magento\Payment\Block\Info\Cc
      * in Previously used card information block
      *
      * @param bool $flag
-     * @return \Magento\Paygate\Block\Authorizenet\Info\Cc
+     * @return \Magento\Authorizenet\Block\Authorizenet\Info\Cc
      */
     public function setCheckoutProgressBlock($flag)
     {
diff --git a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php
index 496b2f8a4ad2dc072fcf269ddc7232074885ef29..6cc99bb9c4200a07889b46ccaf73032cf616e496 100644
--- a/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php
+++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Directpost/Payment.php
@@ -130,18 +130,18 @@ class Payment
                     $session->addCheckoutOrderIncrementId($order->getIncrementId());
                     $session->setLastOrderIncrementId($order->getIncrementId());
 
-                    $requestToPaygate = $payment->getMethodInstance()->generateRequestFromOrder($order);
-                    $requestToPaygate->setControllerActionName($controller);
-                    $requestToPaygate->setOrderSendConfirmation($sendConfirmationFlag);
-                    $requestToPaygate->setStoreId($this->_getOrderCreateModel()->getQuote()->getStoreId());
+                    $requestToAuthorizenet = $payment->getMethodInstance()->generateRequestFromOrder($order);
+                    $requestToAuthorizenet->setControllerActionName($controller);
+                    $requestToAuthorizenet->setOrderSendConfirmation($sendConfirmationFlag);
+                    $requestToAuthorizenet->setStoreId($this->_getOrderCreateModel()->getQuote()->getStoreId());
 
                     $adminUrl = $this->_objectManager->get('Magento\Backend\Model\Url');
                     if ($adminUrl->useSecretKey()) {
-                        $requestToPaygate->setKey(
+                        $requestToAuthorizenet->setKey(
                             $adminUrl->getSecretKey('adminhtml', 'authorizenet_directpost_payment', 'redirect')
                         );
                     }
-                    $result['directpost'] = array('fields' => $requestToPaygate->getData());
+                    $result['directpost'] = array('fields' => $requestToAuthorizenet->getData());
                 }
 
                 $result['success'] = 1;
diff --git a/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php
similarity index 79%
rename from app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php
rename to app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php
index d82663da64149f9b1894f0584b8a88620cf08828..cc02049e6e311cedd503fd52b9f12fcc9a876c6e 100644
--- a/app/code/Magento/Paygate/Controller/Adminhtml/Paygate/Authorizenet/Payment.php
+++ b/app/code/Magento/Authorizenet/Controller/Adminhtml/Authorizenet/Payment.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
@@ -28,10 +28,10 @@
  * Authorize Payment Controller
  *
  * @category   Magento
- * @package    Magento_Paygate
+ * @package    Magento_Authorizenet
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Paygate\Controller\Adminhtml\Paygate\Authorizenet;
+namespace Magento\Authorizenet\Controller\Adminhtml\Authorizenet;
 
 class Payment extends \Magento\Backend\App\Action
 {
@@ -63,7 +63,7 @@ class Payment extends \Magento\Backend\App\Action
         $result['success'] = false;
         try {
             $paymentMethod = $this->_objectManager->get('Magento\Payment\Helper\Data')
-                ->getMethodInstance(\Magento\Paygate\Model\Authorizenet::METHOD_CODE);
+                ->getMethodInstance(\Magento\Authorizenet\Model\Authorizenet::METHOD_CODE);
 
             if ($paymentMethod) {
                 $paymentMethod->setStore(
@@ -75,7 +75,8 @@ class Payment extends \Magento\Backend\App\Action
             }
 
             $result['success']  = true;
-            $result['update_html'] = $this->_getPaymentMethodsHtml();
+            $result['update_html'] = $this->_objectManager->get('Magento\Authorizenet\Helper\Data')
+                ->getPaymentMethodsHtml($this->_view);
         } catch (\Magento\Core\Exception $e) {
             $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error_message'] = $e->getMessage();
@@ -87,23 +88,4 @@ class Payment extends \Magento\Backend\App\Action
         $this->_sessionQuote->getQuote()->getPayment()->save();
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
     }
-
-    /**
-     * Get payment method step html
-     *
-     * @return string
-     */
-    protected function _getPaymentMethodsHtml()
-    {
-        $layout = $this->_view->getLayout();
-
-        $update = $layout->getUpdate();
-        $update->load('checkout_onepage_paymentmethod');
-
-        $layout->generateXml();
-        $layout->generateElements();
-
-        $output = $layout->getOutput();
-        return $output;
-    }
 }
diff --git a/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php b/app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php
similarity index 75%
rename from app/code/Magento/Paygate/Controller/Authorizenet/Payment.php
rename to app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php
index 171f0b682978cae60ec05f19826e545c61466e92..0a86c9b75214bf5e491d9488dde52c771a53f10b 100644
--- a/app/code/Magento/Paygate/Controller/Authorizenet/Payment.php
+++ b/app/code/Magento/Authorizenet/Controller/Authorizenet/Payment.php
@@ -19,19 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
 
-/**
- * Authorize Payment Controller
- *
- * @category   Magento
- * @package    Magento_Paygate
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Paygate\Controller\Authorizenet;
+namespace Magento\Authorizenet\Controller\Authorizenet;
 
 class Payment extends \Magento\App\Action\Action
 {
@@ -63,14 +56,15 @@ class Payment extends \Magento\App\Action\Action
         $result['success'] = false;
         try {
             $paymentMethod = $this->_objectManager->get('Magento\Payment\Helper\Data')
-                ->getMethodInstance(\Magento\Paygate\Model\Authorizenet::METHOD_CODE);
+                ->getMethodInstance(\Magento\Authorizenet\Model\Authorizenet::METHOD_CODE);
             if ($paymentMethod) {
                 $paymentMethod->cancelPartialAuthorization(
                     $this->_session->getQuote()->getPayment()
                 );
             }
             $result['success']  = true;
-            $result['update_html'] = $this->_getPaymentMethodsHtml();
+            $result['update_html'] = $this->_objectManager->get('Magento\Authorizenet\Helper\Data')
+                ->getPaymentMethodsHtml($this->_view);
         } catch (\Magento\Core\Exception $e) {
             $this->_objectManager->get('Magento\Logger')->logException($e);
             $result['error_message'] = $e->getMessage();
@@ -82,20 +76,4 @@ class Payment extends \Magento\App\Action\Action
         $this->_session->getQuote()->getPayment()->save();
         $this->getResponse()->setBody($this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($result));
     }
-
-    /**
-     * Get payment method step html
-     *
-     * @return string
-     */
-    protected function _getPaymentMethodsHtml()
-    {
-        $layout = $this->_view->getLayout();
-        $update = $layout->getUpdate();
-        $update->load('checkout_onepage_paymentmethod');
-        $layout->generateXml();
-        $layout->generateElements();
-        $output = $layout->getOutput();
-        return $output;
-    }
 }
diff --git a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php
index 58910ec62c87b775d2e286c442f08492bd28b55e..46d327ef1b63d045ee57f9caceeaf21d3546564f 100644
--- a/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php
+++ b/app/code/Magento/Authorizenet/Controller/Directpost/Payment.php
@@ -72,11 +72,31 @@ class Payment extends \Magento\App\Action\Action
         return $this->_objectManager->get('Magento\Authorizenet\Model\Directpost\Session');
     }
 
+    /**
+     * Response action.
+     * Action for Authorize.net SIM Relay Request.
+     */
+    public function backendResponseAction()
+    {
+        $this->_responseAction($this->_objectManager->get('Magento\Authorizenet\Helper\Backend'));
+    }
+
     /**
      * Response action.
      * Action for Authorize.net SIM Relay Request.
      */
     public function responseAction()
+    {
+        $this->_responseAction($this->_objectManager->get('Magento\Authorizenet\Helper\Data'));
+    }
+
+    /**
+     * Response action.
+     * Action for Authorize.net SIM Relay Request.
+     *
+     * @param \Magento\Authorizenet\Helper\HelperInterface $helper
+     */
+    protected function _responseAction(\Magento\Authorizenet\Helper\HelperInterface $helper)
     {
         $params = array();
         $data = $this->getRequest()->getPost();
@@ -112,8 +132,7 @@ class Payment extends \Magento\App\Action\Action
             }
             $result['controller_action_name'] = $data['controller_action_name'];
             $result['is_secure'] = isset($data['is_secure']) ? $data['is_secure'] : false;
-            $params['redirect'] = $this->_objectManager->get('Magento\Authorizenet\Helper\HelperInterface')
-                ->getRedirectIframeUrl($result);
+            $params['redirect'] = $helper->getRedirectIframeUrl($result);
         }
 
         $this->_coreRegistry->register('authorizenet_directpost_form_params', $params);
diff --git a/app/code/Magento/Authorizenet/Helper/Backend.php b/app/code/Magento/Authorizenet/Helper/Backend.php
index 0bdf9566c8b0d4d42edbfa98a2282849c08ef27e..92ba346c82a0513a5fc7b6ea54a6d3f60ac91269 100644
--- a/app/code/Magento/Authorizenet/Helper/Backend.php
+++ b/app/code/Magento/Authorizenet/Helper/Backend.php
@@ -31,6 +31,23 @@ namespace Magento\Authorizenet\Helper;
  */
 class Backend extends Data
 {
+    /**
+     * @param \Magento\App\Helper\Context $context
+     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Sales\Model\OrderFactory $orderFactory
+     * @param \Magento\Backend\Model\Url $backendUrl
+     */
+    public function __construct(
+        \Magento\App\Helper\Context $context,
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Sales\Model\OrderFactory $orderFactory,
+        \Magento\Backend\Model\Url $backendUrl
+    ) {
+        parent::__construct($context, $storeManager, $orderFactory);
+        $this->_urlBuilder = $backendUrl;
+    }
+
+
     /**
      * Return URL for admin area
      *
@@ -50,7 +67,7 @@ class Backend extends Data
      */
     public function getPlaceOrderAdminUrl()
     {
-        return $this->_getUrl('*/authorizenet_directpost_payment/place', array());
+        return $this->_getUrl('adminhtml/authorizenet_directpost_payment/place', array());
     }
 
     /**
@@ -78,4 +95,16 @@ class Backend extends Data
     {
         return $this->_getUrl('adminhtml/authorizenet_directpost_payment/redirect', $params);
     }
+
+    /**
+     * Get direct post rely url
+     *
+     * @param null|int|string $storeId
+     * @return string
+     */
+    public function getRelyUrl($storeId = null)
+    {
+        return $this->_storeManager->getDefaultStoreView()->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_LINK)
+            . 'authorizenet/directpost_payment/backendResponse';
+    }
 }
diff --git a/app/code/Magento/Authorizenet/Helper/Data.php b/app/code/Magento/Authorizenet/Helper/Data.php
index 77d393f6901b15e06b283ba25b680290ffeee367..3dbcedd6794a7f4c6004a4836afd788d6b9e7719 100644
--- a/app/code/Magento/Authorizenet/Helper/Data.php
+++ b/app/code/Magento/Authorizenet/Helper/Data.php
@@ -178,4 +178,160 @@ class Data extends \Magento\App\Helper\AbstractHelper implements HelperInterface
             }
         }
     }
+
+    /**
+     * Converts a lot of messages to message
+     *
+     * @param  array $messages
+     * @return string
+     */
+    public function convertMessagesToMessage($messages)
+    {
+        return implode(' | ', $messages);
+    }
+
+    /**
+     * Return message for gateway transaction request
+     * 
+     * @param \Magento\Payment\Model\Info $payment
+     * @param string $requestType
+     * @param string $lastTransactionId
+     * @param \Magento\Object $card
+     * @param bool|float $amount
+     * @param bool|string $exception
+     * @return bool|string
+     */
+    public function getTransactionMessage(
+        $payment,
+        $requestType,
+        $lastTransactionId,
+        $card,
+        $amount = false,
+        $exception = false
+    ) {
+        return $this->getExtendedTransactionMessage(
+            $payment, $requestType, $lastTransactionId, $card, $amount, $exception
+        );
+    }
+
+    /**
+     * Return message for gateway transaction request
+     * 
+     * @param \Magento\Payment\Model\Info $payment
+     * @param string $requestType
+     * @param string $lastTransactionId
+     * @param \Magento\Object $card
+     * @param bool|float $amount
+     * @param bool|string $exception
+     * @param bool|string $additionalMessage
+     * @return bool|mixed
+     */
+    public function getExtendedTransactionMessage(
+        $payment,
+        $requestType,
+        $lastTransactionId,
+        $card,
+        $amount = false,
+        $exception = false,
+        $additionalMessage = false
+    ) {
+        $operation = $this->_getOperation($requestType);
+
+        if (!$operation) {
+            return false;
+        }
+
+        if ($amount) {
+            $amount = __('amount %1', $this->_formatPrice($payment, $amount));
+        }
+
+        if ($exception) {
+            $result = __('failed');
+        } else {
+            $result = __('successful');
+        }
+
+        $card = __('Credit Card: xxxx-%1', $card->getCcLast4());
+
+        $pattern = '%s %s %s - %s.';
+        $texts = array($card, $amount, $operation, $result);
+
+        if (!is_null($lastTransactionId)) {
+            $pattern .= ' %s.';
+            $texts[] = __('Authorize.Net Transaction ID %1', $lastTransactionId);
+        }
+
+        if ($additionalMessage) {
+            $pattern .= ' %s.';
+            $texts[] = $additionalMessage;
+        }
+        $pattern .= ' %s';
+        $texts[] = $exception;
+
+        return call_user_func_array('__', array_merge(array($pattern), $texts));
+    }
+
+    /**
+     * Return operation name for request type
+     *
+     * @param  string $requestType
+     * @return bool|string
+     */
+    protected function _getOperation($requestType)
+    {
+        switch ($requestType) {
+            case \Magento\Authorizenet\Model\Authorizenet::REQUEST_TYPE_AUTH_ONLY:
+                return __('authorize');
+            case \Magento\Authorizenet\Model\Authorizenet::REQUEST_TYPE_AUTH_CAPTURE:
+                return __('authorize and capture');
+            case \Magento\Authorizenet\Model\Authorizenet::REQUEST_TYPE_PRIOR_AUTH_CAPTURE:
+                return __('capture');
+            case \Magento\Authorizenet\Model\Authorizenet::REQUEST_TYPE_CREDIT:
+                return __('refund');
+            case \Magento\Authorizenet\Model\Authorizenet::REQUEST_TYPE_VOID:
+                return __('void');
+            default:
+                return false;
+        }
+    }
+
+    /**
+     * Format price with currency sign
+     * @param  \Magento\Payment\Model\Info $payment
+     * @param float $amount
+     * @return string
+     */
+    protected function _formatPrice($payment, $amount)
+    {
+        return $payment->getOrder()->getBaseCurrency()->formatTxt($amount);
+    }
+
+    /**
+     * Get payment method step html
+     *
+     * @param \Magento\App\ViewInterface $view
+     * @return string
+     */
+    public function getPaymentMethodsHtml(\Magento\App\ViewInterface $view)
+    {
+        $layout = $view->getLayout();
+        $update = $layout->getUpdate();
+        $update->load('checkout_onepage_paymentmethod');
+        $layout->generateXml();
+        $layout->generateElements();
+        $output = $layout->getOutput();
+        return $output;
+    }
+
+    /**
+     * Get direct post rely url
+     *
+     * @param null|int|string $storeId
+     * @return string
+     */
+    public function getRelyUrl($storeId = null)
+    {
+        return $this->_storeManager->getStore($storeId)->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_LINK)
+            . 'authorizenet/directpost_payment/response';
+    }
 }
diff --git a/app/code/Magento/Authorizenet/Helper/HelperInterface.php b/app/code/Magento/Authorizenet/Helper/HelperInterface.php
index cca99723160e75849d8e7fdf18474ff6fe4d412c..41534265848344704b9b8f9f69ddc748a7bfc04b 100644
--- a/app/code/Magento/Authorizenet/Helper/HelperInterface.php
+++ b/app/code/Magento/Authorizenet/Helper/HelperInterface.php
@@ -34,7 +34,7 @@ interface HelperInterface
     /**
      * Retrieve place order url
      *
-     * @param array params
+     * @param array $params
      * @return  string
      */
     public function getSuccessOrderUrl($params);
@@ -42,8 +42,16 @@ interface HelperInterface
     /**
      * Retrieve redirect ifrmae url
      *
-     * @param array params
+     * @param array $params
      * @return string
      */
     public function getRedirectIframeUrl($params);
+
+    /**
+     * Get direct post rely url
+     *
+     * @param null|int|string $storeId
+     * @return string
+     */
+    public function getRelyUrl($storeId = null);
 }
diff --git a/app/code/Magento/Paygate/Model/Authorizenet.php b/app/code/Magento/Authorizenet/Model/Authorizenet.php
similarity index 94%
rename from app/code/Magento/Paygate/Model/Authorizenet.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet.php
index 99c38647a5ca2a1cf250de0c3df59589fefdea21..e161544d1639709c193a9209c2f0403324dbf5da 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet.php
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Paygate\Model;
+namespace Magento\Authorizenet\Model;
 
 class Authorizenet extends \Magento\Payment\Model\Method\Cc
 {
@@ -86,12 +86,12 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
     /**
      * Form block type
      */
-    protected $_formBlockType = 'Magento\Paygate\Block\Authorizenet\Form\Cc';
+    protected $_formBlockType = 'Magento\Authorizenet\Block\Authorizenet\Form\Cc';
 
     /**
      * Info block type
      */
-    protected $_infoBlockType = 'Magento\Paygate\Block\Authorizenet\Info\Cc';
+    protected $_infoBlockType = 'Magento\Authorizenet\Block\Authorizenet\Info\Cc';
 
     /**
      * Availability options
@@ -151,13 +151,13 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Key for storing partial authorization last action state in session
      * @var string
      */
-    protected $_partialAuthorizationLastActionStateSessionKey = 'paygate_authorizenet_last_action_state';
+    protected $_partialAuthorizationLastActionStateSessionKey = 'authorizenet_last_action_state';
 
     /**
      * Key for storing partial authorization checksum in session
      * @var string
      */
-    protected $_partialAuthorizationChecksumSessionKey = 'paygate_authorizenet_checksum';
+    protected $_partialAuthorizationChecksumSessionKey = 'authorizenet_checksum';
 
     /**
      * Fields for creating place request checksum
@@ -184,16 +184,16 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
     );
 
     /**
-     * @var \Magento\Paygate\Model\Authorizenet\Cards
+     * @var \Magento\Authorizenet\Model\Authorizenet\Cards
      */
     protected $_cardsStorage = null;
 
     /**
-     * Paygate data
+     * Authorizenet data
      *
-     * @var \Magento\Paygate\Helper\Data
+     * @var \Magento\Authorizenet\Helper\Data
      */
-    protected $_paygateData = null;
+    protected $_authorizenetData = null;
 
     /**
      * Session
@@ -212,21 +212,21 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
     /**
      * Result factory
      *
-     * @var \Magento\Paygate\Model\Authorizenet\ResultFactory
+     * @var \Magento\Authorizenet\Model\Authorizenet\ResultFactory
      */
     protected $_resultFactory;
 
     /**
      * Request factory
      *
-     * @var \Magento\Paygate\Model\Authorizenet\RequestFactory
+     * @var \Magento\Authorizenet\Model\Authorizenet\RequestFactory
      */
     protected $_requestFactory;
 
     /**
      * Cards factory
      *
-     * @var \Magento\Paygate\Model\Authorizenet\CardsFactory
+     * @var \Magento\Authorizenet\Model\Authorizenet\CardsFactory
      */
     protected $_cardsFactory;
 
@@ -239,12 +239,12 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Centinel\Model\Service $centinelService
-     * @param \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory
-     * @param \Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory
-     * @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
+     * @param \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory
+     * @param \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory
+     * @param \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Session\SessionManagerInterface $session
-     * @param \Magento\Paygate\Helper\Data $paygateData
+     * @param \Magento\Authorizenet\Helper\Data $authorizenetData
      * @param array $data
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -258,12 +258,12 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
         \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Centinel\Model\Service $centinelService,
-        \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory,
-        \Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory,
-        \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
+        \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory,
+        \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory,
+        \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Session\SessionManagerInterface $session,
-        \Magento\Paygate\Helper\Data $paygateData,
+        \Magento\Authorizenet\Helper\Data $authorizenetData,
         array $data = array()
     ) {
         $this->_cardsFactory = $cardsFactory;
@@ -271,7 +271,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
         $this->_resultFactory = $resultFactory;
         $this->_orderFactory = $orderFactory;
         $this->_session = $session;
-        $this->_paygateData = $paygateData;
+        $this->_authorizenetData = $authorizenetData;
         parent::__construct(
             $eventManager,
             $paymentData,
@@ -382,7 +382,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Set partial authorization last action state into session
      *
      * @param string $message
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     public function setPartialAuthorizationLastActionState($state)
     {
@@ -403,7 +403,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
     /**
      * Unset partial authorization last action state in session
      *
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     public function unsetPartialAuthorizationLastActionState()
     {
@@ -416,7 +416,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      *
      * @param  \Magento\Payment\Model\Info $payment
      * @param  decimal $amount
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     public function authorize(\Magento\Object $payment, $amount)
     {
@@ -442,7 +442,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      *
      * @param \Magento\Payment\Model\Info $payment
      * @param decimal $amount
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     public function capture(\Magento\Object $payment, $amount)
     {
@@ -465,7 +465,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Void the payment through gateway
      *
      * @param  \Magento\Payment\Model\Info $payment
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     public function void(\Magento\Object $payment)
     {
@@ -499,7 +499,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Cancel the payment through gateway
      *
      * @param  \Magento\Payment\Model\Info $payment
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     public function cancel(\Magento\Object $payment)
     {
@@ -511,7 +511,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      *
      * @param \Magento\Payment\Model\Info $payment
      * @param decimal $amount
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      * @throws \Magento\Core\Exception
      */
     public function refund(\Magento\Object $payment, $requestedAmount)
@@ -600,7 +600,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * @param \Magento\Payment\Model\Info $payment
      * @param decimal $amount
      * @param string $requestType
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      * @throws \Magento\Core\Exception
      */
     protected function _place($payment, $amount, $requestType)
@@ -631,7 +631,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                     $newTransactionType,
                     array('is_transaction_closed' => 0),
                     array($this->_realTransactionIdKey => $card->getLastTransId()),
-                    $this->_paygateData->getTransactionMessage(
+                    $this->_authorizenetData->getTransactionMessage(
                         $payment, $requestType, $card->getLastTransId(), $card, $amount
                     )
                 );
@@ -654,7 +654,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                             $this->_realTransactionIdKey => $card->getLastTransId(),
                             $this->_isTransactionFraud => true
                         ),
-                        $this->_paygateData->getTransactionMessage(
+                        $this->_authorizenetData->getTransactionMessage(
                             $payment, $requestType, $card->getLastTransId(), $card, $amount
                         )
                     );
@@ -690,7 +690,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * @param \Magento\Payment\Model\Info $payment
      * @param decimal $amount
      * @param string $requestType
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     protected function _partialAuthorization($payment, $amount, $requestType)
     {
@@ -741,7 +741,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                 $newTransactionType,
                 array('is_transaction_closed' => 0),
                 array($this->_realTransactionIdKey => $card->getLastTransId()),
-                $this->_paygateData->getTransactionMessage(
+                $this->_authorizenetData->getTransactionMessage(
                     $payment, $requestType, $card->getLastTransId(), $card, $card->getProcessedAmount()
                 )
             );
@@ -781,7 +781,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      *
      * @param \Magento\Payment\Model\Info $payment
      * @param decimal $amount
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     protected function _preauthorizeCapture($payment, $requestedAmount)
     {
@@ -817,11 +817,6 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                 $card->setCapturedAmount($cardAmountForCapture);
                 $cardsStorage->updateCard($card);
                 $requestedAmount = $this->_formatAmount($requestedAmount - $cardAmountForCapture);
-            } else {
-                /**
-                 * This functional is commented because partial capture is disable. See self::_canCapturePartial.
-                 */
-                //$this->_voidCardTransaction($payment, $card);
             }
         }
 
@@ -835,9 +830,10 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Send capture request to gateway for capture authorized transactions of card
      *
      * @param \Magento\Payment\Model\Info $payment
-     * @param decimal $amount
+     * @param float $amount
      * @param \Magento\Object $card
      * @return \Magento\Sales\Model\Order\Payment\Transaction
+     * @throws \Magento\Core\Exception
      */
     protected function _preauthorizeCaptureCardTransaction($payment, $amount, $card)
     {
@@ -866,7 +862,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                             'parent_transaction_id' => $authTransactionId
                         ),
                         array($this->_realTransactionIdKey => $result->getTransactionId()),
-                        $this->_paygateData->getTransactionMessage(
+                        $this->_authorizenetData->getTransactionMessage(
                             $payment, self::REQUEST_TYPE_PRIOR_AUTH_CAPTURE, $result->getTransactionId(), $card, $amount
                         )
                     );
@@ -883,7 +879,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                 break;
         }
 
-        $exceptionMessage = $this->_paygateData->getTransactionMessage(
+        $exceptionMessage = $this->_authorizenetData->getTransactionMessage(
             $payment, self::REQUEST_TYPE_PRIOR_AUTH_CAPTURE, $realAuthTransactionId, $card, $amount, $exceptionMessage
         );
         throw new \Magento\Core\Exception($exceptionMessage);
@@ -923,7 +919,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                             'parent_transaction_id' => $authTransactionId
                         ),
                         array($this->_realTransactionIdKey => $result->getTransactionId()),
-                        $this->_paygateData->getTransactionMessage(
+                        $this->_authorizenetData->getTransactionMessage(
                             $payment, self::REQUEST_TYPE_VOID, $result->getTransactionId(), $card
                         )
                     );
@@ -946,7 +942,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                             'parent_transaction_id' => $authTransactionId
                         ),
                         array(),
-                        $this->_paygateData->getExtendedTransactionMessage(
+                        $this->_authorizenetData->getExtendedTransactionMessage(
                             $payment,
                             self::REQUEST_TYPE_VOID,
                             null,
@@ -967,7 +963,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                 break;
         }
 
-        $exceptionMessage = $this->_paygateData->getTransactionMessage(
+        $exceptionMessage = $this->_authorizenetData->getTransactionMessage(
             $payment, self::REQUEST_TYPE_VOID, $realAuthTransactionId, $card, false, $exceptionMessage
         );
         throw new \Magento\Core\Exception($exceptionMessage);
@@ -1034,7 +1030,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                             'parent_transaction_id' => $captureTransactionId
                         ),
                         array($this->_realTransactionIdKey => $result->getTransactionId()),
-                        $this->_paygateData->getTransactionMessage(
+                        $this->_authorizenetData->getTransactionMessage(
                             $payment, self::REQUEST_TYPE_CREDIT, $result->getTransactionId(), $card, $amount
                         )
                     );
@@ -1050,7 +1046,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                 break;
         }
 
-        $exceptionMessage = $this->_paygateData->getTransactionMessage(
+        $exceptionMessage = $this->_authorizenetData->getTransactionMessage(
             $payment, self::REQUEST_TYPE_CREDIT, $realCaptureTransactionId, $card, $amount, $exceptionMessage
         );
         throw new \Magento\Core\Exception($exceptionMessage);
@@ -1070,7 +1066,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Return cards storage model
      *
      * @param \Magento\Payment\Model\Info $payment
-     * @return \Magento\Paygate\Model\Authorizenet\Cards
+     * @return \Magento\Authorizenet\Model\Authorizenet\Cards
      */
     public function getCardsStorage($payment = null)
     {
@@ -1224,7 +1220,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
     /**
      * Return authorize payment request
      *
-     * @return \Magento\Paygate\Model\Authorizenet\Request
+     * @return \Magento\Authorizenet\Model\Authorizenet\Request
      */
     protected function _getRequest()
     {
@@ -1244,7 +1240,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      *
      * @link http://www.authorize.net/support/AIM_guide.pdf
      * @param \Magento\Object|\Magento\Payment\Model\Info $payment
-     * @return \Magento\Paygate\Model\Authorizenet\Request
+     * @return \Magento\Authorizenet\Model\Authorizenet\Request
      */
     protected function _buildRequest(\Magento\Object $payment)
     {
@@ -1352,8 +1348,8 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
     /**
      * Post request to gateway and return responce
      *
-     * @param \Magento\Paygate\Model\Authorizenet\Request $request)
-     * @return \Magento\Paygate\Model\Authorizenet\Result
+     * @param \Magento\Authorizenet\Model\Authorizenet\Request $request)
+     * @return \Magento\Authorizenet\Model\Authorizenet\Result
      */
     protected function _postRequest(\Magento\Object $request)
     {
@@ -1366,9 +1362,8 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
         $uri = $this->getConfigData('cgi_url');
         $client->setUri($uri ? $uri : self::CGI_URL);
         $client->setConfig(array(
-            'maxredirects'=>0,
-            'timeout'=>30,
-            //'ssltransport' => 'tcp',
+            'maxredirects' => 0,
+            'timeout' => 30,
         ));
         foreach ($request->getData() as $key => $value) {
             $request->setData($key, str_replace(self::RESPONSE_DELIM_CHAR, '', $value));
@@ -1415,8 +1410,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
                 ->setAccNumber($r[50])
                 ->setCardType($r[51])
                 ->setRequestedAmount($r[53])
-                ->setBalanceOnCard($r[54])
-                ;
+                ->setBalanceOnCard($r[54]);
         }
         else {
              throw new \Magento\Core\Exception(
@@ -1475,7 +1469,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
      * Reset assigned data in payment info model
      *
      * @param \Magento\Payment\Model\Info
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      */
     private function _clearAssignedData($payment)
     {
@@ -1488,8 +1482,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
             ->setCcExpYear(null)
             ->setCcSsIssue(null)
             ->setCcSsStartMonth(null)
-            ->setCcSsStartYear(null)
-            ;
+            ->setCcSsStartYear(null);
         return $this;
     }
 
@@ -1580,7 +1573,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
             }
             $copyOrder->save();
         }
-        throw new \Magento\Core\Exception($this->_paygateData->convertMessagesToMessage($messages));
+        throw new \Magento\Core\Exception($this->_authorizenetData->convertMessagesToMessage($messages));
     }
 
     /**
@@ -1646,8 +1639,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
         $response
             ->setResponseCode((string)$responseXmlDocument->transaction->responseCode)
             ->setResponseReasonCode((string)$responseXmlDocument->transaction->responseReasonCode)
-            ->setTransactionStatus((string)$responseXmlDocument->transaction->transactionStatus)
-        ;
+            ->setTransactionStatus((string)$responseXmlDocument->transaction->transactionStatus);
         return $response;
     }
 }
diff --git a/app/code/Magento/Paygate/Model/Authorizenet/Cards.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php
similarity index 95%
rename from app/code/Magento/Paygate/Model/Authorizenet/Cards.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php
index 522139559a88b1653e30f884a34f09a1d5bd3762..0a2a0c71a5d8e6dc44dabdabb0dac3b2d8ba2065 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet/Cards.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Cards.php
@@ -19,12 +19,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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\Paygate\Model\Authorizenet;
+namespace Magento\Authorizenet\Model\Authorizenet;
 
 class Cards
 {
@@ -52,7 +52,7 @@ class Cards
      * Set payment instance for storing credit card information and partial authorizations
      *
      * @param \Magento\Payment\Model\Info $payment
-     * @return \Magento\Paygate\Model\Authorizenet\Cards
+     * @return \Magento\Authorizenet\Model\Authorizenet\Cards
      */
     public function setPayment(\Magento\Payment\Model\Info $payment)
     {
@@ -99,7 +99,7 @@ class Cards
      * Save data from card object in cards storage
      *
      * @param \Magento\Object $card
-     * @return \Magento\Paygate\Model\Authorizenet\Cards
+     * @return \Magento\Authorizenet\Model\Authorizenet\Cards
      */
     public function updateCard($card)
     {
@@ -185,7 +185,7 @@ class Cards
     /**
      * Remove all cards from payment instance
      *
-     * @return \Magento\Paygate\Model\Authorizenet\Cards
+     * @return \Magento\Authorizenet\Model\Authorizenet\Cards
      */
     public function flushCards()
     {
diff --git a/app/code/Magento/Paygate/Model/Authorizenet/Debug.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php
similarity index 60%
rename from app/code/Magento/Paygate/Model/Authorizenet/Debug.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php
index cc956b043862443b5fa1189f5c5ebd7bf062f88e..6ac976c2157f29e8b1e5ed295b80751384deb146 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet/Debug.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Debug.php
@@ -19,38 +19,38 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
 
 
 /**
- * @method \Magento\Paygate\Model\Resource\Authorizenet\Debug _getResource()
- * @method \Magento\Paygate\Model\Resource\Authorizenet\Debug getResource()
+ * @method \Magento\Authorizenet\Model\Resource\Authorizenet\Debug _getResource()
+ * @method \Magento\Authorizenet\Model\Resource\Authorizenet\Debug getResource()
  * @method string getRequestBody()
- * @method \Magento\Paygate\Model\Authorizenet\Debug setRequestBody(string $value)
+ * @method \Magento\Authorizenet\Model\Authorizenet\Debug setRequestBody(string $value)
  * @method string getResponseBody()
- * @method \Magento\Paygate\Model\Authorizenet\Debug setResponseBody(string $value)
+ * @method \Magento\Authorizenet\Model\Authorizenet\Debug setResponseBody(string $value)
  * @method string getRequestSerialized()
- * @method \Magento\Paygate\Model\Authorizenet\Debug setRequestSerialized(string $value)
+ * @method \Magento\Authorizenet\Model\Authorizenet\Debug setRequestSerialized(string $value)
  * @method string getResultSerialized()
- * @method \Magento\Paygate\Model\Authorizenet\Debug setResultSerialized(string $value)
+ * @method \Magento\Authorizenet\Model\Authorizenet\Debug setResultSerialized(string $value)
  * @method string getRequestDump()
- * @method \Magento\Paygate\Model\Authorizenet\Debug setRequestDump(string $value)
+ * @method \Magento\Authorizenet\Model\Authorizenet\Debug setRequestDump(string $value)
  * @method string getResultDump()
- * @method \Magento\Paygate\Model\Authorizenet\Debug setResultDump(string $value)
+ * @method \Magento\Authorizenet\Model\Authorizenet\Debug setResultDump(string $value)
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Paygate\Model\Authorizenet;
+namespace Magento\Authorizenet\Model\Authorizenet;
 
 class Debug extends \Magento\Core\Model\AbstractModel
 {
     protected function _construct()
     {
-        $this->_init('Magento\Paygate\Model\Resource\Authorizenet\Debug');
+        $this->_init('Magento\Authorizenet\Model\Resource\Authorizenet\Debug');
     }
 }
diff --git a/app/code/Magento/Paygate/Model/Authorizenet/Request.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Request.php
similarity index 91%
rename from app/code/Magento/Paygate/Model/Authorizenet/Request.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet/Request.php
index b9bdc4d49209e89374bbbffd708d0f300eed14e1..a0614c0063e7338061cb917f4cef90340464cfe4 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet/Request.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Request.php
@@ -19,13 +19,13 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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\Paygate\Model\Authorizenet;
+namespace Magento\Authorizenet\Model\Authorizenet;
 
 class Request extends \Magento\Object
 {
diff --git a/app/code/Magento/Paygate/Model/Authorizenet/Result.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Result.php
similarity index 91%
rename from app/code/Magento/Paygate/Model/Authorizenet/Result.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet/Result.php
index 4965c5f3f84d4f1531f2360247656a9c8b157277..d9d078d83e6f88dc6dedf33a4db785109efffb76 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet/Result.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Result.php
@@ -19,13 +19,13 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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\Paygate\Model\Authorizenet;
+namespace Magento\Authorizenet\Model\Authorizenet;
 
 class Result extends \Magento\Object
 {
diff --git a/app/code/Magento/Paygate/Model/Authorizenet/Source/Cctype.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Source/Cctype.php
similarity index 90%
rename from app/code/Magento/Paygate/Model/Authorizenet/Source/Cctype.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet/Source/Cctype.php
index c5b475421835538199654088065078804df2e47e..07fee5595a25dcdb0760483213354ceacdd5cf85 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet/Source/Cctype.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Source/Cctype.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
@@ -28,10 +28,10 @@
  * Authorizenet Payment CC Types Source Model
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Paygate\Model\Authorizenet\Source;
+namespace Magento\Authorizenet\Model\Authorizenet\Source;
 
 class Cctype extends \Magento\Payment\Model\Source\Cctype
 {
diff --git a/app/code/Magento/Paygate/Model/Authorizenet/Source/PaymentAction.php b/app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php
similarity index 83%
rename from app/code/Magento/Paygate/Model/Authorizenet/Source/PaymentAction.php
rename to app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php
index bd4815d608bb9465bca44f2fed19c17a8bab4109..51a577d745f1405f1ce8cfbdb9c1df73b3263a36 100644
--- a/app/code/Magento/Paygate/Model/Authorizenet/Source/PaymentAction.php
+++ b/app/code/Magento/Authorizenet/Model/Authorizenet/Source/PaymentAction.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
@@ -30,7 +30,7 @@
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Paygate\Model\Authorizenet\Source;
+namespace Magento\Authorizenet\Model\Authorizenet\Source;
 
 class PaymentAction implements \Magento\Core\Model\Option\ArrayInterface
 {
@@ -38,11 +38,11 @@ class PaymentAction implements \Magento\Core\Model\Option\ArrayInterface
     {
         return array(
             array(
-                'value' => \Magento\Paygate\Model\Authorizenet::ACTION_AUTHORIZE,
+                'value' => \Magento\Authorizenet\Model\Authorizenet::ACTION_AUTHORIZE,
                 'label' => __('Authorize Only')
             ),
             array(
-                'value' => \Magento\Paygate\Model\Authorizenet::ACTION_AUTHORIZE_CAPTURE,
+                'value' => \Magento\Authorizenet\Model\Authorizenet::ACTION_AUTHORIZE_CAPTURE,
                 'label' => __('Authorize and Capture')
             ),
         );
diff --git a/app/code/Magento/Authorizenet/Model/Directpost.php b/app/code/Magento/Authorizenet/Model/Directpost.php
index c92fc25c03d0e68ab213f6909ef7e7a1639c294e..9cc9f9b879cf7e7450b0b468a48d0e49683c408b 100644
--- a/app/code/Magento/Authorizenet/Model/Directpost.php
+++ b/app/code/Magento/Authorizenet/Model/Directpost.php
@@ -27,7 +27,7 @@
  */
 namespace Magento\Authorizenet\Model;
 
-class Directpost extends \Magento\Paygate\Model\Authorizenet
+class Directpost extends \Magento\Authorizenet\Model\Authorizenet
 {
     protected $_code  = 'authorizenet_directpost';
     protected $_formBlockType = 'Magento\Authorizenet\Block\Directpost\Form';
@@ -63,6 +63,11 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
      */
     protected $_response;
 
+    /**
+     * @var \Magento\Authorizenet\Helper\HelperInterface
+     */
+    protected $_helper;
+
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Payment\Helper\Data $paymentData
@@ -72,16 +77,17 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
      * @param \Magento\Module\ModuleListInterface $moduleList
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Centinel\Model\Service $centinelService
-     * @param \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory
-     * @param \Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory
-     * @param \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory
+     * @param \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory
+     * @param \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory
+     * @param \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Session\SessionManagerInterface $session
-     * @param \Magento\Paygate\Helper\Data $paygateData
+     * @param \Magento\Authorizenet\Helper\Data $authorizenetData
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Sales\Model\QuoteFactory $quoteFactory
      * @param \Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory
      * @param \Magento\Authorizenet\Model\Directpost\Response $response
+     * @param \Magento\Authorizenet\Helper\HelperInterface $helper
      * @param array $data
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -95,16 +101,17 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
         \Magento\Module\ModuleListInterface $moduleList,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Centinel\Model\Service $centinelService,
-        \Magento\Paygate\Model\Authorizenet\CardsFactory $cardsFactory,
-        \Magento\Paygate\Model\Authorizenet\RequestFactory $requestFactory,
-        \Magento\Paygate\Model\Authorizenet\ResultFactory $resultFactory,
+        \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory,
+        \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory,
+        \Magento\Authorizenet\Model\Authorizenet\ResultFactory $resultFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Session\SessionManagerInterface $session,
-        \Magento\Paygate\Helper\Data $paygateData,
+        \Magento\Authorizenet\Helper\Data $authorizenetData,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Sales\Model\QuoteFactory $quoteFactory,
         \Magento\Authorizenet\Model\Directpost\RequestFactory $directRequestFactory,
         \Magento\Authorizenet\Model\Directpost\Response $response,
+        \Magento\Authorizenet\Helper\HelperInterface $helper,
         array $data = array()
     ) {
         parent::__construct(
@@ -121,13 +128,14 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
             $resultFactory,
             $orderFactory,
             $session,
-            $paygateData,
+            $authorizenetData,
             $data
         );
         $this->_storeManager = $storeManager;
         $this->_quoteFactory = $quoteFactory;
         $this->_requestFactory = $directRequestFactory;
         $this->_response = $response;
+        $this->_helper = $helper;
     }
 
     /**
@@ -145,7 +153,7 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
      *
      * @param  \Magento\Object $payment
      * @param  decimal $amount
-     * @return \Magento\Paygate\Model\Authorizenet
+     * @return \Magento\Authorizenet\Model\Authorizenet
      * @throws \Magento\Core\Exception
      */
     public function authorize(\Magento\Object $payment, $amount)
@@ -374,8 +382,7 @@ class Directpost extends \Magento\Paygate\Model\Authorizenet
         if ($storeId == null && $this->getStore()) {
             $storeId = $this->getStore();
         }
-        return $this->_storeManager->getStore($storeId)->getBaseUrl(\Magento\Core\Model\Store::URL_TYPE_LINK)
-            . 'authorizenet/directpost_payment/response';
+        return $this->_helper->getRelyUrl($storeId);
     }
 
     /**
diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php
index 3933a7ce5802d354afa42f2a27610ba7812dc681..bbad9a3f84ffe7003fa8f52a23e40962635bf4ee 100644
--- a/app/code/Magento/Authorizenet/Model/Directpost/Observer.php
+++ b/app/code/Magento/Authorizenet/Model/Directpost/Observer.php
@@ -135,11 +135,11 @@ class Observer
                     //if success, then set order to session and add new fields
                     $this->_session->addCheckoutOrderIncrementId($order->getIncrementId());
                     $this->_session->setLastOrderIncrementId($order->getIncrementId());
-                    $requestToPaygate = $payment->getMethodInstance()->generateRequestFromOrder($order);
-                    $requestToPaygate->setControllerActionName($request->getControllerName());
-                    $requestToPaygate->setIsSecure((string)$this->_storeManager->getStore()->isCurrentlySecure());
+                    $requestToAuthorizenet = $payment->getMethodInstance()->generateRequestFromOrder($order);
+                    $requestToAuthorizenet->setControllerActionName($request->getControllerName());
+                    $requestToAuthorizenet->setIsSecure((string)$this->_storeManager->getStore()->isCurrentlySecure());
 
-                    $result['directpost'] = array('fields' => $requestToPaygate->getData());
+                    $result['directpost'] = array('fields' => $requestToAuthorizenet->getData());
 
                     $response->clearHeader('Location');
                     $response->setBody($this->_coreData->jsonEncode($result));
diff --git a/app/code/Magento/Authorizenet/Model/Directpost/Request.php b/app/code/Magento/Authorizenet/Model/Directpost/Request.php
index 96a3ffc4fe8f8f607a116789b37bc8e1083b9569..b05a22f85c23fdea347920667b5011ab124cf845 100644
--- a/app/code/Magento/Authorizenet/Model/Directpost/Request.php
+++ b/app/code/Magento/Authorizenet/Model/Directpost/Request.php
@@ -84,7 +84,7 @@ class Request extends \Magento\Object
     }
 
     /**
-     * Set paygate data to request.
+     * Set authorizenet data to request.
      *
      * @param \Magento\Authorizenet\Model\Directpost $paymentMethod
      * @return \Magento\Authorizenet\Model\Directpost\Request
@@ -99,7 +99,7 @@ class Request extends \Magento\Object
 
         $this->setXLogin($paymentMethod->getConfigData('login'))
             ->setXType('AUTH_ONLY')
-            ->setXMethod(\Magento\Paygate\Model\Authorizenet::REQUEST_METHOD_CC)
+            ->setXMethod(\Magento\Authorizenet\Model\Authorizenet::REQUEST_METHOD_CC)
             ->setXRelayUrl($paymentMethod->getRelayUrl());
 
         $this->_setTransactionKey($paymentMethod->getConfigData('trans_key'));
diff --git a/app/code/Magento/Paygate/Model/Resource/Authorizenet/Debug.php b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php
similarity index 86%
rename from app/code/Magento/Paygate/Model/Resource/Authorizenet/Debug.php
rename to app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php
index ef1dd33e903785f07d390ac8e021657b86ce754c..74859b1d65a6bf204e974ad5f5bff515b981ab08 100644
--- a/app/code/Magento/Paygate/Model/Resource/Authorizenet/Debug.php
+++ b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
@@ -29,10 +29,10 @@
  * Resource authorizenet debug model
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Paygate\Model\Resource\Authorizenet;
+namespace Magento\Authorizenet\Model\Resource\Authorizenet;
 
 class Debug extends \Magento\Core\Model\Resource\Db\AbstractDb
 {
@@ -42,6 +42,6 @@ class Debug extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     protected function _construct()
     {
-        $this->_init('paygate_authorizenet_debug', 'debug_id');
+        $this->_init('authorizenet_debug', 'debug_id');
     }
 }
diff --git a/app/code/Magento/Paygate/Model/Resource/Authorizenet/Debug/Collection.php b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php
similarity index 80%
rename from app/code/Magento/Paygate/Model/Resource/Authorizenet/Debug/Collection.php
rename to app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php
index 314ea1ea16fa366b42493b1568bf1609c94ef6d2..4fe8b9a13ae43aa1cb25c7da1999f0e4f2948d1d 100644
--- a/app/code/Magento/Paygate/Model/Resource/Authorizenet/Debug/Collection.php
+++ b/app/code/Magento/Authorizenet/Model/Resource/Authorizenet/Debug/Collection.php
@@ -19,7 +19,7 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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)
  */
@@ -29,10 +29,10 @@
  * Resource authorizenet debug collection model
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Paygate\Model\Resource\Authorizenet\Debug;
+namespace Magento\Authorizenet\Model\Resource\Authorizenet\Debug;
 
 class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractCollection
 {
@@ -42,6 +42,9 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     protected function _construct()
     {
-        $this->_init('Magento\Paygate\Model\Authorizenet\Debug', 'Magento\Paygate\Model\Resource\Authorizenet\Debug');
+        $this->_init(
+            'Magento\Authorizenet\Model\Authorizenet\Debug',
+            'Magento\Authorizenet\Model\Resource\Authorizenet\Debug'
+        );
     }
 }
diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/di.xml b/app/code/Magento/Authorizenet/etc/adminhtml/di.xml
index 086851f3e2f400f7d761401b0b54c125b4737e57..141029ad7cd4f01ce9fb8abdc4a37718f06bb257 100644
--- a/app/code/Magento/Authorizenet/etc/adminhtml/di.xml
+++ b/app/code/Magento/Authorizenet/etc/adminhtml/di.xml
@@ -35,4 +35,9 @@
             <instance type="Magento\Backend\Model\Session\Quote" />
         </param>
     </type>
+    <type name="Magento\Authorizenet\Model\Authorizenet">
+        <param name="session">
+            <instance type="Magento\Backend\Model\Session\Quote" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Authorizenet/etc/adminhtml/system.xml b/app/code/Magento/Authorizenet/etc/adminhtml/system.xml
index ba782007e3e5f7b6da10988f4a9a0b193a05c816..a32dd7a97cef189c5a9cddbfa3206732feeaa27b 100644
--- a/app/code/Magento/Authorizenet/etc/adminhtml/system.xml
+++ b/app/code/Magento/Authorizenet/etc/adminhtml/system.xml
@@ -28,6 +28,112 @@
 <config>
     <system>
         <section id="payment">
+            <group id="authorizenet" translate="label" type="text" sortOrder="34" showInDefault="1" showInWebsite="1" showInStore="1">
+                <label>Authorize.net</label>
+                <comment>
+                    <![CDATA[<a href="http://celinks.magento.com/authorize_netRegistration" target="_blank">Click here to sign up for an Authorize.net account</a>]]>
+                </comment>
+                <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Enabled</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="cctypes" translate="label" type="multiselect" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Credit Card Types</label>
+                    <source_model>Magento\Authorizenet\Model\Authorizenet\Source\Cctype</source_model>
+                </field>
+                <field id="useccv" translate="label" type="select" sortOrder="16" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Credit Card Verification</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="email_customer" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Email Customer</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="login" translate="label" type="obscure" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>API Login ID</label>
+                    <backend_model>Magento\Backend\Model\Config\Backend\Encrypted</backend_model>
+                </field>
+                <field id="merchant_email" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Merchant's Email</label>
+                    <validate>validate-email</validate>
+                </field>
+                <field id="order_status" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>New Order Status</label>
+                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\Processing</source_model>
+                </field>
+                <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Sort Order</label>
+                </field>
+                <field id="test" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Test Mode</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="debug" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Debug</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
+                    <label>Title</label>
+                </field>
+                <field id="trans_key" translate="label" type="obscure" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Transaction Key</label>
+                    <backend_model>Magento\Backend\Model\Config\Backend\Encrypted</backend_model>
+                </field>
+                <field id="payment_action" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Payment Action</label>
+                    <source_model>Magento\Authorizenet\Model\Authorizenet\Source\PaymentAction</source_model>
+                </field>
+                <field id="cgi_url" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Gateway URL</label>
+                </field>
+                <field id="currency" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Accepted Currency</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Currency</source_model>
+                </field>
+                <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Payment from Applicable Countries</label>
+                    <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
+                </field>
+                <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Payment from Specific Countries</label>
+                    <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
+                </field>
+                <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Minimum Order Total</label>
+                </field>
+                <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Maximum Order Total</label>
+                </field>
+                <field id="allow_partial_authorization" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0">
+                    <label>Allow Partial Authorization</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="heading_3dsecure" translate="label" sortOrder="120" showInDefault="1" showInWebsite="1">
+                    <label>3D Secure</label>
+                    <frontend_model>Magento\Backend\Block\System\Config\Form\Field\Heading</frontend_model>
+                </field>
+                <field id="centinel" translate="label" type="select" sortOrder="125" showInDefault="1" showInWebsite="1">
+                    <label>3D Secure Card Validation</label>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                </field>
+                <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="130" showInDefault="1" showInWebsite="1">
+                    <label>Severe 3D Secure Card Validation</label>
+                    <comment>Severe Validation Removes Chargeback Liability on Merchant</comment>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                    <depends>
+                        <field id="centinel">1</field>
+                    </depends>
+                </field>
+                <field id="centinel_api_url" translate="label comment" type="text" sortOrder="135" showInDefault="1" showInWebsite="1">
+                    <label>Centinel API URL</label>
+                    <comment>If you leave this empty, we'll use a default value. The custom URL may be provided by CardinalCommerce agreement.</comment>
+                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
+                    <depends>
+                        <field id="centinel">1</field>
+                    </depends>
+                </field>
+                <field id="model"></field>
+            </group>
             <group id="authorizenet_directpost" translate="label" type="text" sortOrder="34" showInDefault="1" showInWebsite="1" showInStore="1">
                 <label>Authorize.net Direct Post</label>
                 <field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
@@ -36,7 +142,7 @@
                 </field>
                 <field id="payment_action" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Payment Action</label>
-                    <source_model>Magento\Paygate\Model\Authorizenet\Source\PaymentAction</source_model>
+                    <source_model>Magento\Authorizenet\Model\Authorizenet\Source\PaymentAction</source_model>
                 </field>
                 <field id="title" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Title</label>
@@ -82,7 +188,7 @@
                 </field>
                 <field id="cctypes" translate="label" type="multiselect" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Credit Card Types</label>
-                    <source_model>Magento\Paygate\Model\Authorizenet\Source\Cctype</source_model>
+                    <source_model>Magento\Authorizenet\Model\Authorizenet\Source\Cctype</source_model>
                 </field>
                 <field id="useccv" translate="label" type="select" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Credit Card Verification</label>
diff --git a/app/code/Magento/Authorizenet/etc/config.xml b/app/code/Magento/Authorizenet/etc/config.xml
index def38c0c098b60191b046f28cf337c92d33b2019..22052ced24ce7af581e436b2a7942ec841bd4fee 100644
--- a/app/code/Magento/Authorizenet/etc/config.xml
+++ b/app/code/Magento/Authorizenet/etc/config.xml
@@ -28,6 +28,24 @@
 <config>
     <default>
         <payment>
+            <authorizenet>
+                <active>0</active>
+                <cctypes>AE,VI,MC,DI</cctypes>
+                <cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url>
+                <debug>0</debug>
+                <email_customer>0</email_customer>
+                <login backend_model="Magento\Backend\Model\Config\Backend\Encrypted" />
+                <merchant_email />
+                <model>Magento\Authorizenet\Model\Authorizenet</model>
+                <order_status>processing</order_status>
+                <payment_action>authorize</payment_action>
+                <test>1</test>
+                <title>Credit Card (Authorize.net)</title>
+                <trans_key backend_model="Magento\Backend\Model\Config\Backend\Encrypted" />
+                <allowspecific>0</allowspecific>
+                <currency>USD</currency>
+                <partial_authorization_checksum_checking>1</partial_authorization_checksum_checking>
+            </authorizenet>
             <authorizenet_directpost>
                 <active>0</active>
                 <cctypes>AE,VI,MC,DI</cctypes>
diff --git a/app/code/Magento/Authorizenet/etc/frontend/di.xml b/app/code/Magento/Authorizenet/etc/frontend/di.xml
index e1e10c1082476b6ba1d9687109ed70da5c2db111..1d95c6e9a7cf4b29e42ac6e6dae0f99bb517cd58 100644
--- a/app/code/Magento/Authorizenet/etc/frontend/di.xml
+++ b/app/code/Magento/Authorizenet/etc/frontend/di.xml
@@ -35,4 +35,16 @@
             <instance type="Magento\Checkout\Model\Session" />
         </param>
     </type>
+    <type name="Magento\Core\Model\Url\SecurityInfo">
+        <param name="secureUrlList">
+            <value>
+                <authorizenet>/authorizenet/payment</authorizenet>
+            </value>
+        </param>
+    </type>
+    <type name="Magento\Authorizenet\Model\Authorizenet">
+        <param name="session">
+            <instance type="Magento\Checkout\Model\Session" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Authorizenet/etc/module.xml b/app/code/Magento/Authorizenet/etc/module.xml
index 334d684477e87b5ffbbd1e9de34702834ce8914e..234b9d91e631ea79bda991cad557f9e221b3ce70 100755
--- a/app/code/Magento/Authorizenet/etc/module.xml
+++ b/app/code/Magento/Authorizenet/etc/module.xml
@@ -26,12 +26,10 @@
 <config>
     <module name="Magento_Authorizenet" version="1.5.0.0" active="true">
         <sequence>
-            <module name="Magento_Paygate"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Checkout"/>
         </sequence>
         <depends>
-            <module name="Magento_Paygate"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Checkout"/>
             <module name="Magento_Backend"/>
@@ -39,6 +37,7 @@
             <module name="Magento_Payment"/>
             <module name="Magento_Theme"/>
             <module name="Magento_Centinel"/>
+            <module name="Magento_Catalog"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Authorizenet/i18n/de_DE.csv b/app/code/Magento/Authorizenet/i18n/de_DE.csv
index 6bbba3e22c76f1b3fa1badabb78f37fb8217c716..67ff79e8b55ea33f404390cd0cb0673bed7d84b5 100644
--- a/app/code/Magento/Authorizenet/i18n/de_DE.csv
+++ b/app/code/Magento/Authorizenet/i18n/de_DE.csv
@@ -1,40 +1,100 @@
 "--Please Select--","--Bitte wählen--"
+"3D Secure","3D Secure"
+"3D Secure Card Validation","3D Secure-Kartenbestätigung"
 "API Login ID","API Login ID"
+"API Login ID","API Login-ID"
 "Accepted Currency","Akzeptierte Währung"
+"Allow Partial Authorization","Teilweise Autorisierung erlauben"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Sind Sie sicher, dass Sie die Zahlung abbrechen möchten? Klicken Sie auf OK, um Ihre Zahlung abzubrechen und den Betrag wieder frei verfügbar zu machen. Klicken Sie auf Abbrechen, um eine andere Kreditkarte anzugeben und mit der Zahlung fortzufahren."
+"Authorize Only","Nur genehmigen"
+"Authorize and Capture","Genehmigen und erfassen"
+"Authorize.Net Transaction ID %s","Authorize.Net Transaktions-ID %s"
+"Authorize.net","Genehmigen.net"
 "Authorize.net Direct Post","Authorize.net Direktpost"
+"Cancel","Abbrechen"
 "Card Verification Number","Kreditkartenprüfnummer"
 "Card Verification Number Visual Reference","Kartenprüfnummer Sichtmerkmale"
+"Centinel API URL","Centinel API-URL"
 "Close","Schließen"
 "Credit Card Information","Kreditkarteninformationen"
 "Credit Card Number","Kreditkartennummer"
 "Credit Card Type","Kreditkartentyp"
 "Credit Card Types","Kreditkartentypen"
+"Credit Card Types","Arten von Kreditkarten"
 "Credit Card Verification","Kreditkarten-Verifizierung"
+"Credit Card Verification","Überprüfung der Kreditkarte"
+"Credit Card: xxxx-%s","Kreditkarte: xxxx-%s"
+"Debug","Debug"
 "Debug","Fehlerbeseitigung"
 "Email Customer","Kunden-Email"
+"Email Customer","Kunden E-Mail"
 "Enabled","Aktiviert"
+"Error in payment gateway.","Fehler beim Payment Gateway."
 "Expiration Date","Ablaufdatum"
 "Gateway URL","Gateway URL"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Gateway-Aktionen wurden gesperrt, weil der Gateway eine oder mehrere Transaktionen nicht verarbeiten konnte. Bitte loggen Sie sich in Ihren Authorize.Net-Account ein, um dieses Problem manuell zu beheben."
+"Gateway error: %s","Fehler des Gateway: %s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Es wird ein Standardwert verwendet, falls das Feld freigelassen wird. Eine benutzerdefinierte URL darf nach der CardinalCommerce-Vereinbarung angegeben werden."
+"Invalid amount for authorization.","Ungültiger Betrag um genehmigt zu werden."
+"Invalid amount for capture.","Ungültiger Betrag für die Erfassung."
+"Invalid amount for partial authorization.","Ungültiger Betrag für die teilweise Autorisierung."
+"Invalid amount for refund.","Ungültiger Betrag für eine Rückerstattung."
+"Invalid split tenderId ID.","Ungültige gespaltene Angebotsidentität"
 "Maximum Order Total","Maximale Bestellung Total"
+"Maximum Order Total","Höchstsumme der Bestellung"
 "Merchant MD5","Händler MD5"
 "Merchant's Email","Händler-Email"
+"Merchant's Email","E-Mail des Händlers"
+"Minimum Order Total","Mindestsumme der Bestellung"
 "Minimum Order Total","Minimale Bestellung Total"
+"New Order Status","Stand der neuen Bestellung"
 "New Order Status","Neuer Bestellstatus"
 "Order saving error: %s","Fehler beim Speichern der Order:"
 "Payment Action","Zahlungsaktion"
+"Payment Action","Zahlungsvorgang"
 "Payment authorization error.","Fehler bei der Zahlungsermächtigung."
 "Payment authorization error. Transacion id is empty.","Fehler bei der Zahlungsbestätigung. Transaktions-ID ist leer."
+"Payment canceling error.","Fehler bei Zahlungsabbruch."
+"Payment capturing error.","Fehler bei Zahlungserfassung."
 "Payment error. Order was not found.","Zahlungsfehler. Bestellung konnte nicht gefunden werden."
 "Payment error. Paid amount doesn\'t match the order amount.","Zahlungsfehler. Gezahlter Betrag entspricht nicht dem Rechnungsbetrag."
+"Payment from Applicable Countries","Bezahlung aus den entsprechenden Ländern"
 "Payment from Applicable Countries","Zahlung aus geeigneten Ländern"
 "Payment from Specific Countries","Zahlung  aus spezifischen Ländern"
+"Payment from Specific Countries","Bezahlung aus bestimmten Ländern"
+"Payment partial authorization error.","Fehler bei teilweiser Autorisierung."
+"Payment refunding error.","Fehler bei der Rückerstattung."
+"Payment updating error.","Fehler beim Zahlungsupdate."
+"Payment voiding error.","Fehler beim Stornieren der Zahlung."
 "Please, choose payment method","Bitte wählen Sie die Zahlungsmethode"
+"Processed Amount","Bearbeiteter Betrag"
+"Remaining Balance","Verbleibender Betrag"
 "Response hash validation failed. Transaction declined.","Überprüfung der Zahlungsfähigkeit fehlgeschlagen. Transaktion abgelehnt."
+"Severe 3D Secure Card Validation","Strenge Absicherung der 3D geschützten Karte"
+"Severe Validation Removes Chargeback Liability on Merchant","Die bestehende strenge Absicherung entzieht den Verkäufer der Verbindlichkeit Ausgleichsbuchungen nachkommen zu müssen"
+"Shopping cart contents and/or address has been changed.","Artikel im Einkaufswagen und/oder die Adresse wurden geändert."
+"Sort Order","Sortierreihenfolge"
 "Sort Order","Sortierfolge"
 "Test Mode","Testmodus"
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","Der Betrag auf Ihrer Kreditkarte reicht nicht aus, um den Kauf durchzuführen. Auf den verfügbaren Betrag kann nicht zugegriffen werden. Um den Kauf durchzuführen, klicken Sie bitte auf OK und geben Sie eine weitere Kreditkartennummer an. Um den Kauf abzubrechen und auf den Betrag wieder zugreifen zu können, klicken Sie bitte auf Abbrechen."
 "The order has been created.","Die Bestellung wurde aufgenommen."
+"There was an error canceling transactions. Please contact us or try again later.","Es ist ein Fehler beim Abbruch der Transaktion aufgetreten. Bitte kontaktieren Sie uns oder probieren Sie es später noch einmal."
 "There was an error processing your order. Please contact us or try again later.","Bei der Bearbeitung Ihrer Bestellung ist ein Fehler aufgetreten. Bitte kontaktieren Sie uns oder versuchen Sie es später noch einmal."
 "Title","Titel"
 "Transaction Key","Transaktionsschlüssel"
+"Transaction Key","Transaction key"
 "What is this?","Was ist das?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","Sie haben die maximale Anzahl an Kreditkarten erreicht, die Sie für die Bezahlung verwenden dürfen."
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Sie haben die maximale Anzahl an Kreditkarten erreicht, die Sie für eine Bezahlung verwenden dürfen. Die verfügbaren Beträge auf allen verwendeten Karten reichten nicht aus, um die Bezahlung abschließen zu können. Der Zahlungsprozess wurde abgebrochen und die Beträge sind wieder frei verfügbar."
 "You will be required to enter your payment details before you place an order.","Bevor Sie eine Bestellung aufgeben können, müssen Sie Ihre Zahlungsdetails angeben."
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Ihre Kredtikarte wurde abgelehnt. Klicken Sie OK, um eine andere Kreditkarte anzugeben, damit Sie den Zahlungsvorgang abschließen können. Klicken Sie auf Abbrechen, um den verwendeten Betrag wieder verfügbar zu machen und eine andere Zahlungsmethode auszuwählen."
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Ihre Bestellung wurde nicht aufgegeben, weil Artikel in Ihrem Einkaufswagen und/oder die Adresse geändert wurden. Bereits autorisierte, ausstehende Beträge von Ihrer vorherigen Zahlung sind wieder frei verfügbar. Bitte führen Sie den Zahlungsvorgang noch einmal durch, um Ihre neu hinzugekommenen Artikel zu erfassen."
+"Your payment has been cancelled. All authorized amounts have been released.","Ihre Zahlung wurde abgebrochen. Alle autorisierten Beträge sind wieder frei verfügbar."
+"amount %s","Betrag %s"
+"authorize","Autorisieren"
+"authorize and capture","Autorisieren und Erfassen"
+"capture","Erfassen"
+"failed","fehlgeschlagen"
+"refund","Rückerstattung"
+"successful","erfolgreich"
+"void","ungültig"
diff --git a/app/code/Magento/Authorizenet/i18n/en_US.csv b/app/code/Magento/Authorizenet/i18n/en_US.csv
index 51350e2a24192ad0ba108a02244f94e355b2dfa9..a9125d4bedd09874fb21d4a6dcfa07ccf9280dfd 100644
--- a/app/code/Magento/Authorizenet/i18n/en_US.csv
+++ b/app/code/Magento/Authorizenet/i18n/en_US.csv
@@ -1,20 +1,40 @@
 "--Please Select--","--Please Select--"
+"3D Secure","3D Secure"
+"3D Secure Card Validation","3D Secure Card Validation"
 "API Login ID","API Login ID"
 "Accepted Currency","Accepted Currency"
+"Allow Partial Authorization","Allow Partial Authorization"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment."
+"Authorize Only","Authorize Only"
+"Authorize and Capture","Authorize and Capture"
+"Authorize.Net Transaction ID %s","Authorize.Net Transaction ID %s"
+"Authorize.net","Authorize.net"
 "Authorize.net Direct Post","Authorize.net Direct Post"
+"Cancel","Cancel"
 "Card Verification Number","Card Verification Number"
 "Card Verification Number Visual Reference","Card Verification Number Visual Reference"
+"Centinel API URL","Centinel API URL"
 "Close","Close"
 "Credit Card Information","Credit Card Information"
 "Credit Card Number","Credit Card Number"
 "Credit Card Type","Credit Card Type"
 "Credit Card Types","Credit Card Types"
 "Credit Card Verification","Credit Card Verification"
+"Credit Card: xxxx-%s","Credit Card: xxxx-%s"
 "Debug","Debug"
 "Email Customer","Email Customer"
 "Enabled","Enabled"
+"Error in payment gateway.","Error in payment gateway."
 "Expiration Date","Expiration Date"
 "Gateway URL","Gateway URL"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s)."
+"Gateway error: %s","Gateway error: %s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement."
+"Invalid amount for authorization.","Invalid amount for authorization."
+"Invalid amount for capture.","Invalid amount for capture."
+"Invalid amount for partial authorization.","Invalid amount for partial authorization."
+"Invalid amount for refund.","Invalid amount for refund."
+"Invalid split tenderId ID.","Invalid split tenderId ID."
 "Maximum Order Total","Maximum Order Total"
 "Merchant MD5","Merchant MD5"
 "Merchant's Email","Merchant's Email"
@@ -24,17 +44,43 @@
 "Payment Action","Payment Action"
 "Payment authorization error.","Payment authorization error."
 "Payment authorization error. Transacion id is empty.","Payment authorization error. Transacion id is empty."
+"Payment canceling error.","Payment canceling error."
+"Payment capturing error.","Payment capturing error."
 "Payment error. Order was not found.","Payment error. Order was not found."
 "Payment error. Paid amount doesn\'t match the order amount.","Payment error. Paid amount doesn\'t match the order amount."
 "Payment from Applicable Countries","Payment from Applicable Countries"
 "Payment from Specific Countries","Payment from Specific Countries"
+"Payment partial authorization error.","Payment partial authorization error."
+"Payment refunding error.","Payment refunding error."
+"Payment updating error.","Payment updating error."
+"Payment voiding error.","Payment voiding error."
 "Please, choose payment method","Please, choose payment method"
+"Processed Amount","Processed Amount"
+"Remaining Balance","Remaining Balance"
 "Response hash validation failed. Transaction declined.","Response hash validation failed. Transaction declined."
+"Severe 3D Secure Card Validation","Severe 3D Secure Card Validation"
+"Severe Validation Removes Chargeback Liability on Merchant","Severe Validation Removes Chargeback Liability on Merchant"
+"Shopping cart contents and/or address has been changed.","Shopping cart contents and/or address has been changed."
 "Sort Order","Sort Order"
 "Test Mode","Test Mode"
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel."
 "The order has been created.","The order has been created."
+"There was an error canceling transactions. Please contact us or try again later.","There was an error canceling transactions. Please contact us or try again later."
 "There was an error processing your order. Please contact us or try again later.","There was an error processing your order. Please contact us or try again later."
 "Title","Title"
 "Transaction Key","Transaction Key"
 "What is this?","What is this?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","You have reached the maximum number of credit card allowed to be used for the payment."
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released."
 "You will be required to enter your payment details before you place an order.","You will be required to enter your payment details before you place an order."
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method."
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents."
+"Your payment has been cancelled. All authorized amounts have been released.","Your payment has been cancelled. All authorized amounts have been released."
+"amount %s","amount %s"
+"authorize","authorize"
+"authorize and capture","authorize and capture"
+"capture","capture"
+"failed","failed"
+"refund","refund"
+"successful","successful"
+"void","void"
diff --git a/app/code/Magento/Authorizenet/i18n/es_ES.csv b/app/code/Magento/Authorizenet/i18n/es_ES.csv
index 0a043dd9693afccca124df7f2acfef2c895d63f2..efd2121126e371f62ab53ff38e97483f21fd3548 100644
--- a/app/code/Magento/Authorizenet/i18n/es_ES.csv
+++ b/app/code/Magento/Authorizenet/i18n/es_ES.csv
@@ -1,40 +1,99 @@
 "--Please Select--","--Por favor, seleccione-"
+"3D Secure","3D Secure"
+"3D Secure Card Validation","Validación de Tarjeta 3D Secure"
+"API Login ID","ID de inicio de sesión en API"
 "API Login ID","Id. de inicio de sesión de API"
+"Accepted Currency","Moneda aceptada"
 "Accepted Currency","Moneda Aceptada"
+"Allow Partial Authorization","Permitir Autorización Parcial"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","¿Está seguro de que desea cancelar su pago? Pinche en Aceptar para cancelar el pago y liberar la cantidad retenida. Pinche en ""Cancelar"" para introducir otra tarjeta de crédito y continuar con su pago."
+"Authorize Only","Sólo autorizar"
+"Authorize and Capture","Autorizar y capturar"
+"Authorize.Net Transaction ID %s","Identificación de la Transacción %s Authorize.Net"
+"Authorize.net","Authorize.net"
 "Authorize.net Direct Post","Enlace directo a authorize.net"
+"Cancel","Cancelar"
 "Card Verification Number","Número de Verificación de Tarjeta"
 "Card Verification Number Visual Reference","Referencia visual del número de verificación de tarjeta"
+"Centinel API URL","Centinel API URL"
 "Close","Cerrar"
 "Credit Card Information","Información de la tarjeta de crédito"
 "Credit Card Number","Número de Tarjeta de Crédito"
 "Credit Card Type","Tipo de Tarjeta de Crédito"
 "Credit Card Types","Tipos de Tarjeta de Crédito"
+"Credit Card Types","Tipos de tarjeta de crédito"
 "Credit Card Verification","Verificación de Tarjeta de Crédito"
+"Credit Card Verification","Verificación de tarjeta de crédito"
+"Credit Card: xxxx-%s","Tarjeta de Crédito: xxxx-%s"
 "Debug","Depurar"
 "Email Customer","Cliente de correo"
+"Email Customer","Enviar mensaje de correo electrónico al cliente"
 "Enabled","Habilitado"
+"Error in payment gateway.","Error en el proceso de pago."
 "Expiration Date","Fecha de Caducidad"
 "Gateway URL","URL de la puerta de enlace"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Las acciones de Gateway se han bloqueadas ya que gateway no puede completar una o varias transacciones. Por favor, inicie sesión manualmente en su cuenta Authorize.Net para resolver el/los problema/s."
+"Gateway error: %s","Error de proceso: %s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Al dejarlo en blanco, se utilizará un valor por defecto. Se puede proporcionar un URL personalizado por el acuerdo CardinalCommerce."
+"Invalid amount for authorization.","Monto no válido para la autorización."
+"Invalid amount for capture.","Cantidad para retención no válida."
+"Invalid amount for partial authorization.","Cantidad de autorización parcial no válida."
+"Invalid amount for refund.","Cantidad de reembolso no válida."
+"Invalid split tenderId ID.","La identificación tenderId no se puede separar."
+"Maximum Order Total","Total máximo de pedido"
 "Maximum Order Total","Total del pedido máximo"
 "Merchant MD5","MD5 del comerciante"
 "Merchant's Email","Email del comerciante"
+"Merchant's Email","Correo electrónico del vendedor"
+"Minimum Order Total","Total mínimo de pedido"
 "Minimum Order Total","Total del pedido mínimo"
 "New Order Status","Estado de los nuevos pedidos"
+"New Order Status","Nuevo estado de pedido"
 "Order saving error: %s","Error al guardar el pedido: %s"
+"Payment Action","Acción de pago"
 "Payment Action","Acción de Pago"
+"Payment authorization error.","Error de autorización de pago."
 "Payment authorization error.","Error en la autorización de pago."
 "Payment authorization error. Transacion id is empty.","Error de autorización del pago. El identificador de transacción está vacío."
+"Payment canceling error.","Error en el pago de cancelación."
+"Payment capturing error.","Error en el pago de retención."
 "Payment error. Order was not found.","Error de pago. No se encontró el pedido."
 "Payment error. Paid amount doesn\'t match the order amount.","Error de pago. El importe pagado no coincide con el importe del pedido."
+"Payment from Applicable Countries","Pago desde países aceptados"
 "Payment from Applicable Countries","Pago desde países aplicables"
 "Payment from Specific Countries","Pago desde países específicos"
+"Payment partial authorization error.","Error en el pago parcial de la autorización."
+"Payment refunding error.","Error en el pago de reembolso."
+"Payment updating error.","Error de actualización del pago."
+"Payment voiding error.","Error en la anulación del pago."
 "Please, choose payment method","Seleccione un método de pago"
+"Processed Amount","Cantidad Procesada"
+"Remaining Balance","Saldo Restante"
 "Response hash validation failed. Transaction declined.","Fallo de validación del hash de respuesta. Se rechazó la transacción."
+"Severe 3D Secure Card Validation","Validación de Tarjeta Severe 3D Secure"
+"Severe Validation Removes Chargeback Liability on Merchant","La Validación Severe Suprime la Responsabilidad de Cancelación de Cargo del Comerciante"
+"Shopping cart contents and/or address has been changed.","El contenido de la cesta de compra y/o la dirección han cambiado."
 "Sort Order","Orden de selección"
+"Sort Order","Ordenar Pedido"
 "Test Mode","Modo de prueba"
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","No tiene suficiente dinero en su tarjeta de crédito para completar la compra. El dinero disponible ha sido retenido. Para completar la compra, pulse OK y especifique un número de tarjeta de crédito adicional. Para cancelar la compra y liberar el dinero retenido, pulse Cancelar."
 "The order has been created.","Se ha creado el pedido."
+"There was an error canceling transactions. Please contact us or try again later.","Ha habido un error en la cancelación de las transacciones. Por favor, póngase en contacto con nosotros o inténtelo más tarde de nuevo."
 "There was an error processing your order. Please contact us or try again later.","Se produjo un error en el proceso de su pedido. Contacte con nosotros o inténtelo más tarde."
 "Title","Título"
 "Transaction Key","Clave de transacción"
 "What is this?","¿Qué es esto?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","Ha alcanzado el máximo permitido por su tarjeta de crédito para efectuar el pago."
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Ha alcanzado el número máximo de tarjetas de crédito que se pueden usar para un solo pago. El dinero disponible en todas las tarjetas usadas era insuficiente para completar el pago. El pago se ha cancelado y el dinero retenido se ha liberado."
 "You will be required to enter your payment details before you place an order.","Se le solicitará que introduzca los detalles de pago antes de realizar un pedido."
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Su tarjeta de crédito se ha rechazado. Pulse OK para especificar otra tarjeta de crédito para completar la compra. Pulse Cancelar para liberar el dinero retenido y seleccionar otra forma de pago."
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Su orden no ha sido cursada, porque el contenido de la cesta de la compra y/o la dirección se han cambiado. El dinero autorizado en su pago previo, como adelanto, ahora lo tiene disponible. Por favor, revise el proceso de pago para su pedido reciente."
+"Your payment has been cancelled. All authorized amounts have been released.","Su pago se ha cancelado. Dispone de todo el dinero que había avanzado."
+"amount %s","dinero %s"
+"authorize","autorizar"
+"authorize and capture","autorizar y capturar"
+"capture","capturar"
+"failed","error"
+"refund","reembolso"
+"successful","exitoso"
+"void","vacío"
diff --git a/app/code/Magento/Authorizenet/i18n/fr_FR.csv b/app/code/Magento/Authorizenet/i18n/fr_FR.csv
index 4a92cad719ada27d1f32e44c25eb5eac3a2ca18d..f5d73e48bdeab5d055c5577efecd10193a8032c2 100644
--- a/app/code/Magento/Authorizenet/i18n/fr_FR.csv
+++ b/app/code/Magento/Authorizenet/i18n/fr_FR.csv
@@ -1,40 +1,100 @@
 "--Please Select--","--Veuillez choisir--"
+"3D Secure","Sécurité 3D"
+"3D Secure Card Validation","Validation de carte sécurité 3D"
+"API Login ID","Identifiant de l'API"
 "API Login ID","ID de connexion de l'API"
+"Accepted Currency","Monnaie acceptée"
 "Accepted Currency","Devise acceptée"
+"Allow Partial Authorization","Permettre autorisation partielle"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Etes-vous sûr de vouloir annuler votre paiement ?  Cliquez sur OK pour annuler le paiement et débloquer le montant en attente. Cliquez sur Quitter pour entrer une autre carte bancaire et continuer le paiemetn."
+"Authorize Only","Autoriser uniquement"
+"Authorize and Capture","Autoriser et enregistrer"
+"Authorize.Net Transaction ID %s","Identifiant de transaction %s Authorize.Net"
+"Authorize.net","Authorize.net"
 "Authorize.net Direct Post","Enregistrement direct Authorize.net"
+"Cancel","Annuler"
 "Card Verification Number","Numéro de vérification de la carte"
 "Card Verification Number Visual Reference","Référence visuelle du numéro de vérification de la carte"
+"Centinel API URL","URP API Centinel"
 "Close","Fermer"
 "Credit Card Information","Renseignements sur la carte de crédit"
 "Credit Card Number","Numéro de carte de crédit"
 "Credit Card Type","Type de carte de crédit"
 "Credit Card Types","Types de cartes de crédit"
 "Credit Card Verification","Vérification de la carte de crédit"
+"Credit Card: xxxx-%s","Carte de crédit : xxxx-%s"
 "Debug","Déboguer"
+"Email Customer","Envoyer un email au client"
 "Email Customer","Envoyer un courriel au client"
+"Enabled","Activé"
 "Enabled","Actif"
+"Error in payment gateway.","Erreur dans le transfert du paiement."
 "Expiration Date","Date d'expiration"
 "Gateway URL","URL passerelle"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Les actions de passerelle sont verouillées car la passerelle ne peut pas compléter une ou plusieurs transactions. Veuillez vous connecter à Authorize.net pour résoudre manuellement le problème."
+"Gateway error: %s","Erreur de la passerelle : %s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Si vide, une valeur par défaut sera utilisée. Une URL personnalisée peut être fournie par CardinalCommerce."
+"Invalid amount for authorization.","Montant invalide pour autorisation."
+"Invalid amount for capture.","Montant invalide"
+"Invalid amount for partial authorization.","Montant invalide pour l'autorisation partielle"
+"Invalid amount for refund.","Montant invalide pour un remboursement"
+"Invalid split tenderId ID.","Identifiant invalide"
 "Maximum Order Total","Total maximal de la commande"
+"Maximum Order Total","Montant total maximum"
 "Merchant MD5","MD5 du commerçant"
+"Merchant's Email","Email du marchand"
 "Merchant's Email","Courriel du commerçant"
 "Minimum Order Total","Total minimal de la commande"
+"Minimum Order Total","Montant total minimum"
+"New Order Status","Nouveau statut de la commande"
 "New Order Status","Nouveau statut commande"
 "Order saving error: %s","Erreur enregistrement commande : %s"
 "Payment Action","Action de paiement"
+"Payment Action","Paiement"
 "Payment authorization error.","Erreur autorisation de paiement."
+"Payment authorization error.","Erreur d'autorisation du paiement."
 "Payment authorization error. Transacion id is empty.","Erreur d'autorisation de paiement. L'id de transaction est vide."
+"Payment canceling error.","Erreur dans l'annulation du paiement."
+"Payment capturing error.","Erreur lors de la saisie du paiement"
 "Payment error. Order was not found.","Erreur de paiement. La commande n'a pas été trouvée."
 "Payment error. Paid amount doesn\'t match the order amount.","Erreur de paiement. Le montant payé ne correspond pas au montant de la commande."
 "Payment from Applicable Countries","Paiement depuis les pays applicables"
+"Payment from Applicable Countries","Paiement depuis les pays disponibles."
 "Payment from Specific Countries","Paiement depuis les pays spécifiques"
+"Payment partial authorization error.","Erreur de l'autorisation partielle du paiement"
+"Payment refunding error.","Erreur de remboursement du paiement"
+"Payment updating error.","Erreur lors de la mise à jour du paiement."
+"Payment voiding error.","Erreur annulant le paiement"
 "Please, choose payment method","Veuillez choisir une méthode de paiement"
+"Processed Amount","Montant réalisé"
+"Remaining Balance","Balance restante"
 "Response hash validation failed. Transaction declined.","Réponse la validation de hachage a échoué. Transaction refusée."
+"Severe 3D Secure Card Validation","Validation de carte sécurité 3D sévère"
+"Severe Validation Removes Chargeback Liability on Merchant","Validation sévère supprime le risque de remboursement pour le vendeur"
+"Shopping cart contents and/or address has been changed.","Le contenu du panier et/ou l'adresse ont été changés."
+"Sort Order","Trier les widgets"
 "Sort Order","Trier la commande"
 "Test Mode","Mode test"
+"Test Mode","Mode test."
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","Le montant disponible sur votre carte de crédit est insuffisant pour pouvoir finaliser votre commande. Le montant disponible a été mis en attente. Pour finaliser votre commande, cliquez sur OK et indiquez le numéro d'une autre carte de crédit. Pour annuler la commande et débloquer le montant mis en attente, cliquez sur Annuler."
 "The order has been created.","La commande a été créée."
+"There was an error canceling transactions. Please contact us or try again later.","Une erreur s'est produite lors de l'annulation de transactions. Veuillez nous contacter ou réessayer ultérieurement."
 "There was an error processing your order. Please contact us or try again later.","Il y a eu une erreur dans le traitement de votre commande. Veuillez nous contacter ou réessayez plus tard."
 "Title","Titre"
+"Transaction Key","Clé de la transaction"
 "Transaction Key","Clé de transaction"
 "What is this?","Qu'est-ce que c'est ?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","Vous avez atteint le nombre maximum autorisé de cartes de crédit à utiliser pour le paiement."
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Vous avez atteint le nombre maximum autorisé de cartes de crédits à utiliser pour un paiement. Les montants disponibles sur l'ensemble des cartes de crédit étaient insuffisants pour finaliser le paiement. Le paiement a été annulé et les montants mis en attente débloqués."
 "You will be required to enter your payment details before you place an order.","Il vous sera demandé de renseigner vos détails de paiement avant de passer une commande."
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Votre carte de crédit a été refusée. Cliquez sur OK pour indiquer une autre carte de crédit pour finaliser votre paiement. Cliquez sur Annuler pour débloquer le montant mis attente et sélectionner un autre moyen de paiement."
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Votre commande n'a pas été enregistrée car les contenus du panier et/ou de l'adresse ont été modifiés. Les montants autorisés en attente de votre paiement précédent sont désormais débloqués. Veuillez procéder au paiement pour les contenus de votre dernier panier."
+"Your payment has been cancelled. All authorized amounts have been released.","Votre paiement a été annulé. Tous les montants autorisés ont été débloqués."
+"amount %s","Montant %s"
+"authorize","autoriser"
+"authorize and capture","autoriser et saisir"
+"capture","saisir"
+"failed","échoué"
+"refund","remboursement"
+"successful","réussi"
+"void","vide"
diff --git a/app/code/Magento/Authorizenet/i18n/nl_NL.csv b/app/code/Magento/Authorizenet/i18n/nl_NL.csv
index 9208f8eeac53cad327204637bb4e8d5aace78967..f0317f80d31d16fc2f133c354113f0a22ea8a685 100644
--- a/app/code/Magento/Authorizenet/i18n/nl_NL.csv
+++ b/app/code/Magento/Authorizenet/i18n/nl_NL.csv
@@ -1,40 +1,101 @@
 "--Please Select--","--selecteer a.u.b.--"
+"3D Secure","3D Secure"
+"3D Secure Card Validation","3D Secure Card Validation"
+"API Login ID","API Login ID"
 "API Login ID","API login ID"
+"Accepted Currency","Geaccepteerde munteenheid"
 "Accepted Currency","Geaccepteerde valuta"
+"Allow Partial Authorization","Gedeeltelijke autorisatie toestaan"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Weet u zeker dat u uw betaling wilt annuleren? Klik op OK om uw betaling te annuleren en het geld vrij te geven. Klik op Cancel om een andere kredietkaart te gebruiken en verder te gaan met uw betaling."
+"Authorize Only","Alleen authoriseren"
+"Authorize and Capture","Authoriseren en opnemen"
+"Authorize.Net Transaction ID %s","Authorize.Net Transactie ID %s"
+"Authorize.net","Authorize.net"
 "Authorize.net Direct Post","Authorize.net directe post"
+"Cancel","Annuleren"
 "Card Verification Number","Kaart verificatie nummer"
 "Card Verification Number Visual Reference","Kaart verificatie nummer visuele referentie"
+"Centinel API URL","Centinel API URL"
 "Close","sluiten"
 "Credit Card Information","Creditcard informatie"
 "Credit Card Number","Creditcardnummer"
 "Credit Card Type","Creditcardtype"
 "Credit Card Types","Creditcardtypes"
+"Credit Card Types","Types credit card"
 "Credit Card Verification","Creditcard verificatie"
+"Credit Card Verification","Credit Card Verificatie"
+"Credit Card: xxxx-%s","Kredietkaart: xxxx-%s"
 "Debug","Debug"
 "Email Customer","email klant"
+"Email Customer","E-mail Klant"
+"Enabled","Aan"
 "Enabled","Werkzaam gemaakt"
+"Error in payment gateway.","Fout in betaling gateway."
 "Expiration Date","vervaldatum"
 "Gateway URL","Gateway URL"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Gateway acties zijn vergrendeld omdat de gateway een of meerdere transacties niet kan voltooien. Log alstublieft in op uw Authorize.Net account om zelf het problem/de problemen op te lossen."
+"Gateway error: %s","Gateway fout: %s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Indien leeg, een standaard waarde kan worden gebruikt. Een aangepaste URL kan worden geleverd volgens de CardinalCommerce overeenkomst"
+"Invalid amount for authorization.","Ongeldig bedrag voor autorisatie."
+"Invalid amount for capture.","Ongeldige aantal voor vangst."
+"Invalid amount for partial authorization.","Ongeldig aantal voor gedeeltelijke autorisatie."
+"Invalid amount for refund.","Ongeldige aantal voor teruggave."
+"Invalid split tenderId ID.","Ongeldige split tenderld ID."
 "Maximum Order Total","Maximale bestellingstotalen"
+"Maximum Order Total","Maximale Bestelling"
 "Merchant MD5","Verkoper MD5"
 "Merchant's Email","Verkoper's email"
+"Merchant's Email","Verkopers e-mail"
+"Minimum Order Total","Minimale Bestelling"
 "Minimum Order Total","Minimale bestellingstotalen"
+"New Order Status","Nieuwe Status van de Bestelling"
 "New Order Status","Nieuwe bestellingsstatus"
 "Order saving error: %s","Bestelling opslaan fout: %s"
+"Payment Action","Betaling"
 "Payment Action","Betalingsactie"
+"Payment authorization error.","Fout bij autorisatie betaling."
 "Payment authorization error.","Betalingsautorisatie fout."
 "Payment authorization error. Transacion id is empty.","Betalings autorisatie fout. Transactie ID is leeg."
+"Payment canceling error.","Probleem met het annuleren van de betaling."
+"Payment capturing error.","Fout in het ophalen van de betaling."
 "Payment error. Order was not found.","Betalingsfout. Bestelling is niet gevonden."
 "Payment error. Paid amount doesn\'t match the order amount.","Betalingsfout. Betaalde bedrag is niet hetzelfde als bedrag van bestelling."
 "Payment from Applicable Countries","Betaling vanuit toegestane landen"
+"Payment from Applicable Countries","Betaling van Geëigende Landen"
+"Payment from Specific Countries","Betaling van Specifieke Landen"
 "Payment from Specific Countries","Betaling vanuit specifieke landen"
+"Payment partial authorization error.","Fout in de gedeeltelijke autorisatie van de betaling."
+"Payment refunding error.","Fout in het terugbetalen van de betaling."
+"Payment updating error.","Fout bij het bijwerken van de betaling."
+"Payment voiding error.","Fout in het vernietigen van de betaling."
 "Please, choose payment method","Kies a.u.b. de verzendmethode"
+"Processed Amount","Verwerkte hoeveelheid"
+"Remaining Balance","Resterend balans"
 "Response hash validation failed. Transaction declined.","Antwoord op hash validatie mislukt. Transactie geweigerd."
+"Severe 3D Secure Card Validation","Strenge 3D Secure Card Validation"
+"Severe Validation Removes Chargeback Liability on Merchant","Strenge validatie verwijdert terugboekingsaansprakelijkheid voor de handelaar"
+"Shopping cart contents and/or address has been changed.","Winkel wagen inhoud en/of adres is gewijzigd."
 "Sort Order","Sorteer Bestelling"
+"Test Mode","Test modus"
 "Test Mode","Testmode"
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","U heeft onvoldoende tegoed op uw creditcard om de aankoop te voltooien. Het bedrag is vastgezet. Om de aankoop te voltooien, klik op OK en geef een extra creditcardnummer op. Om de aankoop te annuleren en het geld terug te zetten, klik op Cancel."
 "The order has been created.","De bestelling is aangemaakt"
+"There was an error canceling transactions. Please contact us or try again later.","Er heeft zich een fout voorgedaan tijdens het annuleren van de transacties. Neem contact met ons op of probeer later."
 "There was an error processing your order. Please contact us or try again later.","Er is een fout opgetreden bij het verwerken van uw bestelling. Contacteer ons a.u.b. of probeert u het later nog eens."
 "Title","Titel"
 "Transaction Key","Transactiesleutel"
 "What is this?","Wat is dit?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","Het aantal toegestane creditcards voor deze betaling is bereikt."
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Het aantal toegestane creditcards voor één betaling is bereikt. Het saldo is nog steeds onvoldoende om de betaling te voltooien. De betaling is geannuleerd en de vastgezette bedragen zijn vrijgegeven."
 "You will be required to enter your payment details before you place an order.","U zult uw betalingsgegevens moeten invullen alvorens u een bestelling kunt plaatsen."
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Uw creditcard is geweigerd. Klik op OK om een andere creditcard te gebruiken voor uw betaling. Klik op Cancel om het bedrag vrij te geven en kies een andere betaalmethode."
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Uw order kan niet worden geplaatst, omdat de inhoud van uw winkelwagentje en/of adres gewijzigd zijn. Geautoriseerde bedragen van uw vorige betaling zijn vrijgegeven. Ga naar het betalingsproces voor de inhoud van uw huidige winkelwagen."
+"Your payment has been cancelled. All authorized amounts have been released.","Uw betaling is geannuleerd. Alle geautoriseerde bedragen zijn vrijgegeven."
+"amount %s","bedrag %s"
+"authorize","autoriseer"
+"authorize and capture","autoriseer en vang"
+"capture","vang"
+"failed","mislukt"
+"refund","teruggave"
+"successful","succesvol"
+"void","ongeldig"
diff --git a/app/code/Magento/Authorizenet/i18n/pt_BR.csv b/app/code/Magento/Authorizenet/i18n/pt_BR.csv
index 0871f5176773e602f0baf93efd3613720e8e5c42..b659f4fb655f87b99ef121ddc8abf68d0dd5bc67 100644
--- a/app/code/Magento/Authorizenet/i18n/pt_BR.csv
+++ b/app/code/Magento/Authorizenet/i18n/pt_BR.csv
@@ -1,20 +1,40 @@
 "--Please Select--","--Por Favor, Escolha--"
+"3D Secure","3D Secure"
+"3D Secure Card Validation","Validação de Cartão 3D Secure"
 "API Login ID","ID de Login API"
 "Accepted Currency","Moeda Aceita"
+"Allow Partial Authorization","Permitir Autorização Parcial"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Tem certeza de que deseja cancelar o seu pagamento? Clique em OK para cancelar o seu pagamento e liberar o montante em espera. Clique em Cancelar para inserir outro cartão de crédito e continuar com o seu pagamento."
+"Authorize Only","Somente Autorizar"
+"Authorize and Capture","Autorizar e Controlar"
+"Authorize.Net Transaction ID %s","ID Transação Authorize.Net %s"
+"Authorize.net","Authorize.net"
 "Authorize.net Direct Post","Postagem Direta da Authorize.net"
+"Cancel","Cancelar"
 "Card Verification Number","Número de Verificação do Cartão"
 "Card Verification Number Visual Reference","Referência Visual de Número de Verificação do Cartão"
+"Centinel API URL","URL Centinel API"
 "Close","Fechar"
 "Credit Card Information","Informações do Cartão de Crédito"
 "Credit Card Number","Número do Cartão de Crédito"
 "Credit Card Type","Tipo de Cartão de Crédito"
 "Credit Card Types","Tipos de Cartão de Crédito"
 "Credit Card Verification","Verificação de Cartão de Crédito"
+"Credit Card: xxxx-%s","Cartão de crédito: xxxx-%s"
 "Debug","Debug"
 "Email Customer","Enviar Email ao Cliente"
 "Enabled","Ativado"
+"Error in payment gateway.","Erro no portal de pagamento."
 "Expiration Date","Data de Validade"
 "Gateway URL","URL do Gateway"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Ações de portal são bloqueadas porque o portal não consegue completar uma ou mais das transações. Por favor entre na sua conta Authorize.Net manualmente para resolver o(s) problema(s)."
+"Gateway error: %s","Erro do portal: %s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Se vazio, um valor definido será usado. URL personalizado pode ser fornecido por acordo CardinalCommerce."
+"Invalid amount for authorization.","Valor inválido para autorização."
+"Invalid amount for capture.","Valor inválido para captura."
+"Invalid amount for partial authorization.","Valor inválido para autorização parcial."
+"Invalid amount for refund.","Valor inválido para reembolso."
+"Invalid split tenderId ID.","ID tenderId de divisão inválida."
 "Maximum Order Total","Total Máximo do Pedido"
 "Merchant MD5","MD5 Vendedor"
 "Merchant's Email","Email do Vendedor"
@@ -24,17 +44,43 @@
 "Payment Action","Ação de Pagamento"
 "Payment authorization error.","Erro na autorização de pagamento."
 "Payment authorization error. Transacion id is empty.","Erro de autorização de pagamento. ID de transação está vazio."
+"Payment canceling error.","Erro de cancelamento de pagamento."
+"Payment capturing error.","Erro de captura de pagamento."
 "Payment error. Order was not found.","Erro de pagamento. Ordem não foi encontrada."
 "Payment error. Paid amount doesn\'t match the order amount.","Erro de pagamento. Valor pago não corresponde ao valor da ordem."
 "Payment from Applicable Countries","Pagamento de Países Aplicáveis"
 "Payment from Specific Countries","Pagamento de Países Específicos"
+"Payment partial authorization error.","Erro de autorização de pagamento parcial."
+"Payment refunding error.","Erro de reembolso de pagamento."
+"Payment updating error.","Erro de atualização de pagamento."
+"Payment voiding error.","Erro de anulamento de pagamento."
 "Please, choose payment method","Por favor, escolha o método de pagamento"
+"Processed Amount","Valor Processado"
+"Remaining Balance","Balanço Restante"
 "Response hash validation failed. Transaction declined.","Validação de resposta de mistura falhou. Transação recusada."
+"Severe 3D Secure Card Validation","Validação de Cartão Severe 3D Secure"
+"Severe Validation Removes Chargeback Liability on Merchant","Validação Severe Remove a Responsabilidade de Cobrança Retroativa no Comerciante"
+"Shopping cart contents and/or address has been changed.","Conteúdo do carrinho de compras e/ou endereço foi alterado."
 "Sort Order","Classificar pedido"
 "Test Mode","Modo de Teste"
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","O valor no seu cartão de crédito é insuficiente para concluir a compra. O montante disponível foi colocado em espera. Para concluir a sua compra, clique em OK e especifique o número do cartão de crédito adicional. Para cancelar a compra e liberar o montante em espera, clique em Cancelar."
 "The order has been created.","A ordem foi criada."
+"There was an error canceling transactions. Please contact us or try again later.","Ocorreu um erro ao cancelar as transações. Por favor entre em contato conosco ou tente novamente mais tarde."
 "There was an error processing your order. Please contact us or try again later.","Ocorreu um erro ao processar sua ordem. Entre em contato conosco ou tente novamente mais tarde."
 "Title","Título"
 "Transaction Key","Chave de Transação"
 "What is this?","O que é isso?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","Você atingiu o número máximo de cartão de crédito autorizado a ser utilizado para o pagamento."
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Você atingiu o número máximo de cartões de crédito que pode ser usado para um único pagamento. Os montantes disponíveis em todos os cartões utilizados foram insuficientes para completar o pagamento. O pagamento foi cancelado e os valores em espera foram liberados."
 "You will be required to enter your payment details before you place an order.","Você será obrigado a inserir seus detalhes de pagamento antes de colocar uma ordem."
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Seu cartão de crédito foi recusado. Clique em OK para especificar outro cartão de crédito para concluir a compra. Clique em Cancelar para liberar a quantia em espera e selecione outro método de pagamento."
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Seu pedido não tenha sido colocado, porque o conteúdo do carrinho de compras e/ou endereço foi alterado. Montantes autorizados a partir do seu pagamento anterior que ficaram pendentes são agora liberados. Por favor siga através do processo de compra para o seu conteúdo recente do carrinho."
+"Your payment has been cancelled. All authorized amounts have been released.","O seu pagamento foi cancelado. Todos os valores autorizados foram liberados."
+"amount %s","valor %s"
+"authorize","autorizar"
+"authorize and capture","autorizar e capturar"
+"capture","capturar"
+"failed","fracassado"
+"refund","reembolso"
+"successful","bem sucedido"
+"void","vazio"
diff --git a/app/code/Magento/Authorizenet/i18n/zh_CN.csv b/app/code/Magento/Authorizenet/i18n/zh_CN.csv
index 04e844cba817885c1ededa354c20a896cc623cff..3de958434379e401ab65de43fda8d44a52c6881b 100644
--- a/app/code/Magento/Authorizenet/i18n/zh_CN.csv
+++ b/app/code/Magento/Authorizenet/i18n/zh_CN.csv
@@ -1,20 +1,40 @@
 "--Please Select--","-- 请选择 --"
+"3D Secure","3D 安全"
+"3D Secure Card Validation","3D 安全信用卡验证"
 "API Login ID","API 登录 ID"
 "Accepted Currency","接受的汇率"
+"Allow Partial Authorization","允许部分身份验证"
+"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","您是否确定要取消支付?单击确定可取消您的支付,并释放占用的额度。单击取消可输入其他信用卡,并继续进行支付。"
+"Authorize Only","仅供授权"
+"Authorize and Capture","授权和捕获"
+"Authorize.Net Transaction ID %s","Authorize.Net 交易 ID %s"
+"Authorize.net","Authorize.net"
 "Authorize.net Direct Post","Authorize.net 直接发表"
+"Cancel","取消"
 "Card Verification Number","卡片验证号码"
 "Card Verification Number Visual Reference","信用卡验证号码 视觉参考"
+"Centinel API URL","Centinel API URL"
 "Close","关闭"
 "Credit Card Information","信用卡信息"
 "Credit Card Number","信用卡号码"
 "Credit Card Type","信用卡类型"
 "Credit Card Types","信用卡类型"
 "Credit Card Verification","信用卡验证"
+"Credit Card: xxxx-%s","信用卡:xxxx-%s"
 "Debug","调试"
 "Email Customer","发送电子邮件给客户"
 "Enabled","已启用"
+"Error in payment gateway.","支付网关出错。"
 "Expiration Date","过期日期"
 "Gateway URL","网关 URL"
+"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","网关操作被锁定,因为网关无法完成一个或多个交易。请登录到您的 Authorize.Net 帐户并手工解决该问题。"
+"Gateway error: %s","网关错误:%s"
+"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","如果为空,则会使用默认值。自定义URL可通过 CardinalCommerce 协议提供。"
+"Invalid amount for authorization.","授权的额度无效。"
+"Invalid amount for capture.","获取的额度无效。"
+"Invalid amount for partial authorization.","部分身份验证无效。"
+"Invalid amount for refund.","退款额度无效。"
+"Invalid split tenderId ID.","拆分的 tenderId ID 无效。"
 "Maximum Order Total","最大订单总数"
 "Merchant MD5","商家 MD5"
 "Merchant's Email","商家电子邮件"
@@ -24,17 +44,43 @@
 "Payment Action","支付操作"
 "Payment authorization error.","支付授权错误。"
 "Payment authorization error. Transacion id is empty.","支付授权出错。交易编号为空。"
+"Payment canceling error.","取消支付过程出错。"
+"Payment capturing error.","支付捕获出错。"
 "Payment error. Order was not found.","支付出错,订单未找到。"
 "Payment error. Paid amount doesn\'t match the order amount.","支付错误。付款金额与订单金额不匹配。"
 "Payment from Applicable Countries","从可接受的国家支付"
 "Payment from Specific Countries","从指定的国家支付"
+"Payment partial authorization error.","支付的部分身份验证出错。"
+"Payment refunding error.","支付的退款出错。"
+"Payment updating error.","支付更新错误。"
+"Payment voiding error.","支付的作废出错。"
 "Please, choose payment method","请选择支付方式"
+"Processed Amount","处理的额度"
+"Remaining Balance","剩下的余额"
 "Response hash validation failed. Transaction declined.","响应哈希验证失败。交易被拒绝。"
+"Severe 3D Secure Card Validation","提供 3D 安全信用卡验证"
+"Severe Validation Removes Chargeback Liability on Merchant","正式验证将撤销银行的退款责任"
+"Shopping cart contents and/or address has been changed.","购物车内容和/或地址已被更改。"
 "Sort Order","排序顺序"
 "Test Mode","测试模式"
+"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","您信用卡的余额不足以完成本次购买。可用余额已经被暂挂。为完成您的购买,请点击确定并提供另一个信用卡号码。要取消购买并退回暂挂的余额,请点击取消。"
 "The order has been created.","订单已创建。"
+"There was an error canceling transactions. Please contact us or try again later.","取消交易时遇到了错误。请联系我们或稍候重试。"
 "There was an error processing your order. Please contact us or try again later.","处理您的订单时遇到了错误。请联系我们,或稍后再试。"
 "Title","标题"
 "Transaction Key","交易密钥"
 "What is this?","这是什么?"
+"You have reached the maximum number of credit card allowed to be used for the payment.","您已经达到了可用于交易的信用卡数量最大值。"
+"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","您已经达到了一次支付可使用信用卡数量的最大值。所有用过卡片的可用额度都不足以完成支付。付款已被取消,暂挂的额度已经被返还。"
 "You will be required to enter your payment details before you place an order.","您将需要输入您的支付详情,随后才能下单。"
+"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","您的信用卡被拒绝。点击确定以指定另一张可完成此次交易的信用卡。点击取消以返还被暂挂的额度,并选择其他支付方式。"
+"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","您的订单创建不成功,因为购物车的内容和/或地址已经有变动。您的上次支付中通过预授权被暂挂的额度已经返还。请为购物车中的新内容重新执行付款流程。"
+"Your payment has been cancelled. All authorized amounts have been released.","您的付款已被取消。所有授权的额度已经被返还。"
+"amount %s","额度 %s"
+"authorize","授权"
+"authorize and capture","授权和获取"
+"capture","获取"
+"failed","失败"
+"refund","退款"
+"successful","成功"
+"void","避免"
diff --git a/app/code/Magento/Paygate/view/adminhtml/form/cc.phtml b/app/code/Magento/Authorizenet/view/adminhtml/form/cc.phtml
similarity index 100%
rename from app/code/Magento/Paygate/view/adminhtml/form/cc.phtml
rename to app/code/Magento/Authorizenet/view/adminhtml/form/cc.phtml
diff --git a/app/code/Magento/Paygate/view/adminhtml/info/cc.phtml b/app/code/Magento/Authorizenet/view/adminhtml/info/cc.phtml
similarity index 100%
rename from app/code/Magento/Paygate/view/adminhtml/info/cc.phtml
rename to app/code/Magento/Authorizenet/view/adminhtml/info/cc.phtml
diff --git a/app/code/Magento/Paygate/view/adminhtml/info/pdf.phtml b/app/code/Magento/Authorizenet/view/adminhtml/info/pdf.phtml
similarity index 100%
rename from app/code/Magento/Paygate/view/adminhtml/info/pdf.phtml
rename to app/code/Magento/Authorizenet/view/adminhtml/info/pdf.phtml
diff --git a/app/code/Magento/Paygate/view/frontend/paygate-authenticate.js b/app/code/Magento/Authorizenet/view/frontend/authorizenet-authenticate.js
similarity index 98%
rename from app/code/Magento/Paygate/view/frontend/paygate-authenticate.js
rename to app/code/Magento/Authorizenet/view/frontend/authorizenet-authenticate.js
index a0b03feac31ed25b6eb24a8bb8cbcbe682db1286..b2e92269cda1aee81b29754e603802dc2b975f12 100644
--- a/app/code/Magento/Paygate/view/frontend/paygate-authenticate.js
+++ b/app/code/Magento/Authorizenet/view/frontend/authorizenet-authenticate.js
@@ -25,7 +25,7 @@
 /*jshint browser:true jquery:true*/
 (function($, window) {
     "use strict";
-    $.widget('mage.paygateAuthenticate', {
+    $.widget('mage.authorizenetAuthenticate', {
         options : {
             cancelButtonSelector: 'button[name="cancel"]',
             partialAuthorizationConfirmationMessage: '',
diff --git a/app/code/Magento/Paygate/view/frontend/form/cc.phtml b/app/code/Magento/Authorizenet/view/frontend/form/cc.phtml
similarity index 94%
rename from app/code/Magento/Paygate/view/frontend/form/cc.phtml
rename to app/code/Magento/Authorizenet/view/frontend/form/cc.phtml
index 03e313db54144b7eb47f840632029b7e037f9b44..9b11bceb92d927ab858ee27a8974199be91d4b6f 100644
--- a/app/code/Magento/Paygate/view/frontend/form/cc.phtml
+++ b/app/code/Magento/Authorizenet/view/frontend/form/cc.phtml
@@ -42,8 +42,8 @@
 
         <script type="text/javascript">
             (function ($) {
-                head.js("<?php echo $this->getViewFileUrl('Magento_Paygate::paygate-authenticate.js') ?>", function () {
-                    $('[data-container="release-amounts"]').paygateAuthenticate({
+                head.js("<?php echo $this->getViewFileUrl('Magento_Authorizenet::authorizenet-authenticate.js') ?>", function () {
+                    $('[data-container="release-amounts"]').authorizenetAuthenticate({
                         partialAuthorizationConfirmationMessage: '<?php echo $this->getPartialAuthorizationConfirmationMessage()?>',
                         cancelConfirmationMessage: '<?php echo $this->getCancelConfirmationMessage() ?>',
                         cancelUrl: '<?php echo $this->getCancelUrl() ?>'
diff --git a/app/code/Magento/Paygate/view/frontend/info/cc.phtml b/app/code/Magento/Authorizenet/view/frontend/info/cc.phtml
similarity index 100%
rename from app/code/Magento/Paygate/view/frontend/info/cc.phtml
rename to app/code/Magento/Authorizenet/view/frontend/info/cc.phtml
diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_supergroup.xml b/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_backendresponse.xml
similarity index 87%
rename from app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_supergroup.xml
rename to app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_backendresponse.xml
index a41f695b23a33fb2660392e416d6b6f65a1e70a7..dc02c8411ed2bf99cdd38dc25c5b7a51a6569398 100644
--- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_supergroup.xml
+++ b/app/code/Magento/Authorizenet/view/frontend/layout/authorizenet_directpost_payment_backendresponse.xml
@@ -24,6 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="catalog_product_grouped"/>
-    <container output="1" name="catalog.product.edit.tab.super.grid.container" label="grid"/>
+    <block class="Magento\Authorizenet\Block\Directpost\Iframe" name="iframe" output="1" template="directpost/iframe.phtml"/>
 </layout>
diff --git a/app/code/Magento/Authz/etc/module.xml b/app/code/Magento/Authz/etc/module.xml
index 956f67273df7c6dedeaa5795bff61817b0f85129..f2e3eefbc760e65642abb528225c83ee9e2afcd2 100644
--- a/app/code/Magento/Authz/etc/module.xml
+++ b/app/code/Magento/Authz/etc/module.xml
@@ -29,6 +29,8 @@
             <module name="Magento_Core"/>
             <!--TODO: Dependency on Magento_User is temporary and should be eliminated when ACL is made global-->
             <module name="Magento_User"/>
+            <module name="Magento_Backend"/>
+            <module name="Magento_Service"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Backend/App/Response/Http/FileFactory.php b/app/code/Magento/Backend/App/Response/Http/FileFactory.php
index 1d31691362280c1cfb59d95849c3742847b7d3ce..077620a3f8ea4ee27553658a3c34617dacf34d72 100644
--- a/app/code/Magento/Backend/App/Response/Http/FileFactory.php
+++ b/app/code/Magento/Backend/App/Response/Http/FileFactory.php
@@ -57,7 +57,7 @@ class FileFactory extends \Magento\App\Response\Http\FileFactory
 
     /**
      * @param \Magento\App\ResponseInterface $response
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Backend\Model\Auth $auth
      * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\Backend\Model\Session $session
@@ -66,7 +66,7 @@ class FileFactory extends \Magento\App\Response\Http\FileFactory
      */
     public function __construct(
         \Magento\App\ResponseInterface $response,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Backend\Model\Auth $auth,
         \Magento\Backend\Model\Url $backendUrl,
         \Magento\Backend\Model\Session $session,
@@ -112,7 +112,7 @@ class FileFactory extends \Magento\App\Response\Http\FileFactory
     public function create(
         $fileName,
         $content,
-        $baseDir = \Magento\Filesystem::ROOT,
+        $baseDir = \Magento\App\Filesystem::ROOT_DIR,
         $contentType = 'application/octet-stream',
         $contentLength = null
     ) {
diff --git a/app/code/Magento/Backend/Block/Template/Context.php b/app/code/Magento/Backend/Block/Template/Context.php
index ef34465c7a4445d16c8f7a1cc78190f985e996df..175726a7634f84bc0b35ed8e3dbfb08ff7fbbfac 100644
--- a/app/code/Magento/Backend/Block/Template/Context.php
+++ b/app/code/Magento/Backend/Block/Template/Context.php
@@ -70,7 +70,7 @@ class Context extends \Magento\View\Element\Template\Context
      * @param \Magento\Escaper $escaper
      * @param \Magento\Filter\FilterManager $filterManager
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\FileSystem $viewFileSystem
      * @param \Magento\View\TemplateEnginePool $enginePool
      * @param \Magento\App\State $appState
@@ -103,7 +103,7 @@ class Context extends \Magento\View\Element\Template\Context
         \Magento\Escaper $escaper,
         \Magento\Filter\FilterManager $filterManager,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\FileSystem $viewFileSystem,
         \Magento\View\TemplateEnginePool $enginePool,
         \Magento\App\State $appState,
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Export.php b/app/code/Magento/Backend/Block/Widget/Grid/Export.php
index 44eb90a1b63a3a9c56182ece80022e564f4e2432..d597dc13a9bd917a6a488998bcb1182ce2453672 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php
@@ -96,7 +96,7 @@ class Export
                 $this->addExportType($type['urlPath'], $type['label']);
             }
         }
-        $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php
index c4359df59f907828a5f40e12a58680a284cfede8..504e0c61b780a1120d7fb619c8d05cdec016e719 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php
@@ -192,7 +192,7 @@ class Extended
         parent::_construct();
         $this->_emptyText = __('We couldn\'t find any records.');
 
-        $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Backend/Block/Widget/Tab.php b/app/code/Magento/Backend/Block/Widget/Tab.php
new file mode 100644
index 0000000000000000000000000000000000000000..66fa9d45b56174993fa0cbf05a06503a548e4713
--- /dev/null
+++ b/app/code/Magento/Backend/Block/Widget/Tab.php
@@ -0,0 +1,86 @@
+<?php
+/**
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Block\Widget;
+
+use Magento\Backend\Block\Widget\Tab\TabInterface;
+
+class Tab extends \Magento\Backend\Block\Template implements TabInterface
+{
+    /**
+     * Return Tab label
+     *
+     * @return string
+     */
+    public function getTabLabel()
+    {
+        return $this->getLabel();
+    }
+
+    /**
+     * Return Tab title
+     *
+     * @return string
+     */
+    public function getTabTitle()
+    {
+        return $this->getTitle();
+    }
+
+    /**
+     * Can show tab in tabs
+     *
+     * @return boolean
+     */
+    public function canShowTab()
+    {
+        return $this->hasCanShow() ? (bool) $this->getCanShow() : true;
+    }
+
+    /**
+     * Tab is hidden
+     *
+     * @return boolean
+     */
+    public function isHidden()
+    {
+        return $this->hasIsHidden() ? (bool) $this->getIsHidden() : false;
+    }
+
+    /**
+     * @return string
+     */
+    public function getTabClass()
+    {
+        return $this->getClass();
+    }
+
+    /**
+     * @return string
+     */
+    public function getTabUrl()
+    {
+        return $this->hasData('url') ? $this->getData('url') : '#';
+    }
+}
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php
index f52eeafb16267372aef95844497d2d3774132f81..abf9bba0b9e8a288d6aaf3b55b832b082479cead 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Config.php
@@ -132,6 +132,6 @@ class Config extends \Magento\Backend\Controller\Adminhtml\System\AbstractConfig
         }
         $gridBlock->setWebsiteId($website->getId())->setConditionName($conditionName);
         $content = $gridBlock->getCsvFile();
-        return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
index 1d9cf8260b54588d0481ea3d36d4795d7d79c471..a8f3b5e48affe3009b56843e6d79bbaf4cedd50c 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
@@ -475,7 +475,8 @@ class Store extends \Magento\Backend\App\Action
                 ->setTime(time())
                 ->setType('db')
                 ->setPath(
-                    $this->_objectManager->get('Magento\Filesystem')->getPath(\Magento\Filesystem::VAR_DIR) . '/backups'
+                    $this->_objectManager->get('Magento\App\Filesystem')
+                        ->getPath(\Magento\App\Filesystem::VAR_DIR) . '/backups'
                 );
 
             $backupDb->createBackup($backup);
diff --git a/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php b/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php
index 064e34d94bcafcea097a54afde863160dab2772f..cf9238ae9554d633698ba28238418e41376ba64c 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php
@@ -46,7 +46,7 @@ class Robots extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -56,7 +56,7 @@ class Robots extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Config $config,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -70,7 +70,7 @@ class Robots extends \Magento\Core\Model\Config\Value
             $resourceCollection,
             $data
         );
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $this->_file = 'robots.txt';
     }
 
diff --git a/app/code/Magento/Backend/Model/Config/Backend/File.php b/app/code/Magento/Backend/Model/Config/Backend/File.php
index ac1fc5e40802925d2134ecf03d65c431ff50a50c..3c9a6ea9717689eac983ad6067cac805cb6b3ddb 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/File.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/File.php
@@ -46,7 +46,7 @@ class File extends \Magento\Core\Model\Config\Value
     protected $_maxFileSize = 0;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -67,7 +67,7 @@ class File extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
      * @param \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -79,7 +79,7 @@ class File extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
         \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -87,7 +87,7 @@ class File extends \Magento\Core\Model\Config\Value
         $this->_uploaderFactory = $uploaderFactory;
         $this->_requestData = $requestData;
         $this->_filesystem = $filesystem;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
 
@@ -147,7 +147,7 @@ class File extends \Magento\Core\Model\Config\Value
      */
     public function validateMaxSize($filePath)
     {
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::SYS_TMP);
+        $directory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::SYS_TMP_DIR);
         if (
             $this->_maxFileSize > 0 &&
             $directory->stat($directory->getRelativePath($filePath))['size'] > ($this->_maxFileSize * 1024)
diff --git a/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php b/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php
index a03b41595f3f8c25193762a8c4f0c2558abfd315..2a39df68ba78dbe579ab242acca927c4a4651bd1 100644
--- a/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php
+++ b/app/code/Magento/Backend/Model/Config/Structure/Element/Field.php
@@ -30,17 +30,6 @@ namespace Magento\Backend\Model\Config\Structure\Element;
 class Field
     extends \Magento\Backend\Model\Config\Structure\AbstractElement
 {
-
-    /**
-     * Default 'value' field for service option
-     */
-    const DEFAULT_VALUE_FIELD = 'id';
-
-    /**
-     * Default 'label' field for service option
-     */
-    const DEFAULT_LABEL_FIELD = 'name';
-
     /**
      * Default value for useEmptyValueOption for service option
      */
@@ -80,20 +69,12 @@ class Field
      */
     protected $_blockFactory;
 
-    /**
-     * dataservice graph
-     *
-     * @var \Magento\Core\Model\DataService\Graph
-     */
-     protected $_dataServiceGraph;
-
     /**
      * @param \Magento\Core\Model\App $application
      * @param \Magento\Backend\Model\Config\BackendFactory $backendFactory
      * @param \Magento\Backend\Model\Config\SourceFactory $sourceFactory
      * @param \Magento\Backend\Model\Config\CommentFactory $commentFactory
      * @param \Magento\View\Element\BlockFactory $blockFactory
-     * @param \Magento\Core\Model\DataService\Graph $dataServiceGraph,
      * @param \Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper $dependencyMapper
      */
     public function __construct(
@@ -102,7 +83,6 @@ class Field
         \Magento\Backend\Model\Config\SourceFactory $sourceFactory,
         \Magento\Backend\Model\Config\CommentFactory $commentFactory,
         \Magento\View\Element\BlockFactory $blockFactory,
-        \Magento\Core\Model\DataService\Graph $dataServiceGraph,
         \Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper $dependencyMapper
     ) {
         parent::__construct($application);
@@ -110,7 +90,6 @@ class Field
         $this->_sourceFactory = $sourceFactory;
         $this->_commentFactory = $commentFactory;
         $this->_blockFactory = $blockFactory;
-        $this->_dataServiceGraph = $dataServiceGraph;
         $this->_dependencyMapper = $dependencyMapper;
     }
 
@@ -386,12 +365,11 @@ class Field
      */
     public function hasOptions()
     {
-        return isset($this->_data['source_model']) || isset($this->_data['options'])
-            || isset($this->_data['source_service']);
+        return isset($this->_data['source_model']) || isset($this->_data['options']);
     }
 
     /**
-     * Retrieve static options, source service options or source model option list
+     * Retrieve static options or source model option list
      *
      * @return array
      */
@@ -401,10 +379,6 @@ class Field
             $sourceModel = $this->_data['source_model'];
             $optionArray = $this->_getOptionsFromSourceModel($sourceModel);
             return $optionArray;
-        } else if (isset($this->_data['source_service'])) {
-            $sourceService = $this->_data['source_service'];
-            $options = $this->_getOptionsFromService($sourceService);
-            return $options;
         } else if (isset($this->_data['options']) && isset($this->_data['options']['option'])) {
             $options = $this->_data['options']['option'];
             $options = $this->_getStaticOptions($options);
@@ -428,40 +402,6 @@ class Field
         return $options;
     }
 
-    /**
-     * Retrieve the options list from the specified service call.
-     *
-     * @param array $sourceService
-     * @return array
-     */
-    protected function _getOptionsFromService($sourceService)
-    {
-        $valueField = self::DEFAULT_VALUE_FIELD;
-        $labelField = self::DEFAULT_LABEL_FIELD;
-        $inclEmptyValOption = self::DEFAULT_INCLUDE_EMPTY_VALUE_OPTION;
-        $serviceCall = $sourceService['service_call'];
-        if (isset($sourceService['idField'])) {
-            $valueField = $sourceService['idField'];
-        }
-        if (isset($sourceService['labelField'])) {
-            $labelField = $sourceService['labelField'];
-        }
-        if (isset($sourceService['includeEmptyValueOption'])) {
-            $inclEmptyValOption = $sourceService['includeEmptyValueOption'];
-        }
-        $dataCollection = $this->_dataServiceGraph->get($serviceCall);
-        $options = array();
-        if ($inclEmptyValOption) {
-            $options[] = array('value' => '', 'label' => '-- Please Select --');
-        }
-        foreach ($dataCollection as $dataItem) {
-            $options[] = array(
-                'value' => $dataItem[$valueField],
-                'label' => $this->_translateLabel($dataItem[$labelField])
-            );
-        }
-        return $options;
-    }
 
     /**
      * Translate a label
diff --git a/app/code/Magento/Backend/etc/module.xml b/app/code/Magento/Backend/etc/module.xml
index c424210532cc394b5a554ce40af08e351ed7e960..9794c6bfc6c14223122f083650e19226e0f07aaf 100755
--- a/app/code/Magento/Backend/etc/module.xml
+++ b/app/code/Magento/Backend/etc/module.xml
@@ -37,6 +37,19 @@
             <module name="Magento_Sendfriend"/>
             <module name="Magento_Theme"/>
             <module name="Magento_Weee"/>
+            <module name="Magento_Reports"/>
+            <module name="Magento_CatalogSearch"/>
+            <module name="Magento_Sales"/>
+            <module name="Magento_Catalog"/>
+            <module name="Magento_User"/>
+            <module name="Magento_Usa"/>
+            <module name="Magento_Cms"/>
+            <module name="Magento_Shipping"/>
+            <module name="Magento_Backup"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Customer"/>
+            <module name="Magento_Tax"/>
+            <module name="Magento_Checkout"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Backend/etc/system.xsd b/app/code/Magento/Backend/etc/system.xsd
index b6b69f04814129ada072dcda17b748f755695c80..741109c59c972a217f125360957a3eada5a03611 100644
--- a/app/code/Magento/Backend/etc/system.xsd
+++ b/app/code/Magento/Backend/etc/system.xsd
@@ -234,7 +234,6 @@
         <xs:complexType>
             <xs:simpleContent>
                 <xs:extension base="xs:string">
-                    <xs:attribute name="service_call" type="xs:string" use="required" />
                     <xs:attribute name="idField" type="xs:string" use="optional" />
                     <xs:attribute name="labelField" type="xs:string" use="optional" />
                     <xs:attribute name="includeEmptyValueOption" type="xs:boolean" use="optional" />
diff --git a/app/code/Magento/Backend/etc/system_file.xsd b/app/code/Magento/Backend/etc/system_file.xsd
index dd5f9b9e0a0ce03e6dd17fd50c9a8febeddc46fd..7ebb5091947b935d3f3f6fc813bcb42abfadca82 100644
--- a/app/code/Magento/Backend/etc/system_file.xsd
+++ b/app/code/Magento/Backend/etc/system_file.xsd
@@ -235,7 +235,6 @@
         <xs:complexType>
             <xs:simpleContent>
                 <xs:extension base="xs:string">
-                    <xs:attribute name="service_call" type="xs:string" use="required" />
                     <xs:attribute name="idField" type="xs:string" use="optional" />
                     <xs:attribute name="labelField" type="xs:string" use="optional" />
                     <xs:attribute name="includeEmptyValueOption" type="xs:boolean" use="optional" />
diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index.php b/app/code/Magento/Backup/Controller/Adminhtml/Index.php
index 7eaac4b66cdd891eb41f9b240b43b2d7fcfad2ce..a9ba1fd09d476b13f8ba977a80f9098258f19282 100644
--- a/app/code/Magento/Backup/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Backup/Controller/Adminhtml/Index.php
@@ -159,7 +159,7 @@ class Index extends \Magento\Backend\App\Action
             }
 
             if ($type != \Magento\Backup\Factory::TYPE_DB) {
-                $backupManager->setRootDir($this->_objectManager->get('Magento\Filesystem')->getPath())
+                $backupManager->setRootDir($this->_objectManager->get('Magento\App\Filesystem')->getPath())
                     ->addIgnorePaths($helper->getBackupIgnorePaths());
             }
 
@@ -215,7 +215,7 @@ class Index extends \Magento\Backend\App\Action
         $response = $this->_fileFactory->create(
             $fileName,
             null,
-            \Magento\Filesystem::VAR_DIR,
+            \Magento\App\Filesystem::VAR_DIR,
             'application/octet-stream',
             $backup->getSize()
         );
@@ -296,7 +296,7 @@ class Index extends \Magento\Backend\App\Action
 
             if ($type != \Magento\Backup\Factory::TYPE_DB) {
 
-                $backupManager->setRootDir($this->_objectManager->get('Magento\Filesystem')->getPath())
+                $backupManager->setRootDir($this->_objectManager->get('Magento\App\Filesystem')->getPath())
                     ->addIgnorePaths($helper->getRollbackIgnorePaths());
 
                 if ($this->getRequest()->getParam('use_ftp', false)) {
diff --git a/app/code/Magento/Backup/Helper/Data.php b/app/code/Magento/Backup/Helper/Data.php
index 6b850783a95035b4ba38e07382019a4ec7bb6ee8..be43df0f45c40704c3b262fd4f63c546fbe3dddc 100644
--- a/app/code/Magento/Backup/Helper/Data.php
+++ b/app/code/Magento/Backup/Helper/Data.php
@@ -30,7 +30,7 @@ namespace Magento\Backup\Helper;
 class Data extends \Magento\App\Helper\AbstractHelper
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -55,14 +55,14 @@ class Data extends \Magento\App\Helper\AbstractHelper
      * Construct
      *
      * @param \Magento\App\Helper\Context $context
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\AuthorizationInterface $authorization
      * @param \Magento\App\Cache\TypeListInterface $cacheTypeList
      * @param \Magento\Index\Model\Resource\Process\CollectionFactory $processFactory
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\AuthorizationInterface $authorization,
         \Magento\App\Cache\TypeListInterface $cacheTypeList,
         \Magento\Index\Model\Resource\Process\CollectionFactory $processFactory
@@ -121,7 +121,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      */
     public function getBackupsDir()
     {
-        return $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/backups';
+        return $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/backups';
     }
 
     /**
@@ -185,12 +185,12 @@ class Data extends \Magento\App\Helper\AbstractHelper
             '.git',
             '.svn',
             'maintenance.flag',
-            $this->_filesystem->getPath(\Magento\Filesystem::SESSION),
-            $this->_filesystem->getPath(\Magento\Filesystem::CACHE),
-            $this->_filesystem->getPath(\Magento\Filesystem::LOG),
-            $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/full_page_cache',
-            $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/locks',
-            $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/report',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::SESSION_DIR),
+            $this->_filesystem->getPath(\Magento\App\Filesystem::CACHE_DIR),
+            $this->_filesystem->getPath(\Magento\App\Filesystem::LOG_DIR),
+            $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/full_page_cache',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/locks',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/report',
         );
     }
 
@@ -205,12 +205,12 @@ class Data extends \Magento\App\Helper\AbstractHelper
             '.svn',
             '.git',
             'maintenance.flag',
-            $this->_filesystem->getPath(\Magento\Filesystem::SESSION),
-            $this->_filesystem->getPath(\Magento\Filesystem::LOG),
-            $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/locks',
-            $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/report',
-            $this->_filesystem->getPath(\Magento\Filesystem::ROOT) . '/errors',
-            $this->_filesystem->getPath(\Magento\Filesystem::ROOT) . '/index.php',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::SESSION_DIR),
+            $this->_filesystem->getPath(\Magento\App\Filesystem::LOG_DIR),
+            $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/locks',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/report',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR) . '/errors',
+            $this->_filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR) . '/index.php',
         );
     }
 
@@ -223,7 +223,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     {
         $maintenanceFlagFile = $this->getMaintenanceFlagFilePath();
         $result = $this->_filesystem
-            ->getDirectoryWrite(\Magento\Filesystem::ROOT)
+            ->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR)
             ->writeFile($maintenanceFlagFile, 'maintenance');
 
         return $result !== false;
@@ -235,7 +235,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     public function turnOffMaintenanceMode()
     {
         $maintenanceFlagFile = $this->getMaintenanceFlagFilePath();
-        $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT)->delete($maintenanceFlagFile);
+        $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR)->delete($maintenanceFlagFile);
     }
 
     /**
diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php
index 2228acd835c134cb0dcfa608ca041465364fdb01..78faadd67b1044ad5fbc6735a52bf045a52f73cc 100644
--- a/app/code/Magento/Backup/Model/Backup.php
+++ b/app/code/Magento/Backup/Model/Backup.php
@@ -54,7 +54,7 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
     protected $_stream = null;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -92,7 +92,7 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Backend\Model\Auth\Session $authSession
      * @param \Magento\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $data
      */
     public function __construct(
@@ -100,14 +100,14 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Backend\Model\Auth\Session $authSession,
         \Magento\Encryption\EncryptorInterface $encryptor,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $data = array()
     ) {
         $this->_encryptor = $encryptor;
         parent::__construct($data);
 
         $this->_filesystem = $filesystem;
-        $this->varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->_helper = $helper;
         $this->_locale = $locale;
         $this->_backendAuthSession = $authSession;
@@ -306,11 +306,11 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
 
         try {
             /** @var \Magento\Filesystem\Directory\WriteInterface $varDirectory */
-            $varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+            $varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
             $this->_stream = $varDirectory->openFile(
                 $this->_getFilePath(),
                 $mode,
-                \Magento\Filesystem::WRAPPER_CONTENT_ZLIB
+                \Magento\App\Filesystem::WRAPPER_CONTENT_ZLIB
             );
         }
         catch (\Magento\Filesystem\FilesystemException $e) {
@@ -400,7 +400,7 @@ class Backup extends \Magento\Object implements \Magento\Backup\Db\BackupInterfa
         }
 
         /** @var \Magento\Filesystem\Directory\ReadInterface $zlibDirectory */
-        $zlibDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ZLIB);
+        $zlibDirectory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::WRAPPER_CONTENT_ZLIB);
         $zlibDirectory = $zlibDirectory->readFile($this->_getFilePath());
 
         echo $zlibDirectory;
diff --git a/app/code/Magento/Backup/Model/Fs/Collection.php b/app/code/Magento/Backup/Model/Fs/Collection.php
index 713d8319a3bcea4e41e265f40b1c5aff59f875e0..b26159bb68df17e4e3441dcf75a349b782fbc617 100644
--- a/app/code/Magento/Backup/Model/Fs/Collection.php
+++ b/app/code/Magento/Backup/Model/Fs/Collection.php
@@ -58,13 +58,13 @@ class Collection extends \Magento\Data\Collection\Filesystem
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Backup\Helper\Data $backupData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Backup\Model\Backup $backup
      */
     public function __construct(
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Backup\Helper\Data $backupData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Backup\Model\Backup $backup
     ) {
         $this->_backupData = $backupData;
@@ -72,7 +72,7 @@ class Collection extends \Magento\Data\Collection\Filesystem
 
         $this->_filesystem = $filesystem;
         $this->_backup = $backup;
-        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
 
         $this->_hideBackupsForApache();
 
diff --git a/app/code/Magento/Backup/Model/Observer.php b/app/code/Magento/Backup/Model/Observer.php
index ef8fe44f22e078019986d2b74ecdf5429361a5ec..c48ad2d8a7cd82833aaad366e25e0338067e4c7d 100644
--- a/app/code/Magento/Backup/Model/Observer.php
+++ b/app/code/Magento/Backup/Model/Observer.php
@@ -75,7 +75,7 @@ class Observer
     /**
      * Filesystem facade
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -89,7 +89,7 @@ class Observer
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Backup\Factory $backupFactory
      */
     public function __construct(
@@ -97,7 +97,7 @@ class Observer
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Logger $logger,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Backup\Factory $backupFactory
     ) {
         $this->_backupData = $backupData;
@@ -135,7 +135,7 @@ class Observer
             $this->_coreRegistry->register('backup_manager', $backupManager);
 
             if ($type != \Magento\Backup\Factory::TYPE_DB) {
-                $backupManager->setRootDir($this->_filesystem->getPath(\Magento\Filesystem::ROOT))
+                $backupManager->setRootDir($this->_filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR))
                     ->addIgnorePaths($this->_backupData->getBackupIgnorePaths());
             }
 
diff --git a/app/code/Magento/Backup/etc/module.xml b/app/code/Magento/Backup/etc/module.xml
index 39c2cedac187a45000be51995d5442a942de55f2..3f3d40ce2f540a9cc0e79584e36b23adc3784f4e 100755
--- a/app/code/Magento/Backup/etc/module.xml
+++ b/app/code/Magento/Backup/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Backend"/>
             <module name="Magento_Cron"/>
             <module name="Magento_Index"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
index 201d3ed2ae1a6ef63b1610de9ec6dde8d68f5d08..1c8bf217c85f01aae2b9d95115878c10afd3919d 100644
--- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
+++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php
@@ -85,6 +85,7 @@ class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Json\EncoderInterface $jsonEncoder
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -105,7 +106,8 @@ class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView
         \Magento\Bundle\Model\Product\PriceFactory $productPrice,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Json\EncoderInterface $jsonEncoder,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_catalogProduct = $catalogProduct;
         $this->_productPrice = $productPrice;
@@ -124,7 +126,8 @@ class Bundle extends \Magento\Catalog\Block\Product\View\AbstractView
             $layoutHelper,
             $imageHelper,
             $arrayUtils,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php
index 62dbb4da2f1f2255d901a9c4e24d5b84be7d64b4..07321e031c3ca9aa939afcef3fb1a2cebd63a7cb 100644
--- a/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php
+++ b/app/code/Magento/Bundle/Block/Checkout/Cart/Item/Renderer.php
@@ -68,6 +68,7 @@ class Renderer extends \Magento\Checkout\Block\Cart\Item\Renderer
         parent::__construct(
             $context, $productConfig, $checkoutSession, $imageHelper, $urlHelper, $messageManager, $data
         );
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php b/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php
new file mode 100644
index 0000000000000000000000000000000000000000..859fd69cf39fe647c998205a710bf184d82d2118
--- /dev/null
+++ b/app/code/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Bundle.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
+
+class Bundle
+{
+    /**
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * @param \Magento\App\RequestInterface $request
+     */
+    public function __construct(\Magento\App\RequestInterface $request)
+    {
+        $this->request = $request;
+    }
+
+    /**
+     * Setting Bundle Items Data to product for father processing
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
+     */
+    public function afterInitialize(\Magento\Catalog\Model\Product $product)
+    {
+        if (($items = $this->request->getPost('bundle_options')) && !$product->getCompositeReadonly()) {
+            $product->setBundleOptionsData($items);
+        }
+
+        if (($selections = $this->request->getPost('bundle_selections')) && !$product->getCompositeReadonly()) {
+            $product->setBundleSelectionsData($selections);
+        }
+
+        if ($product->getPriceType() == '0' && !$product->getOptionsReadonly()) {
+            $product->setCanSaveCustomOptions(true);
+            if ($customOptions = $product->getProductOptions()) {
+                foreach (array_keys($customOptions) as $key) {
+                    $customOptions[$key]['is_delete'] = 1;
+                }
+                $product->setProductOptions($customOptions);
+            }
+        }
+
+        $product->setCanSaveBundleSelections(
+            (bool)$this->request->getPost('affect_bundle_product_selections') && !$product->getCompositeReadonly()
+        );
+
+        return $product;
+    }
+} 
diff --git a/app/code/Magento/Bundle/Model/Observer.php b/app/code/Magento/Bundle/Model/Observer.php
index 7cc187027ad1b584eb621077c19a73469212be45..e36b1b54e2d68b19d69ecf05a64561ae28605385 100644
--- a/app/code/Magento/Bundle/Model/Observer.php
+++ b/app/code/Magento/Bundle/Model/Observer.php
@@ -85,42 +85,6 @@ class Observer
         $this->_productVisibility = $productVisibility;
     }
 
-    /**
-     * Setting Bundle Items Data to product for father processing
-     *
-     * @param \Magento\Object $observer
-     * @return \Magento\Bundle\Model\Observer
-     */
-    public function prepareProductSave($observer)
-    {
-        $request = $observer->getEvent()->getRequest();
-        $product = $observer->getEvent()->getProduct();
-
-        if (($items = $request->getPost('bundle_options')) && !$product->getCompositeReadonly()) {
-            $product->setBundleOptionsData($items);
-        }
-
-        if (($selections = $request->getPost('bundle_selections')) && !$product->getCompositeReadonly()) {
-            $product->setBundleSelectionsData($selections);
-        }
-
-        if ($product->getPriceType() == '0' && !$product->getOptionsReadonly()) {
-            $product->setCanSaveCustomOptions(true);
-            if ($customOptions = $product->getProductOptions()) {
-                foreach (array_keys($customOptions) as $key) {
-                    $customOptions[$key]['is_delete'] = 1;
-                }
-                $product->setProductOptions($customOptions);
-            }
-        }
-
-        $product->setCanSaveBundleSelections(
-            (bool)$request->getPost('affect_bundle_product_selections') && !$product->getCompositeReadonly()
-        );
-
-        return $this;
-    }
-
     /**
      * Append bundles in upsell list for current product
      *
@@ -213,63 +177,6 @@ class Observer
         return $this;
     }
 
-    /**
-     * duplicating bundle options and selections
-     *
-     * @param \Magento\Object $observer
-     * @return \Magento\Bundle\Model\Observer
-     */
-    public function duplicateProduct($observer)
-    {
-        $product = $observer->getEvent()->getCurrentProduct();
-
-        if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
-            //do nothing if not bundle
-            return $this;
-        }
-
-        $newProduct = $observer->getEvent()->getNewProduct();
-
-        $product->getTypeInstance()->setStoreFilter($product->getStoreId(), $product);
-        $optionCollection = $product->getTypeInstance()->getOptionsCollection($product);
-        $selectionCollection = $product->getTypeInstance()->getSelectionsCollection(
-            $product->getTypeInstance()->getOptionsIds($product),
-            $product
-        );
-        $optionCollection->appendSelections($selectionCollection);
-
-        $optionRawData = array();
-        $selectionRawData = array();
-
-        $i = 0;
-        foreach ($optionCollection as $option) {
-            $optionRawData[$i] = array(
-                    'required' => $option->getData('required'),
-                    'position' => $option->getData('position'),
-                    'type' => $option->getData('type'),
-                    'title' => $option->getData('title')?$option->getData('title'):$option->getData('default_title'),
-                    'delete' => ''
-                );
-            foreach ($option->getSelections() as $selection) {
-                $selectionRawData[$i][] = array(
-                    'product_id' => $selection->getProductId(),
-                    'position' => $selection->getPosition(),
-                    'is_default' => $selection->getIsDefault(),
-                    'selection_price_type' => $selection->getSelectionPriceType(),
-                    'selection_price_value' => $selection->getSelectionPriceValue(),
-                    'selection_qty' => $selection->getSelectionQty(),
-                    'selection_can_change_qty' => $selection->getSelectionCanChangeQty(),
-                    'delete' => ''
-                );
-            }
-            $i++;
-        }
-
-        $newProduct->setBundleOptionsData($optionRawData);
-        $newProduct->setBundleSelectionsData($selectionRawData);
-        return $this;
-    }
-
     /**
      * Setting attribute tab block for bundle
      *
diff --git a/app/code/Magento/Bundle/Model/Product/CopyConstructor/Bundle.php b/app/code/Magento/Bundle/Model/Product/CopyConstructor/Bundle.php
new file mode 100644
index 0000000000000000000000000000000000000000..9c277187d7aafcf672c15b5ba04d6a8591a67983
--- /dev/null
+++ b/app/code/Magento/Bundle/Model/Product/CopyConstructor/Bundle.php
@@ -0,0 +1,80 @@
+<?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\Bundle\Model\Product\CopyConstructor;
+
+class Bundle implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * Duplicating bundle options and selections
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) {
+            //do nothing if not bundle
+            return;
+        }
+
+        $product->getTypeInstance()->setStoreFilter($product->getStoreId(), $product);
+        $optionCollection = $product->getTypeInstance()->getOptionsCollection($product);
+        $selectionCollection = $product->getTypeInstance()->getSelectionsCollection(
+            $product->getTypeInstance()->getOptionsIds($product),
+            $product
+        );
+        $optionCollection->appendSelections($selectionCollection);
+
+        $optionRawData = array();
+        $selectionRawData = array();
+
+        $i = 0;
+        foreach ($optionCollection as $option) {
+            $optionRawData[$i] = array(
+                'required' => $option->getData('required'),
+                'position' => $option->getData('position'),
+                'type' => $option->getData('type'),
+                'title' => $option->getData('title')?$option->getData('title'):$option->getData('default_title'),
+                'delete' => ''
+            );
+            foreach ($option->getSelections() as $selection) {
+                $selectionRawData[$i][] = array(
+                    'product_id' => $selection->getProductId(),
+                    'position' => $selection->getPosition(),
+                    'is_default' => $selection->getIsDefault(),
+                    'selection_price_type' => $selection->getSelectionPriceType(),
+                    'selection_price_value' => $selection->getSelectionPriceValue(),
+                    'selection_qty' => $selection->getSelectionQty(),
+                    'selection_can_change_qty' => $selection->getSelectionCanChangeQty(),
+                    'delete' => ''
+                );
+            }
+            $i++;
+        }
+
+        $duplicate->setBundleOptionsData($optionRawData);
+        $duplicate->setBundleSelectionsData($selectionRawData);
+    }
+}
diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php
index 9cd6dbd46bd5bd863d4cb5fab5b0a08cc51b1d8b..f0a39119339eae0e5ee61f2736a23e1a0a9ffaf0 100644
--- a/app/code/Magento/Bundle/Model/Product/Type.php
+++ b/app/code/Magento/Bundle/Model/Product/Type.php
@@ -150,7 +150,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Helper\Product $catalogProduct
@@ -174,7 +174,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Logger $logger,
         \Magento\Catalog\Helper\Product $catalogProduct,
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
index fc4f53a20c2722a8c046022c0625b06cc0c08252..de78c696d2a003948ca1fee4c44fbbf2de321e8e 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php
@@ -46,7 +46,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -56,7 +56,7 @@ class Creditmemo extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractIte
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
index b39c73345cdcd61f4470cad400c302ce4c434f6d..c465a5f5c294376e921c3f1578b4befaea2c6b18 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php
@@ -44,7 +44,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $coreString
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -54,7 +54,7 @@ class Invoice extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $coreString,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
index a033f08d37fa9bc64ac81e14f8f04b9027f2090a..f2ef29591a763548e94b9b0e0b87cbb3d2494d64 100644
--- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
+++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php
@@ -44,7 +44,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -54,7 +54,7 @@ class Shipment extends \Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
diff --git a/app/code/Magento/Bundle/etc/adminhtml/di.xml b/app/code/Magento/Bundle/etc/adminhtml/di.xml
index 8b0224e543ddc4c22e7e6de83f738e38e8bacfc3..47e2e147f448d7cdf4e8c3661a98834e807b1bb9 100644
--- a/app/code/Magento/Bundle/etc/adminhtml/di.xml
+++ b/app/code/Magento/Bundle/etc/adminhtml/di.xml
@@ -27,4 +27,14 @@
     <type name="Magento\Sales\Model\Convert\Quote">
         <plugin name="append_bundle_data_to_order" type="Magento\Bundle\Model\Plugin\QuoteItem"/>
     </type>
+    <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper">
+        <plugin name="Bundle" type="Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle" sortOrder="60" />
+    </type>
+    <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
+        <param name="constructors">
+            <value>
+                <bundle>Magento\Bundle\Model\Product\CopyConstructor\Bundle</bundle>
+            </value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Bundle/etc/adminhtml/events.xml b/app/code/Magento/Bundle/etc/adminhtml/events.xml
index fb84653e17ac30643ede602292413c064c154cfd..0e681b6b3fc6a634374f08b4bf5cabbe4c2cbf07 100644
--- a/app/code/Magento/Bundle/etc/adminhtml/events.xml
+++ b/app/code/Magento/Bundle/etc/adminhtml/events.xml
@@ -24,12 +24,6 @@
  */
 -->
 <config>
-    <event name="catalog_product_prepare_save">
-        <observer name="bundle_observer" instance="Magento\Bundle\Model\Observer" method="prepareProductSave" />
-    </event>
-    <event name="catalog_model_product_duplicate">
-        <observer name="bundle_observer" instance="Magento\Bundle\Model\Observer" method="duplicateProduct" />
-    </event>
     <event name="catalog_product_edit_action">
         <observer name="bundle_observer" instance="Magento\Bundle\Model\Observer" method="setAttributeTabBlock" />
     </event>
diff --git a/app/code/Magento/Bundle/etc/module.xml b/app/code/Magento/Bundle/etc/module.xml
index e0b4f5e9c697e339e55e132db465ef91b87a1e78..f137dc77683f2b8a4d1e90fb05530dbbf9f1a9b4 100755
--- a/app/code/Magento/Bundle/etc/module.xml
+++ b/app/code/Magento/Bundle/etc/module.xml
@@ -42,6 +42,8 @@
             <module name="Magento_Weee"/>
             <module name="Magento_GiftMessage"/>
             <module name="Magento_Theme"/>
+            <module name="Magento_Wishlist"/>
+            <module name="Magento_Multishipping" type="soft"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/Magento/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php
index 82084e147424a8a0b2d105ab306b75a5a0382421..014e7bd641c4a951bfb948b8d0bc31f02c97855d 100644
--- a/app/code/Magento/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php
+++ b/app/code/Magento/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php
@@ -31,7 +31,7 @@ $installer = $this;
 $installFile = __DIR__ . '/upgrade-1.6.0.0-1.6.0.0.1.php';
 
 /** @var \Magento\Filesystem\Directory\Read $modulesDirectory */
-$modulesDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\Filesystem::MODULES);
+$modulesDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
 
 if ($modulesDirectory->isExist($modulesDirectory->getRelativePath($installFile))) {
     include $installFile;
diff --git a/app/code/Magento/Bundle/view/frontend/catalog/product/price.phtml b/app/code/Magento/Bundle/view/frontend/catalog/product/price.phtml
index 7d34ee582998529bb4015634a7318ff726b3b789..a4c350439d2b3b9b234012f7516770cf896ae6ed 100644
--- a/app/code/Magento/Bundle/view/frontend/catalog/product/price.phtml
+++ b/app/code/Magento/Bundle/view/frontend/catalog/product/price.phtml
@@ -29,25 +29,27 @@
 <?php $_id = $_product->getId() ?>
 
 <?php $_weeeTaxAmount = 0; ?>
+<?php /** @var $weeeHelper \Magento\Weee\Helper\Data */ ?>
+<?php $weeeHelper = $this->helper('Magento\Weee\Helper\Data'); ?>
 
 <?php
 if ($_product->getPriceType() == 1) {
-    $_weeeTaxAmount = $this->helper('Magento\Weee\Helper\Data')->getAmount($_product);
+    $_weeeTaxAmount = $weeeHelper->getAmount($_product);
     $_weeeTaxAmountInclTaxes = $_weeeTaxAmount;
-    if ($this->helper('Magento\Weee\Helper\Data')->isTaxable()) {
-        $_attributes = $this->helper('Magento\Weee\Helper\Data')->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
-        $_weeeTaxAmountInclTaxes = $this->helper('Magento\Weee\Helper\Data')->getAmountInclTaxes($_attributes);
+    if ($weeeHelper->isTaxable()) {
+        $_attributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true);
+        $_weeeTaxAmountInclTaxes = $weeeHelper->getAmountInclTaxes($_attributes);
     }
-    if ($_weeeTaxAmount && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(0, 1, 4))) {
+    if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
         $_minimalPriceTax += $_weeeTaxAmount;
         $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
     }
-    if ($_weeeTaxAmount && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 2)) {
+    if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)) {
         $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes;
     }
 
-    if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(1, 2, 4))) {
-        $_weeeTaxAttributes = $this->helper('Magento\Weee\Helper\Data')->getProductWeeeAttributesForDisplay($_product);
+    if ($weeeHelper->typeOfDisplay($_product, array(1, 2, 4))) {
+        $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($_product);
     }
 }
 ?>
@@ -61,10 +63,10 @@ if ($_product->getPriceType() == 1) {
                     <span class="label"><?php echo __('Excl. Tax:') ?></span>
                     <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceTax) ?>
                 </span>
-                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                     <span class="weee">(<small>
                         <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                            <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                             <?php else: ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -82,10 +84,10 @@ if ($_product->getPriceType() == 1) {
                 </span>
         <?php else: ?>
             <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceTax) ?>
-            <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+            <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                 <span class="weee">(<small>
                     <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                        <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                        <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                             <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                         <?php else: ?>
                             <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -97,7 +99,7 @@ if ($_product->getPriceType() == 1) {
                     <?php endforeach; ?>
                 </small>)</span>
             <?php endif; ?>
-            <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
+            <?php if ($weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
                 <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceInclTax) ?>
             <?php endif; ?>
         <?php endif; ?>
@@ -111,10 +113,10 @@ if ($_product->getPriceType() == 1) {
                     <span class="label"><?php echo __('Excl. Tax:') ?></span>
                     <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceTax) ?>
                 </span>
-                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                     <span class="weee">(<small>
                         <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                            <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                             <?php else: ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -132,10 +134,10 @@ if ($_product->getPriceType() == 1) {
                 </span>
             <?php else: ?>
                 <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceTax) ?>
-                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                     <span class="weee">(<small>
                         <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                            <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                             <?php else: ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -147,18 +149,18 @@ if ($_product->getPriceType() == 1) {
                         <?php endforeach; ?>
                     </small>)</span>
                 <?php endif; ?>
-                <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
+                <?php if ($weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
                     <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceInclTax) ?>
                 <?php endif; ?>
             <?php endif; ?>
         </p>
             <?php
                 if ($_product->getPriceType() == 1) {
-                    if ($_weeeTaxAmount && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(0, 1, 4))) {
+                    if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
                         $_maximalPriceTax += $_weeeTaxAmount;
                         $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
                     }
-                    if ($_weeeTaxAmount && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 2)) {
+                    if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)) {
                         $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes;
                     }
                 }
@@ -170,10 +172,10 @@ if ($_product->getPriceType() == 1) {
                         <span class="label"><?php echo __('Excl. Tax:') ?></span>
                         <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_maximalPriceTax) ?>
                     </span>
-                    <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                    <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                         <span class="weee">(<small>
                             <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                                <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                                <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                     <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                                 <?php else: ?>
                                     <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -191,10 +193,10 @@ if ($_product->getPriceType() == 1) {
                     </span>
                 <?php else: ?>
                     <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_maximalPriceTax) ?>
-                    <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                    <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                         <span class="weee">(<small>
                             <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                                <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                                <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                     <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                                 <?php else: ?>
                                     <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -206,7 +208,7 @@ if ($_product->getPriceType() == 1) {
                             <?php endforeach; ?>
                         </small>)</span>
                     <?php endif; ?>
-                    <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
+                    <?php if ($weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
                         <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_maximalPriceInclTax) ?>
                     <?php endif; ?>
                 <?php endif; ?>
@@ -217,10 +219,10 @@ if ($_product->getPriceType() == 1) {
                     <span class="label"><?php echo __('Excl. Tax:') ?></span>
                     <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceTax) ?>
                 </span>
-                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                     <span class="weee">(<small>
                         <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                            <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                             <?php else: ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -238,10 +240,10 @@ if ($_product->getPriceType() == 1) {
                 </span>
             <?php else: ?>
                 <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceTax) ?>
-                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 1, 4))): ?>
+                <?php if ($_weeeTaxAmount && $_product->getPriceType() == 1 && $weeeHelper->typeOfDisplay($_product, array(2, 1, 4))): ?>
                     <span class="weee">(<small>
                         <?php $_weeeSeparator = ''; foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(2, 4))): ?>
+                            <?php if ($weeeHelper->typeOfDisplay($_product, array(2, 4))): ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(); ?>
                             <?php else: ?>
                                 <?php $amount = $_weeeTaxAttribute->getAmount(); ?>
@@ -253,7 +255,7 @@ if ($_product->getPriceType() == 1) {
                         <?php endforeach; ?>
                     </small>)</span>
                 <?php endif; ?>
-                <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
+                <?php if ($weeeHelper->typeOfDisplay($_product, 2) && $_weeeTaxAmount): ?>
                     <?php echo $this->helper('Magento\Core\Helper\Data')->currency($_minimalPriceInclTax) ?>
                 <?php endif; ?>
             <?php endif; ?>
diff --git a/app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_addresses.xml b/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_addresses.xml
similarity index 94%
rename from app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_addresses.xml
rename to app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_addresses.xml
index 2a93f33838ceb6ac0d053e330a5e2911a380452e..784a79eab627df1f671d5ba7b445d49520008200 100644
--- a/app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_addresses.xml
+++ b/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_addresses.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceBlock name="checkout_addresses">
-        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Checkout::multishipping/item/default.phtml" cacheable="false"/>
+        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
     </referenceBlock>
 </layout>
diff --git a/app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_overview.xml b/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_overview.xml
similarity index 94%
rename from app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_overview.xml
rename to app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_overview.xml
index 47a9dde9343ed1c63535ed35f4bf02e779f7a4e2..3c03cba7a9207ff8090b9219cb67ccb070477371 100644
--- a/app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_overview.xml
+++ b/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_overview.xml
@@ -25,6 +25,6 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceBlock name="checkout_overview">
-        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Checkout::multishipping/item/default.phtml" cacheable="false"/>
+        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
     </referenceBlock>
 </layout>
diff --git a/app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_shipping.xml b/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_shipping.xml
similarity index 91%
rename from app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_shipping.xml
rename to app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_shipping.xml
index b9f98da4bce5d75e4ad9408ce4636589ea90e66b..91de6ad093134cd321f61149d9ea65c4452c2eac 100644
--- a/app/code/Magento/Bundle/view/frontend/layout/checkout_multishipping_shipping.xml
+++ b/app/code/Magento/Bundle/view/frontend/layout/multishipping_checkout_shipping.xml
@@ -25,9 +25,9 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceBlock name="checkout_shipping">
-        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Checkout::multishipping/item/default.phtml" cacheable="false"/>
+        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
     </referenceBlock>
     <referenceBlock name="checkout_billing_items">
-        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Checkout::multishipping/item/default.phtml" cacheable="false"/>
+        <block class="Magento\Bundle\Block\Checkout\Cart\Item\Renderer" as="bundle" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
     </referenceBlock>
 </layout>
diff --git a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php
index 686cf59347a5d92a7764a88ba14cbc2387e86244..4c94651463a5a08f69c6e6dcfc39dd7f0a7f0122 100644
--- a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php
+++ b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php
@@ -44,7 +44,7 @@ class Data extends \Magento\Captcha\Helper\Data
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Core\Model\StoreManager $storeManager
      * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Captcha\Model\CaptchaFactory $factory
      * @param \Magento\Backend\App\ConfigInterface $backendConfig
      */
@@ -52,7 +52,7 @@ class Data extends \Magento\Captcha\Helper\Data
         \Magento\App\Helper\Context $context,
         \Magento\Core\Model\StoreManager $storeManager,
         \Magento\Core\Model\Config $config,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Captcha\Model\CaptchaFactory $factory,
         \Magento\Backend\App\ConfigInterface $backendConfig
     ) {
diff --git a/app/code/Magento/Captcha/Helper/Data.php b/app/code/Magento/Captcha/Helper/Data.php
index c8de8b21702e5dfab0bd55e0376b5c320a0c60b8..60738374319140454117bfcf80ddfce6493ad805 100644
--- a/app/code/Magento/Captcha/Helper/Data.php
+++ b/app/code/Magento/Captcha/Helper/Data.php
@@ -68,7 +68,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     protected $_config;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -86,14 +86,14 @@ class Data extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Config $config
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Captcha\Model\CaptchaFactory $factory
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Config $config,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Captcha\Model\CaptchaFactory $factory
     ) {
         $this->_storeManager = $storeManager;
@@ -150,7 +150,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
         $fontsConfig = $this->_config->getValue(\Magento\Captcha\Helper\Data::XML_PATH_CAPTCHA_FONTS, 'default');
         $fonts = array();
         if ($fontsConfig) {
-            $libDir = $this->_filesystem->getPath(\Magento\Filesystem::LIB);
+            $libDir = $this->_filesystem->getPath(\Magento\App\Filesystem::LIB_DIR);
             foreach ($fontsConfig as $fontName => $fontConfig) {
                 $fonts[$fontName] = array(
                     'label' => $fontConfig['label'],
@@ -169,7 +169,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      */
     public function getImgDir($website = null)
     {
-        $mediaDir = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDir = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $captchaDir = '/captcha/' . $this->_getWebsiteCode($website);
         $mediaDir->create($captchaDir);
         $mediaDir->changePermissions($captchaDir, 0775);
@@ -196,7 +196,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      */
     public function getImgUrl($website = null)
     {
-        return $this->_storeManager->getStore()->getBaseUrl(\Magento\Filesystem::MEDIA) . 'captcha'
+        return $this->_storeManager->getStore()->getBaseUrl(\Magento\App\Filesystem::MEDIA_DIR) . 'captcha'
             . '/' . $this->_getWebsiteCode($website) . '/';
     }
 }
diff --git a/app/code/Magento/Captcha/Model/Cron.php b/app/code/Magento/Captcha/Model/Cron.php
index 5b15e6c0883fa7735f108cf49e5c40f11be53642..4c225607f5aee8e686e467379ec60f4abde213cf 100644
--- a/app/code/Magento/Captcha/Model/Cron.php
+++ b/app/code/Magento/Captcha/Model/Cron.php
@@ -64,20 +64,20 @@ class Cron
      * @param Resource\LogFactory $resLogFactory
      * @param \Magento\Captcha\Helper\Data $helper
      * @param \Magento\Captcha\Helper\Adminhtml\Data $adminHelper
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\StoreManager $storeManager
      */
     public function __construct(
         \Magento\Captcha\Model\Resource\LogFactory $resLogFactory,
         \Magento\Captcha\Helper\Data $helper,
         \Magento\Captcha\Helper\Adminhtml\Data $adminHelper,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\StoreManager $storeManager
     ) {
         $this->_resLogFactory = $resLogFactory;
         $this->_helper = $helper;
         $this->_adminHelper = $adminHelper;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_storeManager = $storeManager;
     }
 
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
index af9ceafc56de96b0f63dd9292006afb067e9aa41..3502ccac77d440576af1cf6348863c2cf893efca 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit.php
@@ -216,11 +216,6 @@ class Edit extends \Magento\Backend\Block\Widget
         return $setId;
     }
 
-    public function getIsGrouped()
-    {
-        return $this->getProduct()->isGrouped();
-    }
-
     public function getDuplicateUrl()
     {
         return $this->getUrl('catalog/*/duplicate', array('_current'=>true));
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php
index 0145f6d499de1e2d05056f204d5d5694dff27766..8d89f26d3f3ce164a8f2450b238eda54afecc0fd 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Alerts.php
@@ -35,7 +35,7 @@
 
 namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tab;
 
-class Alerts extends \Magento\Backend\Block\Template
+class Alerts extends \Magento\Backend\Block\Widget\Tab
 {
     protected $_template = 'catalog/product/tab/alert.phtml';
 
@@ -75,4 +75,16 @@ class Alerts extends \Magento\Backend\Block\Template
     {
         return $this->getChildHtml('accordion');
     }
+
+    /**
+     * Tab is hidden
+     *
+     * @return boolean
+     */
+    public function canShowTab()
+    {
+        $alertPriceAllow = $this->_storeConfig->getConfig('catalog/productalert/allow_price');
+        $alertStockAllow = $this->_storeConfig->getConfig('catalog/productalert/allow_stock');
+        return ($alertPriceAllow || $alertStockAllow) && parent::canShowTab();
+    }
 }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
index 88c438fca68ead6ea425798198ae7e8900549f4e..f722228288b1d65423bf8e13a9d1bb2cb776b019 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Attributes.php
@@ -187,6 +187,7 @@ class Attributes extends \Magento\Catalog\Block\Adminhtml\Form
                     $element = $form->getElement($attribute);
                     if ($element) {
                         $element->setReadonly(true, true);
+                        $element->lock();
                     }
                 }
             }
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php
index 9d13fc6266b8f98462439cb3a3b5996b52ab1d2a..07cf853b47e38be1472d79889db2e44cbb67625f 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs.php
@@ -192,13 +192,9 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs
              * @see \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs\Configurable
              * @see \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tabs
              */
-            if (!$product->isGrouped()) {
-                $this->addTab('customer_options', array(
-                    'label' => __('Custom Options'),
-                    'url'   => $this->getUrl('catalog/*/options', array('_current' => true)),
-                    'class' => 'ajax',
-                    'group_code' => self::ADVANCED_TAB_GROUP_CODE,
-                ));
+            if ($this->getChildBlock('customer_options')) {
+                $this->addTab('customer_options', 'customer_options');
+                $this->getChildBlock('customer_options')->setGroupCode(self::ADVANCED_TAB_GROUP_CODE);
             }
 
             $this->addTab('related', array(
@@ -227,22 +223,14 @@ class Tabs extends \Magento\Backend\Block\Widget\Tabs
                 unset($advancedGroups['design']);
             }
 
-            $alertPriceAllow = $this->_storeConfig->getConfig('catalog/productalert/allow_price');
-            $alertStockAllow = $this->_storeConfig->getConfig('catalog/productalert/allow_stock');
-            if (($alertPriceAllow || $alertStockAllow) && !$product->isGrouped()) {
-                $this->addTab('product-alerts', array(
-                    'label'     => __('Product Alerts'),
-                    'content'   => $this->_translateHtml($this->getLayout()
-                        ->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Alerts', 'admin.alerts.products')
-                        ->toHtml()
-                    ),
-                    'group_code' => self::ADVANCED_TAB_GROUP_CODE,
-                ));
+            if ($this->getChildBlock('product-alerts')) {
+                $this->addTab('product-alerts', 'product-alerts');
+                $this->getChildBlock('product-alerts')->setGroupCode(self::ADVANCED_TAB_GROUP_CODE);
             }
 
             if ($this->getRequest()->getParam('id')) {
                 if ($this->_catalogData->isModuleEnabled('Magento_Review')) {
-                    if ($this->_authorization->isAllowed('Magento_Review::reviews_all')){
+                    if ($this->_authorization->isAllowed('Magento_Review::reviews_all')) {
                         $this->addTab('product-reviews', array(
                             'label' => __('Product Reviews'),
                             'url'   => $this->getUrl('catalog/*/reviews', array('_current' => true)),
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs/Grouped.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs/Grouped.php
deleted file mode 100644
index dc163d837b9e07ba352ce4910e3efd03cbfd1060..0000000000000000000000000000000000000000
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tabs/Grouped.php
+++ /dev/null
@@ -1,48 +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)
- */
-
-/**
- * admin edit tabs for grouped product
- *
- * @category    Magento
- * @package     Magento_Adminhtml
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs;
-
-class Grouped extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs
-{
-    protected function _prepareLayout()
-    {
-        parent::_prepareLayout();
-
-        $this->addTab('super', array(
-            'label'     => __('Associated Products'),
-            'url'       => $this->getUrl('catalog/*/superGroup', array('_current'=>true)),
-            'class'     => 'ajax',
-        ));
-    }
-}
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
index d31f24941ce4b931fa82abaf8dcce56751d9accf..9723c5e870fedb6fd05c7c427beca148f8475328 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
@@ -129,10 +129,11 @@ class Category extends \Magento\Data\Form\Element\Multiselect
         $button = $this->_layout
             ->createBlock('Magento\Backend\Block\Widget\Button')
             ->setData(array(
-                'id'        => 'add_category_button',
-                'label'     => $newCategoryCaption,
-                'title'     => $newCategoryCaption,
-                'onclick'   => 'jQuery("#new-category").dialog("open")'
+                'id' => 'add_category_button',
+                'label' => $newCategoryCaption,
+                'title' => $newCategoryCaption,
+                'onclick' => 'jQuery("#new-category").dialog("open")',
+                'disabled' => $this->getDisabled(),
             ));
         $return = <<<HTML
     <input id="{$htmlId}-suggest" placeholder="$suggestPlaceholder" />
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
index 2ba696447874e2070ffe1892eb62fc78ea7e0c50..07a5f4e7bc5114b69a4b59269d3c7f70dc46f6a6 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
+++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
@@ -84,6 +84,9 @@ class Weight extends \Magento\Data\Form\Element\Text
         if (!$this->getForm()->getDataObject()->getTypeInstance()->hasWeight()) {
             $this->_virtual->setChecked('checked');
         }
+        if ($this->getDisabled()) {
+            $this->_virtual->setDisabled($this->getDisabled());
+        }
         return '<div class="fields-group-2"><div class="field"><div class="addon"><div class="control">'
             . parent::getElementHtml()
             . '<label class="addafter" for="'
diff --git a/app/code/Magento/Catalog/Block/Navigation.php b/app/code/Magento/Catalog/Block/Navigation.php
index 7dc27bd4b8aa1ec2f369dd04529b97bf6d19378d..5a5e88638f642027f6ac551df960fef455049cca 100644
--- a/app/code/Magento/Catalog/Block/Navigation.php
+++ b/app/code/Magento/Catalog/Block/Navigation.php
@@ -119,6 +119,7 @@ class Navigation extends \Magento\View\Element\Template
         $this->_registry = $registry;
         $this->_categoryInstance = $categoryFactory->create();
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php
index 5959c5a1e51cbdbb674990ae9f958e88cabbea9c..89e1ea3bd992cba40b744b4f4da3a964c50c790d 100644
--- a/app/code/Magento/Catalog/Block/Product/AbstractProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/AbstractProduct.php
@@ -112,7 +112,7 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
     /**
      * @var \Magento\Math\Random
      */
-    protected $mathRandom;
+    protected $_mathRandom;
 
     /**
      * @var \Magento\Checkout\Helper\Cart
@@ -152,6 +152,7 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
      * @param \Magento\Theme\Helper\Layout $layoutHelper
      * @param \Magento\Catalog\Helper\Image $imageHelper
      * @param array $data
+     * @param array $priceBlockTypes
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -167,7 +168,8 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
         \Magento\Catalog\Helper\Product\Compare $compareProduct,
         \Magento\Theme\Helper\Layout $layoutHelper,
         \Magento\Catalog\Helper\Image $imageHelper,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_imageHelper = $imageHelper;
         $this->_layoutHelper = $layoutHelper;
@@ -178,7 +180,8 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
         $this->_coreRegistry = $registry;
         $this->_taxData = $taxData;
         $this->_catalogData = $catalogData;
-        $this->mathRandom = $mathRandom;
+        $this->_mathRandom = $mathRandom;
+        $this->_priceBlockTypes = $priceBlockTypes;
         parent::__construct($context, $data);
     }
 
@@ -229,25 +232,24 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
     }
 
     /**
-     * Enter description here...
+     * Retrieve add to wishlist params
      *
      * @param \Magento\Catalog\Model\Product $product
      * @return string
      */
-    public function getAddToWishlistUrl($product)
+    public function getAddToWishlistParams($product)
     {
-        return $this->_wishlistHelper->getAddUrl($product);
+        return $this->_wishlistHelper->getAddParams($product);
     }
 
     /**
      * Retrieve Add Product to Compare Products List URL
      *
-     * @param \Magento\Catalog\Model\Product $product
      * @return string
      */
-    public function getAddToCompareUrl($product)
+    public function getAddToCompareUrl()
     {
-        return $this->_compareProduct->getAddUrl($product);
+        return $this->_compareProduct->getAddUrl();
     }
 
     /**
@@ -427,7 +429,6 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
         return $this->_getPriceBlock($product->getTypeId())
             ->setTemplate($this->getTierPriceTemplate())
             ->setProduct($product)
-            ->setInGrouped($product->isGrouped())
             ->toHtml();
     }
 
@@ -832,6 +833,6 @@ abstract class AbstractProduct extends \Magento\View\Element\Template
      */
     public function getRandomString($length, $chars = null)
     {
-        return $this->mathRandom->getRandomString($length, $chars);
+        return $this->_mathRandom->getRandomString($length, $chars);
     }
 }
diff --git a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php
index e691e676fcaaf9f5ac39041ac2a41195c417414f..468469635ec126888588dc711639afd431ba6514 100644
--- a/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php
+++ b/app/code/Magento/Catalog/Block/Product/Compare/ListCompare.php
@@ -127,6 +127,7 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare
      * @param \Magento\Log\Model\Visitor $logVisitor
      * @param \Magento\Customer\Model\Session $customerSession
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -147,7 +148,8 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare
         \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
         \Magento\Log\Model\Visitor $logVisitor,
         \Magento\Customer\Model\Session $customerSession,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_wishlistHelper = $wishlistHelper;
         $this->_coreData = $coreData;
@@ -167,26 +169,26 @@ class ListCompare extends \Magento\Catalog\Block\Product\Compare\AbstractCompare
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
-     * Retrieve url for adding product to wishlist with params
+     * Get add to wishlist params
      *
      * @param \Magento\Catalog\Model\Product $product
-     * @return string
+     * @return array
      */
-    public function getAddToWishlistUrl($product)
+    public function getAddToWishlistParams($product)
     {
         $continueUrl    = $this->_coreData->urlEncode($this->getUrl('customer/account'));
         $urlParamName   = \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED;
 
-        $params = array(
-            $urlParamName   => $continueUrl
-        );
+        $continueUrlParams = array($urlParamName => $continueUrl);
 
-        return $this->_wishlistHelper->getAddUrlWithParams($product, $params);
+        return $this->_wishlistHelper->getAddParams($product, $continueUrlParams);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Product/Gallery.php b/app/code/Magento/Catalog/Block/Product/Gallery.php
index cb2d461d41c4ba63ccb236d4649e0626b612ebfd..70657a25cbda802af8549f1cce77eee6bcf305c4 100644
--- a/app/code/Magento/Catalog/Block/Product/Gallery.php
+++ b/app/code/Magento/Catalog/Block/Product/Gallery.php
@@ -108,7 +108,7 @@ class Gallery extends \Magento\View\Element\Template
     {
         $file = $this->getCurrentImage()->getPath();
 
-        if ($this->_filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA)->isFile($file)) {
+        if ($this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR)->isFile($file)) {
             $size = getimagesize($file);
             if (isset($size[0])) {
                 if ($size[0] > 600) {
diff --git a/app/code/Magento/Catalog/Block/Product/ListProduct.php b/app/code/Magento/Catalog/Block/Product/ListProduct.php
index 02832eacf0c3f1fba65162b8828f266a466e14af..2d14fe67088a0ca53598651eb536e8b8143c78d7 100644
--- a/app/code/Magento/Catalog/Block/Product/ListProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/ListProduct.php
@@ -79,6 +79,7 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Catalog\Model\Layer $catalogLayer
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -96,7 +97,8 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Catalog\Model\Layer $catalogLayer,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_categoryFactory = $categoryFactory;
         $this->_catalogLayer = $catalogLayer;
@@ -112,7 +114,8 @@ class ListProduct extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Catalog/Block/Product/NewProduct.php b/app/code/Magento/Catalog/Block/Product/NewProduct.php
index df802b2ace756b98e7395846684456567b6bb1b6..298044570e2a06e5e612bbfe15d50ef5b8eefd4e 100644
--- a/app/code/Magento/Catalog/Block/Product/NewProduct.php
+++ b/app/code/Magento/Catalog/Block/Product/NewProduct.php
@@ -82,6 +82,7 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
      * @param \Magento\Customer\Model\Session $customerSession
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -100,7 +101,8 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
         \Magento\Customer\Model\Session $customerSession,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_productCollectionFactory = $productCollectionFactory;
         $this->_catalogProductVisibility = $catalogProductVisibility;
@@ -117,8 +119,10 @@ class NewProduct extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Product/Price/Template.php b/app/code/Magento/Catalog/Block/Product/Price/Template.php
index 2464bbc1da57acae67cc7060865270f1e5f404b7..b7541aadd67573adcdf09e73538468c8b9b19de2 100644
--- a/app/code/Magento/Catalog/Block/Product/Price/Template.php
+++ b/app/code/Magento/Catalog/Block/Product/Price/Template.php
@@ -43,6 +43,20 @@ class Template extends \Magento\View\Element\AbstractBlock
      */
     protected $_priceBlockTypes = array();
 
+    /**
+     * @param \Magento\View\Element\Context $context
+     * @param array $priceBlockTypes
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Context $context,
+        array $priceBlockTypes = array(),
+        array $data = array()
+    ) {
+        $this->_priceBlockTypes = $priceBlockTypes;
+        parent::__construct($context, $data);
+    }
+
     /**
      * Retrieve array of Price Block Types
      *
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php b/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php
index c20de66e4ff73600175fc1fa7c0cc0f71567a068..efb01480736bf0b78d1eb1abf85a33a42725e89e 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Promotion.php
@@ -58,6 +58,7 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct
      * @param \Magento\Catalog\Model\LayerFactory $layerFactory
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -77,7 +78,8 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct
         \Magento\Catalog\Model\Layer $catalogLayer,
         \Magento\Catalog\Model\LayerFactory $layerFactory,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_layerFactory = $layerFactory;
         $this->_productCollectionFactory = $productCollectionFactory;
@@ -95,7 +97,8 @@ class Promotion extends \Magento\Catalog\Block\Product\ListProduct
             $imageHelper,
             $categoryFactory,
             $catalogLayer,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Random.php b/app/code/Magento/Catalog/Block/Product/ProductList/Random.php
index 922f75417a7d99fab221ecefa7745d80215b77f7..af628b100907f9582dc3c902b525d2aaf9a7b64c 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Random.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Random.php
@@ -64,6 +64,7 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct
      * @param \Magento\Catalog\Model\LayerFactory $layerFactory
      * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -83,7 +84,8 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct
         \Magento\Catalog\Model\Layer $catalogLayer,
         \Magento\Catalog\Model\LayerFactory $layerFactory,
         \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_layerFactory = $layerFactory;
         $this->_productCollectionFactory = $productCollectionFactory;
@@ -101,7 +103,8 @@ class Random extends \Magento\Catalog\Block\Product\ListProduct
             $imageHelper,
             $categoryFactory,
             $catalogLayer,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php
index 829fbd47f33eb778c4b25450e82bfdbc02a35749..da7bc90343e8946cd7ea1d578a87f8a376da40cc 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Related.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Related.php
@@ -79,6 +79,7 @@ class Related extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -97,7 +98,8 @@ class Related extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Checkout\Model\Resource\Cart $checkoutCart,
         \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
         \Magento\Checkout\Model\Session $checkoutSession,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_checkoutCart = $checkoutCart;
         $this->_catalogProductVisibility = $catalogProductVisibility;
@@ -114,8 +116,10 @@ class Related extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareData()
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
index 9dc656ec0f5aaf5708bc821ee6d3f2d91e59330e..f6b4b4c47ce916f8bdcbebded2d0cf8ee84b2a5a 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php
@@ -172,6 +172,7 @@ class Toolbar extends \Magento\View\Element\Template
         $this->_catalogSession = $catalogSession;
         $this->_catalogConfig = $catalogConfig;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php
index c0a71ef56ba78f10e714c7caf27fe75e3a76b740..f62188a8e1fe0e3e627f29002a886947d73a319a 100644
--- a/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php
+++ b/app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php
@@ -85,6 +85,7 @@ class Upsell extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -103,7 +104,8 @@ class Upsell extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Checkout\Model\Resource\Cart $checkoutCart,
         \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
         \Magento\Checkout\Model\Session $checkoutSession,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_checkoutCart = $checkoutCart;
         $this->_catalogProductVisibility = $catalogProductVisibility;
@@ -120,8 +122,10 @@ class Upsell extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareData()
diff --git a/app/code/Magento/Catalog/Block/Product/Send.php b/app/code/Magento/Catalog/Block/Product/Send.php
index 1d7d6bf745d4d64f7cd6b7b503899f221e5d8161..6b9c1a6197d8b3f0b18c60757b69e7e2dbd3ac2f 100644
--- a/app/code/Magento/Catalog/Block/Product/Send.php
+++ b/app/code/Magento/Catalog/Block/Product/Send.php
@@ -57,6 +57,7 @@ class Send extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Catalog\Helper\Image $imageHelper
      * @param \Magento\Customer\Model\Session $customerSession
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -73,7 +74,8 @@ class Send extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Theme\Helper\Layout $layoutHelper,
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Customer\Model\Session $customerSession,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct(
@@ -88,8 +90,10 @@ class Send extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Block/Product/View.php b/app/code/Magento/Catalog/Block/Product/View.php
index 811fb9842c56c9bddac53d85d8f634645aeee7d2..37a8d9a19f7124978a0ddf4d5358cffb3c01a01d 100644
--- a/app/code/Magento/Catalog/Block/Product/View.php
+++ b/app/code/Magento/Catalog/Block/Product/View.php
@@ -74,6 +74,11 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
      */
     protected $_productHelper;
 
+    /**
+     * @var \Magento\Catalog\Model\ProductTypes\ConfigInterface
+     */
+    protected $productTypeConfig;
+
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Catalog\Model\Config $catalogConfig
@@ -92,8 +97,10 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Tax\Model\Calculation $taxCalculation
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Catalog\Helper\Product $productHelper
+     * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig
      * @param array $data
-     * 
+     * @param array $priceBlockTypes
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -114,13 +121,16 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Stdlib\String $string,
         \Magento\Catalog\Helper\Product $productHelper,
-        array $data = array()
+        \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_productHelper = $productHelper;
         $this->_coreData = $coreData;
         $this->_jsonEncoder = $jsonEncoder;
         $this->_productFactory = $productFactory;
         $this->_taxCalculation = $taxCalculation;
+        $this->productTypeConfig = $productTypeConfig;
         $this->string = $string;
         parent::__construct(
             $context,
@@ -134,7 +144,8 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
@@ -157,7 +168,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
             $currentCategory = $this->_coreRegistry->registry('current_category');
             if ($keyword) {
                 $headBlock->setKeywords($keyword);
-            } elseif($currentCategory) {
+            } elseif ($currentCategory) {
                 $headBlock->setKeywords($product->getName());
             }
             $description = $product->getMetaDescription();
@@ -374,4 +385,14 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
     {
         return $this->getProduct()->getOptionsContainer() == 'container1' ? 'container1' : 'container2';
     }
+
+    /**
+     * Check whether quantity field should be rendered
+     *
+     * @return bool
+     */
+    public function shouldRenderQuantity()
+    {
+        return !$this->productTypeConfig->isProductSet($this->getProduct()->getTypeId());
+    }
 }
diff --git a/app/code/Magento/Catalog/Block/Product/View/AbstractView.php b/app/code/Magento/Catalog/Block/Product/View/AbstractView.php
index 6eaf77fd5a597455c8870ae6530b77744e07e700..e56062c6f642788a1381cd6d83aaa0ae9e9563c6 100644
--- a/app/code/Magento/Catalog/Block/Product/View/AbstractView.php
+++ b/app/code/Magento/Catalog/Block/Product/View/AbstractView.php
@@ -54,6 +54,7 @@ abstract class AbstractView extends \Magento\Catalog\Block\Product\AbstractProdu
      * @param \Magento\Catalog\Helper\Image $imageHelper
      * @param \Magento\Stdlib\ArrayUtils $arrayUtils
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -70,7 +71,8 @@ abstract class AbstractView extends \Magento\Catalog\Block\Product\AbstractProdu
         \Magento\Theme\Helper\Layout $layoutHelper,
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Stdlib\ArrayUtils $arrayUtils,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->arrayUtils = $arrayUtils;
         parent::__construct(
@@ -85,11 +87,11 @@ abstract class AbstractView extends \Magento\Catalog\Block\Product\AbstractProdu
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
-
     /**
      * Retrieve product
      *
diff --git a/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php b/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php
index b834b6e7c1bd5c4069a3cce08ac115d965652d4a..01ddde2fefe5728036359b88f317452f6fc6ce4b 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php
+++ b/app/code/Magento/Catalog/Block/Product/View/Type/Configurable.php
@@ -57,13 +57,6 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
      */
     protected $_catalogProduct = null;
 
-    /**
-     * Tax calculation
-     *
-     * @var \Magento\Tax\Model\Calculation
-     */
-    protected $_taxCalculation;
-
     /**
      * @var \Magento\Json\EncoderInterface
      */
@@ -74,6 +67,11 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
      */
     protected $_imageHelper;
 
+    /**
+     * @var \Magento\Catalog\Helper\Product\Price
+     */
+    protected $priceHelper;
+
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Catalog\Model\Config $catalogConfig
@@ -88,9 +86,10 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
      * @param \Magento\Catalog\Helper\Image $imageHelper
      * @param \Magento\Stdlib\ArrayUtils $arrayUtils
      * @param \Magento\Json\EncoderInterface $jsonEncoder
-     * @param \Magento\Tax\Model\Calculation $taxCalculation
      * @param \Magento\Catalog\Helper\Product $catalogProduct
+     * @param \Magento\Catalog\Helper\Product\Price $priceHelper
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -108,14 +107,15 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Stdlib\ArrayUtils $arrayUtils,
         \Magento\Json\EncoderInterface $jsonEncoder,
-        \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Catalog\Helper\Product $catalogProduct,
-        array $data = array()
+        \Magento\Catalog\Helper\Product\Price $priceHelper,
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_imageHelper = $imageHelper;
-        $this->_taxCalculation = $taxCalculation;
         $this->_catalogProduct = $catalogProduct;
         $this->_jsonEncoder = $jsonEncoder;
+        $this->priceHelper = $priceHelper;
         parent::__construct(
             $context,
             $catalogConfig,
@@ -129,8 +129,10 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
             $layoutHelper,
             $imageHelper,
             $arrayUtils,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -217,10 +219,11 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
         $store      = $this->getCurrentStore();
         $taxHelper  = $this->_taxData;
         $currentProduct = $this->getProduct();
+        $preConfiguredValues = null;
 
-        $preconfiguredFlag = $currentProduct->hasPreconfiguredValues();
-        if ($preconfiguredFlag) {
-            $preconfiguredValues = $currentProduct->getPreconfiguredValues();
+        $preConfiguredFlag = $currentProduct->hasPreconfiguredValues();
+        if ($preConfiguredFlag) {
+            $preConfiguredValues = $currentProduct->getPreconfiguredValues();
             $defaultValues       = array();
         }
 
@@ -264,7 +267,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
             $prices = $attribute->getPrices();
             if (is_array($prices)) {
                 foreach ($prices as $value) {
-                    if(!$this->_validateAttributeValue($attributeId, $value, $options)) {
+                    if (!$this->_validateAttributeValue($attributeId, $value, $options)) {
                         continue;
                     }
                     $currentProduct->setConfigurablePrice(
@@ -294,37 +297,37 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
                 }
             }
             /**
-             * Prepare formated values for options choose
+             * Prepare formatted values for options choose
              */
             foreach ($optionPrices as $optionPrice) {
                 foreach ($optionPrices as $additional) {
                     $this->_preparePrice(abs($additional-$optionPrice));
                 }
             }
-            if($this->_validateAttributeInfo($info)) {
+            if ($this->_validateAttributeInfo($info)) {
                 $attributes[$attributeId] = $info;
             }
 
             // Add attribute default value (if set)
-            if ($preconfiguredFlag) {
-                $configValue = $preconfiguredValues->getData('super_attribute/' . $attributeId);
+            if ($preConfiguredFlag) {
+                $configValue = $preConfiguredValues->getData('super_attribute/' . $attributeId);
                 if ($configValue) {
                     $defaultValues[$attributeId] = $configValue;
                 }
             }
         }
 
-        if (!$this->_taxCalculation->getCustomer() && $this->_coreRegistry->registry('current_customer')) {
-            $this->_taxCalculation->setCustomer($this->_coreRegistry->registry('current_customer'));
+        if (!$this->priceHelper->getCustomer() && $this->_coreRegistry->registry('current_customer')) {
+            $this->priceHelper->setCustomer($this->_coreRegistry->registry('current_customer'));
         }
 
-        $_request = $this->_taxCalculation->getRateRequest(false, false, false);
+        $_request = $this->priceHelper->getRateRequest(false, false, false);
         $_request->setProductClassId($currentProduct->getTaxClassId());
-        $defaultTax = $this->_taxCalculation->getRate($_request);
+        $defaultTax = $this->priceHelper->getRate($_request);
 
-        $_request = $this->_taxCalculation->getRateRequest();
+        $_request = $this->priceHelper->getRateRequest();
         $_request->setProductClassId($currentProduct->getTaxClassId());
-        $currentTax = $this->_taxCalculation->getRate($_request);
+        $currentTax = $this->priceHelper->getRate($_request);
 
         $taxConfig = array(
             'includeTax'        => $taxHelper->priceIncludesTax(),
@@ -346,7 +349,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
             'images'            => $options['images'],
         );
 
-        if ($preconfiguredFlag && !empty($defaultValues)) {
+        if ($preConfiguredFlag && !empty($defaultValues)) {
             $config['defaultValues'] = $defaultValues;
         }
 
@@ -365,7 +368,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
      */
     protected function _validateAttributeValue($attributeId, &$value, &$options)
     {
-        if(isset($options[$attributeId][$value['value_index']])) {
+        if (isset($options[$attributeId][$value['value_index']])) {
             return true;
         }
 
@@ -380,7 +383,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView
      */
     protected function _validateAttributeInfo(&$info)
     {
-        if(count($info['options']) > 0) {
+        if (count($info['options']) > 0) {
             return true;
         }
         return false;
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php
index 414a417476c6be202070198408cd424f34492014..9200887cd11c19d1c3211a7a608efa964fd6434a 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product.php
@@ -37,11 +37,6 @@ use Magento\Backend\App\Action;
 
 class Product extends \Magento\Backend\App\Action
 {
-    /**
-     * The greatest value which could be stored in CatalogInventory Qty field
-     */
-    const MAX_QTY_VALUE = 99999999.9999;
-
     /**
      * Array of actions which can be processed without secret key validation
      *
@@ -54,7 +49,7 @@ class Product extends \Magento\Backend\App\Action
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $registry = null;
 
     /**
      * @var \Magento\Core\Filter\Date
@@ -62,17 +57,41 @@ class Product extends \Magento\Backend\App\Action
     protected $_dateFilter;
 
     /**
-     * @param \Magento\Backend\App\Action\Context $context
-     * @param \Magento\Core\Model\Registry $coreRegistry
+     * @var Product\Initialization\Helper
+     */
+    protected $initializationHelper;
+
+    /**
+     * @var Product\Initialization\StockDataFilter
+     */
+    protected $stockFilter;
+
+    /**
+     * @var \Magento\Catalog\Model\Product\Copier
+     */
+    protected $productCopier;
+
+    /**
+     * @param Action\Context $context
+     * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Filter\Date $dateFilter
+     * @param Product\Initialization\Helper $initializationHelper
+     * @param Product\Initialization\StockDataFilter $stockFilter
+     * @param \Magento\Catalog\Model\Product\Copier $productCopier
      */
     public function __construct(
         \Magento\Backend\App\Action\Context $context,
-        \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Core\Filter\Date $dateFilter
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Core\Filter\Date $dateFilter,
+        \Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper $initializationHelper,
+        \Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter $stockFilter,
+        \Magento\Catalog\Model\Product\Copier $productCopier
     ) {
-        $this->_coreRegistry = $coreRegistry;
+        $this->stockFilter = $stockFilter;
+        $this->initializationHelper = $initializationHelper;
+        $this->registry = $registry;
         $this->_dateFilter = $dateFilter;
+        $this->productCopier = $productCopier;
         parent::__construct($context);
     }
 
@@ -160,8 +179,8 @@ class Product extends \Magento\Backend\App\Action
                 ->setWebsiteIds($configProduct->getWebsiteIds());
         }
 
-        $this->_coreRegistry->register('product', $product);
-        $this->_coreRegistry->register('current_product', $product);
+        $this->registry->register('product', $product);
+        $this->registry->register('current_product', $product);
         $this->_objectManager->get('Magento\Cms\Model\Wysiwyg\Config')->setStoreId(
             $this->getRequest()->getParam('store')
         );
@@ -181,7 +200,8 @@ class Product extends \Magento\Backend\App\Action
         \Magento\Backend\Block\Widget\Grid $gridBlock,
         $productsArray
     ) {
-        return $this->_view->getLayout()->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Ajax\Serializer')
+        return $this->_view->getLayout()
+            ->createBlock('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Ajax\Serializer')
             ->setGridBlock($gridBlock)
             ->setProducts($productsArray)
             ->setInputElementName($inputName);
@@ -225,7 +245,8 @@ class Product extends \Magento\Backend\App\Action
 
         $productData = $this->getRequest()->getPost('product');
         if ($productData) {
-            $this->_filterStockData($productData['stock_data']);
+            $stockData = isset($productData['stock_data']) ? $productData['stock_data'] : array();
+            $productData['stock_data'] = $this->stockFilter->filter($stockData);
             $product->addData($productData);
         }
 
@@ -378,7 +399,7 @@ class Product extends \Magento\Backend\App\Action
     public function generateVariationsAction()
     {
         $this->_saveAttributeOptions();
-        $this->_initProductSave($this->_initProduct());
+        $this->initializationHelper->initialize($this->_initProduct());
         $this->_view->loadLayout();
         $this->_view->renderLayout();
     }
@@ -526,26 +547,6 @@ class Product extends \Magento\Backend\App\Action
         $this->_view->renderLayout();
     }
 
-    /**
-     * Get associated grouped products grid
-     */
-    public function superGroupAction()
-    {
-        $this->_initProduct();
-        $this->_view->loadLayout(false);
-        $this->_view->renderLayout();
-    }
-
-    /**
-     * Get associated grouped products grid popup
-     */
-    public function superGroupPopupAction()
-    {
-        $this->_initProduct();
-        $this->_view->loadLayout(false);
-        $this->_view->renderLayout();
-    }
-
     /**
      * Get product reviews grid
      *
@@ -555,7 +556,7 @@ class Product extends \Magento\Backend\App\Action
         $this->_initProduct();
         $this->_view->loadLayout();
         $this->_view->getLayout()->getBlock('admin.product.reviews')
-            ->setProductId($this->_coreRegistry->registry('product')->getId())
+            ->setProductId($this->registry->registry('product')->getId())
             ->setUseAjax(true);
         $this->_view->renderLayout();
     }
@@ -700,155 +701,6 @@ class Product extends \Magento\Backend\App\Action
         return $validationResult;
     }
 
-    /**
-     * Initialize product before saving
-     *
-     * @param $product \Magento\Catalog\Model\Product
-     * @return \Magento\Catalog\Model\Product
-     */
-    protected function _initProductSave($product)
-    {
-        $productData = $this->getRequest()->getPost('product');
-        if ($productData) {
-            $this->_filterStockData($productData['stock_data']);
-        }
-
-        foreach (array('category_ids', 'website_ids') as $field) {
-            if (!isset($productData[$field])) {
-                $productData[$field] = array();
-            }
-        }
-
-        $wasLockedMedia = false;
-        if ($product->isLockedAttribute('media')) {
-            $product->unlockAttribute('media');
-            $wasLockedMedia = true;
-        }
-
-        $product->addData($productData);
-
-        if ($wasLockedMedia) {
-            $product->lockAttribute('media');
-        }
-
-        if ($this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')->hasSingleStore()) {
-            $product->setWebsiteIds(
-                array(
-                    $this->_objectManager->get('Magento\Core\Model\StoreManagerInterface')
-                        ->getStore(true)->getWebsite()->getId()
-                )
-            );
-        }
-
-        /**
-         * Create Permanent Redirect for old URL key
-         */
-        // && $product->getOrigData('url_key') != $product->getData('url_key')
-        if ($product->getId() && isset($productData['url_key_create_redirect'])) {
-            $product->setData('save_rewrites_history', (bool)$productData['url_key_create_redirect']);
-        }
-
-        /**
-         * Check "Use Default Value" checkboxes values
-         */
-        $useDefaults = $this->getRequest()->getPost('use_default');
-        if ($useDefaults) {
-            foreach ($useDefaults as $attributeCode) {
-                $product->setData($attributeCode, false);
-            }
-        }
-
-        /**
-         * Init product links data (related, upsell, crosssel)
-         */
-        $links = $this->getRequest()->getPost('links');
-        if (isset($links['related']) && !$product->getRelatedReadonly()) {
-            $product->setRelatedLinkData(
-                $this->_objectManager->get('Magento\Backend\Helper\Js')->decodeGridSerializedInput($links['related'])
-            );
-        }
-        if (isset($links['upsell']) && !$product->getUpsellReadonly()) {
-            $product->setUpSellLinkData(
-                $this->_objectManager->get('Magento\Backend\Helper\Js')->decodeGridSerializedInput($links['upsell'])
-            );
-        }
-        if (isset($links['crosssell']) && !$product->getCrosssellReadonly()) {
-            $product->setCrossSellLinkData($this->_objectManager->get('Magento\Backend\Helper\Js')
-                ->decodeGridSerializedInput($links['crosssell']));
-        }
-
-        if (isset($links['grouped']) && !$product->getGroupedReadonly()) {
-            $product->setGroupedLinkData((array)$links['grouped']);
-        }
-
-        /**
-         * Initialize data for configurable product
-         */
-
-        $attributes = $this->getRequest()->getParam('attributes');
-        if (!empty($attributes)) {
-            $this->_objectManager->get('Magento\Catalog\Model\Product\Type\Configurable')
-                ->setUsedProductAttributeIds($attributes, $product);
-
-            $product->setNewVariationsAttributeSetId($this->getRequest()->getPost('new-variations-attribute-set-id'));
-            $associatedProductIds = $this->getRequest()->getPost('associated_product_ids', array());
-            if ($this->getRequest()->getActionName() != 'generateVariations') {
-                $generatedProductIds = $this->_objectManager->get('Magento\Catalog\Model\Product\Type\Configurable')
-                    ->generateSimpleProducts($product, $this->getRequest()->getPost('variations-matrix', array()));
-                $associatedProductIds = array_merge($associatedProductIds, $generatedProductIds);
-            }
-            $product->setAssociatedProductIds(array_filter($associatedProductIds));
-
-            $product->setCanSaveConfigurableAttributes(
-                (bool)$this->getRequest()->getPost('affect_configurable_product_attributes')
-            );
-        }
-
-        /**
-         * Initialize product options
-         */
-        if (isset($productData['options']) && !$product->getOptionsReadonly()) {
-            $product->setProductOptions($productData['options']);
-        }
-
-        $product->setCanSaveCustomOptions(
-            (bool)$this->getRequest()->getPost('affect_product_custom_options')
-            && !$product->getOptionsReadonly()
-        );
-
-        $this->_eventManager->dispatch(
-            'catalog_product_prepare_save',
-            array('product' => $product, 'request' => $this->getRequest())
-        );
-
-        return $product;
-    }
-
-    /**
-     * Filter product stock data
-     *
-     * @param array $stockData
-     */
-    protected function _filterStockData(&$stockData)
-    {
-        if (!isset($stockData['use_config_manage_stock'])) {
-            $stockData['use_config_manage_stock'] = 0;
-        }
-        if ($stockData['use_config_manage_stock'] == 1 && !isset($stockData['manage_stock'])) {
-            $stockData['manage_stock'] = $this->_objectManager->get('Magento\Core\Model\StoreManager')->getStore()
-                ->getConfig(\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_MANAGE_STOCK);
-        }
-        if (isset($stockData['qty']) && (float)$stockData['qty'] > self::MAX_QTY_VALUE) {
-            $stockData['qty'] = self::MAX_QTY_VALUE;
-        }
-        if (isset($stockData['min_qty']) && (int)$stockData['min_qty'] < 0) {
-            $stockData['min_qty'] = 0;
-        }
-        if (!isset($stockData['is_decimal_divided']) || $stockData['is_qty_decimal'] == 0) {
-            $stockData['is_decimal_divided'] = 0;
-        }
-    }
-
     /**
      * Save product action
      */
@@ -861,9 +713,7 @@ class Product extends \Magento\Backend\App\Action
 
         $data = $this->getRequest()->getPost();
         if ($data) {
-            $this->_filterStockData($data['product']['stock_data']);
-
-            $product = $this->_initProductSave($this->_initProduct());
+            $product = $this->initializationHelper->initialize($this->_initProduct());
             $this->_eventManager->dispatch(
                 'catalog_product_transition_product_type',
                 array('product' => $product, 'request' => $this->getRequest())
@@ -907,7 +757,7 @@ class Product extends \Magento\Backend\App\Action
                 );
 
                 if ($redirectBack === 'duplicate') {
-                    $newProduct = $product->duplicate();
+                    $newProduct = $this->productCopier->copy($product);
                     $this->messageManager->addSuccess(__('You duplicated the product.'));
                 }
 
@@ -959,7 +809,7 @@ class Product extends \Magento\Backend\App\Action
     {
         $product = $this->_initProduct();
         try {
-            $newProduct = $product->duplicate();
+            $newProduct = $this->productCopier->copy($product);
             $this->messageManager->addSuccess(__('You duplicated the product.'));
             $this->_redirect('catalog/*/edit', array('_current'=>true, 'id'=>$newProduct->getId()));
         } catch (\Exception $e) {
@@ -1121,7 +971,7 @@ class Product extends \Magento\Backend\App\Action
      */
     public function customOptionsAction()
     {
-        $this->_coreRegistry->register('import_option_products', $this->getRequest()->getPost('products'));
+        $this->registry->register('import_option_products', $this->getRequest()->getPost('products'));
         $this->_view->loadLayout();
         $this->_view->renderLayout();
     }
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php
index 447bd5f236ec82e91d7ed84316ce41beca0c646f..aabc2d330b948c55c8a1defbf7e5e55802b7bbb9 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery.php
@@ -46,7 +46,7 @@ class Gallery extends \Magento\Backend\App\Action
             $uploader->setAllowRenameFiles(true);
             $uploader->setFilesDispersion(true);
             /** @var \Magento\Filesystem\Directory\Read $mediaDirectory */
-            $mediaDirectory = $this->_objectManager->get('Magento\Filesystem')->getDirectoryRead(\Magento\Filesystem::MEDIA);
+            $mediaDirectory = $this->_objectManager->get('Magento\App\Filesystem')->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
             $config = $this->_objectManager->get('Magento\Catalog\Model\Product\Media\Config');
             $result = $uploader->save($mediaDirectory->getAbsolutePath($config->getBaseTmpMediaPath()));
 
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
new file mode 100644
index 0000000000000000000000000000000000000000..2ddfb3c2548859039175d7a50bf443e3b5a73651
--- /dev/null
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper.php
@@ -0,0 +1,145 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Catalog\Controller\Adminhtml\Product\Initialization;
+
+class Helper 
+{
+    /**
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * @var \Magento\Backend\Helper\Js
+     */
+    protected $jsHelper;
+
+    /**
+     * @var \Magento\Core\Model\StoreManagerInterface
+     */
+    protected $storeManager;
+
+    /**
+     * @var StockDataFilter
+     */
+    protected $stockFilter;
+
+    /**
+     * @var Helper\ProductLinks
+     */
+    protected $productLinks;
+
+    /**
+     * @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;
+    }
+
+    /**
+     * Initialize product before saving
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
+     */
+    public function initialize(\Magento\Catalog\Model\Product $product)
+    {
+        $productData = $this->request->getPost('product');
+
+        if ($productData) {
+            $stockData = isset($productData['stock_data']) ? $productData['stock_data'] : array();
+            $productData['stock_data'] = $this->stockFilter->filter($stockData);
+        }
+
+        foreach (array('category_ids', 'website_ids') as $field) {
+            if (!isset($productData[$field])) {
+                $productData[$field] = array();
+            }
+        }
+
+        $wasLockedMedia = false;
+        if ($product->isLockedAttribute('media')) {
+            $product->unlockAttribute('media');
+            $wasLockedMedia = true;
+        }
+
+        $product->addData($productData);
+
+        if ($wasLockedMedia) {
+            $product->lockAttribute('media');
+        }
+
+        if ($this->storeManager->hasSingleStore()) {
+            $product->setWebsiteIds(array($this->storeManager->getStore(true)->getWebsite()->getId()));
+        }
+
+        /**
+         * Create Permanent Redirect for old URL key
+         */
+        if ($product->getId() && isset($productData['url_key_create_redirect'])) {
+            $product->setData('save_rewrites_history', (bool)$productData['url_key_create_redirect']);
+        }
+
+        /**
+         * Check "Use Default Value" checkboxes values
+         */
+        $useDefaults = $this->request->getPost('use_default');
+        if ($useDefaults) {
+            foreach ($useDefaults as $attributeCode) {
+                $product->setData($attributeCode, false);
+            }
+        }
+
+        $product = $this->productLinks->initializeLinks($product);
+
+        /**
+         * Initialize product options
+         */
+        if (isset($productData['options']) && !$product->getOptionsReadonly()) {
+            $product->setProductOptions($productData['options']);
+        }
+
+        $product->setCanSaveCustomOptions(
+            (bool)$this->request->getPost('affect_product_custom_options')
+            && !$product->getOptionsReadonly()
+        );
+
+        return $product;
+    }
+} 
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.php
new file mode 100644
index 0000000000000000000000000000000000000000..8e56f81f9e8e18fcc078b99c869bad6c4d05b8e7
--- /dev/null
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Configurable.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\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
+
+class Configurable 
+{
+    /**
+     * @param \Magento\Catalog\Model\Product\Type\Configurable $productType
+     * @param \Magento\App\RequestInterface $request
+     */
+    public function __construct(
+        \Magento\Catalog\Model\Product\Type\Configurable $productType,
+        \Magento\App\RequestInterface $request
+    ) {
+        $this->productType = $productType;
+        $this->request = $request;
+    }
+
+    /**
+     * Initialize data for configurable product
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
+     */
+    public function afterInitialize(\Magento\Catalog\Model\Product $product)
+    {
+        $attributes = $this->request->getParam('attributes');
+        if (!empty($attributes)) {
+            $this->productType->setUsedProductAttributeIds($attributes, $product);
+
+            $product->setNewVariationsAttributeSetId($this->request->getPost('new-variations-attribute-set-id'));
+            $associatedProductIds = $this->request->getPost('associated_product_ids', array());
+            if ($this->request->getActionName() != 'generateVariations') {
+                $generatedProductIds = $this->productType
+                    ->generateSimpleProducts($product, $this->request->getPost('variations-matrix', array()));
+                $associatedProductIds = array_merge($associatedProductIds, $generatedProductIds);
+            }
+            $product->setAssociatedProductIds(array_filter($associatedProductIds));
+
+            $product->setCanSaveConfigurableAttributes(
+                (bool)$this->request->getPost('affect_configurable_product_attributes')
+            );
+        }
+
+        return $product;
+    }
+} 
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks.php
new file mode 100644
index 0000000000000000000000000000000000000000..18bbb62ea95274bd353308e52168747536322326
--- /dev/null
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks.php
@@ -0,0 +1,73 @@
+<?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\Catalog\Controller\Adminhtml\Product\Initialization\Helper;
+
+class ProductLinks 
+{
+    /**
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * @var \Magento\Backend\Helper\Js
+     */
+    protected $jsHelper;
+
+    /**
+     * @param \Magento\App\RequestInterface $request
+     * @param \Magento\Backend\Helper\Js $jsHelper
+     */
+    public function __construct(\Magento\App\RequestInterface $request, \Magento\Backend\Helper\Js $jsHelper)
+    {
+        $this->request = $request;
+        $this->jsHelper = $jsHelper;
+    }
+
+    /**
+     * Init product links data (related, upsell, crosssel)
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
+     */
+    public function initializeLinks(\Magento\Catalog\Model\Product $product)
+    {
+        $links = $this->request->getPost('links');
+
+        if (isset($links['related']) && !$product->getRelatedReadonly()) {
+            $product->setRelatedLinkData($this->jsHelper->decodeGridSerializedInput($links['related']));
+        }
+
+        if (isset($links['upsell']) && !$product->getUpsellReadonly()) {
+            $product->setUpSellLinkData($this->jsHelper->decodeGridSerializedInput($links['upsell']));
+        }
+
+        if (isset($links['crosssell']) && !$product->getCrosssellReadonly()) {
+            $product->setCrossSellLinkData($this->jsHelper->decodeGridSerializedInput($links['crosssell']));
+        }
+
+        return $product;
+    }
+} 
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..843c0aa34e23199cf3159638b5052b470b4482a9
--- /dev/null
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilter.php
@@ -0,0 +1,77 @@
+<?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\Catalog\Controller\Adminhtml\Product\Initialization;
+
+class StockDataFilter
+{
+    /**
+     * The greatest value which could be stored in CatalogInventory Qty field
+     */
+    const MAX_QTY_VALUE = 99999999.9999;
+
+    /**
+     * @var \Magento\Core\Model\StoreManagerInterface
+     */
+    protected $storeManager;
+
+    /**
+     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     */
+    public function __construct(\Magento\Core\Model\StoreManagerInterface $storeManager)
+    {
+        $this->storeManager = $storeManager;
+    }
+
+    /**
+     * Filter stock data
+     *
+     * @param array $stockData
+     * @return array
+     */
+    public function filter(array $stockData)
+    {
+        if (!isset($stockData['use_config_manage_stock'])) {
+            $stockData['use_config_manage_stock'] = 0;
+        }
+
+        if ($stockData['use_config_manage_stock'] == 1 && !isset($stockData['manage_stock'])) {
+            $stockData['manage_stock'] = $this->storeManager->getStore()
+                ->getConfig(\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_MANAGE_STOCK);
+        }
+        if (isset($stockData['qty']) && (float)$stockData['qty'] > self::MAX_QTY_VALUE) {
+            $stockData['qty'] = self::MAX_QTY_VALUE;
+        }
+
+        if (isset($stockData['min_qty']) && (int)$stockData['min_qty'] < 0) {
+            $stockData['min_qty'] = 0;
+        }
+
+        if (!isset($stockData['is_decimal_divided']) || $stockData['is_qty_decimal'] == 0) {
+            $stockData['is_decimal_divided'] = 0;
+        }
+
+        return $stockData;
+    }
+} 
diff --git a/app/code/Magento/Catalog/Helper/Product/Compare.php b/app/code/Magento/Catalog/Helper/Product/Compare.php
index c76f8a8a86cad4d08e62d5dd8da85835f909c8ca..b2f6b968aae9a4372d8d2e51463cd839846083d5 100644
--- a/app/code/Magento/Catalog/Helper/Product/Compare.php
+++ b/app/code/Magento/Catalog/Helper/Product/Compare.php
@@ -101,6 +101,16 @@ class Compare extends \Magento\Core\Helper\Url
      */
     protected $_formKey;
 
+    /**
+     * @var \Magento\Wishlist\Helper\Data
+     */
+    protected $_wishlistHelper;
+
+    /**
+     * @var \Magento\Core\Helper\Data
+     */
+    protected $_coreHelper;
+
     /**
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
@@ -110,6 +120,8 @@ class Compare extends \Magento\Core\Helper\Url
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\Session $catalogSession
      * @param \Magento\Data\Form\FormKey $formKey
+     * @param \Magento\Wishlist\Helper\Data $wishlistHelper
+     * @param \Magento\Core\Helper\PostData $coreHelper
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
@@ -119,7 +131,9 @@ class Compare extends \Magento\Core\Helper\Url
         \Magento\Log\Model\Visitor $logVisitor,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\Session $catalogSession,
-        \Magento\Data\Form\FormKey $formKey
+        \Magento\Data\Form\FormKey $formKey,
+        \Magento\Wishlist\Helper\Data $wishlistHelper,
+        \Magento\Core\Helper\PostData $coreHelper
     ) {
         $this->_itemCollectionFactory = $itemCollectionFactory;
         $this->_catalogProductVisibility = $catalogProductVisibility;
@@ -127,6 +141,8 @@ class Compare extends \Magento\Core\Helper\Url
         $this->_customerSession = $customerSession;
         $this->_catalogSession = $catalogSession;
         $this->_formKey = $formKey;
+        $this->_wishlistHelper = $wishlistHelper;
+        $this->_coreHelper = $coreHelper;
         parent::__construct($context, $storeManager);
     }
 
@@ -154,44 +170,38 @@ class Compare extends \Magento\Core\Helper\Url
      * Get parameters used for build add product to compare list urls
      *
      * @param   \Magento\Catalog\Model\Product $product
-     * @return  array
+     * @return  string
      */
-    protected function _getUrlParams($product)
+    public function getPostDataParams($product)
     {
-        return array(
-            'product' => $product->getId(),
-            \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl(),
-            'form_key' => $this->_formKey->getFormKey(),
-        );
+        return $this->_coreHelper->getPostData($this->getAddUrl(), ['product' => $product->getId()]);
     }
 
     /**
-     * Retrieve url for adding product to conpare list
+     * Retrieve url for adding product to compare list
      *
-     * @param   \Magento\Catalog\Model\Product $product
      * @return  string
      */
-    public function getAddUrl($product)
+    public function getAddUrl()
     {
-        return $this->_getUrl('catalog/product_compare/add', $this->_getUrlParams($product));
+        return $this->_getUrl('catalog/product_compare/add');
     }
 
     /**
-     * Retrieve add to wishlist url
+     * Retrieve add to wishlist params
      *
      * @param \Magento\Catalog\Model\Product $product
      * @return string
      */
-    public function getAddToWishlistUrl($product)
+    public function getAddToWishlistParams($product)
     {
         $beforeCompareUrl = $this->_catalogSession->getBeforeCompareUrl();
 
-        $params = array(
-            'product'=>$product->getId(),
+        $encodedUrl = array(
             \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl($beforeCompareUrl)
         );
 
-        return $this->_getUrl('wishlist/index/add', $params);
+        return $this->_wishlistHelper->getAddParams($product, $encodedUrl);
     }
 
     /**
@@ -204,7 +214,7 @@ class Compare extends \Magento\Core\Helper\Url
     {
         $beforeCompareUrl = $this->_catalogSession->getBeforeCompareUrl();
         $params = array(
-            'product'=>$product->getId(),
+            'product' => $product->getId(),
             \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl($beforeCompareUrl)
         );
 
@@ -214,16 +224,22 @@ class Compare extends \Magento\Core\Helper\Url
     /**
      * Retrieve remove item from compare list url
      *
-     * @param   $item
      * @return  string
      */
-    public function getRemoveUrl($item)
+    public function getRemoveUrl()
     {
-        $params = array(
-            'product'=>$item->getId(),
-            \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl()
-        );
-        return $this->_getUrl('catalog/product_compare/remove', $params);
+        return $this->_getUrl('catalog/product_compare/remove');
+    }
+
+    /**
+     * Get parameters to remove products from compare list
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return string
+     */
+    public function getPostDataRemove($product)
+    {
+        return $this->_coreHelper->getPostData($this->getRemoveUrl(), ['product' => $product->getId()]);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Helper/Product/Configuration.php b/app/code/Magento/Catalog/Helper/Product/Configuration.php
index 4b8698ba86f417d75835e743c8932372ece61587..1d76313ee475f1b6a36a510646a6f736e28e238a 100644
--- a/app/code/Magento/Catalog/Helper/Product/Configuration.php
+++ b/app/code/Magento/Catalog/Helper/Product/Configuration.php
@@ -157,51 +157,6 @@ class Configuration extends \Magento\App\Helper\AbstractHelper
         return array_merge($attributes, $this->getCustomOptions($item));
     }
 
-    /**
-     * Retrieves configuration options for grouped product
-     *
-     * @param \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface $item
-     * @return array
-     * @throws \Magento\Core\Exception
-     */
-    public function getGroupedOptions(\Magento\Catalog\Model\Product\Configuration\Item\ItemInterface $item)
-    {
-        $product = $item->getProduct();
-        $typeId = $product->getTypeId();
-        if ($typeId != \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE) {
-             throw new \Magento\Core\Exception(__('The product type to extract configurable options is incorrect.'));
-        }
-
-        $options = array();
-        /**
-         * @var \Magento\Catalog\Model\Product\Type\Grouped
-         */
-        $typeInstance = $product->getTypeInstance();
-        $associatedProducts = $typeInstance->getAssociatedProducts($product);
-
-        if ($associatedProducts) {
-            foreach ($associatedProducts as $associatedProduct) {
-                $qty = $item->getOptionByCode('associated_product_' . $associatedProduct->getId());
-                $option = array(
-                    'label' => $associatedProduct->getName(),
-                    'value' => ($qty && $qty->getValue()) ? $qty->getValue() : 0
-                );
-
-                $options[] = $option;
-            }
-        }
-
-        $options = array_merge($options, $this->getCustomOptions($item));
-        $isUnConfigured = true;
-        foreach ($options as &$option) {
-            if ($option['value']) {
-                $isUnConfigured = false;
-                break;
-            }
-        }
-        return $isUnConfigured ? array() : $options;
-    }
-
     /**
      * Retrieves product options list
      *
@@ -211,13 +166,8 @@ class Configuration extends \Magento\App\Helper\AbstractHelper
     public function getOptions(\Magento\Catalog\Model\Product\Configuration\Item\ItemInterface $item)
     {
         $typeId = $item->getProduct()->getTypeId();
-        switch ($typeId) {
-            case \Magento\Catalog\Model\Product\Type\Configurable::TYPE_CODE:
-                return $this->getConfigurableOptions($item);
-            case \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE:
-                return $this->getGroupedOptions($item);
-            default:
-                break;
+        if ($typeId == \Magento\Catalog\Model\Product\Type\Configurable::TYPE_CODE) {
+            return $this->getConfigurableOptions($item);
         }
         return $this->getCustomOptions($item);
     }
diff --git a/app/code/Magento/Catalog/Helper/Product/Options.php b/app/code/Magento/Catalog/Helper/Product/Options.php
index 314090e96550b233bc08c579d69d39f1b2861c2f..522ee1a0d46b080c30f4ea82513300b9b1da4640 100644
--- a/app/code/Magento/Catalog/Helper/Product/Options.php
+++ b/app/code/Magento/Catalog/Helper/Product/Options.php
@@ -43,12 +43,12 @@ class Options extends \Magento\App\Helper\AbstractHelper
 
     /**
      * @param \Magento\App\Helper\Context $context
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
-    public function __construct(\Magento\App\Helper\Context $context, \Magento\Filesystem $filesystem)
+    public function __construct(\Magento\App\Helper\Context $context, \Magento\App\Filesystem $filesystem)
     {
         parent::__construct($context);
-        $this->directory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/Helper/Product/Price.php b/app/code/Magento/Catalog/Helper/Product/Price.php
new file mode 100644
index 0000000000000000000000000000000000000000..3cbedaa549f7a6b774e633fe58726958c58cbfe6
--- /dev/null
+++ b/app/code/Magento/Catalog/Helper/Product/Price.php
@@ -0,0 +1,152 @@
+<?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)
+ */
+
+
+/**
+ * Collection of tax module calls
+ *
+ * @category   Magento
+ * @package    Magento_Catalog
+ * @author     Magento Core Team <core@magentocommerce.com>
+ */
+namespace Magento\Catalog\Helper\Product;
+
+class Price extends \Magento\App\Helper\AbstractHelper
+{
+    /**
+     * @var \Magento\Tax\Helper\Data
+     */
+    protected $taxData;
+
+    /**
+     * @var \Magento\Tax\Model\Calculation
+     */
+    protected $taxCalculation;
+
+    /**
+     * @param \Magento\Tax\Helper\Data $taxData
+     * @param \Magento\Tax\Model\Calculation $taxCalculation
+     */
+    public function __construct(
+        \Magento\Tax\Helper\Data $taxData,
+        \Magento\Tax\Model\Calculation $taxCalculation
+    ) {
+        $this->taxData = $taxData;
+        $this->taxCalculation = $taxCalculation;
+    }
+
+    /**
+     * Get product price with all tax settings processing
+     *
+     * @param $_product
+     * @param $_minimalPriceValue
+     * @param null $includingTax
+     * @return float
+     */
+    public function getPrice($_product, $_minimalPriceValue, $includingTax = null)
+    {
+        return $this->taxData->getPrice($_product, $_minimalPriceValue, $includingTax);
+    }
+
+    /**
+     * Check if we have display in catalog prices including and excluding tax
+     *
+     * @return bool
+     */
+    public function displayBothPrices()
+    {
+        return $this->taxData->displayBothPrices();
+    }
+
+    /**
+     * Check if we have display in catalog prices including tax
+     *
+     * @return bool
+     */
+    public function displayPriceIncludingTax()
+    {
+        return $this->taxData->displayPriceIncludingTax();
+    }
+
+    /**
+     * Check if product prices on input include tax
+     *
+     * @return bool
+     */
+    public function priceIncludesTax()
+    {
+        return $this->taxData->priceIncludesTax();
+    }
+
+    /**
+     * Get customer object
+     *
+     * @return bool|\Magento\Customer\Model\Customer
+     */
+    public function getCustomer()
+    {
+        return $this->taxCalculation->getCustomer();
+    }
+
+    /**
+     * Specify customer object which can be used for rate calculation
+     *
+     * @param   \Magento\Customer\Model\Customer $customer
+     * @return $this
+     */
+    public function setCustomer(\Magento\Customer\Model\Customer $customer)
+    {
+        $this->taxCalculation->setCustomer($customer);
+        return $this;
+    }
+
+    /**
+     * Get request object with information necessary for getting tax rate
+     *
+     * @param   null|bool|\Magento\Object $shippingAddress
+     * @param   null|bool||\Magento\Object $billingAddress
+     * @param   null|int $customerTaxClass
+     * @param   null|int $store
+     * @return  \Magento\Object
+     */
+    public function getRateRequest(
+        $shippingAddress = null,
+        $billingAddress = null,
+        $customerTaxClass = null,
+        $store = null
+    ) {
+        return $this->taxCalculation->getRateRequest($shippingAddress, $billingAddress, $customerTaxClass, $store);
+    }
+
+    /**
+     * Get calculation tax rate by specific request
+     *
+     * @param   \Magento\Object $request
+     * @return  float
+     */
+    public function getRate($request)
+    {
+        return $this->taxCalculation->getRate($request);
+    }
+}
diff --git a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
index 2123d7d56cfbfd5b8e8614fd0168b8fb3f79de95..e51f59299af593c6484f445a89eb0ac731473605 100644
--- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
+++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
@@ -44,7 +44,7 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     /**
      * Filesystem facade
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -59,12 +59,12 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
      * Construct
      *
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
     ) {
         $this->_filesystem = $filesystem;
@@ -94,7 +94,7 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
             return $this;
         }
 
-        $path = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA)->getAbsolutePath('catalog/category/');
+        $path = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR)->getAbsolutePath('catalog/category/');
 
         try {
             /** @var $uploader \Magento\Core\Model\File\Uploader */
diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php
index c1516b3bf3d49b715483a81aff701f64aa528aae..3eafc73268b30af8eec1be25ad37f9117052ba5a 100644
--- a/app/code/Magento/Catalog/Model/Product.php
+++ b/app/code/Magento/Catalog/Model/Product.php
@@ -205,15 +205,10 @@ class Product extends \Magento\Catalog\Model\AbstractModel
      */
     protected $_itemOptionFactory;
 
-    /**
-     * @var \Magento\App\State
-     */
-    protected $_appState;
-
     /**
      * Filesystem facade
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -239,7 +234,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel
      * @param Resource\Product $resource
      * @param Resource\Product\Collection $resourceCollection
      * @param \Magento\Data\CollectionFactory $collectionFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $data
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -266,7 +261,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel
         \Magento\Catalog\Model\Resource\Product $resource,
         \Magento\Catalog\Model\Resource\Product\Collection $resourceCollection,
         \Magento\Data\CollectionFactory $collectionFactory,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         array $data = array()
     ) {
         $this->_itemOptionFactory = $itemOptionFactory;
@@ -1070,23 +1065,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel
         $collection->joinAttributes();
         return $collection;
     }
-
-    /**
-     * Retrieve collection grouped link
-     *
-     * @return \Magento\Catalog\Model\Resource\Product\Link\Collection
-     */
-    public function getGroupedLinkCollection()
-    {
-        $collection = $this->getLinkInstance()->useGroupedLinks()
-            ->getLinkCollection();
-        $collection->setProduct($this);
-        $collection->addLinkTypeIdFilter();
-        $collection->addProductIdFilter();
-        $collection->joinAttributes();
-        return $collection;
-    }
-
 /*******************************************************************************
  ** Media API
  */
@@ -1116,7 +1094,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel
      */
     public function getMediaGalleryImages()
     {
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+        $directory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
         if(!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {
             $images = $this->_collectionFactory->create();
             foreach ($this->getMediaGallery('images') as $image) {
@@ -1166,137 +1144,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel
         return $this->_catalogProductMediaConfig;
     }
 
-    /**
-     * Create duplicate
-     *
-     * @return \Magento\Catalog\Model\Product
-     */
-    public function duplicate()
-    {
-        $this->getWebsiteIds();
-        $this->getCategoryIds();
-
-        /* @var $newProduct \Magento\Catalog\Model\Product */
-        $newProduct = $this->_productFactory->create()->setData($this->getData())
-            ->setIsDuplicate(true)
-            ->setOriginalId($this->getId())
-            ->setStatus(\Magento\Catalog\Model\Product\Status::STATUS_DISABLED)
-            ->setCreatedAt(null)
-            ->setUpdatedAt(null)
-            ->setId(null)
-            ->setStoreId(\Magento\Core\Model\Store::DEFAULT_STORE_ID);
-
-        $this->_eventManager->dispatch(
-            'catalog_model_product_duplicate',
-            array('current_product' => $this, 'new_product' => $newProduct)
-        );
-
-        /* Prepare Related*/
-        $data = array();
-        $this->getLinkInstance()->useRelatedLinks();
-        $attributes = array();
-        foreach ($this->getLinkInstance()->getAttributes() as $_attribute) {
-            if (isset($_attribute['code'])) {
-                $attributes[] = $_attribute['code'];
-            }
-        }
-        foreach ($this->getRelatedLinkCollection() as $_link) {
-            $data[$_link->getLinkedProductId()] = $_link->toArray($attributes);
-        }
-        $newProduct->setRelatedLinkData($data);
-
-        /* Prepare UpSell*/
-        $data = array();
-        $this->getLinkInstance()->useUpSellLinks();
-        $attributes = array();
-        foreach ($this->getLinkInstance()->getAttributes() as $_attribute) {
-            if (isset($_attribute['code'])) {
-                $attributes[] = $_attribute['code'];
-            }
-        }
-        foreach ($this->getUpSellLinkCollection() as $_link) {
-            $data[$_link->getLinkedProductId()] = $_link->toArray($attributes);
-        }
-        $newProduct->setUpSellLinkData($data);
-
-        /* Prepare Cross Sell */
-        $data = array();
-        $this->getLinkInstance()->useCrossSellLinks();
-        $attributes = array();
-        foreach ($this->getLinkInstance()->getAttributes() as $_attribute) {
-            if (isset($_attribute['code'])) {
-                $attributes[] = $_attribute['code'];
-            }
-        }
-        foreach ($this->getCrossSellLinkCollection() as $_link) {
-            $data[$_link->getLinkedProductId()] = $_link->toArray($attributes);
-        }
-        $newProduct->setCrossSellLinkData($data);
-
-        /* Prepare Grouped */
-        $data = array();
-        $this->getLinkInstance()->useGroupedLinks();
-        $attributes = array();
-        foreach ($this->getLinkInstance()->getAttributes() as $_attribute) {
-            if (isset($_attribute['code'])) {
-                $attributes[] = $_attribute['code'];
-            }
-        }
-        foreach ($this->getGroupedLinkCollection() as $_link) {
-            $data[$_link->getLinkedProductId()] = $_link->toArray($attributes);
-        }
-        $newProduct->setGroupedLinkData($data);
-
-        $newProduct->save();
-
-        $this->getOptionInstance()->duplicate($this->getId(), $newProduct->getId());
-        $this->getResource()->duplicate($this->getId(), $newProduct->getId());
-
-        // TODO - duplicate product on all stores of the websites it is associated with
-        /*if ($storeIds = $this->getWebsiteIds()) {
-            foreach ($storeIds as $storeId) {
-                $this->setStoreId($storeId)
-                   ->load($this->getId());
-
-                $newProduct->setData($this->getData())
-                    ->setSku(null)
-                    ->setStatus(\Magento\Catalog\Model\Product\Status::STATUS_DISABLED)
-                    ->setId($newId)
-                    ->save();
-            }
-        }*/
-        return $newProduct;
-    }
-
-    /**
-     * Is product grouped
-     *
-     * @return bool
-     */
-    public function isSuperGroup()
-    {
-        return $this->getTypeId() == \Magento\Catalog\Model\Product\Type::TYPE_GROUPED;
-    }
-
-    /**
-     * Alias for isConfigurable()
-     *
-     * @return bool
-     */
-    public function isSuperConfig()
-    {
-        return $this->isConfigurable();
-    }
-    /**
-     * Check is product grouped
-     *
-     * @return bool
-     */
-    public function isGrouped()
-    {
-        return $this->getTypeId() == \Magento\Catalog\Model\Product\Type::TYPE_GROUPED;
-    }
-
     /**
      * Check is product configurable
      *
@@ -1307,16 +1154,6 @@ class Product extends \Magento\Catalog\Model\AbstractModel
         return $this->getTypeId() == \Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE;
     }
 
-    /**
-     * Whether product configurable or grouped
-     *
-     * @return bool
-     */
-    public function isSuper()
-    {
-        return $this->isConfigurable() || $this->isGrouped();
-    }
-
     /**
      * Returns visible status IDs in catalog
      *
@@ -1487,7 +1324,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel
     /**
      * Get attribute text by its code
      *
-     * @param $attributeCode Code of the attribute
+     * @param string $attributeCode Code of the attribute
      * @return string
      */
     public function getAttributeText($attributeCode)
@@ -1880,9 +1717,9 @@ class Product extends \Magento\Catalog\Model\AbstractModel
     }
 
     /**
-     *  Returns system reserved attribute codes
+     * Returns system reserved attribute codes
      *
-     *  @return array Reserved attribute names
+     * @return array Reserved attribute names
      */
     public function getReservedAttributes()
     {
@@ -1905,10 +1742,10 @@ class Product extends \Magento\Catalog\Model\AbstractModel
     }
 
     /**
-     *  Check whether attribute reserved or not
+     * Check whether attribute reserved or not
      *
-     *  @param \Magento\Catalog\Model\Entity\Attribute $attribute Attribute model object
-     *  @return boolean
+     * @param \Magento\Catalog\Model\Entity\Attribute $attribute Attribute model object
+     * @return boolean
      */
     public function isReservedAttribute ($attribute)
     {
@@ -2019,12 +1856,12 @@ class Product extends \Magento\Catalog\Model\AbstractModel
      */
     public function getPreconfiguredValues()
     {
-        $preconfiguredValues = $this->getData('preconfigured_values');
-        if (!$preconfiguredValues) {
-            $preconfiguredValues = new \Magento\Object();
+        $preConfiguredValues = $this->getData('preconfigured_values');
+        if (!$preConfiguredValues) {
+            $preConfiguredValues = new \Magento\Object();
         }
 
-        return $preconfiguredValues;
+        return $preConfiguredValues;
     }
 
     /**
@@ -2062,8 +1899,8 @@ class Product extends \Magento\Catalog\Model\AbstractModel
      */
     protected function _clearData()
     {
-        foreach ($this->_data as $data){
-            if (is_object($data) && method_exists($data, 'reset')){
+        foreach ($this->_data as $data) {
+            if (is_object($data) && method_exists($data, 'reset')) {
                 $data->reset();
             }
         }
diff --git a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
index 234bbcd5827cb737b903983a57476f9067c537f4..95affc66f284fba0a24d6c4cd74d61d0c2773d07 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
@@ -91,7 +91,7 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Catalog\Model\Product\Media\Config $mediaConfig
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Media $resourceProductAttribute
      */
     public function __construct(
@@ -101,7 +101,7 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Catalog\Model\Product\Media\Config $mediaConfig,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Media $resourceProductAttribute
     ) {
         $this->_productFactory = $productFactory;
@@ -110,7 +110,7 @@ class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
         $this->_coreData = $coreData;
         $this->_resourceModel = $resourceProductAttribute;
         $this->_mediaConfig = $mediaConfig;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         $this->_mediaDirectory->create($this->_mediaConfig->getBaseMediaPath());
         $this->_mediaDirectory->create($this->_mediaConfig->getBaseTmpMediaPath());
diff --git a/app/code/Magento/Catalog/Model/Product/Copier.php b/app/code/Magento/Catalog/Model/Product/Copier.php
new file mode 100644
index 0000000000000000000000000000000000000000..759701f8e3fb6b4bbadbbbdb6c21e438b03a7ca1
--- /dev/null
+++ b/app/code/Magento/Catalog/Model/Product/Copier.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Catalog product copier. Creates product duplicate
+ *
+ * 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\Catalog\Model\Product;
+
+class Copier 
+{
+    /**
+     * @var CopyConstructorInterface
+     */
+    protected $copyConstructor;
+
+    /**
+     * @var \Magento\Catalog\Model\ProductFactory
+     */
+    protected $productFactory;
+
+    /**
+     * @param CopyConstructorInterface $copyConstructor
+     * @param \Magento\Catalog\Model\ProductFactory $productFactory
+     */
+    public function __construct(
+        CopyConstructorInterface $copyConstructor,
+        \Magento\Catalog\Model\ProductFactory $productFactory
+    ) {
+        $this->productFactory  = $productFactory;
+        $this->copyConstructor = $copyConstructor;
+    }
+
+    /**
+     * Create product duplicate
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
+     */
+    public function copy(\Magento\Catalog\Model\Product $product)
+    {
+        $product->getWebsiteIds();
+        $product->getCategoryIds();
+
+        $duplicate = $this->productFactory->create();
+        $duplicate->setData($product->getData());
+        $duplicate->setIsDuplicate(true);
+        $duplicate->setOriginalId($product->getId());
+        $duplicate->setStatus(\Magento\Catalog\Model\Product\Status::STATUS_DISABLED);
+        $duplicate->setCreatedAt(null);
+        $duplicate->setUpdatedAt(null);
+        $duplicate->setId(null);
+        $duplicate->setStoreId(\Magento\Core\Model\Store::DEFAULT_STORE_ID);
+
+        $this->copyConstructor->build($product, $duplicate);
+        $duplicate->save();
+
+        $product->getOptionInstance()->duplicate($product->getId(), $duplicate->getId());
+        $product->getResource()->duplicate($product->getId(), $duplicate->getId());
+        return $duplicate;
+    }
+} 
diff --git a/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.php b/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.php
new file mode 100644
index 0000000000000000000000000000000000000000..d52fedd25ac1a99aee5b0e78374194350c4dfb7a
--- /dev/null
+++ b/app/code/Magento/Catalog/Model/Product/CopyConstructor/Composite.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\Catalog\Model\Product\CopyConstructor;
+
+use Magento\Catalog\Model\Product\CopyConstructorInterface;
+use Magento\Catalog\Model\Product\CopyConstructorFactory;
+
+class Composite implements CopyConstructorInterface
+{
+    /**
+     * @var CopyConstructorInterface[]
+     */
+    protected $constructors;
+
+    /**
+     * @param CopyConstructorFactory $factory
+     * @param array $constructors
+     */
+    public function __construct(CopyConstructorFactory $factory, array $constructors = array())
+    {
+        foreach ($constructors as $instance) {
+            $this->constructors[] = $factory->create($instance);
+        }
+    }
+
+    /**
+     * Build product duplicate
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        foreach ($this->constructors as $constructor) {
+            $constructor->build($product, $duplicate);
+        }
+    }
+} 
diff --git a/app/code/Magento/Catalog/Model/Product/CopyConstructor/CrossSell.php b/app/code/Magento/Catalog/Model/Product/CopyConstructor/CrossSell.php
new file mode 100644
index 0000000000000000000000000000000000000000..fa2ca0dcaaab785aaa2f9144042e2c4eda725de4
--- /dev/null
+++ b/app/code/Magento/Catalog/Model/Product/CopyConstructor/CrossSell.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product\CopyConstructor;
+
+class CrossSell implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * Build product links
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        $data = array();
+        $attributes = array();
+        $link = $product->getLinkInstance();
+        $link->useCrossSellLinks();
+        foreach ($link->getAttributes() as $attribute) {
+            if (isset($attribute['code'])) {
+                $attributes[] = $attribute['code'];
+            }
+        }
+        /** @var \Magento\Catalog\Model\Product\Link $link  */
+        foreach ($product->getCrossSellLinkCollection() as $link) {
+            $data[$link->getLinkedProductId()] = $link->toArray($attributes);
+        }
+        $duplicate->setCrossSellLinkData($data);
+    }
+} 
diff --git a/app/code/Magento/Catalog/Model/Product/CopyConstructor/Related.php b/app/code/Magento/Catalog/Model/Product/CopyConstructor/Related.php
new file mode 100644
index 0000000000000000000000000000000000000000..a5c31177e02bbcaf4b710618ba46873f1a43c45e
--- /dev/null
+++ b/app/code/Magento/Catalog/Model/Product/CopyConstructor/Related.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Catalog\Model\Product\CopyConstructor;
+
+class Related implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * Build product links
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        $data = array();
+        $attributes = array();
+
+        $link = $product->getLinkInstance();
+        $link->useRelatedLinks();
+        foreach ($link->getAttributes() as $attribute) {
+            if (isset($attribute['code'])) {
+                $attributes[] = $attribute['code'];
+            }
+        }
+        /** @var \Magento\Catalog\Model\Product\Link $link  */
+        foreach ($product->getRelatedLinkCollection() as $link) {
+            $data[$link->getLinkedProductId()] = $link->toArray($attributes);
+        }
+        $duplicate->setRelatedLinkData($data);
+    }
+} 
diff --git a/app/code/Magento/Catalog/Model/Product/CopyConstructor/UpSell.php b/app/code/Magento/Catalog/Model/Product/CopyConstructor/UpSell.php
new file mode 100644
index 0000000000000000000000000000000000000000..0408c85c32cf9968aa2014642979fc2784e140ee
--- /dev/null
+++ b/app/code/Magento/Catalog/Model/Product/CopyConstructor/UpSell.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product\CopyConstructor;
+
+class UpSell implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * Build product links
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        $data = array();
+        $link = $product->getLinkInstance();
+        $link->useUpSellLinks();
+        $attributes = array();
+        foreach ($link->getAttributes() as $attribute) {
+            if (isset($attribute['code'])) {
+                $attributes[] = $attribute['code'];
+            }
+        }
+        /** @var \Magento\Catalog\Model\Product\Link $link  */
+        foreach ($product->getUpSellLinkCollection() as $link) {
+            $data[$link->getLinkedProductId()] = $link->toArray($attributes);
+        }
+        $duplicate->setUpSellLinkData($data);
+    }
+} 
diff --git a/app/code/Magento/Sales/Model/ResourceFactory.php b/app/code/Magento/Catalog/Model/Product/CopyConstructorFactory.php
similarity index 60%
rename from app/code/Magento/Sales/Model/ResourceFactory.php
rename to app/code/Magento/Catalog/Model/Product/CopyConstructorFactory.php
index 6a72ad61d1632d8777111bbc63a15bf92f91c4b7..f2be9544ceb20c0c3273cc9dfde1ba0253d6891b 100644
--- a/app/code/Magento/Sales/Model/ResourceFactory.php
+++ b/app/code/Magento/Catalog/Model/Product/CopyConstructorFactory.php
@@ -18,45 +18,43 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Sales
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-/**
- * Factory class for \Magento\Core\Model\Resource\Db\AbstractDb
- */
-namespace Magento\Sales\Model;
+namespace Magento\Catalog\Model\Product;
 
-class ResourceFactory
+class CopyConstructorFactory
 {
     /**
-     * Object Manager instance
-     *
      * @var \Magento\ObjectManager
      */
-    protected $_objectManager = null;
+    protected $objectManager;
 
     /**
-     * Factory constructor
-     *
      * @param \Magento\ObjectManager $objectManager
      */
     public function __construct(\Magento\ObjectManager $objectManager)
     {
-        $this->_objectManager = $objectManager;
+        $this->objectManager = $objectManager;
     }
 
     /**
-     * Create class instance with specified parameters
+     * Create link builder instance
      *
-     * @param string $instanceName
-     * @param array $data
-     * @return \Magento\Core\Model\Resource\Db\AbstractDb
+     * @param string $instance
+     * @param array $arguments
+     * @return CopyConstructorInterface
+     * @throws \InvalidArgumentException
      */
-    public function create($instanceName, array $data = array())
+    public function create($instance, array $arguments = array())
     {
-        return $this->_objectManager->create($instanceName, $data);
+        if (!is_subclass_of($instance, '\Magento\Catalog\Model\Product\CopyConstructorInterface')) {
+            throw new \InvalidArgumentException(
+                $instance . ' does not implement \Magento\Catalog\Model\Product\CopyConstructorInterface'
+            );
+        }
+
+        return $this->objectManager->create($instance, $arguments);
     }
-}
+} 
diff --git a/app/code/Magento/Core/Model/DataService/ConfigInterface.php b/app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php
similarity index 73%
rename from app/code/Magento/Core/Model/DataService/ConfigInterface.php
rename to app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php
index 296bd5f558d53e81aec766103b0ac3b0fbdff7f4..2688fc7f762c81d220e1fecc4e05e630e2c00420 100644
--- a/app/code/Magento/Core/Model/DataService/ConfigInterface.php
+++ b/app/code/Magento/Catalog/Model/Product/CopyConstructorInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Used to get class information associated with an alias, and stored in config files.
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,15 +21,16 @@
  * @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\DataService;
 
-interface ConfigInterface
+namespace Magento\Catalog\Model\Product;
+
+interface CopyConstructorInterface
 {
     /**
-     * Get the class information for a given service call
+     * Build product duplicate
      *
-     * @param $alias
-     * @return mixed
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
      */
-    public function getClassByAlias($alias);
-}
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate);
+} 
diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php
index 5b8d4a0163ce978ec4add9c7249c8faab3029e09..54461a0d16e0db7a3dbc6ec8a8cc59c6a56b4856 100644
--- a/app/code/Magento/Catalog/Model/Product/Image.php
+++ b/app/code/Magento/Catalog/Model/Product/Image.php
@@ -114,7 +114,7 @@ class Image extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Image\Factory $imageFactory
      * @param \Magento\View\Url $viewUrl
      * @param \Magento\View\FileSystem $viewFileSystem
@@ -129,7 +129,7 @@ class Image extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Image\Factory $imageFactory,
         \Magento\View\Url $viewUrl,
         \Magento\View\FileSystem $viewFileSystem,
@@ -142,7 +142,7 @@ class Image extends \Magento\Core\Model\AbstractModel
         $this->_catalogProductMediaConfig = $catalogProductMediaConfig;
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_mediaDirectory->create($this->_catalogProductMediaConfig->getBaseMediaPath());
         $this->_imageFactory = $imageFactory;
         $this->_viewUrl = $viewUrl;
diff --git a/app/code/Magento/Catalog/Model/Product/Link.php b/app/code/Magento/Catalog/Model/Product/Link.php
index 6eb89357af06164b24c95dadd998794971074384..7b3e099bc0a5ac2488664a65ecf90e0afb3ece3b 100644
--- a/app/code/Magento/Catalog/Model/Product/Link.php
+++ b/app/code/Magento/Catalog/Model/Product/Link.php
@@ -46,7 +46,6 @@ namespace Magento\Catalog\Model\Product;
 class Link extends \Magento\Core\Model\AbstractModel
 {
     const LINK_TYPE_RELATED     = 1;
-    const LINK_TYPE_GROUPED     = 3;
     const LINK_TYPE_UPSELL      = 4;
     const LINK_TYPE_CROSSSELL   = 5;
 
@@ -103,12 +102,6 @@ class Link extends \Magento\Core\Model\AbstractModel
         return $this;
     }
 
-    public function useGroupedLinks()
-    {
-        $this->setLinkTypeId(self::LINK_TYPE_GROUPED);
-        return $this;
-    }
-
     public function useUpSellLinks()
     {
         $this->setLinkTypeId(self::LINK_TYPE_UPSELL);
@@ -185,19 +178,4 @@ class Link extends \Magento\Core\Model\AbstractModel
         }
         return $this;
     }
-
-    /**
-     * Save grouped product relation links
-     *
-     * @param \Magento\Catalog\Model\Product $product
-     * @return \Magento\Catalog\Model\Product\Link
-     */
-    public function saveGroupedLinks($product)
-    {
-        $data = $product->getGroupedLinkData();
-        if (!is_null($data)) {
-            $this->_getResource()->saveGroupedLinks($product, $data, self::LINK_TYPE_GROUPED);
-        }
-        return $this;
-    }
 }
diff --git a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
index 3f156c823af9dc92c3243a6a58a907e2a4520283..7522fa5dfdf971ef9e1714ec0dd5a703b970a8e7 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
@@ -47,7 +47,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
     protected $_formattedOptionValue = null;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -120,7 +120,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      * @param \Magento\UrlInterface $url
      * @param \Magento\Escaper $escaper
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\File\Size $fileSize
      * @param array $data
      */
@@ -131,7 +131,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         \Magento\UrlInterface $url,
         \Magento\Escaper $escaper,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\File\Size $fileSize,
         array $data = array()
     ) {
@@ -140,8 +140,8 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         $this->_escaper = $escaper;
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         $this->_filesystem = $filesystem;
-        $this->_rootDirectory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
-        $this->_mediaDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_rootDirectory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
+        $this->_mediaDirectory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_fileSize = $fileSize;
         $this->_data = $data;
         parent::__construct($checkoutSession, $coreStoreConfig, $data);
@@ -372,7 +372,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 
             $filePath = $dispersion;
 
-            $tmpDirectory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::SYS_TMP);
+            $tmpDirectory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::SYS_TMP_DIR);
             $fileHash = md5($tmpDirectory->readFile($tmpDirectory->getRelativePath($fileInfo['tmp_name'])));
             $filePath .= '/' . $fileHash . '.' . $extension;
             $fileFullPath = $this->_mediaDirectory->getAbsolutePath($this->_quotePath . $filePath);
@@ -400,7 +400,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
                     $_height = $_imageSize[1];
                 }
             }
-            $uri = $this->_filesystem->getUri(\Magento\Filesystem::MEDIA);
+            $uri = $this->_filesystem->getUri(\Magento\App\Filesystem::MEDIA_DIR);
             $this->setUserValue(array(
                 'type'          => $fileInfo['type'],
                 'title'         => $fileInfo['name'],
diff --git a/app/code/Magento/Catalog/Model/Product/Type.php b/app/code/Magento/Catalog/Model/Product/Type.php
index 3049fe90d1eafd4c1ca6b7247328942000919dac..0dfed06d58ae53b460de4fbf2a8ccdf02a218dd0 100644
--- a/app/code/Magento/Catalog/Model/Product/Type.php
+++ b/app/code/Magento/Catalog/Model/Product/Type.php
@@ -37,7 +37,6 @@ class Type
     const TYPE_SIMPLE       = 'simple';
     const TYPE_BUNDLE       = 'bundle';
     const TYPE_CONFIGURABLE = 'configurable';
-    const TYPE_GROUPED      = 'grouped';
     const TYPE_VIRTUAL      = 'virtual';
     /**#@-*/
 
diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
index d6df6d14a4d1978034b104fb5c86b363d4c6f650..9899651f0a155689c032a4d3a86cb4088f62c612 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
@@ -107,7 +107,7 @@ abstract class AbstractType
     const OPTION_PREFIX = 'option_';
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -185,7 +185,7 @@ abstract class AbstractType
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Logger $logger
      * @param array $data
@@ -198,7 +198,7 @@ abstract class AbstractType
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Logger $logger,
         array $data = array()
@@ -384,13 +384,13 @@ abstract class AbstractType
             return $options;
         }
         // try to found super product configuration
-        // (if product was buying within grouped product)
         $superProductConfig = $buyRequest->getSuperProductConfig();
         if (!empty($superProductConfig['product_id'])
             && !empty($superProductConfig['product_type'])
         ) {
             $superProductId = (int)$superProductConfig['product_id'];
             if ($superProductId) {
+                /** @var \Magento\Catalog\Model\Product $superProduct */
                 $superProduct = $this->_coreRegistry->registry('used_super_product_' . $superProductId);
                 if (!$superProduct) {
                     $superProduct = $this->_productFactory->create()->load($superProductId);
@@ -505,7 +505,7 @@ abstract class AbstractType
                         $path = dirname($dst);
 
                         try {
-                            $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT)->create($path);
+                            $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR)->create($path);
                         } catch (\Magento\Filesystem\FilesystemException $e) {
                             throw new \Magento\Core\Exception(
                                 __("We can't create writeable directory \"%1\".", $path)
@@ -731,7 +731,7 @@ abstract class AbstractType
     }
 
     /**
-     * Check if product is composite (grouped, configurable, etc)
+     * Check if product is composite
      *
      * @param \Magento\Catalog\Model\Product $product
      * @return bool
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Configurable.php b/app/code/Magento/Catalog/Model/Product/Type/Configurable.php
index 1ec1638acf98b5c8978d96b4fd632431457272cd..40e1ae1fcc44e9a5791f8e814cc48b3dcbe43d23 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Configurable.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/Configurable.php
@@ -170,7 +170,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Logger $logger
      * @param \Magento\Catalog\Model\Resource\Product\Type\ConfigurableFactory $typeConfigurableFactory
@@ -194,7 +194,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Logger $logger,
         \Magento\Catalog\Model\Resource\Product\Type\ConfigurableFactory $typeConfigurableFactory,
diff --git a/app/code/Magento/Catalog/Model/ProductTypes/Config.php b/app/code/Magento/Catalog/Model/ProductTypes/Config.php
index f69158e3f427adfe71b5d71ad1ea8fc81c009553..3e68285f783e60d765876282e211ddff82147755 100644
--- a/app/code/Magento/Catalog/Model/ProductTypes/Config.php
+++ b/app/code/Magento/Catalog/Model/ProductTypes/Config.php
@@ -23,9 +23,7 @@
  */
 namespace Magento\Catalog\Model\ProductTypes;
 
-class Config
-    extends \Magento\Config\Data
-    implements \Magento\Catalog\Model\ProductTypes\ConfigInterface
+class Config extends \Magento\Config\Data implements \Magento\Catalog\Model\ProductTypes\ConfigInterface
 {
     /**
      * @param \Magento\Catalog\Model\ProductTypes\Config\Reader $reader
@@ -60,4 +58,15 @@ class Config
     {
         return $this->get();
     }
+
+    /**
+     * Check whether product type is set of products
+     *
+     * @param string $typeId
+     * @return bool
+     */
+    public function isProductSet($typeId)
+    {
+        return $this->get($typeId . '/is_product_set', false);
+    }
 }
diff --git a/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php b/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php
index bf31993ff22e6079030fc2d13f2c58544af233be..f868e70e8111e1a8571b4165b4919ce837bf17a1 100644
--- a/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php
+++ b/app/code/Magento/Catalog/Model/ProductTypes/ConfigInterface.php
@@ -39,4 +39,12 @@ interface ConfigInterface
      * @return array
      */
     public function getAll();
+
+    /**
+     * Check whether product type is set of products
+     *
+     * @param string $typeId
+     * @return bool
+     */
+    public function isProductSet($typeId);
 }
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
index 1fe9b43ca530d020e63750f70a6101707e5de49b..b50c1e55259f813e11a016de8ffa6d7284ac03f3 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
@@ -40,7 +40,7 @@ class Image
     /**
      * Filesystem facade
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -53,12 +53,12 @@ class Image
 
     /**
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
     ) {
         $this->_filesystem = $filesystem;
@@ -92,7 +92,7 @@ class Image
         } catch (\Exception $e){
             return $this;
         }
-        $path = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA)->getAbsolutePath('catalog/product/');
+        $path = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR)->getAbsolutePath('catalog/product/');
         $uploader->save($path);
 
         $fileName = $uploader->getUploadedFileName();
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Link.php b/app/code/Magento/Catalog/Model/Resource/Product/Link.php
index 84972ad78efb35963d4097041c626bb165f96a33..0a873217447ec1041460e96d256d76a2097491c2 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Link.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Link.php
@@ -100,7 +100,7 @@ class Link extends \Magento\Core\Model\Resource\Db\AbstractDb
         $links   = $adapter->fetchPairs($select, $bind);
 
         $deleteIds = array();
-        foreach($links as $linkedProductId => $linkId) {
+        foreach ($links as $linkedProductId => $linkId) {
             if (!isset($data[$linkedProductId])) {
                 $deleteIds[] = (int)$linkId;
             }
@@ -220,13 +220,6 @@ class Link extends \Magento\Core\Model\Resource\Db\AbstractDb
             ->from(array('l' => $this->getMainTable()), array('linked_product_id'))
             ->where('product_id = :product_id')
             ->where('link_type_id = :link_type_id');
-        if ($typeId == \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED) {
-            $select->join(
-                array('e' => $this->getTable('catalog_product_entity')),
-                'e.entity_id = l.linked_product_id AND e.required_options = 0',
-                array()
-            );
-        }
 
         $childrenIds[$typeId] = array();
         $result = $adapter->fetchAll($select, $bind);
@@ -260,40 +253,4 @@ class Link extends \Magento\Core\Model\Resource\Db\AbstractDb
 
         return $parentIds;
     }
-
-    /**
-     * Save grouped product relations
-     *
-     * @param \Magento\Catalog\Model\Product $product
-     * @param array $data
-     * @param int $typeId
-     * @return \Magento\Catalog\Model\Resource\Product\Link
-     */
-    public function saveGroupedLinks($product, $data, $typeId)
-    {
-        $adapter = $this->_getWriteAdapter();
-        // check for change relations
-        $bind    = array(
-            'product_id'    => (int)$product->getId(),
-            'link_type_id'  => (int)$typeId
-        );
-        $select = $adapter->select()
-            ->from($this->getMainTable(), array('linked_product_id'))
-            ->where('product_id = :product_id')
-            ->where('link_type_id = :link_type_id');
-        $old = $adapter->fetchCol($select, $bind);
-        $new = array_keys($data);
-
-        if (array_diff($old, $new) || array_diff($new, $old)) {
-            $product->setIsRelationsChanged(true);
-        }
-
-        // save product links attributes
-        $this->saveProductLinks($product, $data, $typeId);
-
-        // Grouped product relations should be added to relation table
-        $this->_catalogProductRelation->processRelations($product->getId(), $new);
-
-        return $this;
-    }
 }
diff --git a/app/code/Magento/Catalog/Model/Resource/Setup.php b/app/code/Magento/Catalog/Model/Resource/Setup.php
index 1ca9f5cc2e63a65b5c449d9c892a5c3ce32928eb..02f45a46f02d0b0611a746bcafc6fdde50323589 100755
--- a/app/code/Magento/Catalog/Model/Resource/Setup.php
+++ b/app/code/Magento/Catalog/Model/Resource/Setup.php
@@ -61,7 +61,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
      * @param \Magento\Index\Model\IndexerFactory $indexerFactory
      * @param \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeResourceFactory
@@ -72,7 +72,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         \Magento\Catalog\Model\CategoryFactory $categoryFactory,
         \Magento\Index\Model\IndexerFactory $indexerFactory,
         \Magento\Catalog\Model\Resource\Eav\AttributeFactory $eavAttributeResourceFactory,
@@ -82,7 +82,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
         $this->_categoryFactory = $categoryFactory;
         $this->_indexerFactory = $indexerFactory;
         $this->_eavAttributeResourceFactory = $eavAttributeResourceFactory;
-        parent::__construct($context, $resourceName, $cache, $attrGrCollFactory, $moduleName, $connectionName);
+        parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName);
     }
 
     /**
diff --git a/app/code/Magento/Catalog/data/catalog_setup/data-install-1.6.0.0.php b/app/code/Magento/Catalog/data/catalog_setup/data-install-1.6.0.0.php
index e24c3f8b94735cb55825b3627f1a2e73c791e9d9..8c564c3213db75dc79611649cbe1c0e907519518 100644
--- a/app/code/Magento/Catalog/data/catalog_setup/data-install-1.6.0.0.php
+++ b/app/code/Magento/Catalog/data/catalog_setup/data-install-1.6.0.0.php
@@ -146,10 +146,6 @@ $data = array(
         'link_type_id'  => \Magento\Catalog\Model\Product\Link::LINK_TYPE_RELATED,
         'code'          => 'relation'
     ),
-    array(
-        'link_type_id'  => \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED,
-        'code'  => 'super'
-    ),
     array(
         'link_type_id'  => \Magento\Catalog\Model\Product\Link::LINK_TYPE_UPSELL,
         'code'  => 'up_sell'
@@ -173,16 +169,6 @@ $data = array(
         'product_link_attribute_code'   => 'position',
         'data_type'                     => 'int'
     ),
-    array(
-        'link_type_id'                  => \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED,
-        'product_link_attribute_code'   => 'position',
-        'data_type'                     => 'int'
-    ),
-    array(
-        'link_type_id'                  => \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED,
-        'product_link_attribute_code'   => 'qty',
-        'data_type'                     => 'decimal'
-    ),
     array(
         'link_type_id'                  => \Magento\Catalog\Model\Product\Link::LINK_TYPE_UPSELL,
         'product_link_attribute_code'   => 'position',
diff --git a/app/code/Magento/Catalog/etc/adminhtml/di.xml b/app/code/Magento/Catalog/etc/adminhtml/di.xml
index 4fa0e8bb974add0a350657d24eaab0cdbbf5cbe6..8569d9473101f1334b9687808c3c4f7fbbd3683f 100644
--- a/app/code/Magento/Catalog/etc/adminhtml/di.xml
+++ b/app/code/Magento/Catalog/etc/adminhtml/di.xml
@@ -24,7 +24,6 @@
  */
 -->
 <config>
-    <preference for="Magento\Catalog\Model\Product\Type\Grouped" type="Magento\Catalog\Model\Product\Type\Grouped\Backend" />
     <type name="Magento\Catalog\Controller\Adminhtml\Product\Attribute">
         <param name="attributeLabelCache">
             <instance type="Magento\App\Cache\Type\Translate" />
@@ -62,4 +61,21 @@
             <value type="bool">false</value>
         </param>
     </type>
+    <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper">
+        <plugin name="configurable" type="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Configurable" sortOrder="50" />
+    </type>
+    <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
+        <param name="constructors">
+            <value>
+                <crossSell>Magento\Catalog\Model\Product\CopyConstructor\CrossSell</crossSell>
+                <upSell>Magento\Catalog\Model\Product\CopyConstructor\UpSell</upSell>
+                <related>Magento\Catalog\Model\Product\CopyConstructor\Related</related>
+            </value>
+        </param>
+    </type>
+    <type name="Magento\Catalog\Model\Product\Copier">
+        <param name="copyConstructor">
+            <instance type="Magento\Catalog\Model\Product\CopyConstructor\Composite" />
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/Catalog/etc/module.xml b/app/code/Magento/Catalog/etc/module.xml
index ad3de957412fda381c7f728f2752f29404e1dc38..e7c9201c9c65aef707e5932caf2a4c624b480748 100755
--- a/app/code/Magento/Catalog/etc/module.xml
+++ b/app/code/Magento/Catalog/etc/module.xml
@@ -53,6 +53,8 @@
             <module name="Magento_Sales"/>
             <module name="Magento_CatalogSearch"/>
             <module name="Magento_Weee"/>
+            <module name="Magento_ProductAlert"/>
+            <module name="Magento_Rating"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Catalog/etc/product_types.xml b/app/code/Magento/Catalog/etc/product_types.xml
index 4031330f6a637d19df5b1915235159515cae4f99..a4e0ddc487a370d9a17e06b4c39860b5be9dd15d 100644
--- a/app/code/Magento/Catalog/etc/product_types.xml
+++ b/app/code/Magento/Catalog/etc/product_types.xml
@@ -25,14 +25,6 @@
 -->
 <config>
     <type name="simple" label="Simple Product" modelInstance="Magento\Catalog\Model\Product\Type\Simple" indexPriority="10" />
-    <type name="grouped" label="Grouped Product" modelInstance="Magento\Catalog\Model\Product\Type\Grouped" composite='true' indexPriority="50">
-        <priceModel instance="Magento\Catalog\Model\Product\Type\Grouped\Price" />
-        <indexerModel instance="Magento\Catalog\Model\Resource\Product\Indexer\Price\Grouped" />
-        <allowProductTypes>
-            <type name="simple" />
-            <type name="virtual" />
-        </allowProductTypes>
-    </type>
     <type name="configurable" label="Configurable Product" modelInstance="Magento\Catalog\Model\Product\Type\Configurable" composite='true' indexPriority="30">
         <priceModel instance="Magento\Catalog\Model\Product\Type\Configurable\Price" />
         <indexerModel instance="Magento\Catalog\Model\Resource\Product\Indexer\Price\Configurable" />
diff --git a/app/code/Magento/Catalog/i18n/de_DE.csv b/app/code/Magento/Catalog/i18n/de_DE.csv
index e5e3e7aa7071b40c40fc5103d07dae6abbb7ec49..8ae7321172c30af49ac73bed28204f1f03f68a0a 100644
--- a/app/code/Magento/Catalog/i18n/de_DE.csv
+++ b/app/code/Magento/Catalog/i18n/de_DE.csv
@@ -146,7 +146,6 @@
 "Catalog Product Link","Link zu den Produkten im Katalog"
 "Catalog Product View (Any)","Produktansicht des Katalogs (beliebig)"
 "Catalog Product View (Configurable)","Produktansicht des Katalogs (konfigurierbar)"
-"Catalog Product View (Grouped)","Produktansicht des Katalogs (in Gruppen)"
 "Catalog Product View (Simple)","Produktansicht des Katalogs (vereinfacht)"
 "Catalog Product View (Virtual)","Produktansicht des Katalogs (virtuell)"
 "Catalog Section","Katalogabschnitt"
@@ -313,7 +312,6 @@
 "Grid","Raster"
 "Group add","Gruppe hinzufügen"
 "Group remove","Gruppe entfernen"
-"Grouped Product","Gruppiertes Produkt"
 "Groups","Gruppen"
 "Home","Startseite"
 "ID","ID"
diff --git a/app/code/Magento/Catalog/i18n/en_US.csv b/app/code/Magento/Catalog/i18n/en_US.csv
index ebe78d4e2c830286e8d35e16499191204e5e6ca1..a76ec9887fb34814214825af90362091027ce810 100644
--- a/app/code/Magento/Catalog/i18n/en_US.csv
+++ b/app/code/Magento/Catalog/i18n/en_US.csv
@@ -147,7 +147,6 @@
 "Catalog Product Link","Catalog Product Link"
 "Catalog Product View (Any)","Catalog Product View (Any)"
 "Catalog Product View (Configurable)","Catalog Product View (Configurable)"
-"Catalog Product View (Grouped)","Catalog Product View (Grouped)"
 "Catalog Product View (Simple)","Catalog Product View (Simple)"
 "Catalog Product View (Virtual)","Catalog Product View (Virtual)"
 "Catalog Section","Catalog Section"
@@ -314,7 +313,6 @@
 "Grid","Grid"
 "Group add","Group add"
 "Group remove","Group remove"
-"Grouped Product","Grouped Product"
 "Groups","Groups"
 "Home","Home"
 "ID","ID"
diff --git a/app/code/Magento/Catalog/i18n/es_ES.csv b/app/code/Magento/Catalog/i18n/es_ES.csv
index 07a4d96a75b99a22d8348594dcc203f8309be5c9..6d4cda7c68463545e90a688b4b9c3167f0936e73 100644
--- a/app/code/Magento/Catalog/i18n/es_ES.csv
+++ b/app/code/Magento/Catalog/i18n/es_ES.csv
@@ -146,7 +146,6 @@
 "Catalog Product Link","Enlace al Catálgo de Productos"
 "Catalog Product View (Any)","Vista del Catálogo de Producto (cualquiera)"
 "Catalog Product View (Configurable)","Vista del Catálogo de Producto (Configurable)"
-"Catalog Product View (Grouped)","Vista del Catálogo de Producto (Agrupada)"
 "Catalog Product View (Simple)","Vista del Catálogo de Producto (Simple)"
 "Catalog Product View (Virtual)","Vista del Catálogo de Producto (Virtual)"
 "Catalog Section","Sección de Catálogo"
@@ -313,7 +312,6 @@
 "Grid","Parrilla"
 "Group add","Añadir grupo"
 "Group remove","Eliminación de grupo"
-"Grouped Product","Producto agrupado"
 "Groups","Grupos"
 "Home","Inicio"
 "ID","ID"
diff --git a/app/code/Magento/Catalog/i18n/fr_FR.csv b/app/code/Magento/Catalog/i18n/fr_FR.csv
index 98068e2e186166508aba2d46fb724a8ca4075358..122f2ea0233a1b86a09f804115cf087bdd7ead60 100644
--- a/app/code/Magento/Catalog/i18n/fr_FR.csv
+++ b/app/code/Magento/Catalog/i18n/fr_FR.csv
@@ -146,7 +146,6 @@
 "Catalog Product Link","Lien du Produit Catalogue"
 "Catalog Product View (Any)","Affichage du Produit Catalogue (Tous)"
 "Catalog Product View (Configurable)","Affichage du Produit Catalogue (Configurable)"
-"Catalog Product View (Grouped)","Affichage du Produit Catalogue (Groupé)"
 "Catalog Product View (Simple)","Affichage du Produit Catalogue (Simple)"
 "Catalog Product View (Virtual)","Affichage du Produit Catalogue (Virtuel)"
 "Catalog Section","Section Catalogue"
@@ -313,7 +312,6 @@
 "Grid","Grille"
 "Group add","Groupe ajouter"
 "Group remove","Suppression de groupe"
-"Grouped Product","Produits  groupés"
 "Groups","Groupes"
 "Home","Accueil"
 "ID","ID"
diff --git a/app/code/Magento/Catalog/i18n/nl_NL.csv b/app/code/Magento/Catalog/i18n/nl_NL.csv
index b89451ceef43e77967323a51b1ef36c166a4fb69..157296cda2070478ce7679ef2dcd48e9146ee975 100644
--- a/app/code/Magento/Catalog/i18n/nl_NL.csv
+++ b/app/code/Magento/Catalog/i18n/nl_NL.csv
@@ -146,7 +146,6 @@
 "Catalog Product Link","Catalogus Product Link"
 "Catalog Product View (Any)","Catalogus Product Bezichtiging (Elke)"
 "Catalog Product View (Configurable)","Catalogus Product Bezichtiging (Configureerbaar)"
-"Catalog Product View (Grouped)","Catalogus Product Bezichtiging (Gegroepeerd)"
 "Catalog Product View (Simple)","Catalogus Product Bezichtiging (Simpel)"
 "Catalog Product View (Virtual)","Catalogus Product Bezichtiging (Virtueel)"
 "Catalog Section","Catalogus Gedeelte"
@@ -313,7 +312,6 @@
 "Grid","Rooster"
 "Group add","Voeg groep toe"
 "Group remove","Groep verwijderen"
-"Grouped Product","Gegroepeerd Product"
 "Groups","Groepen"
 "Home","Thuis"
 "ID","ID"
diff --git a/app/code/Magento/Catalog/i18n/pt_BR.csv b/app/code/Magento/Catalog/i18n/pt_BR.csv
index f33e81c91e5c9c2dfd82742dbe4ea95aacf9517f..ec85d4721e5e6660dd2de60906a0e7c192337dca 100644
--- a/app/code/Magento/Catalog/i18n/pt_BR.csv
+++ b/app/code/Magento/Catalog/i18n/pt_BR.csv
@@ -146,7 +146,6 @@
 "Catalog Product Link","Link do Produto de Catálogo"
 "Catalog Product View (Any)","Visualizar Produto de Catálogo (Qualquer Um)"
 "Catalog Product View (Configurable)","Visualizar Produto de Catálogo (Configurável)"
-"Catalog Product View (Grouped)","Visualizar Produto de Catálogo (Agrupado)"
 "Catalog Product View (Simple)","Visualizar Produto de Catálogo (Simples)"
 "Catalog Product View (Virtual)","Visualizar Produto de Catálogo (Virtual)"
 "Catalog Section","Seção de Catálogo"
@@ -313,7 +312,6 @@
 "Grid","Grade"
 "Group add","Adicionar em grupo"
 "Group remove","Remover grupo"
-"Grouped Product","Produto Agrupado"
 "Groups","Grupos"
 "Home","Início"
 "ID","Identidade"
diff --git a/app/code/Magento/Catalog/i18n/zh_CN.csv b/app/code/Magento/Catalog/i18n/zh_CN.csv
index 685ee7240758696dd9d3f29cd1b11b15c9fbe810..776e34364e400fd41be027864642529b61a76d24 100644
--- a/app/code/Magento/Catalog/i18n/zh_CN.csv
+++ b/app/code/Magento/Catalog/i18n/zh_CN.csv
@@ -146,7 +146,6 @@
 "Catalog Product Link","分类产品链接"
 "Catalog Product View (Any)","分类产品视图(任意)"
 "Catalog Product View (Configurable)","分类产品视图(可配置)"
-"Catalog Product View (Grouped)","分类产品视图(分组)"
 "Catalog Product View (Simple)","分类产品视图(简单)"
 "Catalog Product View (Virtual)","分类产品视图(虚拟)"
 "Catalog Section","分类选择"
@@ -313,7 +312,6 @@
 "Grid","网格"
 "Group add","组添加"
 "Group remove","组删除"
-"Grouped Product","分组产品"
 "Groups","群组"
 "Home","主页"
 "ID","ID"
diff --git a/app/code/Magento/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php b/app/code/Magento/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php
index b70a948884e226ede7e4c82d7fd12190c2eb59c1..0d9d9d0f3fb92c71cc764664ff2bd0b6e21337cd 100644
--- a/app/code/Magento/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php
+++ b/app/code/Magento/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php
@@ -31,7 +31,7 @@ $installer = $this;
 $installFile = __DIR__ . '/upgrade-1.6.0.0.8-1.6.0.0.9.php';
 
 /** @var \Magento\Filesystem\Directory\Read $modulesDirectory */
-$modulesDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\Filesystem::MODULES);
+$modulesDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
 
 if ($modulesDirectory->isExist($modulesDirectory->getRelativePath($installFile))) {
     include $installFile;
diff --git a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php
index fa9bb46bf103cfc216e585639946ff5d713d90ed..bba182665a10cc0366fcfca6c57b3b3e80a21271 100644
--- a/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php
+++ b/app/code/Magento/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php
@@ -43,6 +43,6 @@ $installer->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'country_of_man
     'comparable'        => false,
     'visible_on_front'  => false,
     'unique'            => false,
-    'apply_to'          => 'simple,configurable,bundle,grouped',
+    'apply_to'          => 'simple,configurable,bundle',
     'is_configurable'   => false,
 ));
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/config.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/config.phtml
index 6bb128b72eeec938121f8c410174bb14fbb19fb1..1112dc2167776902eb145efe76b4dce0f36b83b8 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/config.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/edit/super/config.phtml
@@ -68,7 +68,21 @@ jQuery(function($) {
         qtyField = $('#qty'),
         currentProductTemplateControl = $('#product-template-suggest-container .actions-split > .action-toggle'),
         attributesInput = $("input[name='attributes[]']", variationsContainer),
-        hasVariations = <?php echo ($this->getProduct()->isConfigurable() || $this->getRequest()->has('attributes')) ? 'true' : 'false' ?>;
+        hasVariations = <?php echo ($this->getProduct()->isConfigurable() || $this->getRequest()->has('attributes')) ? 'true' : 'false' ?>,
+        isLocked = function (element) {
+            return element.is('[data-locked]');
+        },
+        disableElement = function (element) {
+            if (!isLocked(element)) {
+                element.prop('disabled', true).trigger('change');
+            }
+        },
+        enableElement = function (element) {
+            if (!isLocked(element)) {
+            element.removeProp('disabled').trigger('change');
+
+            }
+        };
 
     collapsableArea
         .on('show', function() {
@@ -78,12 +92,8 @@ jQuery(function($) {
 
             attributesInput.prop('disabled', false);
 
-            qtyField
-                .prop('disabled', true)
-                .trigger('change');
-
-            stockAvailabilityField
-                .prop('disabled', false);
+            disableElement(qtyField);
+            enableElement(stockAvailabilityField);
 
             $.each($('#configurable-attributes-container').variationsAttributes('getAttributes'), function() {
                 $('#attribute-' + this.code + '-container select').prop('disabled', true);
@@ -97,12 +107,8 @@ jQuery(function($) {
                 .removeClass('disabled')
                 .removeProp('disabled');
 
-            stockAvailabilityField
-                .prop('disabled', true);
-
-            qtyField
-                .removeProp('disabled')
-                .trigger('change');
+            disableElement(stockAvailabilityField);
+            enableElement(qtyField);
         })
         .collapse(hasVariations ? 'show' : 'hide');
 
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/price.phtml b/app/code/Magento/Catalog/view/adminhtml/catalog/product/price.phtml
index 072029e77d87c9a9d89788761773eff597644804..e2bd96805d435c1ce95ffa8c82e46d691f8164ef 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/price.phtml
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/product/price.phtml
@@ -35,10 +35,10 @@
 <?php
     /** @var $_coreHelper \Magento\Core\Helper\Data */
     $_coreHelper        = $this->helper('Magento\Core\Helper\Data');
-    /** @var $_weeeHelper \Magento\Weee\Helper\Data */
-    $_weeeHelper        = $this->helper('Magento\Weee\Helper\Data');
-    /** @var $_taxHelper \Magento\Tax\Helper\Data */
-    $_taxHelper         = $this->helper('Magento\Tax\Helper\Data');
+    /** @var $weeeHelper \Magento\Weee\Helper\Data */
+    $weeeHelper        = $this->helper('Magento\Weee\Helper\Data');
+    /** @var $priceHelper \Magento\Catalog\Helper\Product\Price */
+    $priceHelper         = $this->helper('Magento\Catalog\Helper\Product\Price');
 
     $_product           = $this->getProduct();
     $_id                = $_product->getId();
@@ -46,31 +46,31 @@
     $_website           = $this->getWebsite($_storeId);
 
     $_weeeSeparator     = '';
-    $_simplePricesTax   = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
+    $_simplePricesTax   = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices());
     $_minimalPriceValue = $_product->getMinimalPrice();
-    $_minimalPrice      = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
+    $_minimalPrice      = $priceHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
 ?>
 
 
 <?php
-$_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = null);
-$_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true);
+$_exclTax = $priceHelper->getPrice($_product, $_minimalPriceValue, $includingTax = null);
+$_inclTax = $priceHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true);
 ?>
-<?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product, null, null, $_website); ?>
-<?php if ($_weeeHelper->typeOfDisplay($_product, array(1,2,4))): ?>
-    <?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product, null, null, $_website); ?>
-    <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, $_website); ?>
+<?php $_weeeTaxAmount = $weeeHelper->getAmount($_product, null, null, $_website); ?>
+<?php if ($weeeHelper->typeOfDisplay($_product, array(1,2,4))): ?>
+    <?php $_weeeTaxAmount = $weeeHelper->getAmount($_product, null, null, $_website); ?>
+    <?php $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, $_website); ?>
 <?php endif; ?>
 
 <div class="price-box">
-<?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
-<?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
-<?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
-<?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
-<?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
+<?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?>
+<?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
+<?php $_finalPrice = $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?>
+<?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
+<?php $_weeeDisplayType = $weeeHelper->getPriceDisplayType(); ?>
 <?php if ($_finalPrice == $_price): ?>
-    <?php if ($_taxHelper->displayBothPrices()): ?>
-        <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
+    <?php if ($priceHelper->displayBothPrices()): ?>
+        <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?>
             <span class="price-excluding-tax">
                 <span class="label"><?php echo __('Excl. Tax:') ?></span>
                 <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -83,7 +83,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
                     <?php echo $_coreHelper->currencyByStore($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?>
                 </span>
             </span>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
             <span class="price-excluding-tax">
                 <span class="label"><?php echo __('Excl. Tax:') ?></span>
                 <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -103,7 +103,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
                     <?php endforeach; ?>
                     )</span>
             </span>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
             <span class="price-excluding-tax">
                 <span class="label"><?php echo __('Excl. Tax:') ?></span>
                 <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -123,7 +123,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
                     <?php endforeach; ?>
                     )</span>
             </span>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
             <span class="price-excluding-tax">
                 <span class="label"><?php echo __('Excl. Tax:') ?></span>
                 <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -156,11 +156,11 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
             </span>
         <?php endif; ?>
     <?php else: ?>
-        <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
+        <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?>
             <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                 <?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
             </span>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
             <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                 <?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
             </span>
@@ -171,7 +171,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
                     <?php $_weeeSeparator = ' + '; ?>
                 <?php endforeach; ?>
                 )</span>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
             <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                 <?php echo $_coreHelper->currencyByStore($_price+$_weeeTaxAmount, $_storeId, true, true) ?>
             </span>
@@ -182,7 +182,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
                     <?php $_weeeSeparator = ' + '; ?>
                 <?php endforeach; ?>
                 )</span>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
             <span class="regular-price"><?php echo $_coreHelper->currencyByStore($_price, $_storeId, true, true) ?></span><br />
             <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
                 <span class="weee">
@@ -199,9 +199,9 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
         <?php endif; ?>
     <?php endif; ?>
 <?php else: /* if ($_finalPrice == $_price): */ ?>
-    <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
+    <?php $_originalWeeeTaxAmount = $weeeHelper->getOriginalAmount($_product); ?>
 
-    <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
+    <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?>
         <p class="old-price">
             <span class="price-label"><?php echo __('Regular Price:') ?></span>
             <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -209,7 +209,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
             </span>
         </p>
 
-        <?php if ($_taxHelper->displayBothPrices()): ?>
+        <?php if ($priceHelper->displayBothPrices()): ?>
             <p class="special-price">
                 <span class="price-label"><?php echo __('Special Price:') ?></span>
                 <span class="price-excluding-tax">
@@ -234,7 +234,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
         </p>
         <?php endif; ?>
 
-    <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
+    <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
         <p class="old-price">
             <span class="price-label"><?php echo __('Regular Price:') ?></span>
             <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -264,7 +264,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
             </span>
         </span>
         </p>
-    <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
+    <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
         <p class="old-price">
             <span class="price-label"><?php echo __('Regular Price:') ?></span>
             <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -294,7 +294,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
             </span>
         </span>
         </p>
-    <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
+    <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
         <p class="old-price">
             <span class="price-label"><?php echo __('Regular Price:') ?></span>
             <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -330,7 +330,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
             </span>
         </p>
 
-        <?php if ($_taxHelper->displayBothPrices()): ?>
+        <?php if ($priceHelper->displayBothPrices()): ?>
             <p class="special-price">
                 <span class="price-label"><?php echo __('Special Price:') ?></span>
                 <span class="price-excluding-tax">
@@ -361,7 +361,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax
 <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
 
     <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
-    <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
+    <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
         <?php $_minimalPriceDisplayValue = $_minimalPrice+$_weeeTaxAmount; ?>
     <?php endif; ?>
 
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/type-switcher.js b/app/code/Magento/Catalog/view/adminhtml/catalog/type-switcher.js
index fbab1d582cf1316011b23a30fe273c9386ddb7fa..ea184be046edc31fe17b5f671c10d62b9ecdcd70 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/type-switcher.js
+++ b/app/code/Magento/Catalog/view/adminhtml/catalog/type-switcher.js
@@ -76,19 +76,50 @@
                 if ($(this).is(':checked')) {
                     $type.val(self.baseType.virtual).trigger('change');
                     if ($type.val() != 'bundle') { // @TODO move this check to Magento_Bundle after refactoring as widget
-                        self.$weight.addClass('ignore-validate').prop('disabled', true);
+                        self.disableElement(self.$weight);
                     }
                     self.$tab.show().closest('li').removeClass('removed');
                 } else {
                     $type.val(self.baseType.real).trigger('change');
                     if ($type.val() != 'bundle') { // @TODO move this check to Magento_Bundle after refactoring as widget
-                        self.$weight.removeClass('ignore-validate').prop('disabled', false);
+                        self.enableElement(self.$weight);
                     }
                     self.$tab.hide();
                 }
             }).trigger('change');
         },
 
+        /**
+         * Disable element
+         * @param {jQuery|HTMLElement} element
+         */
+        disableElement: function (element) {
+            if (!this._isLocked(element)) {
+                element.addClass('ignore-validate').prop('disabled', true);
+            }
+        },
+
+        /**
+         * Enable element
+         * @param {jQuery|HTMLElement} element
+         */
+        enableElement: function (element) {
+            if (!this._isLocked(element)) {
+                element.removeClass('ignore-validate').prop('disabled', false);
+            }
+        },
+
+        /**
+         * Is element locked
+         *
+         * @param {jQuery|HTMLElement} element
+         * @returns {Boolean}
+         * @private
+         */
+        _isLocked: function (element) {
+            return element.is('[data-locked]');
+        },
+
         /**
          * Get element bu code
          * @param {string} code
diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml
index b4b7a42b5742df7d82dd796af610607266b68670..91159ae119f2a70d9048f01c5f9fd3e1b028dadc 100644
--- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml
+++ b/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_new.xml
@@ -122,7 +122,22 @@
         <block class="Magento\View\Element\Template" name="affected-attribute-set-form" template="Magento_Catalog::product/configurable/affected-attribute-set-selector/form.phtml"/>
     </referenceContainer>
     <referenceContainer name="left">
-        <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs" name="product_tabs"/>
+        <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs" name="product_tabs">
+            <block class="Magento\Backend\Block\Widget\Tab" name="product_tabs.customer_options" as="customer_options">
+                <arguments>
+                    <argument name="label" xsi:type="string" translate="true">Custom Options</argument>
+                    <argument name="url" xsi:type="url" path="catalog/*/options">
+                        <param name="_current">1</param>
+                    </argument>
+                    <argument name="class" xsi:type="string">ajax</argument>
+                </arguments>
+            </block>
+            <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Alerts" name="product_tabs.product-alerts" as="product-alerts">
+                <arguments>
+                    <argument name="label" xsi:type="string" translate="true">Product Alerts</argument>
+                </arguments>
+            </block>
+        </block>
     </referenceContainer>
     <referenceContainer name="js">
         <block class="Magento\Catalog\Block\Adminhtml\Product\Edit\Js" name="catalog_product_js" template="catalog/product/js.phtml"/>
diff --git a/app/code/Magento/Catalog/view/adminhtml/product/product.css b/app/code/Magento/Catalog/view/adminhtml/product/product.css
index 4d824b68fa8b28cbda876573298f424a6dac7692..54a508adde2a10629dca4d80f0a5578d8a332aec 100644
--- a/app/code/Magento/Catalog/view/adminhtml/product/product.css
+++ b/app/code/Magento/Catalog/view/adminhtml/product/product.css
@@ -856,29 +856,6 @@
     display: none !important;
 }
 
-/*
-    Grouped Products Grid
--------------------------------------- */
-#grouped_grid .col-name {
-    width: 25%;
-}
-
-#grouped_grid .col-sku {
-    width: 10%;
-}
-
-#grouped_grid .col-qty {
-    width: 7%;
-}
-
-.ui-dialog.grouped .massaction {
-    display: none;
-}
-
-.ui-dialog.grouped .col-entity_id {
-    width: 2%;
-}
-
 /*
     Custom Options
 -------------------------------------- */
diff --git a/app/code/Magento/Catalog/view/frontend/js/msrp.js b/app/code/Magento/Catalog/view/frontend/js/msrp.js
index 3e11af76d510e4308f9d774908362d6bc9ed35e5..a7d80e15530aa2097506b550858a287ca73f6a5b 100644
--- a/app/code/Magento/Catalog/view/frontend/js/msrp.js
+++ b/app/code/Magento/Catalog/view/frontend/js/msrp.js
@@ -27,7 +27,6 @@
 (function($) {
     $.widget('mage.addToCart', {
         options: {
-            groupedProductContainer: '.grouped-items-table',
             showAddToCart: true
         },
 
diff --git a/app/code/Magento/Catalog/view/frontend/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/product/compare/list.phtml
index 8c8b6f77a2003eb1d1e742ffa1d3b904ff7715af..7efe0129394199c4343172209fc193f9c9cfebbf 100644
--- a/app/code/Magento/Catalog/view/frontend/product/compare/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/compare/list.phtml
@@ -40,7 +40,8 @@
                             <th class="cell label remove">&nbsp;</th>
                         <?php endif; ?>
                         <td class="cell remove product">
-                            <a href="<?php echo $this->helper('Magento\Catalog\Helper\Product\Compare')->getRemoveUrl($_item) ?>"
+                            <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
+                            <a href="#" data-post='<?php echo $compareHelper->getPostDataRemove($_item); ?>'
                                class="action delete" title="<?php echo __('Remove Product') ?>">
                                 <span><?php echo __('Remove Product') ?></span>
                             </a>
@@ -84,8 +85,8 @@
                                     <?php endif; ?>
                                 </div>
                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
-                                    <div class="secondary addto links">
-                                        <a href="<?php echo $this->helper('Magento\Catalog\Helper\Product\Compare')->getAddToWishlistUrl($_item) ?>" class="action towishlist" data-action="add-to-wishlist">
+                                    <div class="secondary addto links" data-role="add-to-links">
+                                        <a href="#" data-post='<?php echo $this->getAddToWishlistParams($_item); ?>' class="action towishlist" data-action="add-to-wishlist">
                                             <span><?php echo __('Add to Wishlist') ?></span>
                                         </a>
                                     </div>
diff --git a/app/code/Magento/Catalog/view/frontend/product/compare/sidebar.phtml b/app/code/Magento/Catalog/view/frontend/product/compare/sidebar.phtml
index 59ac6a0d8401456c6b4d8b220a698c0857c33b4d..c41afa7c74ecb33e2ab644d184e93a25b9be23b5 100644
--- a/app/code/Magento/Catalog/view/frontend/product/compare/sidebar.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/compare/sidebar.phtml
@@ -48,8 +48,11 @@ $count = $_helper->getItemCount();
                         <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_item, $_item->getName(), 'name') ?>
                     </a>
                 </strong>
-                <a href="<?php echo $_helper->getRemoveUrl($_item) ?>" title="<?php echo __('Remove This Item') ?>"
-                   class="action delete"><span><?php echo __('Remove This Item') ?></span></a>
+                <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
+                <a href="#" data-post='<?php echo $compareHelper->getPostDataRemove($_item); ?>'
+                   title="<?php echo __('Remove This Item') ?>"
+                   class="action delete">
+                    <span><?php echo __('Remove This Item') ?></span></a>
             </li>
         <?php endforeach; ?>
     </ol>
@@ -64,17 +67,17 @@ $count = $_helper->getItemCount();
         </div>
     </div>
     <script type="text/javascript">
-        (function($) {
+        (function ($) {
             head.js("<?php echo $this->getViewFileUrl('Magento_Catalog::js/compare.js') ?>", function () {
-                    $('#compare-items').compareItems({
-                        removeConfirmMessage: '<?php echo __('Are you sure you would like to remove this item from the compare products?') ?>',
-                        removeSelector: '#compare-items a.action.delete',
-                        clearAllConfirmMessage: '<?php echo __('Are you sure you would like to remove all products from your comparison?') ?>',
-                        clearAllSelector: '#compare-clear-all'
-                    });
+                $('#compare-items').compareItems({
+                    removeConfirmMessage: '<?php echo __('Are you sure you would like to remove this item from the compare products?') ?>',
+                    removeSelector: '#compare-items a.action.delete',
+                    clearAllConfirmMessage: '<?php echo __('Are you sure you would like to remove all products from your comparison?') ?>',
+                    clearAllSelector: '#compare-clear-all'
                 });
-            })(jQuery);
-        </script>
+            });
+        })(jQuery);
+    </script>
     <?php else: ?>
         <p class="empty"><?php echo __('You have no items to compare.') ?></p>
         <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/frontend/product/list.phtml b/app/code/Magento/Catalog/view/frontend/product/list.phtml
index e447c72129d5f33accde18437601c9e7c4b1634d..bc368edf893b7b4c9d79fedc5d60333fc0797cbc 100644
--- a/app/code/Magento/Catalog/view/frontend/product/list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/list.phtml
@@ -91,10 +91,21 @@ $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()): ?>
-                                    <button type="button" title="<?php echo __('Add to Cart') ?>" class="action tocart"
-                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_product) ?>'}}">
-                                        <span><?php echo __('Add to Cart') ?></span>
-                                    </button>
+                                    <?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) ?>'}}">
+                                            <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>
@@ -103,12 +114,17 @@ $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im
                                     <?php endif; ?>
                                 <?php endif; ?>
                             </div>
-                            <div class="secondary"<?php echo strpos($pos, $viewMode . '-secondary') ? $position : ''; ?>>
-                                <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getAddUrl($_product) ?>"
+                            <div data-role="add-to-links" class="secondary"<?php echo strpos($pos, $viewMode . '-secondary') ? $position : ''; ?>>
+                                <a href="#"
+                                   data-post='<?php echo $this->getAddToWishlistParams($_product); ?>'
                                    class="action towishlist" data-action="add-to-wishlist">
                                     <span><?php echo __('Add to Wishlist') ?></span>
                                 </a>
-                                <a href="<?php echo $this->getAddToCompareUrl($_product) ?>" class="action tocompare">
+                                <?php
+                                $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
+                                ?>
+                                <a href="#" class="action tocompare"
+                                   data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'>
                                     <span><?php echo __('Add to Compare') ?></span>
                                 </a>
                             </div>
diff --git a/app/code/Magento/Catalog/view/frontend/product/list/items.phtml b/app/code/Magento/Catalog/view/frontend/product/list/items.phtml
index 716e37e43947f56943cc0d0f7c5e97608322f82b..18d94f90ecdfa90c1aaeed40232c505cc561f006 100644
--- a/app/code/Magento/Catalog/view/frontend/product/list/items.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/list/items.phtml
@@ -230,9 +230,20 @@ switch($type=$this->getType()) {
                             <?php if($showCart): ?>
                             <div class="primary">
                                 <?php if($_item->isSaleable()): ?>
-                                <button class="action tocart" data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}" type="button" title="<?php echo __('Add to Cart') ?>">
-                                    <span><?php echo __('Add to Cart') ?></span>
-                                </button>
+                                    <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                        <button class="action tocart" data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}" type="button" title="<?php echo __('Add to Cart') ?>">
+                                            <span><?php echo __('Add to Cart') ?></span>
+                                        </button>
+                                    <?php else: ?>
+                                        <?php $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
+                                        ?>
+                                        <button class="action tocart"
+                                                data-post='<?php echo $postData; ?>'
+                                                type="button" title="<?php echo __('Add to Cart') ?>">
+                                            <span><?php echo __('Add to Cart') ?></span>
+                                        </button>
+                                    <?php endif; ?>
                                 <?php else: ?>
                                     <?php if ($_item->getIsSalable()): ?>
                                         <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -244,14 +255,20 @@ switch($type=$this->getType()) {
                             <?php endif; ?>
 
                             <?php if($showWishlist || $showCompare): ?>
-                            <div class="secondary addto links">
+                            <div class="secondary addto links" data-role="add-to-links">
                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                    <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>" class="action towishlist" data-action="add-to-wishlist" title="<?php echo __('Add to Wishlist') ?>">
+                                    <a href="#" data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'  class="action towishlist" data-action="add-to-wishlist" title="<?php echo __('Add to Wishlist') ?>">
                                         <span><?php echo __('Add to Wishlist') ?></span>
                                     </a>
                                 <?php endif; ?>
-                                <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                    <a href="<?php echo $this->getAddToCompareUrl($_item) ?>" class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                    <?php
+                                    $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
+                                    ?>
+                                    <a href="#" class="action tocompare"
+                                       data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'
+                                       data-role="add-to-links"
+                                       title="<?php echo __('Add to Compare'); ?>">
                                         <span><?php echo __('Add to Compare') ?></span>
                                     </a>
                                 <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/frontend/product/listing.phtml b/app/code/Magento/Catalog/view/frontend/product/listing.phtml
index c61fb8bea98aaa444858dedfb16d14bac6f8df3a..29ded60475a31afff0cb9f90b57c9ee437bd33c3 100644
--- a/app/code/Magento/Catalog/view/frontend/product/listing.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/listing.phtml
@@ -85,8 +85,8 @@ $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im
                                                                         '<p class="stock unavailable"><span>' . __('Out of stock') . '</span></p>';
                     }
 
-                    $info['links'] = '<div class="product links">'
-                                    . '<a href="' . $this->helper('Magento\Wishlist\Helper\Data')->getAddUrl($_product) . '" class="action towishlist" data-action="add-to-wishlist">'
+                    $info['links'] = '<div class="product links" data-role="add-to-links">'
+                                    . '<a href="#" data-post=\'' . $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($_product) . '\' class="action towishlist" data-action="add-to-wishlist">'
                                     . '<span>' . __('Add to Wishlist') . '</span></a>'
                                     . '<a href="' . $this->getAddToCompareUrl($_product) . '" class="action tocompare">'
                                     . '<span>' . __('Add to Compare') . '</span></a></div>';
diff --git a/app/code/Magento/Catalog/view/frontend/product/price.phtml b/app/code/Magento/Catalog/view/frontend/product/price.phtml
index 3cf636099367778357d76348ac9fc1d0e48eb4c1..2787e9b4ffd13dea12b5e8ed310cc79c7058eda1 100644
--- a/app/code/Magento/Catalog/view/frontend/product/price.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/price.phtml
@@ -34,138 +34,63 @@
 ?>
 <?php
     $_coreHelper = $this->helper('Magento\Core\Helper\Data');
-    $_weeeHelper = $this->helper('Magento\Weee\Helper\Data');
-    $_taxHelper  = $this->helper('Magento\Tax\Helper\Data');
+    $weeeHelper = $this->helper('Magento\Weee\Helper\Data');
+    $priceHelper  = $this->helper('Magento\Catalog\Helper\Product\Price');
     /* @var $_coreHelper \Magento\Core\Helper\Data */
-    /* @var $_weeeHelper \Magento\Weee\Helper\Data */
-    /* @var $_taxHelper \Magento\Tax\Helper\Data */
+    /* @var $weeeHelper \Magento\Weee\Helper\Data */
+    /* @var $priceHelper Magento\Catalog\Helper\Product\Price */
 
     $_product = $this->getProduct();
     $_storeId = $_product->getStoreId();
     $_id = $_product->getId();
     $_weeeSeparator = '';
-    $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices());
+    $_simplePricesTax = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices());
     $_minimalPriceValue = $_product->getMinimalPrice();
-    $_minimalPrice = $_taxHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
+    $_minimalPrice = $priceHelper->getPrice($_product, $_minimalPriceValue, $_simplePricesTax);
 ?>
+<?php $_weeeTaxAmount = $weeeHelper->getAmountForDisplay($_product); ?>
+<?php if ($weeeHelper->typeOfDisplay($_product, array(\Magento\Weee\Model\Tax::DISPLAY_INCL_DESCR, \Magento\Weee\Model\Tax::DISPLAY_EXCL_DESCR_INCL, 4))): ?>
+    <?php $_weeeTaxAmount = $weeeHelper->getAmount($_product); ?>
+    <?php $_weeeTaxAttributes = $weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
+<?php endif; ?>
+<?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
+<?php if ($weeeHelper->isTaxable() && !$priceHelper->priceIncludesTax($_storeId)): ?>
+    <?php $_attributes = $weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
+    <?php $_weeeTaxAmountInclTaxes = $weeeHelper->getAmountInclTaxes($_attributes); ?>
+<?php endif; ?>
 
-<?php if (!$_product->isGrouped()): ?>
-    <?php $_weeeTaxAmount = $_weeeHelper->getAmountForDisplay($_product); ?>
-    <?php if ($_weeeHelper->typeOfDisplay($_product, array(\Magento\Weee\Model\Tax::DISPLAY_INCL_DESCR, \Magento\Weee\Model\Tax::DISPLAY_EXCL_DESCR_INCL, 4))): ?>
-        <?php $_weeeTaxAmount = $_weeeHelper->getAmount($_product); ?>
-        <?php $_weeeTaxAttributes = $_weeeHelper->getProductWeeeAttributesForDisplay($_product); ?>
-    <?php endif; ?>
-    <?php $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; ?>
-    <?php if ($_weeeHelper->isTaxable() && !$_taxHelper->priceIncludesTax($_storeId)): ?>
-        <?php $_attributes = $_weeeHelper->getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?>
-        <?php $_weeeTaxAmountInclTaxes = $_weeeHelper->getAmountInclTaxes($_attributes); ?>
-    <?php endif; ?>
-
-    <div class="price-box">
-    <?php $_price = $_taxHelper->getPrice($_product, $_product->getPrice()) ?>
-    <?php $_regularPrice = $_taxHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
-    <?php $_finalPrice = $_taxHelper->getPrice($_product, $_product->getFinalPrice()) ?>
-    <?php $_finalPriceInclTax = $_taxHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
-    <?php $_weeeDisplayType = $_weeeHelper->getPriceDisplayType(); ?>
-    <?php if ($_finalPrice >= $_price): ?>
-        <?php if ($_taxHelper->displayBothPrices()): ?>
-            <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
-                    </span>
-                </span>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
-                    </span>
-                </span>
-            <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
-                    </span>
-                </span>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
-                    </span>
-                    <span class="weee">(
-                        <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php echo $_weeeSeparator; ?>
-                            <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
-                            <?php $_weeeSeparator = ' + '; ?>
-                        <?php endforeach; ?>
-                        )</span>
-                </span>
-            <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
-                    </span>
+<div class="price-box">
+<?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?>
+<?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $_simplePricesTax) ?>
+<?php $_finalPrice = $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?>
+<?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
+<?php $_weeeDisplayType = $weeeHelper->getPriceDisplayType(); ?>
+<?php if ($_finalPrice >= $_price): ?>
+    <?php if ($priceHelper->displayBothPrices()): ?>
+        <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
                 </span>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
-                    </span>
-                    <span class="weee">(
-                        <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                            <?php echo $_weeeSeparator; ?>
-                            <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
-                            <?php $_weeeSeparator = ' + '; ?>
-                        <?php endforeach; ?>
-                        )</span>
-                </span>
-            <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_price, true, false) ?>
-                    </span>
-                </span>
-                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                    <span class="weee">
-                        <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
-                    </span>
-                <?php endforeach; ?>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
-                    </span>
-                </span>
-            <?php else: ?>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php if ($_finalPrice == $_price): ?>
-                            <?php echo $_coreHelper->currency($_price, true, false) ?>
-                        <?php else: ?>
-                            <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
-                        <?php endif; ?>
-                    </span>
-                </span>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
-                    </span>
+            </span>
+            <span class="price-including-tax">
+                <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
                 </span>
-            <?php endif; ?>
-        <?php else: ?>
-            <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
-                <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
                 </span>
-            <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
-                <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+            <span class="price-including-tax">
+                <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
                 </span>
                 <span class="weee">(
                     <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
@@ -174,9 +99,18 @@
                         <?php $_weeeSeparator = ' + '; ?>
                     <?php endforeach; ?>
                     )</span>
-            <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
-                <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, false) ?>
+                </span>
+            </span>
+            <span class="price-including-tax">
+                <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
                 </span>
                 <span class="weee">(
                     <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
@@ -185,70 +119,102 @@
                         <?php $_weeeSeparator = ' + '; ?>
                     <?php endforeach; ?>
                     )</span>
-            <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
-                <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
-                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                    <span class="weee">
-                        <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
-                    </span>
-                <?php endforeach; ?>
-                <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_price, true, false) ?>
                 </span>
-            <?php else: ?>
-                <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+            </span>
+            <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                <span class="weee">
+                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
+                </span>
+            <?php endforeach; ?>
+            <span class="price-including-tax">
+                <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
+                </span>
+            </span>
+        <?php else: ?>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                     <?php if ($_finalPrice == $_price): ?>
-                        <?php echo $_coreHelper->currency($_price, true, true) ?>
+                        <?php echo $_coreHelper->currency($_price, true, false) ?>
                     <?php else: ?>
-                        <?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
+                        <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
                     <?php endif; ?>
                 </span>
-            <?php endif; ?>
-        <?php endif; ?>
-    <?php else: /* if ($_finalPrice == $_price): */ ?>
-        <?php $_originalWeeeTaxAmount = $_weeeHelper->getOriginalAmount($_product); ?>
-
-        <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 0)): // including ?>
-            <p class="old-price">
-                <span class="price-label"><?php echo __('Regular Price:') ?></span>
-                <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
-                </span>
-            </p>
-
-            <?php if ($_taxHelper->displayBothPrices()): ?>
-                <p class="special-price">
-                    <span class="price-label"><?php echo __('Special Price:') ?></span>
-                    <span class="price-excluding-tax">
-                        <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                        <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                            <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
-                        </span>
-                    </span>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
-                    </span>
+            </span>
+            <span class="price-including-tax">
+                <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
                 </span>
-                </p>
-            <?php else: ?>
-            <p class="special-price">
-                <span class="price-label"><?php echo __('Special Price:') ?></span>
-                <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?>
+            </span>
+        <?php endif; ?>
+    <?php else: ?>
+        <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?>
+            <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
+            <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+            <span class="weee">(
+                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                    <?php echo $_weeeSeparator; ?>
+                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
+                    <?php $_weeeSeparator = ' + '; ?>
+                <?php endforeach; ?>
+                )</span>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
+            <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+            <span class="weee">(
+                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                    <?php echo $_weeeSeparator; ?>
+                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
+                    <?php $_weeeSeparator = ' + '; ?>
+                <?php endforeach; ?>
+                )</span>
+        <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
+            <span class="regular-price"><?php echo $_coreHelper->currency($_price,true,true) ?></span><br />
+            <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                <span class="weee">
+                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
                 </span>
-            </p>
-            <?php endif; ?>
+            <?php endforeach; ?>
+            <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_price + $_weeeTaxAmount, true, true) ?>
+            </span>
+        <?php else: ?>
+            <span class="regular-price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php if ($_finalPrice == $_price): ?>
+                    <?php echo $_coreHelper->currency($_price, true, true) ?>
+                <?php else: ?>
+                    <?php echo $_coreHelper->currency($_finalPrice, true, true) ?>
+                <?php endif; ?>
+            </span>
+        <?php endif; ?>
+    <?php endif; ?>
+<?php else: /* if ($_finalPrice == $_price): */ ?>
+    <?php $_originalWeeeTaxAmount = $weeeHelper->getOriginalAmount($_product); ?>
 
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
-            <p class="old-price">
-                <span class="price-label"><?php echo __('Regular Price:') ?></span>
-                <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
-                </span>
-            </p>
+    <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 0)): // including ?>
+        <p class="old-price">
+            <span class="price-label"><?php echo __('Regular Price:') ?></span>
+            <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
+            </span>
+        </p>
 
+        <?php if ($priceHelper->displayBothPrices()): ?>
             <p class="special-price">
                 <span class="price-label"><?php echo __('Special Price:') ?></span>
                 <span class="price-excluding-tax">
@@ -257,13 +223,6 @@
                         <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
                     </span>
                 </span>
-            <span class="weee">(
-                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                    <?php echo $_weeeSeparator; ?>
-                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
-                    <?php $_weeeSeparator = ' + '; ?>
-                <?php endforeach; ?>
-                )</span>
             <span class="price-including-tax">
                 <span class="label"><?php echo __('Incl. Tax:') ?></span>
                 <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
@@ -271,44 +230,112 @@
                 </span>
             </span>
             </p>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
-            <p class="old-price">
-                <span class="price-label"><?php echo __('Regular Price:') ?></span>
-                <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
+        <?php else: ?>
+        <p class="special-price">
+            <span class="price-label"><?php echo __('Special Price:') ?></span>
+            <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmountInclTaxes, true, false) ?>
+            </span>
+        </p>
+        <?php endif; ?>
+
+    <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 1)): // incl. + weee ?>
+        <p class="old-price">
+            <span class="price-label"><?php echo __('Regular Price:') ?></span>
+            <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
+            </span>
+        </p>
+
+        <p class="special-price">
+            <span class="price-label"><?php echo __('Special Price:') ?></span>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
                 </span>
-            </p>
+            </span>
+        <span class="weee">(
+            <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                <?php echo $_weeeSeparator; ?>
+                <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
+                <?php $_weeeSeparator = ' + '; ?>
+            <?php endforeach; ?>
+            )</span>
+        <span class="price-including-tax">
+            <span class="label"><?php echo __('Incl. Tax:') ?></span>
+            <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
+            </span>
+        </span>
+        </p>
+    <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 4)): // incl. + weee ?>
+        <p class="old-price">
+            <span class="price-label"><?php echo __('Regular Price:') ?></span>
+            <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_regularPrice + $_originalWeeeTaxAmount, true, false) ?>
+            </span>
+        </p>
 
-            <p class="special-price">
-                <span class="price-label"><?php echo __('Special Price:') ?></span>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
-                    </span>
+        <p class="special-price">
+            <span class="price-label"><?php echo __('Special Price:') ?></span>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPrice + $_weeeTaxAmount, true, false) ?>
                 </span>
-            <span class="weee">(
-                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                    <?php echo $_weeeSeparator; ?>
-                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
-                    <?php $_weeeSeparator = ' + '; ?>
-                <?php endforeach; ?>
-                )</span>
+            </span>
+        <span class="weee">(
+            <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                <?php echo $_weeeSeparator; ?>
+                <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, true); ?>
+                <?php $_weeeSeparator = ' + '; ?>
+            <?php endforeach; ?>
+            )</span>
+        <span class="price-including-tax">
+            <span class="label"><?php echo __('Incl. Tax:') ?></span>
+            <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
+            </span>
+        </span>
+        </p>
+    <?php elseif ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
+        <p class="old-price">
+            <span class="price-label"><?php echo __('Regular Price:') ?></span>
+            <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
+            </span>
+        </p>
+
+        <p class="special-price">
+            <span class="price-label"><?php echo __('Special Price:') ?></span>
+            <span class="price-excluding-tax">
+                <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                    <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
+                </span>
+            </span>
+            <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
+                <span class="weee">
+                    <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
+                </span>
+            <?php endforeach; ?>
             <span class="price-including-tax">
                 <span class="label"><?php echo __('Incl. Tax:') ?></span>
                 <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
                     <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
                 </span>
             </span>
-            </p>
-        <?php elseif ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, 2)): // excl. + weee + final ?>
-            <p class="old-price">
-                <span class="price-label"><?php echo __('Regular Price:') ?></span>
-                <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
-                </span>
-            </p>
+        </p>
+    <?php else: // excl. ?>
+        <p class="old-price">
+            <span class="price-label"><?php echo __('Regular Price:') ?></span>
+            <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
+            </span>
+        </p>
 
+        <?php if ($priceHelper->displayBothPrices()): ?>
             <p class="special-price">
                 <span class="price-label"><?php echo __('Special Price:') ?></span>
                 <span class="price-excluding-tax">
@@ -317,122 +344,44 @@
                         <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
                     </span>
                 </span>
-                <?php foreach ($_weeeTaxAttributes as $_weeeTaxAttribute): ?>
-                    <span class="weee">
-                        <?php echo $_weeeTaxAttribute->getName(); ?>: <?php echo $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, true); ?>
-                    </span>
-                <?php endforeach; ?>
                 <span class="price-including-tax">
                     <span class="label"><?php echo __('Incl. Tax:') ?></span>
                     <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                        <?php echo $_coreHelper->currency($_finalPriceInclTax + $_weeeTaxAmountInclTaxes, true, false) ?>
-                    </span>
-                </span>
-            </p>
-        <?php else: // excl. ?>
-            <p class="old-price">
-                <span class="price-label"><?php echo __('Regular Price:') ?></span>
-                <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_regularPrice, true, false) ?>
-                </span>
-            </p>
-
-            <?php if ($_taxHelper->displayBothPrices()): ?>
-                <p class="special-price">
-                    <span class="price-label"><?php echo __('Special Price:') ?></span>
-                    <span class="price-excluding-tax">
-                        <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                        <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                            <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
-                        </span>
-                    </span>
-                    <span class="price-including-tax">
-                        <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                        <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                            <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
-                        </span>
+                        <?php echo $_coreHelper->currency($_finalPriceInclTax, true, false) ?>
                     </span>
-                </p>
-            <?php else: ?>
-            <p class="special-price">
-                <span class="price-label"><?php echo __('Special Price:') ?></span>
-                <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                    <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
                 </span>
             </p>
-            <?php endif; ?>
+        <?php else: ?>
+        <p class="special-price">
+            <span class="price-label"><?php echo __('Special Price:') ?></span>
+            <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                <?php echo $_coreHelper->currency($_finalPrice, true, false) ?>
+            </span>
+        </p>
         <?php endif; ?>
+    <?php endif; ?>
 
-    <?php endif; /* if ($_finalPrice == $_price): */ ?>
-
-    <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
+<?php endif; /* if ($_finalPrice == $_price): */ ?>
+<?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?>
 
-        <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
-        <?php if ($_weeeTaxAmount && $_weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
-            <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
-        <?php endif; ?>
+    <?php $_minimalPriceDisplayValue = $_minimalPrice; ?>
+    <?php if ($_weeeTaxAmount && $weeeHelper->typeOfDisplay($_product, array(0, 1, 4))): ?>
+        <?php $_minimalPriceDisplayValue = $_minimalPrice + $_weeeTaxAmount; ?>
+    <?php endif; ?>
 
-        <?php if ($this->getUseLinkForAsLowAs()):?>
-        <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
-        <?php else:?>
-        <span class="minimal-price-link">
-        <?php endif?>
-            <span class="label"><?php echo __('As low as:') ?></span>
-            <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>
-            </span>
-        <?php if ($this->getUseLinkForAsLowAs()):?>
-        </a>
-        <?php else:?>
+    <?php if ($this->getUseLinkForAsLowAs()):?>
+    <a href="<?php echo $_product->getProductUrl(); ?>" class="minimal-price-link">
+    <?php else:?>
+    <span class="minimal-price-link">
+    <?php endif?>
+        <span class="label"><?php echo __('As low as:') ?></span>
+        <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+            <?php echo $_coreHelper->currency($_minimalPriceDisplayValue, true, false) ?>
         </span>
-        <?php endif?>
-    <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
-    </div>
-
-<?php else: /* if (!$_product->isGrouped()): */ ?>
-    <?php
-        $showMinPrice = $this->getDisplayMinimalPrice();
-        if ($showMinPrice && $_minimalPriceValue) {
-            $_exclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue);
-            $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, true);
-            $price    = $showMinPrice ? $_minimalPriceValue : 0;
-        } else {
-            $price    = $_product->getFinalPrice();
-            $_exclTax = $_taxHelper->getPrice($_product, $price);
-            $_inclTax = $_taxHelper->getPrice($_product, $price, true);
-        }
-    ?>
-    <?php if ($price): ?>
-        <div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
-            <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
-                <?php if ($showMinPrice): ?>
-                <span class="price-label"><?php echo __('Starting at:') ?></span>
-                <?php endif ?>
-                <?php if ($_taxHelper->displayBothPrices()): ?>
-                    <span class="price-excluding-tax">
-                        <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                        <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price">
-                            <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
-                        </span>
-                    </span>
-                    <span class="price-including-tax">
-                        <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                        <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
-                            <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
-                        </span>
-                    </span>
-                <?php else: ?>
-                    <?php
-                    $_showPrice = $_inclTax;
-                    if (!$_taxHelper->displayPriceIncludingTax()) {
-                        $_showPrice = $_exclTax;
-                    }
-                    ?>
-                <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price">
-                    <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
-                </span>
-                <?php endif; ?>
-            </p>
-        </div>
-    <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
-<?php endif; /* if (!$_product->isGrouped()): */ ?>
+    <?php if ($this->getUseLinkForAsLowAs()):?>
+    </a>
+    <?php else:?>
+    </span>
+    <?php endif?>
+<?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
+</div>
diff --git a/app/code/Magento/Catalog/view/frontend/product/view/addto.phtml b/app/code/Magento/Catalog/view/frontend/product/view/addto.phtml
index 1001f0612820b19a3b158fa626c9e4137fe60e14..1af64b1c8b79822130d84bca40119320f3f08249 100644
--- a/app/code/Magento/Catalog/view/frontend/product/view/addto.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/view/addto.phtml
@@ -23,24 +23,26 @@
  */
 /** @var $this \Magento\Catalog\Block\Product\View*/
 ?>
-<?php $_product = $this->getProduct(); ?>
-<?php $_wishlistSubmitUrl = $this->helper('Magento\Wishlist\Helper\Data')->getAddUrl($_product); ?>
+<?php
+$_product = $this->getProduct();
+$_wishlistSubmitParams = $this->helper('Magento\Wishlist\Helper\Data')->getAddParams($_product);
+$compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
+?>
 
 <div class="product addto links" data-role="add-to-links">
     <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
-        <a href="<?php echo $_wishlistSubmitUrl ?>"
+        <a href="#"
            class="action towishlist"
+           data-post='<?php echo $_wishlistSubmitParams; ?>'
            data-action="add-to-wishlist"><span><?php echo __('Add to Wishlist') ?></span></a>
     <?php endif; ?>
-    <?php $_compareUrl = $this->helper('Magento\Catalog\Helper\Product\Compare')->getAddUrl($_product); ?>
-    <?php if ($_compareUrl) : ?>
-        <a href="<?php echo $_compareUrl ?>"
-           class="action tocompare"><span><?php echo __('Add to Compare') ?></span></a>
-    <?php endif; ?>
+    <a href="#" data-post='<?php echo $compareHelper->getPostDataParams($_product);?>'
+       data-role="add-to-links"
+       class="action tocompare"><span><?php echo __('Add to Compare') ?></span></a>
 </div>
 <script type="text/javascript">
     head.js("<?php echo $this->getViewFileUrl('Magento_Wishlist::js/add-to-wishlist.js') ?>", function () {
-        jQuery('[data-role="add-to-links"]').addToWishlist(
+        jQuery('.product.info.main').addToWishlist(
             <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode(array('productType' => $_product->getTypeId()))?>
         );
     });
diff --git a/app/code/Magento/Catalog/view/frontend/product/view/addtocart.phtml b/app/code/Magento/Catalog/view/frontend/product/view/addtocart.phtml
index 06ce797dd43c3bcf9f66526535ba491593bf6665..6779f656226c5fc5909e10f2de25d429e76f8b97 100644
--- a/app/code/Magento/Catalog/view/frontend/product/view/addtocart.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/view/addtocart.phtml
@@ -21,12 +21,14 @@
  * @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)
  */
+
+/** @var $this \Magento\Catalog\Block\Product\View */
 ?>
 <?php $_product = $this->getProduct(); ?>
 <?php $buttonTitle = __('Add to Cart'); ?>
 <?php if ($_product->isSaleable()): ?>
 <div class="box tocart">
-    <?php if (!$_product->isGrouped()): ?>
+    <?php if ($this->shouldRenderQuantity()): ?>
     <div class="field qty">
         <label class="label" for="qty"><span><?php echo __('Qty') ?></span></label>
         <div class="control">
@@ -63,41 +65,7 @@
             "<?php echo $this->getViewFileUrl('mage/validation.js')?>",
             "<?php echo $this->getViewFileUrl('mage/validation/validation.js')?>", function () {
                 $('#product_addtocart_form').validation({
-                    errorPlacement: function (error, element) {
-                        if (element.attr('data-validate') && element.attr('data-validate').indexOf('validate-one-checkbox-required-by-name') > 0) {
-                            error.appendTo('#links-advice-container');
-                        } else if (element.attr('data-validate')&& element.attr('data-validate').indexOf('validate-grouped-qty') > 0) {
-                            $('#super-product-table').siblings(this.errorElement + '.' + this.errorClass).remove();
-                            $('#super-product-table').after(error);
-                        } else if (element.is(':radio, :checkbox')) {
-                            element.closest('.nested').after(error);
-                        } else {
-                            element.after(error);
-                        }
-                    },
-                    highlight: function (element, errorClass) {
-                        if ($(element).attr('data-validate') && $(element).attr('data-validate').indexOf('validate-required-datetime') > 0) {
-                            $(element).parent().find('.datetime-picker').each(function() {
-                                $(this).removeClass(errorClass);
-                                if ($(this).val().length === 0) {
-                                    $(this).addClass(errorClass);
-                                }
-                            });
-                        } else if ($(element).is(':radio, :checkbox')) {
-                            $(element).closest('.nested').addClass(errorClass+'-group');
-                        } else {
-                            $(element).addClass(errorClass);
-                        }
-                    },
-                    unhighlight: function (element, errorClass) {
-                        if ($(element).attr('data-validate') && $(element).attr('data-validate').indexOf('validate-required-datetime') > 0) {
-                            $(element).parent().find('.datetime-picker').removeClass(errorClass);
-                        } else if ($(element).is(':radio, :checkbox')) {
-                            $(element).closest('.nested').removeClass(errorClass+'-group');
-                        } else {
-                            $(element).removeClass(errorClass);
-                        }
-                    }
+                    radioCheckboxClosest: '.nested'
                 });
             });
     })(jQuery);
diff --git a/app/code/Magento/Catalog/view/frontend/product/view/tierprices.phtml b/app/code/Magento/Catalog/view/frontend/product/view/tierprices.phtml
index 247be49486bfb42ef7b88b3a38c8ae0a7f924a92..f87467367367f0a50609f9cc009c57e2efdad953 100644
--- a/app/code/Magento/Catalog/view/frontend/product/view/tierprices.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/view/tierprices.phtml
@@ -41,15 +41,12 @@ if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(1,
 
 ?>
 <?php if (count($_tierPrices) > 0): ?>
-    <ul class="<?php echo ($this->getInGrouped() ? 'tier prices grouped items' : 'prices tier items'); ?>">
-        <?php if ($this->getInGrouped()): ?>
-            <?php $_tierPrices = $this->getTierPrices($_product); ?>
-        <?php endif; ?>
+    <ul class="<?php echo ($this->hasListClass() ? $this->getListClass() : 'prices tier items'); ?>">
         <?php $this->helper('Magento\Weee\Helper\Data')->processTierPrices($_product, $_tierPrices); ?>
         <?php foreach ($_tierPrices as $_index => $_price): ?>
             <li class="item">
                 <?php if ($_catalogHelper->canApplyMsrp($_product)): ?>
-                    <?php if ($this->getInGrouped()): ?>
+                    <?php if ($this->getShowDetailedPrice() === false): ?>
                         <?php echo __('Buy %1 for', $_price['price_qty']) ?>:
                     <?php else: ?>
                         <?php echo __('Buy %1', $_price['price_qty']) ?>
@@ -181,7 +178,7 @@ if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(1,
 
                 <?php endif; // Can apply MSRP ?>
 
-                <?php if (!$this->getInGrouped()): ?>
+                <?php if ($this->getShowDetailedPrice() !== false): ?>
                     <?php if(($_product->getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price'])
                         || ($_product->getPrice() != $_product->getFinalPrice() &&  $_product->getFinalPrice() > $_price['price'])): ?>
                         <?php echo __('and') ?>&nbsp;<strong class="benefit"><?php echo __('save')?>&nbsp;<span class="percent tier-<?php echo $_index;?>"><?php echo $_price['savePercent']?></span>%
@@ -195,7 +192,7 @@ if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(1,
                 ? $this->getAddToCartUrl($_product, array('qty' => $_price['price_qty']))
                 : '';
             ?>
-            <a href="#" id="<?php echo($popupId);?>" data-tier-price='{addToCartUrl:"<?php echo $addToCartUrl; ?>", name:"<?php echo $_product->getName() ?>", price:<?php echo json_encode($_price['real_price_html']) ?>, msrp:"<?php echo $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,false) ?>"<?php if (!$this->getInGrouped()): ?>, qty:"<?php echo $_price['price_qty']?>"<?php endif ?>}'><?php echo __('Click for price'); ?></a>
+            <a href="#" id="<?php echo($popupId);?>" data-tier-price='{addToCartUrl:"<?php echo $addToCartUrl; ?>", name:"<?php echo $_product->getName() ?>", price:<?php echo json_encode($_price['real_price_html']) ?>, msrp:"<?php echo $this->helper('Magento\Core\Helper\Data')->currency($_product->getMsrp(),true,false) ?>"<?php if ($this->getCanDisplayQty() !== false): ?>, qty:"<?php echo $_price['price_qty']?>"<?php endif ?>}'><?php echo __('Click for price'); ?></a>
         <?php else: ?>
             <span class="msrp-price-hide-message">
                 <?php echo $_catalogHelper->getMsrpPriceMessage($_product) ?>
diff --git a/app/code/Magento/Catalog/view/frontend/product/view/validation.js b/app/code/Magento/Catalog/view/frontend/product/view/validation.js
index 195c4d3371c528d0f6ed23a2a8112a56c96b1895..a6ba77053def1ab8f35c39615c658b086f14faea 100644
--- a/app/code/Magento/Catalog/view/frontend/product/view/validation.js
+++ b/app/code/Magento/Catalog/view/frontend/product/view/validation.js
@@ -25,15 +25,18 @@
 (function($) {
     $.widget("mage.validation", $.mage.validation, {
         options: {
+            radioCheckboxClosest: 'ul',
             errorPlacement: function (error, element) {
+                if (element.attr('data-validate-message-box')) {
+                    var messageBox = $(element.attr('data-validate-message-box'));
+                    messageBox.html(error);
+                    return;
+                }
                 var dataValidate = element.attr('data-validate');
                 if (dataValidate && dataValidate.indexOf('validate-one-checkbox-required-by-name') > 0) {
                     error.appendTo('#links-advice-container');
-                } else if (dataValidate && dataValidate.indexOf('validate-grouped-qty') > 0) {
-                    $('#super-product-table').siblings(this.errorElement + '.' + this.errorClass).remove();
-                    $('#super-product-table').after(error);
                 } else if (element.is(':radio, :checkbox')) {
-                    element.closest('ul').after(error);
+                    element.closest(this.radioCheckboxClosest).after(error);
                 } else {
                     element.after(error);
                 }
@@ -48,7 +51,7 @@
                         }
                     });
                 } else if ($(element).is(':radio, :checkbox')) {
-                    $(element).closest('ul').addClass(errorClass);
+                    $(element).closest(this.radioCheckboxClosest).addClass(errorClass);
                 } else {
                     $(element).addClass(errorClass);
                 }
@@ -58,11 +61,11 @@
                 if (dataValidate && dataValidate.indexOf('validate-required-datetime') > 0) {
                     $(element).parent().find('.datetime-picker').removeClass(errorClass);
                 } else if ($(element).is(':radio, :checkbox')) {
-                    $(element).closest('ul').removeClass(errorClass);
+                    $(element).closest(this.radioCheckboxClosest).removeClass(errorClass);
                 } else {
                     $(element).removeClass(errorClass);
                 }
             }
         }
     });
-})(jQuery);
\ No newline at end of file
+})(jQuery);
diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml b/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml
index db74d774579b7bd59fde9b5ed351803a8a0f0bfb..9f30e0fcf7f3e8e5beaa7a195e2f0a921f8f0887 100644
--- a/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-<?php if (($items$_products = $this->getProductCollection()) && $_products->getSize()): ?>
+<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
     <?php $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image');?>
     <div class="block widget new minilist">
         <div class="title">
@@ -51,7 +51,22 @@
                             <div class="product actions">
                                 <div class="primary">
                                     <?php if($_product->isSaleable()): ?>
-                                        <a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="action tocart">
+                                        <?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) ?>'}}">
+                                                <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; ?>
+                                    <a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="action tocart">
                                             <span><?php echo __('Add to Cart') ?></span>
                                         </a>
                                     <?php else: ?>
diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_grid.phtml b/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_grid.phtml
index 9c13bb25ab7f47a5ddf6711e9d92368f49318468..e5db932f33826cfffbe2d43018ca11a36bdef82f 100644
--- a/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_grid.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_grid.phtml
@@ -75,11 +75,23 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge
                                     <?php if($showCart): ?>
                                         <div class="primary">
                                             <?php if($_item->isSaleable()): ?>
-                                                <button class="action tocart"
-                                                        data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
-                                                        type="button" title="<?php echo __('Add to Cart') ?>">
-                                                    <span><?php echo __('Add to Cart') ?></span>
-                                                </button>
+                                                <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                                    <button class="action tocart"
+                                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php else: ?>
+                                                    <?php
+                                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
+                                                    ?>
+                                                    <button class="action tocart"
+                                                            data-post='<?php echo $postData; ?>'
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php endif; ?>
                                             <?php else: ?>
                                                 <?php if ($_item->getIsSalable()): ?>
                                                     <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -90,17 +102,20 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge
                                         </div>
                                     <?php endif; ?>
                                     <?php if($showWishlist || $showCompare): ?>
-                                        <div class="secondary addto links">
+                                        <div class="secondary addto links" data-role="add-to-links">
                                             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                                <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
+                                                <a href="#"
+                                                   data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'
                                                    class="action towishlist" data-action="add-to-wishlist"
                                                    title="<?php echo __('Add to Wishlist') ?>">
                                                     <span><?php echo __('Add to Wishlist') ?></span>
                                                 </a>
                                             <?php endif; ?>
-                                            <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                                <a href="<?php echo $this->getAddToCompareUrl($_item) ?>"
-                                                   class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                            <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                                <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
+                                                <a href="#" class="action tocompare"
+                                                   data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'
+                                                   title="<?php echo __('Add to Compare') ?>">
                                                     <span><?php echo __('Add to Compare') ?></span>
                                                 </a>
                                             <?php endif; ?>
@@ -115,4 +130,4 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge
             </ol>
         </div>
     </div>
-<?php endif;?>
+<?php endif;?>
\ No newline at end of file
diff --git a/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_list.phtml b/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_list.phtml
index 2d3239dc164d77e3a0ad2cdab2b385ed60015bfe..b54adc15891d8117e6d260510ea555c032b5aeb2 100644
--- a/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_list.phtml
+++ b/app/code/Magento/Catalog/view/frontend/product/widget/new/content/new_list.phtml
@@ -75,11 +75,23 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge
                                     <?php if($showCart): ?>
                                         <div class="primary">
                                             <?php if($_item->isSaleable()): ?>
-                                                <button class="action tocart"
-                                                        data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
-                                                        type="button" title="<?php echo __('Add to Cart') ?>">
-                                                    <span><?php echo __('Add to Cart') ?></span>
-                                                </button>
+                                                <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                                    <button class="action tocart"
+                                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php else: ?>
+                                                    <?php
+                                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
+                                                    ?>
+                                                    <button class="action tocart"
+                                                            data-post='<?php echo $postData; ?>'
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php endif; ?>
                                             <?php else: ?>
                                                 <?php if ($_item->getIsSalable()): ?>
                                                     <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -90,17 +102,20 @@ if ($exist = ($this->getProductCollection() && $this->getProductCollection()->ge
                                         </div>
                                     <?php endif; ?>
                                     <?php if($showWishlist || $showCompare): ?>
-                                        <div class="secondary addto links">
+                                        <div class="secondary addto links" data-role="add-to-links">
                                             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                                <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
+                                                <a href="#"
+                                                   data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'
                                                    class="action towishlist" data-action="add-to-wishlist"
                                                    title="<?php echo __('Add to Wishlist') ?>">
                                                     <span><?php echo __('Add to Wishlist') ?></span>
                                                 </a>
                                             <?php endif; ?>
-                                            <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                                <a href="<?php echo $this->getAddToCompareUrl($_item) ?>"
-                                                   class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                            <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                                <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); ?>
+                                                <a href="#" class="action tocompare"
+                                                   title="<?php echo __('Add to Compare') ?>"
+                                                   data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'>
                                                     <span><?php echo __('Add to Compare') ?></span>
                                                 </a>
                                             <?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/frontend/rss/product/price.phtml b/app/code/Magento/Catalog/view/frontend/rss/product/price.phtml
index 836ea064803a9c3dd1a2e09dec455f98affb1b0c..70b71334477d621abb9f2e87677b763e87e8c0d0 100644
--- a/app/code/Magento/Catalog/view/frontend/rss/product/price.phtml
+++ b/app/code/Magento/Catalog/view/frontend/rss/product/price.phtml
@@ -30,19 +30,17 @@
  * @var $this \Magento\Catalog\Block\Product\Price
  */
 ?>
-
 <?php $_product = $this->getProduct() ?>
+<?php /* @var $priceHelper \Magento\Catalog\Helper\Product\Price */ ?>
 <?php $_id = $_product->getId() ?>
+<?php $priceHelper = $this->helper('Magento\Catalog\Helper\Product\Price'); ?>
 <?php if ($_product->getCanShowPrice() !== false):?>
 
-<?php $_weeeSeparator = ''; ?>
-
-<?php $simplePricesTax = ($this->helper('Magento\Tax\Helper\Data')->displayPriceIncludingTax() || $this->helper('Magento\Tax\Helper\Data')->displayBothPrices()); ?>
-
-<?php $_minimalPriceValue = $_product->getMinimalPrice() ?>
-<?php $_minimalPrice = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?>
+    <?php $_weeeSeparator = ''; ?>
+    <?php $simplePricesTax = ($priceHelper->displayPriceIncludingTax() || $priceHelper->displayBothPrices()); ?>
+    <?php $_minimalPriceValue = $_product->getMinimalPrice() ?>
+    <?php $_minimalPrice = $priceHelper->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?>
 
-<?php if (!$_product->isGrouped()): ?>
     <?php $_weeeTaxAmount = $this->helper('Magento\Weee\Helper\Data')->getAmountForDisplay($_product); ?>
     <?php if ($this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, array(1,2,4))): ?>
         <?php $_weeeTaxAmount = $this->helper('Magento\Weee\Helper\Data')->getAmount($_product); ?>
@@ -50,13 +48,13 @@
     <?php endif; ?>
 
     <div class="price-box">
-    <?php $_price = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getPrice()) ?>
-    <?php $_regularPrice = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?>
-    <?php $_finalPrice = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getFinalPrice()) ?>
-    <?php $_finalPriceInclTax = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_product->getFinalPrice(), true) ?>
+    <?php $_price = $priceHelper->getPrice($_product, $_product->getPrice()) ?>
+    <?php $_regularPrice = $priceHelper->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?>
+    <?php $_finalPrice = $priceHelper->getPrice($_product, $_product->getFinalPrice()) ?>
+    <?php $_finalPriceInclTax = $priceHelper->getPrice($_product, $_product->getFinalPrice(), true) ?>
     <?php $_weeeDisplayType = $this->helper('Magento\Weee\Helper\Data')->getPriceDisplayType(); ?>
     <?php if ($_finalPrice == $_price): ?>
-        <?php if ($this->helper('Magento\Tax\Helper\Data')->displayBothPrices()): ?>
+        <?php if ($priceHelper->displayBothPrices()): ?>
             <?php if ($_weeeTaxAmount && $this->helper('Magento\Weee\Helper\Data')->typeOfDisplay($_product, 0)): // including ?>
                 <span class="price-excluding-tax">
                     <span class="label"><?php echo __('Excl. Tax:') ?></span>
@@ -174,7 +172,7 @@
                 <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?></span>
             </p>
 
-            <?php if ($this->helper('Magento\Tax\Helper\Data')->displayBothPrices()): ?>
+            <?php if ($priceHelper->displayBothPrices()): ?>
                 <p class="special-price">
                     <span class="price-label"><?php echo __('Special Price:') ?></span>
                     <span class="price-excluding-tax">
@@ -274,7 +272,7 @@
                 <span class="price" id="old-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_regularPrice,true,false) ?></span>
             </p>
 
-            <?php if ($this->helper('Magento\Tax\Helper\Data')->displayBothPrices()): ?>
+            <?php if ($priceHelper->displayBothPrices()): ?>
                 <p class="special-price">
                     <span class="price-label"><?php echo __('Special Price:') ?></span>
                     <span class="price-excluding-tax">
@@ -317,38 +315,6 @@
         <?php endif?>
     <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?>
     </div>
-
-<?php else: /* if (!$_product->isGrouped()): */ ?>
-    <?php
-    $_exclTax = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_minimalPriceValue, $includingTax = null);
-    $_inclTax = $this->helper('Magento\Tax\Helper\Data')->getPrice($_product, $_minimalPriceValue, $includingTax = true);
-    ?>
-    <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
-        <div class="price-box">
-        <p class="minimal-price">
-            <span class="price-label"><?php echo __('Starting at:') ?></span>
-            <?php if ($this->helper('Magento\Tax\Helper\Data')->displayBothPrices()): ?>
-                <span class="price-excluding-tax">
-                    <span class="label"><?php echo __('Excl. Tax:') ?></span>
-                    <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_exclTax, true, false) ?></span>
-                </span>
-                <span class="price-including-tax">
-                    <span class="label"><?php echo __('Incl. Tax:') ?></span>
-                    <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_inclTax, true, false) ?></span>
-                </span>
-            <?php else: ?>
-                <?php
-                $_showPrice = $_inclTax;
-                if (!$this->helper('Magento\Tax\Helper\Data')->displayPriceIncludingTax()) {
-                    $_showPrice = $_exclTax;
-                }
-                ?>
-            <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_showPrice, true, false) ?></span>
-            <?php endif; ?>
-        </p>
-        </div>
-    <?php endif; /* if ($this->getDisplayMinimalPrice() && $_minimalPrice): */ ?>
-<?php endif; /* if (!$_product->isGrouped()): */ ?>
 <?php else: ?>
-<?php //echo __('Price is not available');?>
+    <?php //echo __('Price is not available');?>
 <?php endif; /* if (!$_product->getCanShowPrice()): */?>
diff --git a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
index bb230e5f9d0742f0ccc7ff9d5faa52684851470a..6a88db7fa1f567af192ed19aa384ad5bc2639870 100644
--- a/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
+++ b/app/code/Magento/CatalogInventory/Block/Adminhtml/Form/Field/Stock.php
@@ -158,11 +158,14 @@ class Stock extends \Magento\Data\Form\Element\Select
      */
     protected function _disableFields()
     {
+        if ($this->getDisabled() || $this->_isProductComposite()) {
+            $this->_qty->setDisabled('disabled');
+        }
         if (!$this->_isProductComposite() && $this->_qty->getValue() === null) {
             $this->setDisabled('disabled');
         }
-        if ($this->_isProductComposite()) {
-            $this->_qty->setDisabled('disabled');
+        if ($this->isLocked()) {
+            $this->_qty->lock();
         }
         return $this;
     }
diff --git a/app/code/Magento/CatalogInventory/Model/Observer.php b/app/code/Magento/CatalogInventory/Model/Observer.php
index fa163b80ff1581a86f4b4aa46c6bbf9b99dc7980..7ae79d792f6198e572a63596879e12b12472ee48 100644
--- a/app/code/Magento/CatalogInventory/Model/Observer.php
+++ b/app/code/Magento/CatalogInventory/Model/Observer.php
@@ -239,40 +239,6 @@ class Observer
         return $this;
     }
 
-    /**
-     * Copy product inventory data (used for product duplicate functionality)
-     *
-     * @param   \Magento\Event\Observer $observer
-     * @return  \Magento\CatalogInventory\Model\Observer
-     */
-    public function copyInventoryData($observer)
-    {
-        /** @var \Magento\Catalog\Model\Product $currentProduct */
-        $currentProduct = $observer->getEvent()->getCurrentProduct();
-        /** @var \Magento\Catalog\Model\Product $newProduct */
-        $newProduct = $observer->getEvent()->getNewProduct();
-
-        $newProduct->unsStockItem();
-        $stockData = array(
-            'use_config_min_qty'        => 1,
-            'use_config_min_sale_qty'   => 1,
-            'use_config_max_sale_qty'   => 1,
-            'use_config_backorders'     => 1,
-            'use_config_notify_stock_qty'=> 1
-        );
-        if ($currentStockItem = $currentProduct->getStockItem()) {
-            $stockData += array(
-                'use_config_enable_qty_inc'  => $currentStockItem->getData('use_config_enable_qty_inc'),
-                'enable_qty_increments'             => $currentStockItem->getData('enable_qty_increments'),
-                'use_config_qty_increments'         => $currentStockItem->getData('use_config_qty_increments'),
-                'qty_increments'                    => $currentStockItem->getData('qty_increments'),
-            );
-        }
-        $newProduct->setStockData($stockData);
-
-        return $this;
-    }
-
     /**
      * Prepare stock item data for save
      *
@@ -561,7 +527,7 @@ class Observer
             $productTypeCustomOption = $quoteItem->getProduct()->getCustomOption('product_type');
             if (!is_null($productTypeCustomOption)) {
                 // Check if product related to current item is a part of grouped product
-                if ($productTypeCustomOption->getValue() == \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE) {
+                if ($productTypeCustomOption->getValue() == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE) {
                     $stockItem->setProductName($quoteItem->getProduct()->getName());
                     $stockItem->setIsChildItem(true);
                 }
diff --git a/app/code/Magento/CatalogInventory/Model/Product/CopyConstructor/CatalogInventory.php b/app/code/Magento/CatalogInventory/Model/Product/CopyConstructor/CatalogInventory.php
new file mode 100644
index 0000000000000000000000000000000000000000..bd8ec669bfb23dbb953bf74cf703b2096794870c
--- /dev/null
+++ b/app/code/Magento/CatalogInventory/Model/Product/CopyConstructor/CatalogInventory.php
@@ -0,0 +1,56 @@
+<?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\CatalogInventory\Model\Product\CopyConstructor;
+
+class CatalogInventory implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * Copy product inventory data (used for product duplicate functionality)
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        $duplicate->unsStockItem();
+        $stockData = array(
+            'use_config_min_qty'          => 1,
+            'use_config_min_sale_qty'     => 1,
+            'use_config_max_sale_qty'     => 1,
+            'use_config_backorders'       => 1,
+            'use_config_notify_stock_qty' => 1
+        );
+        /** @var \Magento\CatalogInventory\Model\Stock\Item $currentStockItem */
+        if ($currentStockItem = $product->getStockItem()) {
+            $stockData += array(
+                'use_config_enable_qty_inc'         => $currentStockItem->getData('use_config_enable_qty_inc'),
+                'enable_qty_increments'             => $currentStockItem->getData('enable_qty_increments'),
+                'use_config_qty_increments'         => $currentStockItem->getData('use_config_qty_increments'),
+                'qty_increments'                    => $currentStockItem->getData('qty_increments'),
+            );
+        }
+        $duplicate->setStockData($stockData);
+    }
+} 
diff --git a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php
index a6bb75ec6d943121e46740c97fa974b638ccd6d8..a34dad9095d2040d96d59a919b001a998750cd58 100644
--- a/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php
+++ b/app/code/Magento/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php
@@ -75,7 +75,8 @@ class Grouped
                 array())
             ->joinLeft(
                 array('l' => $this->getTable('catalog_product_link')),
-                'e.entity_id = l.product_id AND l.link_type_id=' . \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED,
+                'e.entity_id = l.product_id AND l.link_type_id='
+                    . \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED,
                 array())
             ->joinLeft(
                 array('le' => $this->getTable('catalog_product_entity')),
diff --git a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml
index 22c04dfec5e7f5100d147ff889efbb3a9a2b439c..05457026a73b2d486879ab185bfec4366a743ead 100644
--- a/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml
+++ b/app/code/Magento/CatalogInventory/etc/adminhtml/di.xml
@@ -25,4 +25,11 @@
 -->
 <config>
     <preference for="Magento\CatalogInventory\Model\Stock\Item" type="Magento\CatalogInventory\Model\Adminhtml\Stock\Item" />
+    <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
+        <param name="constructors">
+            <value>
+                <catalog_inventory>Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory</catalog_inventory>
+            </value>
+        </param>
+    </type>
 </config>
diff --git a/app/code/Magento/CatalogInventory/etc/events.xml b/app/code/Magento/CatalogInventory/etc/events.xml
index 1a2229835dc5849a96434b82eec56ea6f3b537ef..ead47fb2d88700868f6a3787e2d4f284cd947dc9 100644
--- a/app/code/Magento/CatalogInventory/etc/events.xml
+++ b/app/code/Magento/CatalogInventory/etc/events.xml
@@ -69,9 +69,6 @@
     <event name="catalog_product_save_after">
         <observer name="inventory" instance="Magento\CatalogInventory\Model\Observer" method="saveInventoryData" />
     </event>
-    <event name="catalog_model_product_duplicate">
-        <observer name="inventory" instance="Magento\CatalogInventory\Model\Observer" method="copyInventoryData" />
-    </event>
     <event name="admin_system_config_changed_section_cataloginventory">
         <observer name="inventory" instance="Magento\CatalogInventory\Model\Observer" method="updateItemsStockUponConfigChange" />
     </event>
diff --git a/app/code/Magento/CatalogInventory/etc/module.xml b/app/code/Magento/CatalogInventory/etc/module.xml
index c56037ab2764395b992f29cde33636fb01b50c13..5442076b16fe35884b197865acb225991a7c80c8 100755
--- a/app/code/Magento/CatalogInventory/etc/module.xml
+++ b/app/code/Magento/CatalogInventory/etc/module.xml
@@ -30,6 +30,7 @@
         </sequence>
         <depends>
             <module name="Magento_Catalog"/>
+            <module name="Magento_GroupedProduct" />
             <module name="Magento_Core"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Bundle"/>
diff --git a/app/code/Magento/CatalogInventory/etc/product_types.xml b/app/code/Magento/CatalogInventory/etc/product_types.xml
index d50ba19b36412fa2e72d2e75f5c4be0707f609f2..72c3744a174a4b1d101933a6a84a49c7cbe0b8c9 100644
--- a/app/code/Magento/CatalogInventory/etc/product_types.xml
+++ b/app/code/Magento/CatalogInventory/etc/product_types.xml
@@ -29,7 +29,4 @@
     <type name="configurable">
         <stockIndexerModel instance="Magento\CatalogInventory\Model\Resource\Indexer\Stock\Configurable" />
     </type>
-    <type name="grouped">
-        <stockIndexerModel instance="Magento\CatalogInventory\Model\Resource\Indexer\Stock\Grouped" />
-    </type>
 </config>
diff --git a/app/code/Magento/CatalogRule/Model/Observer.php b/app/code/Magento/CatalogRule/Model/Observer.php
index 32065adc29aa13daf90f0cf20db92393e898d96b..219ab91e2b9fc96aa54cffec147b3da773e93a62 100644
--- a/app/code/Magento/CatalogRule/Model/Observer.php
+++ b/app/code/Magento/CatalogRule/Model/Observer.php
@@ -74,7 +74,7 @@ class Observer
     /**
      * @var \Magento\CatalogRule\Model\Resource\Rule\CollectionFactory
      */
-    protected $_ruleCollFactory;
+    protected $_ruleCollectionFactory;
 
     /**
      * @var \Magento\Core\Model\StoreManagerInterface
@@ -104,7 +104,7 @@ class Observer
     /**
      * @param Resource\RuleFactory $resourceRuleFactory
      * @param Resource\Rule $resourceRule
-     * @param Resource\Rule\CollectionFactory $ruleCollFactory
+     * @param Resource\Rule\CollectionFactory $ruleCollectionFactory
      * @param Rule\Product\Price $productPrice
      * @param RuleFactory $ruleFactory
      * @param FlagFactory $flagFactory
@@ -121,7 +121,7 @@ class Observer
     public function __construct(
         Resource\RuleFactory $resourceRuleFactory,
         Resource\Rule $resourceRule,
-        Resource\Rule\CollectionFactory $ruleCollFactory,
+        Resource\Rule\CollectionFactory $ruleCollectionFactory,
         Rule\Product\Price $productPrice,
         RuleFactory $ruleFactory,
         FlagFactory $flagFactory,
@@ -135,7 +135,7 @@ class Observer
     ) {
         $this->_resourceRuleFactory = $resourceRuleFactory;
         $this->_resourceRule = $resourceRule;
-        $this->_ruleCollFactory = $ruleCollFactory;
+        $this->_ruleCollectionFactory = $ruleCollectionFactory;
         $this->_productPrice = $productPrice;
         $this->_ruleFactory = $ruleFactory;
         $this->_flagFactory = $flagFactory;
@@ -163,7 +163,7 @@ class Observer
 
         $productWebsiteIds = $product->getWebsiteIds();
 
-        $rules = $this->_ruleCollFactory->create()
+        $rules = $this->_ruleCollectionFactory->create()
             ->addFieldToFilter('is_active', 1);
 
         foreach ($rules as $rule) {
@@ -385,7 +385,7 @@ class Observer
     protected function _checkCatalogRulesAvailability($attributeCode)
     {
         /* @var $collection \Magento\CatalogRule\Model\Resource\Rule\Collection */
-        $collection = $this->_ruleCollFactory->create()
+        $collection = $this->_ruleCollectionFactory->create()
             ->addAttributeInConditionFilter($attributeCode);
 
         $disabledRulesCount = 0;
@@ -525,7 +525,7 @@ class Observer
             return;
         }
 
-        $rules = $this->_ruleCollFactory->create()
+        $rules = $this->_ruleCollectionFactory->create()
             ->addFieldToFilter('is_active', 1);
 
         foreach ($rules as $rule) {
diff --git a/app/code/Magento/CatalogRule/Model/Rule.php b/app/code/Magento/CatalogRule/Model/Rule.php
index 0619a7be3fdf909f8c7eb1208b5a6ddaaa08348c..f55393e32ba376fcd4a1ca7ac3582b2fc7fb76b0 100644
--- a/app/code/Magento/CatalogRule/Model/Rule.php
+++ b/app/code/Magento/CatalogRule/Model/Rule.php
@@ -143,7 +143,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
     /**
      * @var \Magento\CatalogRule\Model\Rule\Action\CollectionFactory
      */
-    protected $_actionCollFactory;
+    protected $_actionCollectionFactory;
 
     /**
      * @var \Magento\Catalog\Model\ProductFactory
@@ -158,7 +158,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
     /**
      * @var \Magento\Catalog\Model\Resource\Product\CollectionFactory
      */
-    protected $_productCollFactory;
+    protected $_productCollectionFactory;
 
     /**
      * @var \Magento\Stdlib\DateTime
@@ -170,10 +170,10 @@ class Rule extends \Magento\Rule\Model\AbstractModel
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
+     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\CatalogRule\Model\Rule\Condition\CombineFactory $combineFactory
-     * @param \Magento\CatalogRule\Model\Rule\Action\CollectionFactory $actionCollFactory
+     * @param \Magento\CatalogRule\Model\Rule\Action\CollectionFactory $actionCollectionFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Core\Model\Resource\Iterator $resourceIterator
      * @param \Magento\Index\Model\Indexer $indexer
@@ -191,10 +191,10 @@ class Rule extends \Magento\Rule\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
+        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\CatalogRule\Model\Rule\Condition\CombineFactory $combineFactory,
-        \Magento\CatalogRule\Model\Rule\Action\CollectionFactory $actionCollFactory,
+        \Magento\CatalogRule\Model\Rule\Action\CollectionFactory $actionCollectionFactory,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Core\Model\Resource\Iterator $resourceIterator,
         \Magento\Index\Model\Indexer $indexer,
@@ -207,10 +207,10 @@ class Rule extends \Magento\Rule\Model\AbstractModel
         array $relatedCacheTypes = array(),
         array $data = array()
     ) {
-        $this->_productCollFactory = $productCollFactory;
+        $this->_productCollectionFactory = $productCollectionFactory;
         $this->_storeManager = $storeManager;
         $this->_combineFactory = $combineFactory;
-        $this->_actionCollFactory = $actionCollFactory;
+        $this->_actionCollectionFactory = $actionCollectionFactory;
         $this->_productFactory = $productFactory;
         $this->_resourceIterator = $resourceIterator;
         $this->_indexer = $indexer;
@@ -249,7 +249,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
      */
     public function getActionsInstance()
     {
-        return $this->_actionCollFactory->create();
+        return $this->_actionCollectionFactory->create();
     }
 
     /**
@@ -302,7 +302,7 @@ class Rule extends \Magento\Rule\Model\AbstractModel
 
             if ($this->getWebsiteIds()) {
                 /** @var $productCollection \Magento\Catalog\Model\Resource\Product\Collection */
-                $productCollection = $this->_productCollFactory->create();
+                $productCollection = $this->_productCollectionFactory->create();
                 $productCollection->addWebsiteFilter($this->getWebsiteIds());
                 if ($this->_productsFilter) {
                     $productCollection->addIdFilter($this->_productsFilter);
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
index f01e921d48ada6c4a4f774070441c7aca25dc9ad..d78e8c89482a155c57f7664d7cc974d18accc6fb 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
@@ -69,7 +69,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * @var \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory
      */
-    protected $_productAttributeCollFactory;
+    protected $_productAttributeCollectionFactory;
 
     /**
      * Catalog product status
@@ -149,7 +149,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @param \Magento\Catalog\Model\Product\Type $catalogProductType
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param \Magento\Catalog\Model\Product\Status $catalogProductStatus
-     * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollFactory
+     * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollectionFactory
      * @param EngineProvider $engineProvider
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Filter\FilterManager $filter
@@ -164,7 +164,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
         \Magento\Catalog\Model\Product\Type $catalogProductType,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Catalog\Model\Product\Status $catalogProductStatus,
-        \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollFactory,
+        \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollectionFactory,
         \Magento\CatalogSearch\Model\Resource\EngineProvider $engineProvider,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Filter\FilterManager $filter,
@@ -177,7 +177,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
         $this->_catalogProductType = $catalogProductType;
         $this->_eavConfig = $eavConfig;
         $this->_catalogProductStatus = $catalogProductStatus;
-        $this->_productAttributeCollFactory = $productAttributeCollFactory;
+        $this->_productAttributeCollectionFactory = $productAttributeCollectionFactory;
         $this->_eventManager = $eventManager;
         $this->filter = $filter;
         $this->_catalogSearchData = $catalogSearchData;
@@ -544,7 +544,7 @@ class Fulltext extends \Magento\Core\Model\Resource\Db\AbstractDb
         if (null === $this->_searchableAttributes) {
             $this->_searchableAttributes = array();
 
-            $productAttributes = $this->_productAttributeCollFactory->create();
+            $productAttributes = $this->_productAttributeCollectionFactory->create();
 
             if ($this->_engineProvider->get() && $this->_engineProvider->get()->allowAdvancedIndex()) {
                 $productAttributes->addToIndexFilter(true);
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php
index c12292e8eec7f4ed22fa3064fc061ab3803bac07..7b3c61ec31ab27bc692dffba9a5768a111bc0097 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Engine.php
@@ -49,14 +49,14 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
      *
      * @var \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory
      */
-    protected $_catalogSearchFulltextCollFactory;
+    protected $_catalogSearchFulltextCollectionFactory;
 
     /**
      * Catalog search advanced coll factory
      *
      * @var \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory
      */
-    protected $_catalogSearchAdvancedCollFactory;
+    protected $_catalogSearchAdvancedCollectionFactory;
 
     /**
      * @var \Magento\CatalogSearch\Model\Resource\Advanced
@@ -86,8 +86,8 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
      * Construct
      *
      * @param \Magento\App\Resource $resource
-     * @param \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory $catalogSearchAdvancedCollFactory
-     * @param \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory $catalogSearchFulltextCollFactory
+     * @param \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory $catalogSearchAdvancedCollectionFactory
+     * @param \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory $catalogSearchFulltextCollectionFactory
      * @param \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility
      * @param \Magento\CatalogSearch\Model\Resource\Advanced $searchResource
      * @param \Magento\CatalogSearch\Model\Resource\Advanced\Collection $searchResourceCollection
@@ -96,16 +96,16 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function __construct(
         \Magento\App\Resource $resource,
-        \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory $catalogSearchAdvancedCollFactory,
-        \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory $catalogSearchFulltextCollFactory,
+        \Magento\CatalogSearch\Model\Resource\Advanced\CollectionFactory $catalogSearchAdvancedCollectionFactory,
+        \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory $catalogSearchFulltextCollectionFactory,
         \Magento\Catalog\Model\Product\Visibility $catalogProductVisibility,
         \Magento\CatalogSearch\Model\Resource\Advanced $searchResource,
         \Magento\CatalogSearch\Model\Resource\Advanced\Collection $searchResourceCollection,
         \Magento\CatalogSearch\Helper\Data $catalogSearchData,
         \Magento\CatalogSearch\Model\Resource\Helper $resourceHelper
     ) {
-        $this->_catalogSearchAdvancedCollFactory = $catalogSearchAdvancedCollFactory;
-        $this->_catalogSearchFulltextCollFactory = $catalogSearchFulltextCollFactory;
+        $this->_catalogSearchAdvancedCollectionFactory = $catalogSearchAdvancedCollectionFactory;
+        $this->_catalogSearchFulltextCollectionFactory = $catalogSearchFulltextCollectionFactory;
         $this->_catalogProductVisibility = $catalogProductVisibility;
         $this->_searchResource = $searchResource;
         $this->_searchResourceCollection = $searchResourceCollection;
@@ -255,7 +255,7 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function getResultCollection()
     {
-        return $this->_catalogSearchFulltextCollFactory->create();
+        return $this->_catalogSearchFulltextCollectionFactory->create();
     }
 
     /**
@@ -265,7 +265,7 @@ class Engine extends \Magento\Core\Model\Resource\Db\AbstractDb
      */
     public function getAdvancedResultCollection()
     {
-        return $this->_catalogSearchAdvancedCollFactory->create();
+        return $this->_catalogSearchAdvancedCollectionFactory->create();
     }
 
     /**
diff --git a/app/code/Magento/Centinel/Block/Authentication.php b/app/code/Magento/Centinel/Block/Authentication.php
index cb7bf543f1897aa2c501fe0bb2eccdc3be2c0e93..77a1a694f496bd0622f2d867405b0ccaed589366 100644
--- a/app/code/Magento/Centinel/Block/Authentication.php
+++ b/app/code/Magento/Centinel/Block/Authentication.php
@@ -65,6 +65,7 @@ class Authentication extends \Magento\View\Element\Template
     ) {
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Centinel/etc/module.xml b/app/code/Magento/Centinel/etc/module.xml
index d7d8567123f1d0d846b2059701512fee653a0105..9294272d60c5be9e26ff4a4ce6df8f9b5e6d7d53 100755
--- a/app/code/Magento/Centinel/etc/module.xml
+++ b/app/code/Magento/Centinel/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Theme"/>
+            <module name="Magento_Sales"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Centinel/view/frontend/layout/checkout_multishipping_overview.xml b/app/code/Magento/Centinel/view/frontend/layout/multishipping_checkout_overview.xml
similarity index 100%
rename from app/code/Magento/Centinel/view/frontend/layout/checkout_multishipping_overview.xml
rename to app/code/Magento/Centinel/view/frontend/layout/multishipping_checkout_overview.xml
diff --git a/app/code/Magento/Checkout/Block/Agreements.php b/app/code/Magento/Checkout/Block/Agreements.php
index 38852805665c9c70e50d58c97e0bd77af0b39038..161b2c2cb508c2d4b1c1161a8bb32cc23697bd9f 100644
--- a/app/code/Magento/Checkout/Block/Agreements.php
+++ b/app/code/Magento/Checkout/Block/Agreements.php
@@ -30,19 +30,19 @@ class Agreements extends \Magento\View\Element\Template
     /**
      * @var \Magento\Checkout\Model\Resource\Agreement\CollectionFactory
      */
-    protected $_agreementCollFactory;
+    protected $_agreementCollectionFactory;
 
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory
+     * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollectionFactory
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory,
+        \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollectionFactory,
         array $data = array()
     ) {
-        $this->_agreementCollFactory = $agreementCollFactory;
+        $this->_agreementCollectionFactory = $agreementCollectionFactory;
         parent::__construct($context, $data);
     }
 
@@ -56,7 +56,7 @@ class Agreements extends \Magento\View\Element\Template
                 $agreements = array();
             } else {
                 /** @var \Magento\Checkout\Model\Resource\Agreement\Collection $agreements */
-                $agreements = $this->_agreementCollFactory->create()
+                $agreements = $this->_agreementCollectionFactory->create()
                     ->addStoreFilter($this->_storeManager->getStore()->getId())
                     ->addFieldToFilter('is_active', 1);
             }
diff --git a/app/code/Magento/Checkout/Block/Cart.php b/app/code/Magento/Checkout/Block/Cart.php
index 950f7d905a787d023b13989aa14a7f1f55b31b4c..658a01cb0ee2cf309603646adf7f990ce2124f5b 100644
--- a/app/code/Magento/Checkout/Block/Cart.php
+++ b/app/code/Magento/Checkout/Block/Cart.php
@@ -66,6 +66,7 @@ class Cart extends \Magento\Checkout\Block\Cart\AbstractCart
         $this->_cartHelper = $cartHelper;
         $this->_catalogUrlBuilder = $catalogUrlBuilder;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Cart/AbstractCart.php b/app/code/Magento/Checkout/Block/Cart/AbstractCart.php
index 527e7fbea266734f61fcdc3fc8dcc9a899263055..969b1860d9ba85c3bfee064f73d0bbbdc92b999f 100644
--- a/app/code/Magento/Checkout/Block/Cart/AbstractCart.php
+++ b/app/code/Magento/Checkout/Block/Cart/AbstractCart.php
@@ -80,6 +80,7 @@ class AbstractCart extends \Magento\View\Element\Template
         $this->_checkoutSession = $checkoutSession;
         $this->_catalogData = $catalogData;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Cart/Coupon.php b/app/code/Magento/Checkout/Block/Cart/Coupon.php
index f1e6ee2cf619bd04dc3b338f7101da81ba21d06d..275ce2099d313e434d200e88fc15d1f560915d3e 100644
--- a/app/code/Magento/Checkout/Block/Cart/Coupon.php
+++ b/app/code/Magento/Checkout/Block/Cart/Coupon.php
@@ -29,6 +29,24 @@ namespace Magento\Checkout\Block\Cart;
 
 class Coupon extends \Magento\Checkout\Block\Cart\AbstractCart
 {
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Catalog\Helper\Data $catalogData
+     * @param \Magento\Customer\Model\Session $customerSession
+     * @param \Magento\Checkout\Model\Session $checkoutSession
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Catalog\Helper\Data $catalogData,
+        \Magento\Customer\Model\Session $customerSession,
+        \Magento\Checkout\Model\Session $checkoutSession,
+        array $data = array()
+    ) {
+        parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $data);
+        $this->_isScopePrivate = true;
+    }
+
     public function getCouponCode()
     {
         return $this->getQuote()->getCouponCode();
diff --git a/app/code/Magento/Checkout/Block/Cart/Crosssell.php b/app/code/Magento/Checkout/Block/Cart/Crosssell.php
index 516c1e3381f4d2b6cfe1c533ac96931feb9c3240..b162fdd602f412be0ea23af8feb0f53c3c110f1f 100644
--- a/app/code/Magento/Checkout/Block/Cart/Crosssell.php
+++ b/app/code/Magento/Checkout/Block/Cart/Crosssell.php
@@ -79,6 +79,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\CatalogInventory\Model\Stock $stock
      * @param \Magento\Catalog\Model\Product\LinkFactory $productLinkFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -98,7 +99,8 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
         \Magento\CatalogInventory\Model\Stock $stock,
         \Magento\Catalog\Model\Product\LinkFactory $productLinkFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_checkoutSession = $checkoutSession;
         $this->_productVisibility = $productVisibility;
@@ -116,8 +118,10 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -211,7 +215,7 @@ class Crosssell extends \Magento\Catalog\Block\Product\AbstractProduct
         foreach ($this->getQuote()->getAllItems() as $quoteItem) {
             $productTypeOpt = $quoteItem->getOptionByCode('product_type');
             if ($productTypeOpt instanceof \Magento\Sales\Model\Quote\Item\Option
-                && $productTypeOpt->getValue() == \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE
+                && $productTypeOpt->getValue() == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE
                 && $productTypeOpt->getProductId()
             ) {
                 $productIds[] = $productTypeOpt->getProductId();
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php
index 3ce2a6ed8611f6f50eca49ce4091394d93bdff11..4b290598b166d3927fd3342ca36cef3d6d14319b 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer.php
@@ -103,6 +103,7 @@ class Renderer extends \Magento\View\Element\Template
         $this->_checkoutSession = $checkoutSession;
         $this->messageManager = $messageManager;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php
index d23047f0284fe807b53449db377dde0d6b919328..d1dcfc14c35867fc26a114bbd88e8cf39d1f3551 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Configurable.php
@@ -36,6 +36,36 @@ class Configurable extends \Magento\Checkout\Block\Cart\Item\Renderer
      */
     const CONFIG_THUMBNAIL_SOURCE = 'checkout/cart/configurable_product_image';
 
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Catalog\Helper\Product\Configuration $productConfig
+     * @param \Magento\Checkout\Model\Session $checkoutSession
+     * @param \Magento\Catalog\Helper\Image $imageHelper
+     * @param \Magento\Core\Helper\Url $urlHelper
+     * @param \Magento\Message\ManagerInterface $messageManager
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Catalog\Helper\Product\Configuration $productConfig,
+        \Magento\Checkout\Model\Session $checkoutSession,
+        \Magento\Catalog\Helper\Image $imageHelper,
+        \Magento\Core\Helper\Url $urlHelper,
+        \Magento\Message\ManagerInterface $messageManager,
+        array $data = array()
+    ) {
+        parent::__construct(
+            $context,
+            $productConfig,
+            $checkoutSession,
+            $imageHelper,
+            $urlHelper,
+            $messageManager,
+            $data
+        );
+        $this->_isScopePrivate = true;
+    }
+
     /**
      * Get item configurable child product
      *
diff --git a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Grouped.php b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Grouped.php
index c32bddc20a2d91ac527c5bdf62bd5072ab59bbb4..4e012a9426fee6956aef1398179498700cfb36ca 100644
--- a/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Grouped.php
+++ b/app/code/Magento/Checkout/Block/Cart/Item/Renderer/Grouped.php
@@ -36,6 +36,36 @@ class Grouped extends \Magento\Checkout\Block\Cart\Item\Renderer
      */
     const CONFIG_THUMBNAIL_SOURCE = 'checkout/cart/grouped_product_image';
 
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Catalog\Helper\Product\Configuration $productConfig
+     * @param \Magento\Checkout\Model\Session $checkoutSession
+     * @param \Magento\Catalog\Helper\Image $imageHelper
+     * @param \Magento\Core\Helper\Url $urlHelper
+     * @param \Magento\Message\ManagerInterface $messageManager
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Catalog\Helper\Product\Configuration $productConfig,
+        \Magento\Checkout\Model\Session $checkoutSession,
+        \Magento\Catalog\Helper\Image $imageHelper,
+        \Magento\Core\Helper\Url $urlHelper,
+        \Magento\Message\ManagerInterface $messageManager,
+        array $data = array()
+    ) {
+        parent::__construct(
+            $context,
+            $productConfig,
+            $checkoutSession,
+            $imageHelper,
+            $urlHelper,
+            $messageManager,
+            $data
+        );
+        $this->_isScopePrivate = true;
+    }
+
     /**
      * Get item grouped product
      *
diff --git a/app/code/Magento/Checkout/Block/Cart/Shipping.php b/app/code/Magento/Checkout/Block/Cart/Shipping.php
index fa179d27a61d15e8ed6d60c673af66dc226ef5d5..7d773b392cc2e3ba36556221989136327e40d8f7 100644
--- a/app/code/Magento/Checkout/Block/Cart/Shipping.php
+++ b/app/code/Magento/Checkout/Block/Cart/Shipping.php
@@ -57,6 +57,11 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
      */
     protected $_taxHelper;
 
+    /**
+     * @var \Magento\Sales\Model\Quote\Address\CarrierFactoryInterface
+     */
+    protected $_carrierFactory;
+
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Catalog\Helper\Data $catalogData
@@ -64,6 +69,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Directory\Block\Data $directoryBlock
      * @param \Magento\Tax\Helper\Data $taxHelper
+     * @param \Magento\Sales\Model\Quote\Address\CarrierFactoryInterface $carrierFactory
      * @param array $data
      */
     public function __construct(
@@ -73,11 +79,14 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Directory\Block\Data $directoryBlock,
         \Magento\Tax\Helper\Data $taxHelper,
+        \Magento\Sales\Model\Quote\Address\CarrierFactoryInterface $carrierFactory,
         array $data = array()
     ) {
-        $this->_taxHelper = $taxHelper;
         $this->_directoryBlock = $directoryBlock;
+        $this->_taxHelper = $taxHelper;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -264,7 +273,7 @@ class Shipping extends \Magento\Checkout\Block\Cart\AbstractCart
             foreach ($this->_rates as $rateGroup) {
                 if (!empty($rateGroup)) {
                     foreach ($rateGroup as $rate) {
-                        $this->_carriers[] = $rate->getCarrierInstance();
+                        $this->_carriers[] = $this->_carrierFactory->get($rate->getCarrier());
                     }
                 }
             }
diff --git a/app/code/Magento/Checkout/Block/Cart/Sidebar.php b/app/code/Magento/Checkout/Block/Cart/Sidebar.php
index bb11733e091d754c0e39c53e722ad64119abd4f5..68d3ada702d9aa16bdf717460ce691130cb20793 100644
--- a/app/code/Magento/Checkout/Block/Cart/Sidebar.php
+++ b/app/code/Magento/Checkout/Block/Cart/Sidebar.php
@@ -105,6 +105,7 @@ class Sidebar extends \Magento\Checkout\Block\Cart\AbstractCart
         $this->_taxConfig = $taxConfig;
         $this->_checkoutCart = $checkoutCart;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Cart/Totals.php b/app/code/Magento/Checkout/Block/Cart/Totals.php
index 778fe52bf5b6529667829b9f39b40ad501542e86..b0d1098508a841325dfc216f1811bdffd14734f7 100644
--- a/app/code/Magento/Checkout/Block/Cart/Totals.php
+++ b/app/code/Magento/Checkout/Block/Cart/Totals.php
@@ -55,6 +55,7 @@ class Totals extends \Magento\Checkout\Block\Cart\AbstractCart
     ) {
         $this->_salesConfig = $salesConfig;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $data);
+        $this->_isScopePrivate = true;
 
     }
 
diff --git a/app/code/Magento/Checkout/Block/Onepage.php b/app/code/Magento/Checkout/Block/Onepage.php
index c38932ef2fdc9cca2d0a740fff1154c3a23ace10..127bf5f671666267dde81faa086de8e59999d712 100644
--- a/app/code/Magento/Checkout/Block/Onepage.php
+++ b/app/code/Magento/Checkout/Block/Onepage.php
@@ -35,6 +35,38 @@ namespace Magento\Checkout\Block;
 
 class Onepage extends \Magento\Checkout\Block\Onepage\AbstractOnepage
 {
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Core\Helper\Data $coreData
+     * @param \Magento\App\Cache\Type\Config $configCacheType
+     * @param \Magento\Customer\Model\Session $customerSession
+     * @param \Magento\Checkout\Model\Session $resourceSession
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Core\Helper\Data $coreData,
+        \Magento\App\Cache\Type\Config $configCacheType,
+        \Magento\Customer\Model\Session $customerSession,
+        \Magento\Checkout\Model\Session $resourceSession,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        array $data = array()
+    ) {
+        parent::__construct(
+            $context,
+            $coreData,
+            $configCacheType,
+            $customerSession,
+            $resourceSession,
+            $countryCollFactory,
+            $regionCollFactory,
+            $data
+        );
+        $this->_isScopePrivate = true;
+    }
     /**
      * Get 'one step checkout' step data
      *
diff --git a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php
index 44d8aa13059b7d37da4f51715784b817354e7b4b..9958455c25c3c4930a41fda5ae2e18937945038b 100644
--- a/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php
+++ b/app/code/Magento/Checkout/Block/Onepage/AbstractOnepage.php
@@ -52,12 +52,12 @@ abstract class AbstractOnepage extends \Magento\View\Element\Template
     /**
      * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
-    protected $_regionCollFactory;
+    protected $_regionCollectionFactory;
 
     /**
      * @var \Magento\Directory\Model\Resource\Country\CollectionFactory
      */
-    protected $_countryCollFactory;
+    protected $_countryCollectionFactory;
 
     /**
      * @var \Magento\Core\Helper\Data
@@ -70,8 +70,8 @@ abstract class AbstractOnepage extends \Magento\View\Element\Template
      * @param \Magento\App\Cache\Type\Config $configCacheType
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Checkout\Model\Session $resourceSession
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      * @param array $data
      */
     public function __construct(
@@ -80,17 +80,18 @@ abstract class AbstractOnepage extends \Magento\View\Element\Template
         \Magento\App\Cache\Type\Config $configCacheType,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Checkout\Model\Session $resourceSession,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
         array $data = array()
     ) {
         $this->_coreData = $coreData;
         $this->_configCacheType = $configCacheType;
         $this->_customerSession = $customerSession;
         $this->_checkoutSession = $resourceSession;
-        $this->_countryCollFactory = $countryCollFactory;
-        $this->_regionCollFactory = $regionCollFactory;
+        $this->_countryCollectionFactory = $countryCollectionFactory;
+        $this->_regionCollectionFactory = $regionCollectionFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -148,7 +149,7 @@ abstract class AbstractOnepage extends \Magento\View\Element\Template
     public function getCountryCollection()
     {
         if (!$this->_countryCollection) {
-            $this->_countryCollection = $this->_countryCollFactory->create()->loadByStore();
+            $this->_countryCollection = $this->_countryCollectionFactory->create()->loadByStore();
         }
         return $this->_countryCollection;
     }
@@ -156,7 +157,7 @@ abstract class AbstractOnepage extends \Magento\View\Element\Template
     public function getRegionCollection()
     {
         if (!$this->_regionCollection) {
-            $this->_regionCollection = $this->_regionCollFactory->create()
+            $this->_regionCollection = $this->_regionCollectionFactory->create()
                 ->addCountryFilter($this->getAddress()->getCountryId())
                 ->load();
         }
diff --git a/app/code/Magento/Checkout/Block/Onepage/Billing.php b/app/code/Magento/Checkout/Block/Onepage/Billing.php
index 6fc8e11e8706dee8a656423eba044ae4fce81b60..b0f0f9914da5e8005f899c74a87fab7e2e10bad5 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Billing.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Billing.php
@@ -61,8 +61,8 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage
      * @param \Magento\App\Cache\Type\Config $configCacheType
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Checkout\Model\Session $resourceSession
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory
      * @param array $data
      */
@@ -72,8 +72,8 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage
         \Magento\App\Cache\Type\Config $configCacheType,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Checkout\Model\Session $resourceSession,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
         \Magento\Sales\Model\Quote\AddressFactory $addressFactory,
         array $data = array()
     ) {
@@ -84,10 +84,11 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage
             $configCacheType,
             $customerSession,
             $resourceSession,
-            $countryCollFactory,
-            $regionCollFactory,
+            $countryCollectionFactory,
+            $regionCollectionFactory,
             $data
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -122,7 +123,7 @@ class Billing extends \Magento\Checkout\Block\Onepage\AbstractOnepage
      */
     public function getCountries()
     {
-        return $this->_countryCollFactory->create()->loadByStore();
+        return $this->_countryCollectionFactory->create()->loadByStore();
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Onepage/Failure.php b/app/code/Magento/Checkout/Block/Onepage/Failure.php
index fd19d8759cc012e3c5a01638cf42206547a35f11..7569ebe8e50b5d521484c53142e1ba5dfde2b2a6 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Failure.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Failure.php
@@ -46,6 +46,7 @@ class Failure extends \Magento\View\Element\Template
     ) {
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getRealOrderId()
diff --git a/app/code/Magento/Checkout/Block/Onepage/Link.php b/app/code/Magento/Checkout/Block/Onepage/Link.php
index fd798d5ec68ae0e14cbbdd9d5417ddc87d9dae6e..6481984b0ebe895de38c0f2ccc168feec9fcc5fd 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Link.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Link.php
@@ -60,6 +60,7 @@ class Link extends \Magento\View\Element\Template
         $this->_checkoutHelper = $checkoutHelper;
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Onepage/Login.php b/app/code/Magento/Checkout/Block/Onepage/Login.php
index 35b8772ceeeb0b9bb6f30e18c00c76bfc8c965e8..59006e91e9bcb17de7c5d4d1e34a9bf5af2da665 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Login.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Login.php
@@ -54,8 +54,8 @@ class Login extends \Magento\Checkout\Block\Onepage\AbstractOnepage
      * @param \Magento\App\Cache\Type\Config $configCacheType
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Checkout\Model\Session $resourceSession
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      * @param \Magento\Checkout\Helper\Data $checkoutData
      * @param \Magento\Message\ManagerInterface $messageManager
      * @param array $data
@@ -66,8 +66,8 @@ class Login extends \Magento\Checkout\Block\Onepage\AbstractOnepage
         \Magento\App\Cache\Type\Config $configCacheType,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Checkout\Model\Session $resourceSession,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
         \Magento\Checkout\Helper\Data $checkoutData,
         \Magento\Message\ManagerInterface $messageManager,
         array $data = array()
@@ -81,10 +81,11 @@ class Login extends \Magento\Checkout\Block\Onepage\AbstractOnepage
             $configCacheType,
             $customerSession,
             $resourceSession,
-            $countryCollFactory,
-            $regionCollFactory,
+            $countryCollectionFactory,
+            $regionCollectionFactory,
             $data
         );
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php b/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php
index 973275719e2f9e5b5c348b1b9e0ffe6e100bb346..5b27f0066d88ac2bb680c0357893c50538a43bc0 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Payment/Info.php
@@ -25,7 +25,7 @@
  */
 
 /**
- * Multishipping checkout payment information data
+ * Checkout payment information data
  *
  * @category   Magento
  * @package    Magento_Checkout
@@ -54,6 +54,7 @@ class Info extends \Magento\Payment\Block\Info\AbstractContainer
     ) {
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $paymentData, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php b/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php
index e26e8fb6add75d0444ff6b5aa58629576182fdda..e76b366ef8b948703639409c6af3a33c3278df9d 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Payment/Methods.php
@@ -55,6 +55,7 @@ class Methods extends \Magento\Payment\Block\Form\Container
     ) {
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $paymentHelper, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Onepage/Review/Info.php b/app/code/Magento/Checkout/Block/Onepage/Review/Info.php
index 0822e418fce21f9c3a60c75330e9556a97602fa9..ebbddbe7640e46f687715270a830ca0e573d2575 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Review/Info.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Review/Info.php
@@ -48,6 +48,7 @@ class Info extends \Magento\Sales\Block\Items\AbstractItems
     ) {
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping.php b/app/code/Magento/Checkout/Block/Onepage/Shipping.php
index 7c72481fe9bcdebdd645cb2b21bd329e42351f8b..b0d132d7b325086ee609bf7e3649fa622c5dd5a2 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Shipping.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Shipping.php
@@ -49,8 +49,8 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage
      * @param \Magento\App\Cache\Type\Config $configCacheType
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Checkout\Model\Session $resourceSession
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory
      * @param array $data
      */
@@ -60,8 +60,8 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage
         \Magento\App\Cache\Type\Config $configCacheType,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Checkout\Model\Session $resourceSession,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
         \Magento\Sales\Model\Quote\AddressFactory $addressFactory,
         array $data = array()
     ) {
@@ -72,10 +72,11 @@ class Shipping extends \Magento\Checkout\Block\Onepage\AbstractOnepage
             $configCacheType,
             $customerSession,
             $resourceSession,
-            $countryCollFactory,
-            $regionCollFactory,
+            $countryCollectionFactory,
+            $regionCollectionFactory,
             $data
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php
index b711a7354c3616bab5daca8acd29916c70638318..bfbd855468a04bd38a0ddf805374ac15a34e30b8 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Shipping/Method/Available.php
@@ -52,8 +52,8 @@ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage
      * @param \Magento\App\Cache\Type\Config $configCacheType
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Checkout\Model\Session $resourceSession
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      * @param \Magento\Tax\Helper\Data $taxData
      * @param array $data
      */
@@ -63,8 +63,8 @@ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage
         \Magento\App\Cache\Type\Config $configCacheType,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Checkout\Model\Session $resourceSession,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
         \Magento\Tax\Helper\Data $taxData,
         array $data = array()
     ) {
@@ -75,10 +75,11 @@ class Available extends \Magento\Checkout\Block\Onepage\AbstractOnepage
             $configCacheType,
             $customerSession,
             $resourceSession,
-            $countryCollFactory,
-            $regionCollFactory,
+            $countryCollectionFactory,
+            $regionCollectionFactory,
             $data
         );
+        $this->_isScopePrivate = true;
     }
 
     public function getShippingRates()
diff --git a/app/code/Magento/Checkout/Block/Onepage/Success.php b/app/code/Magento/Checkout/Block/Onepage/Success.php
index 5b9c090e23420342d4519ea4c80d68e8674b3ce3..5f1d1bd2fde44127fece5d0cd789d68095563db7 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Success.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Success.php
@@ -92,6 +92,7 @@ class Success extends \Magento\View\Element\Template
         $this->_agreementFactory = $agreementFactory;
         $this->_recurringProfileCollectionFactory = $recurringProfileCollectionFactory;
         $this->_orderConfig = $orderConfig;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Controller/Action.php b/app/code/Magento/Checkout/Controller/Action.php
index 79fd08d23ddb6dbe181eab7401de8d435e0053fd..5f8f808d314321a0854c53496b6107708f749fb4 100644
--- a/app/code/Magento/Checkout/Controller/Action.php
+++ b/app/code/Magento/Checkout/Controller/Action.php
@@ -26,7 +26,7 @@
 
 
 /**
- * Controller for onepage and multishipping checkouts
+ * Controller for onepage checkouts
  */
 namespace Magento\Checkout\Controller;
 
diff --git a/app/code/Magento/Checkout/Helper/Data.php b/app/code/Magento/Checkout/Helper/Data.php
index 49433023d490623cb48da3131176dfb328e1a24e..3f637af2e7104f22fc5cb553247e67bbc373c875 100644
--- a/app/code/Magento/Checkout/Helper/Data.php
+++ b/app/code/Magento/Checkout/Helper/Data.php
@@ -63,7 +63,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     /**
      * @var \Magento\Checkout\Model\Resource\Agreement\CollectionFactory
      */
-    protected $_agreementCollFactory;
+    protected $_agreementCollectionFactory;
 
     /**
      * @var \Magento\Email\Model\TemplateFactory
@@ -76,7 +76,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory
+     * @param \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollectionFactory
      * @param \Magento\Email\Model\TemplateFactory $emailTemplFactory
      */
     public function __construct(
@@ -85,14 +85,14 @@ class Data extends \Magento\App\Helper\AbstractHelper
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollFactory,
+        \Magento\Checkout\Model\Resource\Agreement\CollectionFactory $agreementCollectionFactory,
         \Magento\Email\Model\TemplateFactory $emailTemplFactory
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_storeManager = $storeManager;
         $this->_checkoutSession = $checkoutSession;
         $this->_locale = $locale;
-        $this->_agreementCollFactory = $agreementCollFactory;
+        $this->_agreementCollectionFactory = $agreementCollectionFactory;
         $this->_emailTemplFactory = $emailTemplFactory;
         parent::__construct($context);
     }
@@ -133,7 +133,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
             if (!$this->_coreStoreConfig->getConfigFlag('checkout/options/enable_agreements')) {
                 $this->_agreements = array();
             } else {
-                $this->_agreements = $this->_agreementCollFactory->create()
+                $this->_agreements = $this->_agreementCollectionFactory->create()
                     ->addStoreFilter($this->_storeManager->getStore()->getId())
                     ->addFieldToFilter('is_active', 1)
                     ->getAllIds();
diff --git a/app/code/Magento/Checkout/Helper/Url.php b/app/code/Magento/Checkout/Helper/Url.php
index 5f785fb3cb87b007c9836a4c0f606abb7616b6c9..3d53ca4a9b47051d18b9ee76684f32f6df665d51 100644
--- a/app/code/Magento/Checkout/Helper/Url.php
+++ b/app/code/Magento/Checkout/Helper/Url.php
@@ -53,40 +53,6 @@ class Url extends \Magento\Core\Helper\Url
         return $this->_getUrl('checkout/onepage');
     }
 
-    /**
-     * Multi Shipping (MS) checkout urls
-     */
-
-    /**
-     * Retrieve multishipping checkout url
-     *
-     * @return string
-     */
-    public function getMSCheckoutUrl()
-    {
-        return $this->_getUrl('checkout/multishipping');
-    }
-
-    public function getMSLoginUrl()
-    {
-        return $this->_getUrl('checkout/multishipping/login', array('_secure'=>true, '_current'=>true));
-    }
-
-    public function getMSAddressesUrl()
-    {
-        return $this->_getUrl('checkout/multishipping/addresses');
-    }
-
-    public function getMSShippingAddressSavedUrl()
-    {
-        return $this->_getUrl('checkout/multishipping_address/shippingSaved');
-    }
-
-    public function getMSRegisterUrl()
-    {
-        return $this->_getUrl('checkout/multishipping/register');
-    }
-
     /**
      * One Page (OP) checkout urls
      */
diff --git a/app/code/Magento/Checkout/Model/Resource/Setup.php b/app/code/Magento/Checkout/Model/Resource/Setup.php
index 34ce493b2cc06cfa8c5d6c9034e61b9ac6d14cb5..22e6cd9348aa1940b9ec5cffeed0baf3c8f2fcc5 100644
--- a/app/code/Magento/Checkout/Model/Resource/Setup.php
+++ b/app/code/Magento/Checkout/Model/Resource/Setup.php
@@ -45,7 +45,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param \Magento\Customer\Helper\Address $customerAddress
      * @param string $moduleName
      * @param string $connectionName
@@ -54,13 +54,13 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         \Magento\Customer\Helper\Address $customerAddress,
         $moduleName = 'Magento_Checkout',
         $connectionName = ''
     ) {
         $this->_customerAddress = $customerAddress;
-        parent::__construct($context, $resourceName, $cache, $attrGrCollFactory, $moduleName, $connectionName);
+        parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName);
     }
 
     /**
diff --git a/app/code/Magento/Checkout/etc/frontend/di.xml b/app/code/Magento/Checkout/etc/frontend/di.xml
index 0c0c1faabb97f25d2aee26def186ea317f6daff8..dd1ef14930082be1ecff73683deb339608eab7b3 100644
--- a/app/code/Magento/Checkout/etc/frontend/di.xml
+++ b/app/code/Magento/Checkout/etc/frontend/di.xml
@@ -33,7 +33,6 @@
         <param name="secureUrlList">
             <value>
                 <checkout_onepage>/checkout/onepage</checkout_onepage>
-                <checkout_multishipping>/checkout/multishipping</checkout_multishipping>
             </value>
         </param>
     </type>
diff --git a/app/code/Magento/Checkout/etc/frontend/page_types.xml b/app/code/Magento/Checkout/etc/frontend/page_types.xml
index 7b7c368b91f2efd01992a12758f26373bc32b2de..688528fbfa12415f5d78c9a0ed10c096e0fee360 100644
--- a/app/code/Magento/Checkout/etc/frontend/page_types.xml
+++ b/app/code/Magento/Checkout/etc/frontend/page_types.xml
@@ -26,21 +26,6 @@
 <page_types>
     <type id="checkout_cart_configure" label="Configure Cart Item (Any)"/>
     <type id="checkout_cart_index" label="Shopping Cart"/>
-    <type id="checkout_cart_multishipping" label="Catalog Quick Search Form Suggestions"/>
-    <type id="checkout_cart_multishipping_address_editaddress" label="Multishipping Checkout One Address Edit Form"/>
-    <type id="checkout_cart_multishipping_address_editbilling" label="Multishipping Checkout Billing Address Edit Form"/>
-    <type id="checkout_cart_multishipping_address_editshipping" label="Multishipping Checkout Shipping Address Edit Form"/>
-    <type id="checkout_cart_multishipping_address_newbilling" label="Multishipping Checkout Billing Address Creation"/>
-    <type id="checkout_cart_multishipping_address_newshipping" label="Multishipping Checkout Shipping Address Creation"/>
-    <type id="checkout_cart_multishipping_address_selectbilling" label="Multishipping Checkout Billing Address Selection"/>
-    <type id="checkout_cart_multishipping_addresses" label="Multishipping Checkout Address (Any) Form"/>
-    <type id="checkout_cart_multishipping_billing" label="Multishipping Checkout Billing Information Step"/>
-    <type id="checkout_cart_multishipping_customer_address" label="Multishipping Checkout Customer Address Edit Form"/>
-    <type id="checkout_cart_multishipping_login" label="Multishipping Checkout Login User Form"/>
-    <type id="checkout_cart_multishipping_overview" label="Multishipping Checkout Overview"/>
-    <type id="checkout_cart_multishipping_register" label="Multishipping Checkout Register User Form"/>
-    <type id="checkout_cart_multishipping_shipping" label="Multishipping Checkout Shipping Information Step"/>
-    <type id="checkout_cart_multishipping_success" label="Multishipping Checkout Success"/>
     <type id="checkout_onepage_failure" label="One Page Checkout Failure"/>
     <type id="checkout_onepage_index" label="One Page Checkout"/>
     <type id="checkout_onepage_paymentmethod" label="One Page Checkout Choose Payment Method"/>
diff --git a/app/code/Magento/Checkout/etc/module.xml b/app/code/Magento/Checkout/etc/module.xml
index 5527e10adbe83965ec4827cebb2b15677a76c995..13abefbbf374a1781b09d5249e4517d18a267276 100755
--- a/app/code/Magento/Checkout/etc/module.xml
+++ b/app/code/Magento/Checkout/etc/module.xml
@@ -28,6 +28,7 @@
         <sequence>
             <module name="Magento_Sales"/>
             <module name="Magento_CatalogInventory"/>
+            <module name="Magento_GroupedProduct" />
         </sequence>
         <depends>
             <module name="Magento_Sales"/>
@@ -35,6 +36,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Catalog"/>
+            <module name="Magento_GroupedProduct" />
             <module name="Magento_Payment"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Directory"/>
@@ -42,6 +44,9 @@
             <module name="Magento_GiftMessage"/>
             <module name="Magento_Wishlist"/>
             <module name="Magento_Weee"/>
+            <module name="Magento_Backend"/>
+            <module name="Magento_Theme"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Checkout/sql/checkout_setup/install-1.6.0.0.php b/app/code/Magento/Checkout/sql/checkout_setup/install-1.6.0.0.php
index 2b09bb01af9f207ccde2dd34d92c45a1a272edb6..9d219fbe0e207403f060f63ab23272c81806a8ce 100644
--- a/app/code/Magento/Checkout/sql/checkout_setup/install-1.6.0.0.php
+++ b/app/code/Magento/Checkout/sql/checkout_setup/install-1.6.0.0.php
@@ -598,160 +598,6 @@ $setup->insert($installer->getTable('eav_form_element'), array(
     'sort_order'    => $elementSort++
 ));
 
-/**
- *****************************************************************************
- * checkout/multishipping/register/
- *****************************************************************************
- */
-
-$setup->insert($installer->getTable('eav_form_type'), array(
-    'code'      => 'checkout_multishipping_register',
-    'label'     => 'checkout_multishipping_register',
-    'is_system' => 1,
-    'theme'     => '',
-    'store_id'  => 0
-));
-$formTypeId   = $setup->lastInsertId($installer->getTable('eav_form_type'));
-
-$setup->insert($installer->getTable('eav_form_type_entity'), array(
-    'type_id'        => $formTypeId,
-    'entity_type_id' => $customerEntityTypeId
-));
-$setup->insert($installer->getTable('eav_form_type_entity'), array(
-    'type_id'        => $formTypeId,
-    'entity_type_id' => $addressEntityTypeId
-));
-
-$setup->insert($installer->getTable('eav_form_fieldset'), array(
-    'type_id'    => $formTypeId,
-    'code'       => 'general',
-    'sort_order' => 1
-));
-$fieldsetId = $setup->lastInsertId($installer->getTable('eav_form_fieldset'));
-
-$setup->insert($installer->getTable('eav_form_fieldset_label'), array(
-    'fieldset_id' => $fieldsetId,
-    'store_id'    => 0,
-    'label'       => 'Personal Information'
-));
-
-$elementSort = 0;
-if ($showPrefix) {
-    $setup->insert($installer->getTable('eav_form_element'), array(
-        'type_id'       => $formTypeId,
-        'fieldset_id'   => $fieldsetId,
-        'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'prefix'),
-        'sort_order'    => $elementSort++
-    ));
-}
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'firstname'),
-    'sort_order'    => $elementSort++
-));
-if ($showMiddlename) {
-    $setup->insert($installer->getTable('eav_form_element'), array(
-        'type_id'       => $formTypeId,
-        'fieldset_id'   => $fieldsetId,
-        'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'middlename'),
-        'sort_order'    => $elementSort++
-    ));
-}
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'lastname'),
-    'sort_order'    => $elementSort++
-));
-if ($showSuffix) {
-    $setup->insert($installer->getTable('eav_form_element'), array(
-        'type_id'       => $formTypeId,
-        'fieldset_id'   => $fieldsetId,
-        'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'suffix'),
-        'sort_order'    => $elementSort++
-    ));
-}
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'email'),
-    'sort_order'    => $elementSort++
-));
-if ($showDob) {
-    $setup->insert($installer->getTable('eav_form_element'), array(
-        'type_id'       => $formTypeId,
-        'fieldset_id'   => $fieldsetId,
-        'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'dob'),
-        'sort_order'    => $elementSort++
-    ));
-}
-if ($showTaxVat) {
-    $setup->insert($installer->getTable('eav_form_element'), array(
-        'type_id'       => $formTypeId,
-        'fieldset_id'   => $fieldsetId,
-        'attribute_id'  => $installer->getAttributeId($customerEntityTypeId, 'taxvat'),
-        'sort_order'    => $elementSort++
-    ));
-}
-
-$setup->insert($installer->getTable('eav_form_fieldset'), array(
-    'type_id'    => $formTypeId,
-    'code'       => 'address',
-    'sort_order' => 2
-));
-$fieldsetId = $setup->lastInsertId($installer->getTable('eav_form_fieldset'));
-
-$setup->insert($installer->getTable('eav_form_fieldset_label'), array(
-    'fieldset_id' => $fieldsetId,
-    'store_id'    => 0,
-    'label'       => 'Address Information'
-));
-
-$elementSort = 0;
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'company'),
-    'sort_order'    => $elementSort++
-));
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'telephone'),
-    'sort_order'    => $elementSort++
-));
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'street'),
-    'sort_order'    => $elementSort++
-));
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'city'),
-    'sort_order'    => $elementSort++
-));
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'region'),
-    'sort_order'    => $elementSort++
-));
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'postcode'),
-    'sort_order'    => $elementSort++
-));
-$setup->insert($installer->getTable('eav_form_element'), array(
-    'type_id'       => $formTypeId,
-    'fieldset_id'   => $fieldsetId,
-    'attribute_id'  => $installer->getAttributeId($addressEntityTypeId, 'country_id'),
-    'sort_order'    => $elementSort++
-));
-
 $table = $installer->getTable('core_config_data');
 
 $select = $setup->select()
diff --git a/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml b/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml
index 4b98b3140c519d33e685336bb9b759f77378d3a8..04d39084cbbf14a15dedd8d4cffcb03afdb69694 100644
--- a/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml
+++ b/app/code/Magento/Checkout/view/frontend/cart/item/configure/updatecart.phtml
@@ -22,12 +22,14 @@
  * @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)
  */
+
+/** @var $this \Magento\Catalog\Block\Product\View */
 ?>
 <?php $_product = $this->getProduct(); ?>
 <?php $buttonTitle = __('Update Cart'); ?>
 <?php if ($_product->isSaleable()): ?>
     <div class="box tocart update">
-        <?php if (!$_product->isGrouped()): ?>
+        <?php if ($this->shouldRenderQuantity()): ?>
         <div class="field qty">
             <label class="label" for="qty"><span><?php echo __('Qty') ?></span></label>
             <div class="control">
diff --git a/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml b/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml
index 1aa9ca7c8fb4c52732d97980d842d6ea63889aba..850a12f799a869402235f44eb32f2869e81453bf 100644
--- a/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml
+++ b/app/code/Magento/Checkout/view/frontend/cart/item/default.phtml
@@ -296,7 +296,7 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite
 
             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?>
                 <?php if ($isVisibleProduct): ?>
-                <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartUrl($_item->getId()); ?>" class="use-ajax action towishlist">
+                <a href="#" data-post='<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartParams($_item->getId()); ?>' class="use-ajax action towishlist">
                     <span><?php echo __('Move to Wishlist'); ?></span>
                 </a>
                 <?php endif ?>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
index 173335470baa2169cfb9c0c8956dca7ec56dbf60..dc6a482cee01a7daa19c19e4b358921c44d1c81a 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
+++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml
@@ -41,7 +41,6 @@
                 <block class="Magento\Checkout\Block\Cart" name="checkout.cart.methods.bottom" template="cart/methods.phtml" cacheable="false">
                     <container name="checkout.cart.methods" as="methods" label="Payment Methods After Checkout Button">
                         <block class="Magento\Checkout\Block\Onepage\Link" name="checkout.cart.methods.onepage.bottom" template="onepage/link.phtml" cacheable="false"/>
-                        <block class="Magento\Checkout\Block\Multishipping\Link" name="checkout.cart.methods.multishipping" template="multishipping/link.phtml" cacheable="false"/>
                     </container>
                 </block>
                 <block class="Magento\Checkout\Block\Cart\Crosssell" name="checkout.cart.crosssell" template="Magento_Catalog::product/list/items.phtml" after="-" cacheable="false">
diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php
index f592f48c3c5e322d9453bef6b9122ac661dc852c..64df4431b966710e8467080f58d196ed2d0bbae5 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images.php
@@ -151,9 +151,9 @@ class Images extends \Magento\Backend\App\Action
             $path = $this->getStorage()->getSession()->getCurrentPath();
             foreach ($files as $file) {
                 $file = $helper->idDecode($file);
-                /** @var \Magento\Filesystem $filesystem */
-                $filesystem = $this->_objectManager->get('Magento\Filesystem');
-                $dir = $filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+                /** @var \Magento\App\Filesystem $filesystem */
+                $filesystem = $this->_objectManager->get('Magento\App\Filesystem');
+                $dir = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
                 $filePath = $path . '/' . $file;
                 if ($dir->isFile($dir->getRelativePath($filePath))) {
                     $this->getStorage()->deleteFile($filePath);
diff --git a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
index 9e7ebc3f883ec1693e8dbe994c243f3e3368bdd8..6b7116a2fb966c2fb8aa053049259056e233b3e6 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -83,14 +83,14 @@ class Images extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Backend\Helper\Data $backendData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
         \Magento\Backend\Helper\Data $backendData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         parent::__construct($context);
@@ -98,7 +98,7 @@ class Images extends \Magento\App\Helper\AbstractHelper
         $this->_coreData = $coreData;
         $this->_storeManager = $storeManager;
 
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_directory->create(\Magento\Cms\Model\Wysiwyg\Config::IMAGE_DIRECTORY);
     }
 
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
index ad7f4901c8e8a424f107cd553d13fdd99b2fcc30..f8e67392d676910c2cb5019d16785c7a9b3cf2b7 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -147,7 +147,7 @@ class Storage extends \Magento\Object
      * @param \Magento\Backend\Model\Url $backendUrl
      * @param \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Image\AdapterFactory $imageFactory
      * @param \Magento\View\Url $viewUrl
      * @param \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory $storageCollectionFactory
@@ -167,7 +167,7 @@ class Storage extends \Magento\Object
         \Magento\Backend\Model\Url $backendUrl,
         \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Image\AdapterFactory $imageFactory,
         \Magento\View\Url $viewUrl,
         \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory $storageCollectionFactory,
@@ -184,7 +184,7 @@ class Storage extends \Magento\Object
         $this->_backendUrl = $backendUrl;
         $this->_cmsWysiwygImages = $cmsWysiwygImages;
         $this->_coreFileStorageDb = $coreFileStorageDb;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_imageFactory = $imageFactory;
         $this->_viewUrl = $viewUrl;
         $this->_storageCollectionFactory = $storageCollectionFactory;
@@ -381,32 +381,29 @@ class Storage extends \Magento\Object
      */
     public function deleteDirectory($path)
     {
-        // prevent accidental root directory deleting
-        $rootCmp = rtrim($this->_cmsWysiwygImages->getStorageRoot(), '/');
-        $rootCmp = preg_replace('~[/\\\]+~', '/', $rootCmp);
-        $pathCmp = rtrim($path, '/');
-
-        if ($rootCmp == $pathCmp) {
-            throw new \Magento\Core\Exception(
-                __('We cannot delete root directory %1.', $path)
-            );
-        }
-
         if ($this->_coreFileStorageDb->checkDbUsage()) {
             $this->_directoryDatabaseFactory->create()->deleteDirectory($path);
         }
         try {
-            $this->_directory->delete($this->_directory->getRelativePath($path));
+            $this->_deleteByPath($path);
+            $path = $this->getThumbnailRoot() . $this->_getRelativePathToRoot($path);
+            $this->_deleteByPath($path);
         } catch (\Magento\Filesystem\FilesystemException $e) {
             throw new \Magento\Core\Exception(__('We cannot delete directory %1.', $path));
         }
+    }
 
-        if (strpos($pathCmp, $rootCmp) === 0) {
-            $this->_directory->delete(
-                $this->_directory->getRelativePath(
-                    $this->getThumbnailRoot() . substr($pathCmp, strlen($rootCmp))
-                )
-            );
+    /**
+     * Delete by path
+     *
+     * @param string $path
+     */
+    protected function _deleteByPath($path)
+    {
+        $path = $this->_sanitizePath($path);
+        if (!empty($path)) {
+            $this->_validatePath($path);
+            $this->_directory->delete($this->_directory->getRelativePath($path));
         }
     }
 
@@ -658,4 +655,49 @@ class Storage extends \Magento\Object
     {
         return $this->_resizeParameters['height'];
     }
+
+    /**
+     * Is path under storage root directory
+     *
+     * @param string $path
+     *
+     * @throws \Magento\Core\Exception
+     */
+    protected function _validatePath($path)
+    {
+        $root = $this->_sanitizePath($this->_cmsWysiwygImages->getStorageRoot());
+        if ($root == $path) {
+            throw new \Magento\Core\Exception(__('We cannot delete root directory %1.', $path));
+        }
+        if (strpos($path, $root) !== 0) {
+            throw new \Magento\Core\Exception(__('Directory %1 is not under storage root path.', $path));
+        }
+    }
+
+    /**
+     * Sanitize path
+     *
+     * @param string $path
+     *
+     * @return string
+     */
+    protected function _sanitizePath($path)
+    {
+        return rtrim(preg_replace('~[/\\\]+~', '/', $this->_directory->getDriver()->getRealPath($path)), '/');
+    }
+
+    /**
+     * Get path in root storage dir
+     *
+     * @param string $path
+     *
+     * @return string|bool
+     */
+    protected function _getRelativePathToRoot($path)
+    {
+        return substr(
+            $this->_sanitizePath($path),
+            strlen($this->_sanitizePath($this->_cmsWysiwygImages->getStorageRoot()))
+        );
+    }
 }
diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php
index 64c3777087c29f6d6a6d29c4f41c51fd0adb4a08..2ccf1fffd41295c1f6872ea5ffa194fb06e7e03e 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php
@@ -36,15 +36,15 @@ namespace Magento\Cms\Model\Wysiwyg\Images\Storage;
 class Collection extends \Magento\Data\Collection\Filesystem
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
-    public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Filesystem $filesystem)
+    public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\App\Filesystem $filesystem)
     {
         $this->_filesystem = $filesystem;
         parent::__construct($entityFactory);
@@ -53,7 +53,7 @@ class Collection extends \Magento\Data\Collection\Filesystem
     protected function _generateRow($filename)
     {
         $filename = preg_replace('~[/\\\]+~', '/', $filename);
-        $path = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $path = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         return array(
             'filename' => $filename,
             'basename' => basename($filename),
diff --git a/app/code/Magento/Cms/etc/module.xml b/app/code/Magento/Cms/etc/module.xml
index b14591291ed1a025312c3b294bf5d9858afe2ade..62eae84d78981c151c723ce018a12b02f056d1f0 100644
--- a/app/code/Magento/Cms/etc/module.xml
+++ b/app/code/Magento/Cms/etc/module.xml
@@ -35,6 +35,8 @@
             <module name="Magento_Widget"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Catalog"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Install"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Connect/Helper/Data.php b/app/code/Magento/Connect/Helper/Data.php
index fa76f1b422d0e0343c932ec7f2928a1b195f6733..afc081bda5a98e7af49e5b73c5a8390712c63b9c 100644
--- a/app/code/Magento/Connect/Helper/Data.php
+++ b/app/code/Magento/Connect/Helper/Data.php
@@ -31,7 +31,7 @@ namespace Magento\Connect\Helper;
 class Data extends \Magento\Core\Helper\Data
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -51,7 +51,7 @@ class Data extends \Magento\Core\Helper\Data
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Locale $locale
      * @param \Magento\App\State $appState
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Convert\Xml $xmlConverter
      * @param bool $dbCompatibleMode
      */
@@ -61,12 +61,12 @@ class Data extends \Magento\Core\Helper\Data
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Locale $locale,
         \Magento\App\State $appState,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Convert\Xml $xmlConverter,
         $dbCompatibleMode = true
     ) {
         $this->filesystem = $filesystem;
-        $this->readDirectory = $this->filesystem->getDirectoryRead(\Magento\Filesystem::VAR_DIR);
+        $this->readDirectory = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::VAR_DIR);
         $this->_xmlConverter = $xmlConverter;
         parent::__construct(
             $context,
diff --git a/app/code/Magento/Connect/Model/Extension.php b/app/code/Magento/Connect/Model/Extension.php
index b39a13a684477f2bbca650fc2dfed7f3a2b7a83d..13b11e5add23cf5155252b856042d25dc313b0df 100644
--- a/app/code/Magento/Connect/Model/Extension.php
+++ b/app/code/Magento/Connect/Model/Extension.php
@@ -46,7 +46,7 @@ class Extension extends \Magento\Object
     protected $_package;
 
     /**
-     * @var \Magento\Filesystem $filesystem
+     * @var \Magento\App\Filesystem $filesystem
      */
     protected $filesystem;
 
@@ -76,14 +76,14 @@ class Extension extends \Magento\Object
      * Constructor
      *
      * @param \Magento\Convert\ConvertArray $convertArray
-     * @param \Magento\Filesystem           $filesystem
+     * @param \Magento\App\Filesystem           $filesystem
      * @param Session                       $session
      * @param \Magento\Logger               $logger
      * @param array                         $data
      */
     public function __construct(
         \Magento\Convert\ConvertArray   $convertArray,
-        \Magento\Filesystem             $filesystem,
+        \Magento\App\Filesystem             $filesystem,
         \Magento\Connect\Model\Session  $session,
         \Magento\Logger                 $logger,
         array $data = array()
@@ -91,7 +91,7 @@ class Extension extends \Magento\Object
         $this->_convertArray    = $convertArray;
         $this->_session         = $session;
         $this->filesystem       = $filesystem;
-        $this->writeDirectory   = $this->filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->writeDirectory   = $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->logger           = $logger;
         parent::__construct($data);
 
diff --git a/app/code/Magento/Connect/Model/Extension/Collection.php b/app/code/Magento/Connect/Model/Extension/Collection.php
index 238f5765bf81c0c7e1d19a7c1c0d58aeab961125..7f365378e2c4ef847078debbf55a68f927ead856 100644
--- a/app/code/Magento/Connect/Model/Extension/Collection.php
+++ b/app/code/Magento/Connect/Model/Extension/Collection.php
@@ -45,7 +45,7 @@ class Collection extends \Magento\Data\Collection\Filesystem
     protected $_disallowedFilesMask = '/^package\.xml$/i';
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -58,13 +58,13 @@ class Collection extends \Magento\Data\Collection\Filesystem
      * Set base dir
      *
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
-    public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Filesystem $filesystem)
+    public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\App\Filesystem $filesystem)
     {
         parent::__construct($entityFactory);
         $this->filesystem = $filesystem;
-        $this->connectDirectory = $this->filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->connectDirectory = $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->connectDirectory->create('connect');
         $this->addTargetDir($this->connectDirectory->getAbsolutePath('connect'));
     }
diff --git a/app/code/Magento/Contacts/etc/module.xml b/app/code/Magento/Contacts/etc/module.xml
index 06955bdf4c78e25fb1e512c0edeb25157e208ac6..e4fa2ea264d7ec4c14475bcef92eecdd7e806c54 100755
--- a/app/code/Magento/Contacts/etc/module.xml
+++ b/app/code/Magento/Contacts/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Cms"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php b/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php
index 895aa9ad273de91f41ed4bcff5367e5bb5e8aa75..ad537e54a5c8c88e06d615375c8e2ca9e606dca0 100644
--- a/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php
+++ b/app/code/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandler.php
@@ -26,7 +26,7 @@
 namespace Magento\Core\App\FrontController\Plugin;
 
 use Magento\Core\Model\StoreManager,
-    Magento\Filesystem;
+    Magento\App\Filesystem;
 
 class DispatchExceptionHandler
 {
@@ -38,7 +38,7 @@ class DispatchExceptionHandler
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
diff --git a/app/code/Magento/Core/App/Media.php b/app/code/Magento/Core/App/Media.php
index d9139d58152f3cff2e843e135db241fe19b928a9..ca7b14d16c0eab89e49902e3a0ce3ce9581f3de6 100644
--- a/app/code/Magento/Core/App/Media.php
+++ b/app/code/Magento/Core/App/Media.php
@@ -89,7 +89,7 @@ class Media implements AppInterface
     protected $_response;
 
     /**
-     * @var \Magento\Filesystem $filesystem
+     * @var \Magento\App\Filesystem $filesystem
      */
     protected $filesystem;
 
@@ -108,7 +108,7 @@ class Media implements AppInterface
      * @param $mediaDirectory
      * @param $configCacheFile
      * @param $relativeFileName
-     * @param \Magento\Filesystem $filesytem
+     * @param \Magento\App\Filesystem $filesytem
      */
     public function __construct(
         State $applicationState,
@@ -120,7 +120,7 @@ class Media implements AppInterface
         $mediaDirectory,
         $configCacheFile,
         $relativeFileName,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_applicationState = $applicationState;
         $this->_objectManager = $objectManager;
@@ -132,20 +132,20 @@ class Media implements AppInterface
         $this->_configCacheFile = $configCacheFile;
         $this->_relativeFileName = $relativeFileName;
         $this->filesystem = $filesystem;
-        $this->directory = $this->filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+        $this->directory = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
     }
 
     /**
-     * Execute application
+     * Run application
      *
-     * @return int
+     * @return \Magento\App\ResponseInterface
      */
     public function execute()
     {
         try {
             if (!$this->_applicationState->isInstalled()) {
-                $this->_response->sendNotFound();
-                return -1;
+                $this->_response->setHttpResponseCode(404);
+                return $this->_response;
             }
             if (!$this->_mediaDirectory) {
                 $config = $this->_objectManager->create(
@@ -159,29 +159,28 @@ class Media implements AppInterface
                 );
                 $isAllowed = $this->_isAllowed;
                 if (!$isAllowed($this->_relativeFileName, $allowedResources)) {
-                    $this->_response->sendNotFound();
-                    return -1;
+                    $this->_response->setHttpResponseCode(404);
+                    return $this->_response;
                 }
             }
 
             if (0 !== stripos($this->_request->getPathInfo(), $this->_mediaDirectory . '/')) {
-                $this->_response->sendNotFound();
-                return -1;
+                $this->_response->setHttpResponseCode(404);
+                return $this->_response;
             }
 
             $sync = $this->_objectManager->get('Magento\Core\Model\File\Storage\Synchronization');
             $sync->synchronize($this->_relativeFileName, $this->_request->getFilePath());
 
             if ($this->directory->isReadable($this->directory->getRelativePath($this->_request->getFilePath()))) {
-                $this->_response->sendFile($this->_request->getFilePath());
-                return 0;
+                $this->_response->setFilePath($this->_request->getFilePath());
             } else {
-                $this->_response->sendNotFound();
-                return -1;
+                $this->_response->setHttpResponseCode(404);
             }
+            return $this->_response;
         } catch (\Magento\Core\Model\Store\Exception $e) {
-            $this->_response->sendNotFound();
-            return -1;
+            $this->_response->setHttpResponseCode(404);
+            return $this->_response;
         }
     }
 }
diff --git a/app/code/Magento/Core/Block/Formkey.php b/app/code/Magento/Core/Block/Formkey.php
index 01fe4cef97676b3abb3644d09d0342641d25d94d..9408511ce4abb617adb9a3dc12d667495374a198 100644
--- a/app/code/Magento/Core/Block/Formkey.php
+++ b/app/code/Magento/Core/Block/Formkey.php
@@ -48,6 +48,7 @@ class Formkey extends \Magento\View\Element\Template
     ) {
         $this->formKey = $formKey;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Core/Helper/File/Media.php b/app/code/Magento/Core/Helper/File/Media.php
index 800c4dc77bf03a38b5aa86ce6fb85a496923a7c0..1f746651b136e6b3b5abf8c5434671b7664a0494 100644
--- a/app/code/Magento/Core/Helper/File/Media.php
+++ b/app/code/Magento/Core/Helper/File/Media.php
@@ -37,7 +37,7 @@ class Media extends \Magento\App\Helper\AbstractHelper
     protected $_date;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
     
@@ -45,13 +45,13 @@ class Media extends \Magento\App\Helper\AbstractHelper
      * Constructor
      *
      * @param \Magento\App\Helper\Context $context
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Date $date
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
         \Magento\Core\Model\Date $date,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         parent::__construct($context);
         $this->_date = $date;
@@ -77,7 +77,7 @@ class Media extends \Magento\App\Helper\AbstractHelper
         $path = ltrim($path, '\\/');
         $fullPath = $mediaDirectory . '/' . $path;
 
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+        $dir = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
         $relativePath = $dir->getRelativePath($fullPath);
         if (!$dir->isFile($relativePath)) {
             throw new \Magento\Core\Exception(__('File %1 does not exist', $fullPath));
diff --git a/app/code/Magento/Core/Helper/File/Storage/Database.php b/app/code/Magento/Core/Helper/File/Storage/Database.php
index 82e5e3e8192f82c8cd11d9a2ea7be46eb10adec2..f66897ce72e076bf2f1ec0f82dcbfeeed78ee9f1 100644
--- a/app/code/Magento/Core/Helper/File/Storage/Database.php
+++ b/app/code/Magento/Core/Helper/File/Storage/Database.php
@@ -62,7 +62,7 @@ class Database extends \Magento\App\Helper\AbstractHelper
     protected $_mediaBaseDirectory;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -85,14 +85,14 @@ class Database extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Core\Model\File\Storage\DatabaseFactory $dbStorageFactory
      * @param \Magento\Core\Model\File\Storage\File $fileStorage
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\ConfigInterface $config
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
         \Magento\Core\Model\File\Storage\DatabaseFactory $dbStorageFactory,
         \Magento\Core\Model\File\Storage\File $fileStorage,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\ConfigInterface $config
     ) {
         $this->_filesystem = $filesystem;
@@ -312,7 +312,7 @@ class Database extends \Magento\App\Helper\AbstractHelper
             $uniqueResultFile = $this->getUniqueFilename($path, $file);
 
             if ($uniqueResultFile !== $file) {
-                $dirWrite = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+                $dirWrite = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
                 $dirWrite->renameFile($path . $file, $path . $uniqueResultFile);
             }
             $this->saveFile($path . $uniqueResultFile);
@@ -343,7 +343,7 @@ class Database extends \Magento\App\Helper\AbstractHelper
     public function getMediaBaseDir()
     {
         if (null === $this->_mediaBaseDirectory) {
-            $mediaDir = $this->_filesystem->getPath(\Magento\Filesystem::MEDIA);
+            $mediaDir = $this->_filesystem->getPath(\Magento\App\Filesystem::MEDIA_DIR);
             $this->_mediaBaseDirectory = rtrim($mediaDir, '\\/');
         }
         return $this->_mediaBaseDirectory;
diff --git a/app/code/Magento/Core/Helper/PostData.php b/app/code/Magento/Core/Helper/PostData.php
new file mode 100644
index 0000000000000000000000000000000000000000..0b6c19b7790ea8ccb67fd86cad68d6159524e814
--- /dev/null
+++ b/app/code/Magento/Core/Helper/PostData.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Helper to obtain post data for postData widget
+ *
+ * @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 PostData extends \Magento\App\Helper\AbstractHelper
+{
+    /**
+     * Form key
+     *
+     * @var \Magento\Data\Form\FormKey
+     */
+    protected $_formKey;
+
+    /**
+     * @param \Magento\App\Helper\Context $context
+     * @param \Magento\Data\Form\FormKey $formKey
+     */
+    public function __construct(
+        \Magento\App\Helper\Context $context,
+        \Magento\Data\Form\FormKey $formKey
+    ) {
+        parent::__construct($context);
+        $this->_formKey = $formKey;
+    }
+
+    /**
+     * get data for post by javascript in format acceptable to $.mage.dataPost widget
+     *
+     * @param string $url
+     * @param array $data
+     * @return string
+     */
+    public function getPostData($url, array $data = array())
+    {
+        if (!isset($data['form_key'])) {
+            $data['form_key'] = $this->_formKey->getFormKey();
+        }
+        if (!isset($data[\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED])) {
+            $data[\Magento\App\Action\Action::PARAM_NAME_URL_ENCODED] = $this->getEncodedUrl();
+        }
+        return json_encode(['action' => $url, 'data' => $data]);
+    }
+
+    /**
+     * Get current encoded url
+     *
+     * @param string|null $url
+     * @return string
+     */
+    public function getEncodedUrl($url = null)
+    {
+        if (!$url) {
+            $url = $this->_urlBuilder->getCurrentUrl();
+        }
+        return $this->urlEncode($url);
+    }
+}
diff --git a/app/code/Magento/Core/Helper/Theme.php b/app/code/Magento/Core/Helper/Theme.php
index 6d7a67521ef1d0a3e1a7948b915159d8c95d9878..3e8f8b6d42b20d3d9788c4e51c438a113f8a4024 100644
--- a/app/code/Magento/Core/Helper/Theme.php
+++ b/app/code/Magento/Core/Helper/Theme.php
@@ -34,7 +34,7 @@ class Theme extends \Magento\App\Helper\AbstractHelper
     /**
      * Filesystem facade
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -59,14 +59,14 @@ class Theme extends \Magento\App\Helper\AbstractHelper
 
     /**
      * @param \Magento\App\Helper\Context $context
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory
      * @param \Magento\Core\Model\Resource\Theme\Collection $themeCollection
      * @param \Magento\View\FileSystem $viewFileSystem
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Layout\ProcessorFactory $layoutProcessorFactory,
         \Magento\Core\Model\Resource\Theme\Collection $themeCollection,
         \Magento\View\FileSystem $viewFileSystem
@@ -118,7 +118,7 @@ class Theme extends \Magento\App\Helper\AbstractHelper
             'skipProxy'  => true
         );
 
-        $rootDirectory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $rootDirectory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $files = array();
         foreach ($elements as $fileId) {
             $fileId = (string)$fileId;
@@ -145,9 +145,9 @@ class Theme extends \Magento\App\Helper\AbstractHelper
      */
     public function getGroupedCssFiles($theme)
     {
-        $jsDir = $this->_filesystem->getPath(\Magento\Filesystem::PUB_LIB);
-        $codeDir = $this->_filesystem->getPath(\Magento\Filesystem::MODULES);
-        $designDir = $this->_filesystem->getPath(\Magento\Filesystem::THEMES);
+        $jsDir = $this->_filesystem->getPath(\Magento\App\Filesystem::PUB_LIB_DIR);
+        $codeDir = $this->_filesystem->getPath(\Magento\App\Filesystem::MODULES_DIR);
+        $designDir = $this->_filesystem->getPath(\Magento\App\Filesystem::THEMES_DIR);
 
         $groups = array();
         $themes = array();
diff --git a/app/code/Magento/Core/Model/AbstractShell.php b/app/code/Magento/Core/Model/AbstractShell.php
index a3857ca01cb97919a32507928c31145a137031bf..b4b2278c5d04863e9ee49cd253878f9f24b6ab28 100644
--- a/app/code/Magento/Core/Model/AbstractShell.php
+++ b/app/code/Magento/Core/Model/AbstractShell.php
@@ -66,17 +66,17 @@ abstract class AbstractShell
     /**
      * Initializes application and parses input parameters
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $entryPoint
      * @throws \Exception
      */
-    public function __construct(\Magento\Filesystem $filesystem, $entryPoint)
+    public function __construct(\Magento\App\Filesystem $filesystem, $entryPoint)
     {
         if (isset($_SERVER['REQUEST_METHOD'])) {
             throw new \Exception('This script cannot be run from Browser. This is the shell script.');
         }
 
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $this->_entryPoint = $entryPoint;
         $this->_rawArgs = $_SERVER['argv'];
         $this->_applyPhpVariables();
diff --git a/app/code/Magento/Core/Model/App.php b/app/code/Magento/Core/Model/App.php
index ece5761cca2a7c26c88acbe68b64599f5906c3b8..a3c9e3174cf3316e802be4374e5bd70647a29ef7 100644
--- a/app/code/Magento/Core/Model/App.php
+++ b/app/code/Magento/Core/Model/App.php
@@ -53,7 +53,7 @@ class App implements \Magento\Core\Model\AppInterface
     /**
      * Magento version
      */
-    const VERSION = '2.0.0.0-dev61';
+    const VERSION = '2.0.0.0-dev62';
 
 
     /**
@@ -423,9 +423,9 @@ class App implements \Magento\Core\Model\AppInterface
     public function cleanAllSessions()
     {
         if (session_module_name() == 'files') {
-            /** @var \Magento\Filesystem $filesystem */
-            $filesystem = $this->_objectManager->create('Magento\Filesystem');
-            $sessionDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::SESSION);
+            /** @var \Magento\App\Filesystem $filesystem */
+            $filesystem = $this->_objectManager->create('Magento\App\Filesystem');
+            $sessionDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::SESSION_DIR);
             foreach ($sessionDirectory->read() as $path) {
                 $sessionDirectory->delete($path);
             }
@@ -804,7 +804,7 @@ class App implements \Magento\Core\Model\AppInterface
             'revision'  => '0',
             'patch'     => '0',
             'stability' => 'dev',
-            'number'    => '61',
+            'number'    => '62',
         );
     }
 }
diff --git a/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php b/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php
index 25ffc178db357fdc490c96029d5a23172f660e97..e7363b8f71e17813ea768869b1456665e3949f3b 100644
--- a/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php
+++ b/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php
@@ -32,17 +32,17 @@ class CleanMergedJsCss
     protected $database;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\Core\Helper\File\Storage\Database $database
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Helper\File\Storage\Database $database,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->database = $database;
         $this->filesystem = $filesystem;
@@ -59,7 +59,7 @@ class CleanMergedJsCss
         $invocationChain->proceed($arguments);
 
         /** @var \Magento\Filesystem\Directory\ReadInterface $pubCacheDirectory */
-        $pubCacheDirectory = $this->filesystem->getDirectoryRead(\Magento\Filesystem::PUB_VIEW_CACHE);
+        $pubCacheDirectory = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR);
         $mergedDir = $pubCacheDirectory->getAbsolutePath() . '/' . \Magento\View\Asset\Merged::PUBLIC_MERGE_DIR;
         $this->database->deleteFolder($mergedDir);
     }
diff --git a/app/code/Magento/Core/Model/Config/FileResolver.php b/app/code/Magento/Core/Model/Config/FileResolver.php
index da923c0ab5f1bfbbe0ee314358a68e89ea35bff7..5b9e320adb6dc2cbd70a20eda2c615b0058cd1c4 100644
--- a/app/code/Magento/Core/Model/Config/FileResolver.php
+++ b/app/code/Magento/Core/Model/Config/FileResolver.php
@@ -41,12 +41,12 @@ class FileResolver implements \Magento\Config\FileResolverInterface
 
     /**
      * @param \Magento\Module\Dir\Reader $moduleReader
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
         \Magento\Module\Dir\Reader $moduleReader,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Config\FileIteratorFactory $iteratorFactory
     ) {
         $this->iteratorFactory = $iteratorFactory;
@@ -61,7 +61,7 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     {
         switch ($scope) {
             case 'primary':
-                $directory = $this->filesystem->getDirectoryRead(\Magento\Filesystem::CONFIG);
+                $directory = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::CONFIG_DIR);
                 $iterator = $this->iteratorFactory->create(
                     $directory,
                     $directory->search('{' . $filename . ',*/' . $filename . '}')
diff --git a/app/code/Magento/Core/Model/DataService/Config.php b/app/code/Magento/Core/Model/DataService/Config.php
deleted file mode 100644
index d8edd40476d612827d7908b427ea69e843ee55c3..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Config.php
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-/**
- * This class reads config.xml of modules, and provides interface to the configuration of service calls.
- *
- * Service calls are defined in service_calls.xml files in etc directory of the modules.
- * Additionally, reference to service_calls.xml file is configured in config.xml file.
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 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\DataService;
-
-class Config implements \Magento\Core\Model\DataService\ConfigInterface
-{
-    /** Xpath to service call */
-    const SERVICE_CALLS_XPATH = '/service_calls/service_call';
-
-    /** @var \Magento\Core\Model\DataService\Config\Reader\Factory */
-    protected $_readerFactory;
-
-    /** @var  \Magento\Core\Model\DataService\Config\Reader */
-    protected $_reader;
-
-    /** @var array $_serviceCallNodes */
-    protected $_serviceCallNodes;
-
-    /** @var \Magento\Module\Dir\Reader  */
-    protected $_moduleReader;
-
-    /**
-     * @param Config\Reader\Factory $readerFactory
-     * @param \Magento\Module\Dir\Reader $moduleReader
-     */
-    public function __construct(
-        \Magento\Core\Model\DataService\Config\Reader\Factory $readerFactory,
-        \Magento\Module\Dir\Reader $moduleReader
-    ) {
-        $this->_readerFactory = $readerFactory;
-        $this->_moduleReader = $moduleReader;
-        $this->_indexServiceCallNodes();
-    }
-
-    /**
-     * Build an index of service calls nodes to avoid expensive xpath calls
-     *
-     * @return \Magento\Core\Model\DataService\Config $this
-     */
-    private function _indexServiceCallNodes()
-    {
-        /** @var \DOMElement $node */
-        foreach ($this->getServiceCalls() as $node) {
-            $this->_serviceCallNodes[$node->getAttribute('name')] = $node;
-        }
-        return $this;
-    }
-
-    /**
-     * Reader object initialization.
-     *
-     * @return \Magento\Core\Model\DataService\Config\Reader
-     */
-    protected function _getReader()
-    {
-        if (is_null($this->_reader)) {
-            $serviceCallsFiles = $this->_getServiceCallsFiles();
-            $this->_reader = $this->_readerFactory->createReader($serviceCallsFiles);
-        }
-        return $this->_reader;
-    }
-
-    /**
-     * Retrieve list of service calls files from each module.
-     *
-     * @return array
-     */
-    protected function _getServiceCallsFiles()
-    {
-        return $this->_moduleReader->getConfigurationFiles('service_calls.xml');
-    }
-
-    /**
-     * Get \DOMXPath with loaded service calls inside.
-     *
-     * @return \DOMXPath
-     */
-    protected function _getXPathServiceCalls()
-    {
-        $serviceCalls = $this->_getReader()->getServiceCallConfig();
-        return new \DOMXPath($serviceCalls);
-    }
-
-    /**
-     * Return Service Calls.
-     *
-     * @return \DOMNodeList
-     */
-    public function getServiceCalls()
-    {
-        return $this->_getXPathServiceCalls()->query(self::SERVICE_CALLS_XPATH);
-    }
-
-    /**
-     * Get the class information for a given service call
-     *
-     * @param string $alias
-     * @return array
-     * @throws \InvalidArgumentException
-     * @throws \LogicException
-     */
-    public function getClassByAlias($alias)
-    {
-        //validate that service call is defined
-        if (!isset($this->_serviceCallNodes[$alias])) {
-            throw new \InvalidArgumentException("Service call with name '{$alias}'  doesn't exist");
-        }
-
-        /** @var \DOMElement $node */
-        $node = $this->_serviceCallNodes[$alias];
-        $methodArguments = array();
-
-        /** @var \DOMElement $child */
-        foreach ($node->childNodes as $child) {
-            if ($child instanceof \DOMElement) {
-                $methodArguments[$child->getAttribute('name')] = $child->nodeValue;
-            }
-        }
-
-        $result = array(
-            'class' => $node->getAttribute('service'),
-            'retrieveMethod' => $node->getAttribute('method'),
-            'methodArguments' => $methodArguments,
-        );
-
-        //validate that service attribute is defined
-        if (!$result['class']) {
-            throw new \InvalidArgumentException("Invalid Service call {$alias}, "
-                . 'service type must be defined in the "service" attribute');
-        }
-
-        //validate that retrieval method attribute is defined
-        if (!$result['retrieveMethod']) {
-            throw new \LogicException("Invalid Service call {$alias}, "
-                . "retrieval method must be defined for the service {$result['class']}");
-        }
-
-        return $result;
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Config/Reader.php b/app/code/Magento/Core/Model/DataService/Config/Reader.php
deleted file mode 100644
index 28b0aaec3377e54d9a59903491e54a19826f5e0f..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Config/Reader.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-/**
- * Magento Data Service Config reader
- *
- * 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\Core\Model\DataService\Config;
-
-class Reader extends \Magento\Config\AbstractXml
-{
-    /**
-     * @var \Magento\Module\Dir\Reader
-     */
-    private $_modulesReader;
-
-    /**
-     * @param \Magento\Config\FileIterator $configFiles
-     * @param \Magento\Module\Dir\Reader $moduleReader
-     */
-    public function __construct(\Magento\Config\FileIterator $configFiles, \Magento\Module\Dir\Reader $moduleReader)
-    {
-        if (count($configFiles)) {
-            parent::__construct($configFiles);
-        }
-        $this->_modulesReader = $moduleReader;
-    }
-
-    /**
-     * Get absolute path to the XML-schema file
-     *
-     * @return string
-     */
-    public function getSchemaFile()
-    {
-        return $this->_modulesReader->getModuleDir('etc', 'Magento_Core') . '/service_calls.xsd';
-    }
-
-    /**
-     * Extract configuration data from the DOM structure
-     *
-     * @param \DOMDocument $dom
-     * @return array
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _extractData(\DOMDocument $dom)
-    {
-        return array();
-    }
-
-    /**
-     * Get XML-contents, initial for merging
-     *
-     * @return string
-     */
-    protected function _getInitialXml()
-    {
-        return '<?xml version="1.0"?><service_calls></service_calls>';
-    }
-
-    /**
-     * Get if xml files must be runtime validated
-     *
-     * @return boolean
-     */
-    protected function _isRuntimeValidated()
-    {
-        return false;
-    }
-
-    /**
-     * Retrieve Service Calls
-     *
-     * @return \DOMDocument
-     */
-    public function getServiceCallConfig()
-    {
-        return $this->_getDomConfigModel()->getDom();
-    }
-
-    /**
-     * Get list of paths to identifiable nodes
-     *
-     * @return array
-     */
-    protected function _getIdAttributes()
-    {
-        return array(
-            '/service_calls/service_call/arg' => 'name',
-            '/service_calls/service_call' => 'name',
-        );
-    }
-
-    /**
-     * Perform xml validation
-     *
-     * @return \Magento\Config\AbstractXml
-     * @throws \Magento\Exception if invalid XML-file passed
-     */
-    public function validate()
-    {
-        return $this->_performValidate();
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Graph.php b/app/code/Magento/Core/Model/DataService/Graph.php
deleted file mode 100644
index e9903a308225395c9c8c2d1702aba88bfad6054c..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Graph.php
+++ /dev/null
@@ -1,132 +0,0 @@
-<?php
-/**
- * DataService graph manages creation and storage of data services.
- *
- * manages the graph of objects
- *  - initializes data service
- *  - calls factory to retrieve data
- *  - stores data to repository
- *
- * 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\Core\Model\DataService;
-
-class Graph implements \Magento\Core\Model\DataService\Path\NodeInterface
-{
-    /** @var \Magento\Core\Model\DataService\Invoker */
-    protected $_invoker;
-
-    /** @var \Magento\Core\Model\DataService\Repository */
-    protected $_repository;
-
-    /**
-     * @param \Magento\Core\Model\DataService\Invoker $dataServiceInvoker
-     * @param \Magento\Core\Model\DataService\Repository $repository
-     */
-    public function __construct(
-        \Magento\Core\Model\DataService\Invoker $dataServiceInvoker,
-        \Magento\Core\Model\DataService\Repository $repository
-    ) {
-        $this->_invoker = $dataServiceInvoker;
-        $this->_repository = $repository;
-    }
-
-    /**
-     * Get the value for the method argument
-     *
-     * @param string $path
-     * @return mixed
-     */
-    public function getArgumentValue($path)
-    {
-        return $this->_invoker->getArgumentValue($path);
-    }
-
-    /**
-     * Takes array of the following structure
-     * and initializes all of the data sources
-     *
-     *  array(dataServiceName => array(
-     *      blocks => array(
-     *          'namespace' => aliasInNamespace
-     *      ))
-     *
-     * @param array $dataServicesList
-     * @return \Magento\Core\Model\DataService\Graph
-     * @throws \InvalidArgumentException
-     */
-    public function init(array $dataServicesList)
-    {
-        foreach ($dataServicesList as $dataServiceName => $namespaceConfig) {
-            if (!isset($namespaceConfig['namespaces'])) {
-                throw new \InvalidArgumentException("Data reference configuration doesn't have a block to link to");
-            }
-            if ($this->get($dataServiceName) === false) {
-                throw new \InvalidArgumentException("Data service '$dataServiceName' couldn't be retrieved");
-            }
-            foreach ($namespaceConfig['namespaces'] as $namespaceName => $aliasInNamespace) {
-                $this->_repository->setAlias($namespaceName, $dataServiceName, $aliasInNamespace);
-            }
-        }
-        return $this;
-    }
-
-    /**
-     * Retrieve the data or the service call based on its name
-     *
-     * @param string $dataServiceName
-     * @return bool|array
-     */
-    public function get($dataServiceName)
-    {
-        $dataService = $this->_repository->get($dataServiceName);
-        if ($dataService === null) {
-            $dataService = $this->_invoker->getServiceData($dataServiceName);
-            $this->_repository->add($dataServiceName, $dataService);
-        }
-        return $dataService;
-    }
-
-    /**
-     * Retrieve all data for the service calls for particular namespace.
-     *
-     * @param string $namespace
-     * @return mixed
-     */
-    public function getByNamespace($namespace)
-    {
-        return $this->_repository->getByNamespace($namespace);
-    }
-
-    /**
-     * Return a child path node that corresponds to the input path element.  This can be used to walk the
-     * data service graph.  Leaf nodes in the graph tend to be of mixed type (scalar, array, or object).
-     *
-     * @param string $pathElement the path element name of the child node
-     * @return \Magento\Core\Model\DataService\Path\NodeInterface|mixed|null the child node,
-     *    or mixed if this is a leaf node
-     */
-    public function getChildNode($pathElement)
-    {
-        return $this->get($pathElement);
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Invoker.php b/app/code/Magento/Core/Model/DataService/Invoker.php
deleted file mode 100644
index 9c580a3289fc7a0dd9ddd56e6642f49ccebe519f..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Invoker.php
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-/**
- * DataService invoker invokes the service, calls the methods and retrieves the data from the call.
- *
- * 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\Core\Model\DataService;
-
-class Invoker
-{
-    /**
-     * separates data structure hierarchy
-     */
-    const DATASERVICE_PATH_SEPARATOR = '.';
-
-    /**
-     * @var \Magento\Core\Model\DataService\ConfigInterface
-     */
-    protected $_config;
-
-    /**
-     * @var \Magento\ObjectManager
-     */
-    protected $_objectManager;
-
-    /** @var \Magento\Core\Model\DataService\Path\Composite */
-    protected $_composite;
-
-    /**
-     * @var \Magento\Core\Model\DataService\Path\Navigator
-     */
-    private $_navigator;
-
-    /**
-     * @param \Magento\Core\Model\DataService\ConfigInterface $config
-     * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\DataService\Path\Composite $composite
-     * @param \Magento\Core\Model\DataService\Path\Navigator $navigator
-     */
-    public function __construct(
-        \Magento\Core\Model\DataService\ConfigInterface $config,
-        \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\DataService\Path\Composite $composite,
-        \Magento\Core\Model\DataService\Path\Navigator $navigator
-    ) {
-        $this->_config = $config;
-        $this->_objectManager = $objectManager;
-        $this->_composite = $composite;
-        $this->_navigator = $navigator;
-    }
-
-    /**
-     * Call service method and retrieve the data (array) from the call
-     *
-     * @param string $sourceName
-     * @throws \InvalidArgumentException
-     * @return bool|array
-     */
-    public function getServiceData($sourceName)
-    {
-        $classInformation = $this->_config->getClassByAlias($sourceName);
-        $instance = $this->_objectManager->get($classInformation['class']);
-        $serviceData = $this->_applyMethod(
-            $instance, $classInformation['retrieveMethod'],
-            $classInformation['methodArguments']
-        );
-        if (!is_array($serviceData)) {
-            $type = gettype($serviceData);
-            throw new \InvalidArgumentException(
-                "Data service method calls must return an array, received {$type} instead.
-                 Called {$classInformation['class']}::{$classInformation['retrieveMethod']}"
-            );
-        }
-        return $serviceData;
-    }
-
-    /**
-     * Invoke method configured for service call
-     *
-     * @param Object $object
-     * @param string $methodName
-     * @param array $methodArguments
-     * @return array
-     */
-    protected function _applyMethod($object, $methodName, $methodArguments)
-    {
-        $arguments = array();
-        if (is_array($methodArguments)) {
-            $arguments = $this->_prepareArguments($methodArguments);
-        }
-        return call_user_func_array(array($object, $methodName), $arguments);
-    }
-
-    /**
-     * Prepare  values for the method params
-     *
-     * @param array $argumentsList
-     * @return array
-     */
-    protected function _prepareArguments($argumentsList)
-    {
-        $result = array();
-        foreach ($argumentsList as $name => $value) {
-            $result[$name] = $this->getArgumentValue($value);
-        }
-        return $result;
-    }
-
-    /**
-     * Get the value for the method argument
-     *
-     * @param string $valueTemplate
-     * @return mixed
-     */
-    public function getArgumentValue($valueTemplate)
-    {
-        $composite = $this->_composite;
-        $navigator = $this->_navigator;
-        $callback = function ($matches) use ($composite, $navigator) {
-            // convert from '{{parent.child}}' format to array('parent', 'child') format
-            $pathArray = explode(\Magento\Core\Model\DataService\Invoker::DATASERVICE_PATH_SEPARATOR, $matches[1]);
-            return $navigator->search($composite, $pathArray);
-        };
-
-        return preg_replace_callback('(\{\{(.*?)\}\})', $callback, $valueTemplate);
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Path/Composite.php b/app/code/Magento/Core/Model/DataService/Path/Composite.php
deleted file mode 100644
index 9486de46e6d5e8c4b28a2fdcd2d1d853252ec521..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Path/Composite.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-/**
- * DataService composite visitable element
- *
- * 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\Core\Model\DataService\Path;
-
-class Composite implements \Magento\Core\Model\DataService\Path\NodeInterface
-{
-    /**
-     * @var array
-     */
-    protected $_children = array();
-
-    /**
-     * @param \Magento\ObjectManager $objectManager
-     * @param array string[] $items
-     */
-    public function __construct(\Magento\ObjectManager $objectManager, $items)
-    {
-        foreach ($items as $key => $item) {
-            $this->_children[$key] = $objectManager->get($item);
-        }
-    }
-
-    /**
-     * Return a child path node that corresponds to the input path element.  This can be used to walk the
-     * data service tree.  Leaf nodes in the graph tend to be of mixed type (scalar, array, or object).
-     *
-     * @param string $pathElement the path element name of the child node
-     * @return \Magento\Core\Model\DataService\Path\NodeInterface|mixed|null the child node,
-     *   or mixed if this is a leaf node
-     */
-    public function getChildNode($pathElement)
-    {
-        if (array_key_exists($pathElement, $this->_children)) {
-            return $this->_children[$pathElement];
-        }
-
-        return null;
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Path/Navigator.php b/app/code/Magento/Core/Model/DataService/Path/Navigator.php
deleted file mode 100644
index fd937fafedbb1e23ea457e931623ce2fe9b057ae..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Path/Navigator.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * Navigates the DataService path.
- *
- * DataServices can be represented by a path, for example {root.branch.leaf} could be a way to point to
- * a specific 'leaf' data service that lives within the context of 'branch' which itself is found under
- * the 'root' data service. What we are trying to solve here is an efficient and easy to use method of
- * accessing a specific data service within an existing hierarchy.
- *
- * 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\Core\Model\DataService\Path;
-
-class Navigator
-{
-    /**
-     * Searches a root node using a given path for a specific child node.
-     *
-     * @param \Magento\Core\Model\DataService\Path\NodeInterface|array $root
-     *        Root node in the graph from which to start the search.
-     * @param array $path path to use for searching.
-     * @throws \InvalidArgumentException if $root is null or if path can't be followed to a leaf node.
-     * @return mixed
-     */
-    public function search($root, array $path)
-    {
-        if (null === $root) {
-            throw new \InvalidArgumentException('Search contained null root.');
-        }
-        $pathElement = array_shift($path);
-
-        $childElement = null;
-        if (is_array($root)) {
-            if (array_key_exists($pathElement, $root)) {
-                $childElement = $root[$pathElement];
-            }
-        } else {
-            $childElement = $root->getChildNode($pathElement);
-        }
-
-        if (empty($path)) {
-            return $childElement;
-        }
-        try {
-            return $this->search($childElement, $path);
-        } catch (\InvalidArgumentException $iae) {
-            throw new \InvalidArgumentException(
-                'Search failed to find an intermediate node with given path: '
-                . $pathElement . '.' . join('.', $path)
-            );
-        }
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Path/NodeInterface.php b/app/code/Magento/Core/Model/DataService/Path/NodeInterface.php
deleted file mode 100644
index c379880918188ecee1a5611c3f1a6586d5a32b4b..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Path/NodeInterface.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/**
- * DataService path node interface.
- *
- * Think of the data service paths as forming a graph.  This interface represents a node in such a graph.
- *
- * 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\Core\Model\DataService\Path;
-
-interface NodeInterface
-{
-    /**
-     * Returns a child path node that corresponds to the input path element.  This can be used to walk the
-     * data service graph.  Leaf nodes in the graph tend to be of mixed type (scalar, array, or object).
-     *
-     * @param string $pathElement the path element name of the child node
-     * @return \Magento\Core\Model\DataService\Path\NodeInterface|mixed|null the child node,
-     *    or mixed if this is a leaf node
-     */
-    public function getChildNode($pathElement);
-}
diff --git a/app/code/Magento/Core/Model/DataService/Path/Request.php b/app/code/Magento/Core/Model/DataService/Path/Request.php
deleted file mode 100644
index cd3f30694887743590c3d97471fc2810afbfaef6..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Path/Request.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/**
- * Wrapper around \Magento\App\Request\Http for the Navigator class.
- *
- * HTTP Requests need to be exposed as data services for the front end to be able to access the
- * request data. This class acts as a wrapper around the \Magento\App\Request\Http object so
- * that the data can be searched for and extracted via the Navigator class.
- *
- * 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\Core\Model\DataService\Path;
-
-class Request implements \Magento\Core\Model\DataService\Path\NodeInterface
-{
-    /**
-     * @var \Magento\App\RequestInterface
-     */
-    protected $_request;
-
-    /**
-     * @param \Magento\App\RequestInterface $request
-     */
-    public function __construct(\Magento\App\RequestInterface $request)
-    {
-        $this->_request = $request;
-    }
-
-    /**
-     * Return a child path node that corresponds to the input path element.  This can be used to walk the
-     * data service graph.  Leaf nodes in the graph tend to be of mixed type (scalar, array, or object).
-     *
-     * @param string $pathElement the path element name of the child node
-     * @return \Magento\Core\Model\DataService\Path\NodeInterface|mixed|null the child node,
-     *    or mixed if this is a leaf node
-     */
-    public function getChildNode($pathElement)
-    {
-        switch ($pathElement) {
-            case 'params':
-                return $this->_request->getParams();
-        }
-
-        return null;
-    }
-}
diff --git a/app/code/Magento/Core/Model/DataService/Repository.php b/app/code/Magento/Core/Model/DataService/Repository.php
deleted file mode 100644
index 4c2a70fadcbf36f8e7db2200e504727173f1482a..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/Model/DataService/Repository.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/**
- * DataService Repository stores the data and allows to retrieve for service calls.
- *
- * Assigns namespaces and aliases to the service calls data.
- *
- * 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\Core\Model\DataService;
-
-class Repository implements \Magento\Core\Model\DataService\Path\NodeInterface
-{
-    /**
-     * @var array
-     */
-    protected $_serviceData = array();
-
-    /**
-     * @var array
-     */
-    protected $_namespaces = array();
-
-    /**
-     * Assign a new name to existing namespace identified by alias.
-     *
-     * @param string $namespace
-     * @param string $serviceName
-     * @param string $alias
-     * @return $this
-     */
-    public function setAlias($namespace, $serviceName, $alias)
-    {
-        if (isset($this->_namespaces[$namespace])) {
-            $this->_namespaces[$namespace][$serviceName] = $alias;
-        } else {
-            $this->_namespaces[$namespace] = array($serviceName => $alias);
-        }
-        return $this;
-    }
-
-    /**
-     * Get all data services from namespace.
-     *
-     * @param string $namespace
-     * @return array
-     */
-    public function getByNamespace($namespace)
-    {
-        if (!isset($this->_namespaces[$namespace])) {
-            return array();
-        }
-        $dataServices = array();
-        $dataServicesNames = $this->_namespaces[$namespace];
-        foreach ($dataServicesNames as $serviceName => $alias) {
-            $dataServices[$alias] = $this->get($serviceName);
-        }
-        return $dataServices;
-    }
-
-    /**
-     * Add new service data.
-     *
-     * @param string $serviceName
-     * @param array $data
-     * @return \Magento\Core\Model\DataService\Repository
-     */
-    public function add($serviceName, $data)
-    {
-        $this->_serviceData[$serviceName] = $data;
-        return $this;
-    }
-
-    /**
-     * Get service data by name.
-     *
-     * @param string $serviceName
-     * @return array|null
-     */
-    public function get($serviceName)
-    {
-        if (!isset($this->_serviceData[$serviceName])) {
-            return null;
-        }
-        return $this->_serviceData[$serviceName];
-    }
-
-    /**
-     * Return a child path node that corresponds to the input path element.  This can be used to walk the
-     * data service graph.  Leaf nodes in the graph tend to be of mixed type (scalar, array, or object).
-     *
-     * @param string $pathElement the path element name of the child node
-     * @return \Magento\Core\Model\DataService\Path\NodeInterface|mixed|null the child node,
-     *    or mixed if this is a leaf node
-     */
-    public function getChildNode($pathElement)
-    {
-        return $this->get($pathElement);
-    }
-}
diff --git a/app/code/Magento/Core/Model/File/Storage.php b/app/code/Magento/Core/Model/File/Storage.php
index 42e38da92321921d93f70c577cf4fdb398985cf8..dc48841f1824355b53262ab2505b379db2a4c709 100644
--- a/app/code/Magento/Core/Model/File/Storage.php
+++ b/app/code/Magento/Core/Model/File/Storage.php
@@ -26,7 +26,7 @@
 
 namespace Magento\Core\Model\File;
 
-use \Magento\Filesystem;
+use \Magento\App\Filesystem;
 
 /**
  * Class Storage
@@ -96,7 +96,7 @@ class Storage extends \Magento\Core\Model\AbstractModel
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -109,7 +109,7 @@ class Storage extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\File\Storage\Flag $fileFlag
      * @param \Magento\Core\Model\File\Storage\FileFactory $fileFactory
      * @param \Magento\Core\Model\File\Storage\DatabaseFactory $databaseFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -123,7 +123,7 @@ class Storage extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\File\Storage\Flag $fileFlag,
         \Magento\Core\Model\File\Storage\FileFactory $fileFactory,
         \Magento\Core\Model\File\Storage\DatabaseFactory $databaseFactory,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -298,7 +298,7 @@ class Storage extends \Magento\Core\Model\AbstractModel
     public function getScriptConfig()
     {
         $config = array();
-        $config['media_directory'] = $this->filesystem->getPath(Filesystem::MEDIA);
+        $config['media_directory'] = $this->filesystem->getPath(Filesystem::MEDIA_DIR);
 
         $allowedResources = $this->_coreConfig->getValue(self::XML_PATH_MEDIA_RESOURCE_WHITELIST, 'default');
         foreach ($allowedResources as $allowedResource) {
diff --git a/app/code/Magento/Core/Model/File/Storage/Config.php b/app/code/Magento/Core/Model/File/Storage/Config.php
index e25256a259e03689555c498836fabe6bb374907e..319f86bc8dd85bb4e6c444a1c66a61baec9284b2 100644
--- a/app/code/Magento/Core/Model/File/Storage/Config.php
+++ b/app/code/Magento/Core/Model/File/Storage/Config.php
@@ -52,16 +52,16 @@ class Config
 
     /**
      * @param \Magento\Core\Model\File\Storage $storage
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $cacheFile
      */
     public function __construct(
         \Magento\Core\Model\File\Storage $storage,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $cacheFile
     ) {
         $this->config = $storage->getScriptConfig();
-        $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::PUB);
+        $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_DIR);
         $this->cacheFilePath = $cacheFile;
     }
 
diff --git a/app/code/Magento/Core/Model/File/Storage/Response.php b/app/code/Magento/Core/Model/File/Storage/Response.php
index f235ef2bc2a888b0c06a174c78a3b77eee9654b1..77dcf25ae4f23137608e09f5f13c50e54dc67717 100644
--- a/app/code/Magento/Core/Model/File/Storage/Response.php
+++ b/app/code/Magento/Core/Model/File/Storage/Response.php
@@ -23,36 +23,47 @@
  */
 namespace Magento\Core\Model\File\Storage;
 
-class Response
+use Magento\App\Response\Http;
+
+class Response extends Http
 {
     /**
-     * Application object manager
+     * @var \Magento\File\Transfer\Adapter\Http
+     */
+    protected $_transferAdapter;
+
+    /**
+     * Full path to file
      *
-     * @var \Magento\ObjectManager
+     * @var string
      */
-    protected $_objectManager;
+    protected $_filePath;
 
-    public function __construct(\Magento\ObjectManager $objectManager = null)
+    /**
+     * @param \Magento\File\Transfer\Adapter\Http $transferAdapter
+     */
+    public function __construct(\Magento\File\Transfer\Adapter\Http $transferAdapter)
     {
-        $this->_objectManager = $objectManager;
+        $this->_transferAdapter = $transferAdapter;
     }
 
     /**
-     * Send the file to client
-     *
-     * @param string|array $filePath
+     * Send response
      */
-    public function sendFile($filePath)
+    public function sendResponse()
     {
-        $transfer = $this->_objectManager->create('Magento\File\Transfer\Adapter\Http');
-        $transfer->send($filePath);
+        if ($this->_filePath && $this->getHttpResponseCode() == 200) {
+            $this->_transferAdapter->send($this->_filePath);
+        } else {
+            parent::sendResponse();
+        }
     }
 
     /**
-     * Return page header
+     * @param string $path
      */
-    public function sendNotFound()
+    public function setFilePath($path)
     {
-        header('HTTP/1.0 404 Not Found');
+        $this->_filePath = $path;
     }
 }
diff --git a/app/code/Magento/Core/Model/File/Storage/Synchronization.php b/app/code/Magento/Core/Model/File/Storage/Synchronization.php
index 1e93b48bb716e5a810f3481c7205c1a1f6762727..0da6710e83871f4550277883d8a442fe3484391a 100644
--- a/app/code/Magento/Core/Model/File/Storage/Synchronization.php
+++ b/app/code/Magento/Core/Model/File/Storage/Synchronization.php
@@ -49,14 +49,14 @@ class Synchronization
 
     /**
      * @param \Magento\Core\Model\File\Storage\DatabaseFactory $storageFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Model\File\Storage\DatabaseFactory $storageFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->storageFactory = $storageFactory;
-        $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::PUB);
+        $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Layout.php b/app/code/Magento/Core/Model/Layout.php
index 2b951e72de89fa576065a500e6123f05c3db74d8..2245462cc8660e38ec059d52186becebc890ca9b 100644
--- a/app/code/Magento/Core/Model/Layout.php
+++ b/app/code/Magento/Core/Model/Layout.php
@@ -154,14 +154,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
      */
     protected $_scheduledStructure;
 
-    /**
-     * @var array
-     */
-    protected $_serviceCalls = array();
-
-    /** @var \Magento\Core\Model\DataService\Graph  */
-    protected $_dataServiceGraph;
-
     /**
      * Renderers registered for particular name
      *
@@ -226,7 +218,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
      * @param \Magento\Data\Structure $structure
      * @param Layout\Argument\Processor $argumentProcessor
      * @param Layout\ScheduledStructure $scheduledStructure
-     * @param DataService\Graph $dataServiceGraph
      * @param Store\Config $coreStoreConfig
      * @param \Magento\App\State $appState
      * @param \Magento\Message\ManagerInterface $messageManager
@@ -243,7 +234,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         \Magento\Data\Structure $structure,
         \Magento\Core\Model\Layout\Argument\Processor $argumentProcessor,
         \Magento\Core\Model\Layout\ScheduledStructure $scheduledStructure,
-        \Magento\Core\Model\DataService\Graph $dataServiceGraph,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\App\State $appState,
         \Magento\Message\ManagerInterface $messageManager,
@@ -262,7 +252,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         $this->setXml(simplexml_load_string('<layout/>', $this->_elementClass));
         $this->_renderingOutput = new \Magento\Object;
         $this->_scheduledStructure = $scheduledStructure;
-        $this->_dataServiceGraph = $dataServiceGraph;
         $this->_processorFactory = $processorFactory;
         $this->themeFactory = $themeFactory;
         $this->_logger = $logger;
@@ -369,9 +358,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
 
         $this->_readStructure($this->getNode());
 
-        $this->_dataServiceGraph
-            ->init($this->getServiceCalls());
-
         while (false === $this->_scheduledStructure->isStructureEmpty()) {
             $this->_scheduleElement(key($this->_scheduledStructure->getStructure()));
         };
@@ -465,7 +451,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
                     break;
 
                 case Element::TYPE_BLOCK:
-                    $this->_initServiceCalls($node);
                     $this->_scheduleStructure($node, $parent);
                     $this->_readStructure($node);
                     break;
@@ -509,32 +494,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         }
     }
 
-    /**
-     * Grab information about data service from the node
-     *
-     * @param \Magento\View\Layout\Element $node
-     * @return \Magento\Core\Model\Layout
-     */
-    protected function _initServiceCalls($node)
-    {
-        if (!$dataServices = $node->xpath('data')) {
-            return $this;
-        }
-        $nodeName = $node->getAttribute('name');
-        foreach ($dataServices as $dataServiceNode) {
-            $dataServiceName = $dataServiceNode->getAttribute('service_call');
-            if (isset($this->_serviceCalls[$dataServiceName])) {
-                $this->_serviceCalls[$dataServiceName]['namespaces'][$nodeName] =
-                    $dataServiceNode->getAttribute('alias');
-            } else {
-                $this->_serviceCalls[$dataServiceName] = array(
-                    'namespaces' => array($nodeName => $dataServiceNode->getAttribute('alias'))
-                );
-            }
-        }
-        return $this;
-    }
-
     /**
      * Merge Container attributes
      *
@@ -866,16 +825,12 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         $className = (string)$node['class'];
 
         $arguments = $this->_processArguments($args);
-        $dictionary = $this->_dataServiceGraph->getByNamespace((string)$node['name']);
 
         $block = $this->_createBlock($className, $elementName,
             array('data' => $arguments));
 
         if (!empty($node['template'])) {
             $templateFileName = (string)$node['template'];
-            if ($block instanceof \Magento\View\Element\Template) {
-                $block->assign($dictionary);
-            }
             $block->setTemplate($templateFileName);
         }
 
@@ -890,11 +845,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         return $block;
     }
 
-    public function getServiceCalls()
-    {
-        return $this->_serviceCalls;
-    }
-
     /**
      * Set container-specific data to structure element
      *
@@ -1562,12 +1512,11 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
      * @param $dynamicType
      * @param $type
      * @param $template
-     * @param string $dataServiceName
      * @param array $data
      * @return $this
      */
     public function addAdjustableRenderer($namespace, $staticType, $dynamicType, $type, $template,
-        $dataServiceName = '', $data = array()
+        $data = array()
     ) {
         if (!isset($namespace)) {
             $this->_renderers[$namespace] = array();
@@ -1578,7 +1527,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
         $this->_renderers[$namespace][$staticType][$dynamicType] = array(
             'type' => $type,
             'template' => $template,
-            'dataServiceName' => $dataServiceName,
             'data' => $data
         );
         return $this;
@@ -1614,9 +1562,6 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
     {
         if ($options = $this->getRendererOptions($namespace, $staticType, $dynamicType)) {
             $dictionary = array();
-            if (!empty($options['dataServiceName'])) {
-                $dictionary = $this->_dataServiceGraph->get($options['dataServiceName']);
-            }
             /** @var $block \Magento\View\Element\Template */
             $block = $this->createBlock($options['type'], '')
                 ->setData($data)
@@ -1668,4 +1613,14 @@ class Layout extends \Magento\Simplexml\Config implements \Magento\View\LayoutIn
     {
         return !(boolean)count($this->_xml->xpath('//' . Element::TYPE_BLOCK . '[@cacheable="false"]'));
     }
+
+    /**
+     * Check is current layout private
+     *
+     * @return bool
+     */
+    public function  isPrivate()
+    {
+        return !(boolean)count($this->_xml->xpath('//' . Element::TYPE_BLOCK . '[@cache-control="private"]'));
+    }
 }
diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php
index 20b6926919844bd0afce790d2e67ee2e80153bb3..71fa12c710282a2adefde4a12b5740293c6e3cc6 100644
--- a/app/code/Magento/Core/Model/Layout/Merge.php
+++ b/app/code/Magento/Core/Model/Layout/Merge.php
@@ -124,7 +124,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
     protected $_logger;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -139,7 +139,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
      * @param \Magento\Cache\FrontendInterface $cache
      * @param \Magento\Core\Model\Layout\Update\Validator $validator
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Design\ThemeInterface $theme Non-injectable theme instance
      */
     public function __construct(
@@ -151,7 +151,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
         \Magento\Cache\FrontendInterface $cache,
         \Magento\Core\Model\Layout\Update\Validator $validator,
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Design\ThemeInterface $theme = null
     ) {
         $this->_theme = $theme ?: $design->getDesignTheme();
@@ -601,7 +601,7 @@ class Merge implements \Magento\View\Layout\ProcessorInterface
         $layoutStr = '';
         $theme = $this->_getPhysicalTheme($this->_theme);
         $updateFiles = $this->_fileSource->getFiles($theme);
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $dir = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $useErrors = libxml_use_internal_errors(true);
         foreach ($updateFiles as $file) {
             $filename = $dir->getRelativePath($file->getFilename());
diff --git a/app/code/Magento/Core/Model/Locale/Hierarchy/Config/FileResolver.php b/app/code/Magento/Core/Model/Locale/Hierarchy/Config/FileResolver.php
index c5d2c85426b43f29b2fab824ae1e73beb4f6512f..a41576b2da2c6c8f3dfd4820d755691c1d780761 100644
--- a/app/code/Magento/Core/Model/Locale/Hierarchy/Config/FileResolver.php
+++ b/app/code/Magento/Core/Model/Locale/Hierarchy/Config/FileResolver.php
@@ -38,14 +38,14 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     protected $iteratorFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Config\FileIteratorFactory $iteratorFactory
     ) {
-        $this->directoryRead = $filesystem->getDirectoryRead(\Magento\Filesystem::APP);
+        $this->directoryRead = $filesystem->getDirectoryRead(\Magento\App\Filesystem::APP_DIR);
         $this->iteratorFactory = $iteratorFactory;
     }
 
diff --git a/app/code/Magento/Core/Model/Resource/File/Storage/File.php b/app/code/Magento/Core/Model/Resource/File/Storage/File.php
index 267ea7799d9500f2b832af4608653b106dff291c..7bbfe64ddde68022685fd0d14e639b1510cacb89 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/File.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/File.php
@@ -32,7 +32,7 @@ namespace Magento\Core\Model\Resource\File\Storage;
 class File
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -42,11 +42,11 @@ class File
     protected $_logger;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Logger $log
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Logger $log
     ) {
         $this->_logger = $log;
@@ -63,7 +63,7 @@ class File
     {
         $files          = array();
         $directories    = array();
-        $directoryInstance = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+        $directoryInstance = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
         if ($directoryInstance->isDirectory($dir)) {
             foreach ($directoryInstance->readRecursively($dir) as $path) {
                 $itemName = basename($path);
@@ -92,7 +92,7 @@ class File
      */
     public function clear($dir = '')
     {
-        $directoryInstance = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $directoryInstance = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         if ($directoryInstance->isDirectory($dir)) {
             foreach ($directoryInstance->read($dir) as $path) {
                 $directoryInstance->delete($path);
@@ -120,11 +120,11 @@ class File
             : $dir['name'];
 
         try {
-            $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA)->create($path);
+            $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR)->create($path);
         } catch (\Exception $e) {
             $this->_logger->log($e->getMessage());
             throw new \Magento\Core\Exception(
-                __('Unable to create directory: %1', \Magento\Filesystem::MEDIA . '/' . $path)
+                __('Unable to create directory: %1', \Magento\App\Filesystem::MEDIA_DIR . '/' . $path)
             );
         }
 
@@ -143,7 +143,7 @@ class File
     public function saveFile($filePath, $content, $overwrite = false)
     {
         try {
-            $directoryInstance = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+            $directoryInstance = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
             if (!$directoryInstance->isFile($filePath) || ($overwrite && $directoryInstance->delete($filePath))) {
                 $directoryInstance->writeFile($filePath, $content);
                 return true;
diff --git a/app/code/Magento/Core/Model/Resource/Setup.php b/app/code/Magento/Core/Model/Resource/Setup.php
index 0397fcaced6af2a64e4db5e9582566dffa7c7e4e..3b10fba864d2b0c5fa542dac86614738548cb6ee 100644
--- a/app/code/Magento/Core/Model/Resource/Setup.php
+++ b/app/code/Magento/Core/Model/Resource/Setup.php
@@ -120,7 +120,7 @@ class Setup implements \Magento\Module\Updater\SetupInterface
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -152,7 +152,7 @@ class Setup implements \Magento\Module\Updater\SetupInterface
         $this->_themeResourceFactory = $context->getThemeResourceFactory();
         $this->_moduleConfig = $context->getModuleList()->getModule($moduleName);
         $this->filesystem = $context->getFilesystem();
-        $this->modulesDir = $this->filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $this->modulesDir = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $this->_connectionName = $connectionName ?: $this->_connectionName;
     }
 
@@ -835,7 +835,7 @@ class Setup implements \Magento\Module\Updater\SetupInterface
     }
 
     /**
-     * @return \Magento\Filesystem
+     * @return \Magento\App\Filesystem
      */
     public function getFilesystem()
     {
diff --git a/app/code/Magento/Core/Model/Resource/Setup/Context.php b/app/code/Magento/Core/Model/Resource/Setup/Context.php
index b0a05f88d17d30ec72d94bbb7151a86e9a5fc4e3..264f1078dfd1a09c3d920a28dab892f48caea0ae 100644
--- a/app/code/Magento/Core/Model/Resource/Setup/Context.php
+++ b/app/code/Magento/Core/Model/Resource/Setup/Context.php
@@ -76,7 +76,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     protected $_encryptor;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -93,7 +93,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
      * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory
      * @param \Magento\Core\Model\Theme\CollectionFactory $themeFactory
      * @param \Magento\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Logger $logger,
@@ -106,7 +106,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
         \Magento\Core\Model\Resource\Theme\CollectionFactory $themeResourceFactory,
         \Magento\Core\Model\Theme\CollectionFactory $themeFactory,
         \Magento\Encryption\EncryptorInterface $encryptor,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_logger = $logger;
         $this->_eventManager = $eventManager;
@@ -202,7 +202,7 @@ class Context implements \Magento\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Filesystem
+     * @return \Magento\App\Filesystem
      */
     public function getFilesystem()
     {
diff --git a/app/code/Magento/Core/Model/Resource/Setup/Migration.php b/app/code/Magento/Core/Model/Resource/Setup/Migration.php
index 25243f8029e7f9487f910717aa05fe2706cc6920..7614ecc76d96ba6d8959be8c9531bc6086ba18af 100644
--- a/app/code/Magento/Core/Model/Resource/Setup/Migration.php
+++ b/app/code/Magento/Core/Model/Resource/Setup/Migration.php
@@ -158,7 +158,7 @@ class Migration extends \Magento\Core\Model\Resource\Setup
         $moduleName = 'Magento_Core',
         $connectionName = ''
     ) {
-        $this->_directory = $context->getFilesystem()->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->_directory = $context->getFilesystem()->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $this->_coreHelper = $helper;
         $this->_pathToMapFile = $confPathToMapFile;
         parent::__construct($context, $resourceName, $moduleName, $connectionName);
diff --git a/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php b/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php
index 6963e41426082618b8b4e782ea480eff50cd3ea3..f996e53bfedad6bb69169cdbd6df47fa6e5ee571 100644
--- a/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php
+++ b/app/code/Magento/Core/Model/Resource/Type/Db/Pdo/Mysql.php
@@ -29,7 +29,7 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
     /**
      * Filesystem class
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -59,7 +59,7 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
     protected $_isActive;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Stdlib\DateTime $dateTime
      * @param string $host
@@ -72,7 +72,7 @@ class Mysql extends \Magento\Core\Model\Resource\Type\Db
      * @param bool $active
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Stdlib\DateTime $dateTime,
         $host,
diff --git a/app/code/Magento/Core/Model/Session/Config.php b/app/code/Magento/Core/Model/Session/Config.php
index ac8ea3c1d03b839700ce62655763a1fe2a761074..a385cc6a1e828f46bd39853933cd16be1f3b58de 100644
--- a/app/code/Magento/Core/Model/Session/Config.php
+++ b/app/code/Magento/Core/Model/Session/Config.php
@@ -117,7 +117,7 @@ class Config implements \Magento\Session\Config\ConfigInterface
     protected $_appState;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -127,7 +127,7 @@ class Config implements \Magento\Session\Config\ConfigInterface
      * @param \Magento\Stdlib\String $stringHelper
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\App\State $appState
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $saveMethod
      * @param null|string $savePath
      * @param null|string $cacheLimiter
@@ -138,7 +138,7 @@ class Config implements \Magento\Session\Config\ConfigInterface
         \Magento\Stdlib\String $stringHelper,
         \Magento\App\RequestInterface $request,
         \Magento\App\State $appState,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $saveMethod = \Magento\Session\SaveHandlerInterface::DEFAULT_HANDLER,
         $savePath = null,
         $cacheLimiter = null
diff --git a/app/code/Magento/Core/Model/Store.php b/app/code/Magento/Core/Model/Store.php
index b58f95b1ad1594acf15e76ccc48cea4c74fcc9e2..78b512335d47b7ff931ddd5c362d7a3df1a64fbb 100644
--- a/app/code/Magento/Core/Model/Store.php
+++ b/app/code/Magento/Core/Model/Store.php
@@ -276,7 +276,7 @@ class Store extends \Magento\Core\Model\AbstractModel
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -312,7 +312,7 @@ class Store extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Url $url
      * @param \Magento\App\RequestInterface $request
      * @param \Magento\Core\Model\Resource\Config\Data $configDataResource
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Core\Model\Config $coreConfig
      * @param \Magento\Core\Model\Resource\Store $resource
@@ -331,7 +331,7 @@ class Store extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Url $url,
         \Magento\App\RequestInterface $request,
         \Magento\Core\Model\Resource\Config\Data $configDataResource,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Core\Model\Resource\Store $resource,
@@ -568,7 +568,7 @@ class Store extends \Magento\Core\Model\AbstractModel
                     $url = $this->getConfig($path);
                     if (!$url) {
                         $url = $this->getBaseUrl(self::URL_TYPE_WEB, $secure)
-                            . $this->filesystem->getUri(\Magento\Filesystem::PUB_LIB);
+                            . $this->filesystem->getUri(\Magento\App\Filesystem::PUB_LIB_DIR);
                     }
                     break;
 
@@ -577,7 +577,7 @@ class Store extends \Magento\Core\Model\AbstractModel
                     $url = $this->getConfig($path);
                     if (!$url) {
                         $url = $this->getBaseUrl(self::URL_TYPE_WEB, $secure)
-                            . $this->filesystem->getUri(\Magento\Filesystem::STATIC_VIEW);
+                            . $this->filesystem->getUri(\Magento\App\Filesystem::STATIC_VIEW_DIR);
                     }
                     break;
 
@@ -586,7 +586,7 @@ class Store extends \Magento\Core\Model\AbstractModel
                     $url = $this->getConfig($path);
                     if (!$url) {
                         $url = $this->getBaseUrl(self::URL_TYPE_WEB, $secure)
-                            . $this->filesystem->getUri(\Magento\Filesystem::PUB_VIEW_CACHE);
+                            . $this->filesystem->getUri(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR);
                     }
                     break;
 
@@ -597,7 +597,7 @@ class Store extends \Magento\Core\Model\AbstractModel
                         $url = $this->getConfig($path);
                         if (!$url) {
                             $url = $this->getBaseUrl(self::URL_TYPE_WEB, $secure)
-                                . $this->filesystem->getUri(\Magento\Filesystem::MEDIA);
+                                . $this->filesystem->getUri(\Magento\App\Filesystem::MEDIA_DIR);
                         }
                     }
                     break;
@@ -655,16 +655,16 @@ class Store extends \Magento\Core\Model\AbstractModel
      * If we use Database file storage and server doesn't support rewrites (.htaccess in media folder)
      * we have to put name of fetching media script exactly into URL
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param bool $secure
      * @return string|bool
      */
-    protected function _getMediaScriptUrl(\Magento\Filesystem $filesystem, $secure)
+    protected function _getMediaScriptUrl(\Magento\App\Filesystem $filesystem, $secure)
     {
         if (!$this->getConfig(self::XML_PATH_USE_REWRITES)
             && $this->_coreFileStorageDatabase->checkDbUsage()
         ) {
-            return $this->getBaseUrl(self::URL_TYPE_WEB, $secure) . $filesystem->getUri(\Magento\Filesystem::PUB)
+            return $this->getBaseUrl(self::URL_TYPE_WEB, $secure) . $filesystem->getUri(\Magento\App\Filesystem::PUB_DIR)
             . '/' . self::MEDIA_REWRITE_SCRIPT;
         }
         return false;
diff --git a/app/code/Magento/Core/Model/Theme/Collection.php b/app/code/Magento/Core/Model/Theme/Collection.php
index 340da17163d38fbb92ae6ac516f2da3b9aa4955f..dd2989605b48d717b44f866fd9933d5d5dae7ecf 100644
--- a/app/code/Magento/Core/Model/Theme/Collection.php
+++ b/app/code/Magento/Core/Model/Theme/Collection.php
@@ -57,16 +57,16 @@ class Collection extends \Magento\Data\Collection implements \Magento\View\Desig
 
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Config\FileIteratorFactory $fileIteratorFactory
      */
     public function __construct(
         \Magento\Core\Model\EntityFactory $entityFactory,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Config\FileIteratorFactory $fileIteratorFactory
     ) {
         parent::__construct($entityFactory);
-        $this->_directory = $filesystem->getDirectoryRead(\Magento\Filesystem::THEMES);
+        $this->_directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::THEMES_DIR);
         $this->fileIteratorFactory = $fileIteratorFactory;
     }
 
diff --git a/app/code/Magento/Core/Model/Theme/Image/Path.php b/app/code/Magento/Core/Model/Theme/Image/Path.php
index bcb825085d8ccb88ba57db8df7479f75752720a9..8e29888a36a9ba9ff31b1417de2b1cbadc1cc118 100644
--- a/app/code/Magento/Core/Model/Theme/Image/Path.php
+++ b/app/code/Magento/Core/Model/Theme/Image/Path.php
@@ -37,7 +37,7 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -54,12 +54,12 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface
     /**
      * Initialize dependencies
      * 
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Url $viewUrl
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Url $viewUrl,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
@@ -96,7 +96,7 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface
      */
     public function getImagePreviewDirectory()
     {
-        return $this->filesystem->getPath(\Magento\Filesystem::MEDIA) . '/' . self::PREVIEW_DIRECTORY_PATH;
+        return $this->filesystem->getPath(\Magento\App\Filesystem::MEDIA_DIR) . '/' . self::PREVIEW_DIRECTORY_PATH;
     }
 
     /**
@@ -106,6 +106,6 @@ class Path implements \Magento\View\Design\Theme\Image\PathInterface
      */
     public function getTemporaryDirectory()
     {
-        return $this->filesystem->getPath(\Magento\Filesystem::MEDIA) . '/theme/origin';
+        return $this->filesystem->getPath(\Magento\App\Filesystem::MEDIA_DIR) . '/theme/origin';
     }
 }
diff --git a/app/code/Magento/Core/Model/Theme/Registration.php b/app/code/Magento/Core/Model/Theme/Registration.php
index b7de8746ed649000f210e6a8dbb4fd6fe677678c..be58085e3b817fcd73d0b9c497700d0f36954a8d 100644
--- a/app/code/Magento/Core/Model/Theme/Registration.php
+++ b/app/code/Magento/Core/Model/Theme/Registration.php
@@ -75,16 +75,16 @@ class Registration
      *
      * @param \Magento\Core\Model\Resource\Theme\CollectionFactory $collectionFactory
      * @param Collection $filesystemCollection
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Model\Resource\Theme\CollectionFactory    $collectionFactory,
         \Magento\Core\Model\Theme\Collection                    $filesystemCollection,
-        \Magento\Filesystem                                     $filesystem
+        \Magento\App\Filesystem                                     $filesystem
     ) {
         $this->_collectionFactory   = $collectionFactory;
         $this->_themeCollection     = $filesystemCollection;
-        $this->directoryRead        = $filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+        $this->directoryRead        = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Translate.php b/app/code/Magento/Core/Model/Translate.php
index d84b79a5e34858b40aabce457faf8c16445de95d..2ece5a27e6054a1267160a314017081f9893986f 100644
--- a/app/code/Magento/Core/Model/Translate.php
+++ b/app/code/Magento/Core/Model/Translate.php
@@ -197,7 +197,7 @@ class Translate implements TranslateInterface
     protected $_appState;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -220,7 +220,7 @@ class Translate implements TranslateInterface
      * @param \Magento\Core\Model\Resource\Translate $translate
      * @param \Magento\Core\Model\App $app
      * @param \Magento\App\State $appState
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -238,7 +238,7 @@ class Translate implements TranslateInterface
         \Magento\Core\Model\Resource\Translate $translate,
         \Magento\Core\Model\App $app,
         \Magento\App\State $appState,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_viewDesign = $viewDesign;
         $this->_localeHierarchy = $config->getHierarchy();
@@ -254,7 +254,7 @@ class Translate implements TranslateInterface
         $this->_app = $app;
         $this->_appState = $appState;
         $this->filesystem = $filesystem;
-        $this->directory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
@@ -499,7 +499,7 @@ class Translate implements TranslateInterface
      */
     protected function _getModuleTranslationFile($moduleName, $locale)
     {
-        $file = $this->_modulesReader->getModuleDir(\Magento\Filesystem::LOCALE, $moduleName);
+        $file = $this->_modulesReader->getModuleDir(\Magento\App\Filesystem::LOCALE_DIR, $moduleName);
         $file .= '/' . $locale . '.csv';
         return $file;
     }
@@ -514,7 +514,7 @@ class Translate implements TranslateInterface
     {
         $area = isset($area) ? $area : $this->_appState->getAreaCode();
         return $this->_viewFileSystem
-            ->getFilename(\Magento\Filesystem::LOCALE . '/' . $locale . '.csv', array('area' => $area));
+            ->getFilename(\Magento\App\Filesystem::LOCALE_DIR . '/' . $locale . '.csv', array('area' => $area));
     }
 
     /**
diff --git a/app/code/Magento/Core/etc/config.xml b/app/code/Magento/Core/etc/config.xml
index 518dc38094a8763819fccadb7b1f4222d2f6ddb9..1035177d413802b5dd1576c67fc6afe9e7a88198 100644
--- a/app/code/Magento/Core/etc/config.xml
+++ b/app/code/Magento/Core/etc/config.xml
@@ -88,40 +88,18 @@
             </media_storage_configuration>
             <filesystem>
                 <directory>
-                    <design>
-                        <read_only>1</read_only>
-                        <path>app/design</path>
-                    </design>
-                    <var>
-                        <read_only>0</read_only>
-                        <path>var</path>
-                        <allow_create_dirs>1</allow_create_dirs>
-                        <permissions>511</permissions>
-                    </var>
-                    <tmp>
-                        <read_only>0</read_only>
-                        <path>var/tmp</path>
-                        <allow_create_dirs>1</allow_create_dirs>
-                        <permissions>511</permissions>
-                    </tmp>
-                    <cache>
-                        <read_only>0</read_only>
-                        <path>var/cache</path>
-                        <allow_create_dirs>1</allow_create_dirs>
-                        <permissions>511</permissions>
-                    </cache>
-                    <log>
+                    <media>
                         <read_only>0</read_only>
-                        <path>var/log</path>
-                        <allow_create_dirs>1</allow_create_dirs>
+                        <path>pub/media</path>
+                        <uri>pub/media</uri>
                         <permissions>511</permissions>
-                    </log>
-                    <session>
+                    </media>
+                    <static>
                         <read_only>0</read_only>
-                        <path>var/session</path>
-                        <allow_create_dirs>1</allow_create_dirs>
+                        <path>pub/static</path>
+                        <uri>pub/static</uri>
                         <permissions>511</permissions>
-                    </session>
+                    </static>
                     <pub>
                         <read_only>0</read_only>
                         <path>pub</path>
@@ -129,34 +107,32 @@
                         <permissions>511</permissions>
                     </pub>
                     <pub_lib>
-                        <read_only>1</read_only>
+                        <read_only>0</read_only>
                         <path>pub/lib</path>
                         <uri>pub/lib</uri>
+                        <permissions>511</permissions>
                     </pub_lib>
-                    <media>
+                    <view_cache>
                         <read_only>0</read_only>
-                        <path>pub/media</path>
-                        <uri>pub/media</uri>
+                        <path>pub/cache</path>
+                        <uri>pub/cache</uri>
                         <permissions>511</permissions>
-                    </media>
+                    </view_cache>
+                    <tmp>
+                        <read_only>0</read_only>
+                        <path>var/tmp</path>
+                        <permissions>511</permissions>
+                    </tmp>
+                    <design>
+                        <read_only>1</read_only>
+                        <path>app/design</path>
+                    </design>
                     <upload>
                         <read_only>0</read_only>
                         <path>pub/media/upload</path>
                         <uri>pub/media/upload</uri>
                         <permissions>511</permissions>
                     </upload>
-                    <static>
-                        <read_only>0</read_only>
-                        <path>pub/static</path>
-                        <uri>pub/static</uri>
-                        <permissions>511</permissions>
-                    </static>
-                    <view_cache>
-                        <read_only>0</read_only>
-                        <path>pub/cache</path>
-                        <uri>pub/cache</uri>
-                        <permissions>511</permissions>
-                    </view_cache>
                     <ftp>
                         <read_only>0</read_only>
                         <permissions>511</permissions>
diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml
index 03b8a50a3b79cfd51758e10b2599b60e9f6f1c26..2d878c8d39f609f86ee2a37d701f0bedbff4d0ae 100644
--- a/app/code/Magento/Core/etc/di.xml
+++ b/app/code/Magento/Core/etc/di.xml
@@ -33,7 +33,6 @@
     <preference for="Magento\Session\SessionManagerInterface" type="Magento\Core\Model\Session" />
     <preference for="Magento\Core\Model\LocaleInterface" type="Magento\Core\Model\Locale" />
     <preference for="Magento\View\Asset\MergeStrategyInterface" type="Magento\View\Asset\MergeStrategy\Direct" />
-    <preference for="Magento\Core\Model\DataService\ConfigInterface" type="Magento\Core\Model\DataService\Config" />
     <preference for="Magento\Core\Model\ConfigInterface" type="Magento\Core\Model\Config" />
     <preference for="Magento\Core\Model\Config\DataInterface" type="Magento\Core\Model\Config\Data" />
     <preference for="Magento\Core\Model\Config\Storage\WriterInterface" type="Magento\Core\Model\Config\Storage\Writer\Db" />
diff --git a/app/code/Magento/Core/etc/layouts.xsd b/app/code/Magento/Core/etc/layouts.xsd
index a091804c3086bcd98ed841db62f32405940406d9..a03c770d642d1147420e3db20e1a94c7786729f1 100644
--- a/app/code/Magento/Core/etc/layouts.xsd
+++ b/app/code/Magento/Core/etc/layouts.xsd
@@ -135,7 +135,6 @@
     <xs:element name="update" type="updateType"/>
     <xs:element name="remove" type="removeType"/>
     <xs:element name="move" type="moveType"/>
-    <xs:element name="data" type="dataType"/>
 
     <xs:simpleType name="handlePageType">
         <xs:restriction base="xs:string">
@@ -222,7 +221,6 @@
             <xs:element ref="block" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="container" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="referenceBlock" minOccurs="0" maxOccurs="unbounded"/>
-            <xs:element ref="data" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute type="elementNameType" name="name" use="optional"/>
         <xs:attribute type="blockClassType" name="class" use="optional"/>
@@ -237,16 +235,6 @@
         <xs:attribute name="cacheable" type="xs:boolean" default="true" use="optional"/>
     </xs:complexType>
 
-    <xs:complexType name="dataType">
-        <xs:annotation>
-            <xs:documentation>
-                Use data from Service Layer in View Layer.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:attribute type="xs:string" name="alias" use="required"/>
-        <xs:attribute type="xs:string" name="serviceCall" use="optional"/>
-    </xs:complexType>
-
     <xs:complexType name="actionType">
         <xs:annotation>
             <xs:documentation>
diff --git a/app/code/Magento/Core/etc/module.xml b/app/code/Magento/Core/etc/module.xml
index b2bf27498fb9e457e139e68039ca2f1d4c5fc39d..2b5c4d33fbca60a2e6a0724cf60b10b823911f1f 100755
--- a/app/code/Magento/Core/etc/module.xml
+++ b/app/code/Magento/Core/etc/module.xml
@@ -44,6 +44,8 @@
             <module name="Magento_PaypalUk"/>
             <module name="Magento_ProductAlert"/>
             <module name="Magento_SalesRule"/>
+            <module name="Magento_Eav"/>
+            <module name="Magento_Install"/>
             <extension name="spl"/>
             <extension name="dom"/>
             <extension name="simplexml"/>
diff --git a/app/code/Magento/Core/etc/service_calls.xsd b/app/code/Magento/Core/etc/service_calls.xsd
deleted file mode 100644
index 0c1c78f903fb6bdb2c85e37b9f9d2688e93a79d2..0000000000000000000000000000000000000000
--- a/app/code/Magento/Core/etc/service_calls.xsd
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/**
- * Schema for service calls
- *
- * 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)
- */
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-    <xs:element name="service_calls">
-        <xs:complexType>
-            <xs:sequence minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="service_call" />
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:attributeGroup name="serviceCallAttributeGroup">
-        <xs:attribute name="name" type="xs:string" use="required" />
-        <xs:attribute name="service" type="xs:string" use="required" />
-        <xs:attribute name="method" type="xs:string" use="required" />
-    </xs:attributeGroup>
-
-    <xs:element name="service_call">
-        <xs:annotation>
-            <xs:documentation>
-                Service call definition
-            </xs:documentation>
-        </xs:annotation>
-
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element minOccurs="0" maxOccurs="unbounded" name="arg" type="typeArg" />
-            </xs:sequence>
-            <xs:attributeGroup ref="serviceCallAttributeGroup"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:complexType name="typeArg">
-        <xs:annotation>
-            <xs:documentation>
-                Dynamic values which are evaluated at the time of service calls construction or method invocation enclosed with {{ }}.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:simpleContent>
-            <xs:extension base="xs:string">
-                <xs:attribute type="xs:string" name="name" use="required"/>
-            </xs:extension>
-        </xs:simpleContent>
-    </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
diff --git a/app/code/Magento/Customer/Block/Account/AuthorizationLink.php b/app/code/Magento/Customer/Block/Account/AuthorizationLink.php
index 4c6cacd6a6ada6e50bd2ed7f25080a8c07c31bfa..3e2ea17d6633d2e2f5186668605bcbedf5aa13d2 100644
--- a/app/code/Magento/Customer/Block/Account/AuthorizationLink.php
+++ b/app/code/Magento/Customer/Block/Account/AuthorizationLink.php
@@ -56,6 +56,7 @@ class AuthorizationLink extends \Magento\View\Element\Html\Link
         parent::__construct($context, $data);
         $this->_customerSession = $session;
         $this->_customerHelper = $customerHelper;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Account/Customer.php b/app/code/Magento/Customer/Block/Account/Customer.php
index ae107157c36d595f232f470026a18247c7cb7cbe..4f8969ce874053831fe1a361356bc2d5bab9905c 100644
--- a/app/code/Magento/Customer/Block/Account/Customer.php
+++ b/app/code/Magento/Customer/Block/Account/Customer.php
@@ -45,6 +45,7 @@ class Customer extends \Magento\View\Element\Template
     ) {
         parent::__construct($context, $data);
         $this->_customerSession = $session;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard.php b/app/code/Magento/Customer/Block/Account/Dashboard.php
index 277308960962a89ce05a49f8a9c4d4f5536583dc..2f5ce780529fddef464010f420d3228a2dd37b80 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard.php
@@ -65,6 +65,7 @@ class Dashboard extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_subscriberFactory = $subscriberFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getCustomer()
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Address.php b/app/code/Magento/Customer/Block/Account/Dashboard/Address.php
index b52cb9ffd1cbee05b5f591f1d102dbf0b406d4ba..f3078cf1854650f36b30a20849fd2c7a6091ce87 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Address.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Address.php
@@ -53,6 +53,7 @@ class Address extends \Magento\View\Element\Template
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getCustomer()
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Block.php b/app/code/Magento/Customer/Block/Account/Dashboard/Block.php
index f5bc0473d51a7adfa50c5343705c6a1fa54763f6..90b78723cd8c9b79716258e51c7d8d55d3cc5e50 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Block.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Block.php
@@ -29,5 +29,15 @@ namespace Magento\Customer\Block\Account\Dashboard;
 
 class Block extends \Magento\View\Element\Template
 {
-
+    /**
+     * @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/Dashboard/Hello.php b/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php
index 18e429a03b74f13e83593dc97ae5b4ad5d8bba3f..67fa472679906d01721a06a4e124547ee7a10c45 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Hello.php
@@ -46,6 +46,7 @@ class Hello extends \Magento\View\Element\Template
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getCustomerName()
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Info.php b/app/code/Magento/Customer/Block/Account/Dashboard/Info.php
index 96651d3a8278dfea7bece05d84ea3436a2571368..1bf2eb1b99e056ece3c59fe37fbfd353b3bd72d0 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Info.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Info.php
@@ -68,6 +68,7 @@ class Info extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_subscriberFactory = $subscriberFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
 
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php b/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php
index 736d9a73c4a47fdd3a572e6795e61147c3831600..9f811f948a976cc4095514f7899d59e56b2915ea 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Newsletter.php
@@ -66,6 +66,7 @@ class Newsletter extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_subscriberFactory = $subscriberFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getSubscriptionObject()
diff --git a/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php b/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php
index 03fb413992343b720a67710249c96bd8e358d3d1..1c7b6db8958926405dbde0199dc5c39eca768bfb 100644
--- a/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php
+++ b/app/code/Magento/Customer/Block/Account/Dashboard/Sidebar.php
@@ -96,6 +96,7 @@ class Sidebar extends \Magento\View\Element\Template
         $this->_wishListFactory = $wishListFactory;
         $this->_itemsCompareFactory = $itemsCompareFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
 
@@ -172,7 +173,7 @@ class Sidebar extends \Magento\View\Element\Template
 
     public function getCompareAddUrlTemplate()
     {
-        return $this->getUrl('catalog/product_compare/add',array('product'=>'#{id}'));
+        return $this->getUrl('catalog/product_compare/add');
     }
 
     public function getCompareUrl()
diff --git a/app/code/Magento/Customer/Block/Account/Forgotpassword.php b/app/code/Magento/Customer/Block/Account/Forgotpassword.php
index d27feab49810907c6e155a28f8f56b921a0d6a35..a541d59fc9fb2c1d81c562a1a0d1e3df5e1aee95 100644
--- a/app/code/Magento/Customer/Block/Account/Forgotpassword.php
+++ b/app/code/Magento/Customer/Block/Account/Forgotpassword.php
@@ -36,5 +36,15 @@ namespace Magento\Customer\Block\Account;
 
 class Forgotpassword extends \Magento\View\Element\Template
 {
-
+    /**
+     * @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/Link.php b/app/code/Magento/Customer/Block/Account/Link.php
index 33838933e2636b2667ad5ae6f14a9abead52dfbe..7ceda267b5f71207a564475dd8e58275f3d1eb54 100644
--- a/app/code/Magento/Customer/Block/Account/Link.php
+++ b/app/code/Magento/Customer/Block/Account/Link.php
@@ -43,6 +43,7 @@ class Link extends \Magento\View\Element\Html\Link
     ) {
         $this->_customerHelper = $customerHelper;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Account/RegisterLink.php b/app/code/Magento/Customer/Block/Account/RegisterLink.php
index 26e392122ed714efdac1ac7568b3fc1463053c02..e86a803304f9969798be5c5b3cb3773b6c755f00 100644
--- a/app/code/Magento/Customer/Block/Account/RegisterLink.php
+++ b/app/code/Magento/Customer/Block/Account/RegisterLink.php
@@ -56,6 +56,7 @@ class RegisterLink extends \Magento\View\Element\Html\Link
         parent::__construct($context, $data);
         $this->_customerSession = $session;
         $this->_customerHelper = $customerHelper;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Account/Resetpassword.php b/app/code/Magento/Customer/Block/Account/Resetpassword.php
index d3c0638cc49191730a5255a61fc00e1b2c64b7dd..abf0f0230484865cdbfb8d0d53fee3be5f7ba37c 100644
--- a/app/code/Magento/Customer/Block/Account/Resetpassword.php
+++ b/app/code/Magento/Customer/Block/Account/Resetpassword.php
@@ -36,5 +36,15 @@ namespace Magento\Customer\Block\Account;
 
 class Resetpassword extends \Magento\View\Element\Template
 {
-
+    /**
+     * @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/Address/Book.php b/app/code/Magento/Customer/Block/Address/Book.php
index 875d7ad1ca8756705b41a5003d01bd48aaf5dec2..6fa2ae4f80f4d02abfc4308f67ebfde430b0d6a7 100644
--- a/app/code/Magento/Customer/Block/Address/Book.php
+++ b/app/code/Magento/Customer/Block/Address/Book.php
@@ -52,6 +52,7 @@ class Book extends \Magento\View\Element\Template
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/Customer/Block/Address/Edit.php b/app/code/Magento/Customer/Block/Address/Edit.php
index b31c601dc1463962a190116af09dc9f6ee11fe57..ea81b4e0d19633e40ee314a81aea72c99020ae5f 100644
--- a/app/code/Magento/Customer/Block/Address/Edit.php
+++ b/app/code/Magento/Customer/Block/Address/Edit.php
@@ -55,8 +55,8 @@ class Edit extends \Magento\Directory\Block\Data
      * @param \Magento\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\App\Cache\Type\Config $configCacheType
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
@@ -67,8 +67,8 @@ class Edit extends \Magento\Directory\Block\Data
         \Magento\Core\Helper\Data $coreData,
         \Magento\Json\EncoderInterface $jsonEncoder,
         \Magento\App\Cache\Type\Config $configCacheType,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
         \Magento\Core\Model\Config $config,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Customer\Model\AddressFactory $addressFactory,
@@ -78,8 +78,9 @@ class Edit extends \Magento\Directory\Block\Data
         $this->_customerSession = $customerSession;
         $this->_addressFactory = $addressFactory;
         parent::__construct(
-            $context, $coreData, $jsonEncoder, $configCacheType, $regionCollFactory, $countryCollFactory, $data
+            $context, $coreData, $jsonEncoder, $configCacheType, $regionCollectionFactory, $countryCollectionFactory, $data
         );
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php b/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php
index f5ee2a6ec0e49784d24ffbe48cfc61700c22637b..46406a31ba254fdcb4670bb675003b5eca1b3a3b 100644
--- a/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php
+++ b/app/code/Magento/Customer/Block/Address/Renderer/DefaultRenderer.php
@@ -72,6 +72,7 @@ class DefaultRenderer
         $this->_customerAddress = $customerAddress;
         $this->_attrDataFactory = $attrDataFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Form/Edit.php b/app/code/Magento/Customer/Block/Form/Edit.php
index 2ed667c1ea755c26b7022e96d4d211269daa9cc8..1fa35366a9e2f36ce7c4cda68a66bd224f89c9b2 100644
--- a/app/code/Magento/Customer/Block/Form/Edit.php
+++ b/app/code/Magento/Customer/Block/Form/Edit.php
@@ -35,5 +35,19 @@ namespace Magento\Customer\Block\Form;
 
 class Edit extends \Magento\Customer\Block\Account\Dashboard
 {
-
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Customer\Model\Session $customerSession
+     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Customer\Model\Session $customerSession,
+        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
+        array $data = array()
+    ) {
+        parent::__construct($context, $customerSession, $subscriberFactory, $data);
+        $this->_isScopePrivate = true;
+    }
 }
diff --git a/app/code/Magento/Customer/Block/Form/Login.php b/app/code/Magento/Customer/Block/Form/Login.php
index 2fa00d7c4e2a299608e1f99dfc26366dd93a5311..568820e7b1cdf9369b107666268d702555c5e937 100644
--- a/app/code/Magento/Customer/Block/Form/Login.php
+++ b/app/code/Magento/Customer/Block/Form/Login.php
@@ -62,6 +62,7 @@ class Login extends \Magento\View\Element\Template
         $this->_customerHelper = $customerHelper;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/Customer/Block/Form/Register.php b/app/code/Magento/Customer/Block/Form/Register.php
index a1f7f65866d63c39869b54dfab9a290af48c81cc..48bdbaf3447bd54142ecb4b4a0fbed204a367bfb 100644
--- a/app/code/Magento/Customer/Block/Form/Register.php
+++ b/app/code/Magento/Customer/Block/Form/Register.php
@@ -58,8 +58,8 @@ class Register extends \Magento\Directory\Block\Data
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Json\EncoderInterface $jsonEncoder
      * @param \Magento\App\Cache\Type\Config $configCacheType
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
      * @param \Magento\Module\Manager $moduleManager
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
@@ -73,8 +73,8 @@ class Register extends \Magento\Directory\Block\Data
         \Magento\Core\Helper\Data $coreData,
         \Magento\Json\EncoderInterface $jsonEncoder,
         \Magento\App\Cache\Type\Config $configCacheType,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
         \Magento\Module\Manager $moduleManager,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Customer\Model\AddressFactory $addressFactory,
@@ -90,10 +90,11 @@ class Register extends \Magento\Directory\Block\Data
             $coreData,
             $jsonEncoder,
             $configCacheType,
-            $regionCollFactory,
-            $countryCollFactory,
+            $regionCollectionFactory,
+            $countryCollectionFactory,
             $data
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Newsletter.php b/app/code/Magento/Customer/Block/Newsletter.php
index fe5dbc2e311501dd14ac0106fd2b40edfacd8670..c24826046d5e1ed10bb39fdfe5a27f8536af4d6b 100644
--- a/app/code/Magento/Customer/Block/Newsletter.php
+++ b/app/code/Magento/Customer/Block/Newsletter.php
@@ -36,9 +36,24 @@ namespace Magento\Customer\Block;
 
 class Newsletter extends \Magento\Customer\Block\Account\Dashboard
 {
-
     protected $_template = 'form/newsletter.phtml';
 
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Customer\Model\Session $customerSession
+     * @param \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Customer\Model\Session $customerSession,
+        \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory,
+        array $data = array()
+    ) {
+        parent::__construct($context, $customerSession, $subscriberFactory, $data);
+        $this->_isScopePrivate = true;
+    }
+
     public function getIsSubscribed()
     {
         return $this->getSubscriptionObject()->isSubscribed();
diff --git a/app/code/Magento/Customer/Block/Widget/AbstractWidget.php b/app/code/Magento/Customer/Block/Widget/AbstractWidget.php
index b64c335764e83be81424b29aa8e59c6afe6a73ae..7999b1613a08e6f0cfe0aeabb7d65e4a62c6ab67 100644
--- a/app/code/Magento/Customer/Block/Widget/AbstractWidget.php
+++ b/app/code/Magento/Customer/Block/Widget/AbstractWidget.php
@@ -53,6 +53,7 @@ class AbstractWidget extends \Magento\View\Element\Template
         $this->_addressHelper = $addressHelper;
         $this->_eavConfig = $eavConfig;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getConfig($key)
diff --git a/app/code/Magento/Customer/Block/Widget/Dob.php b/app/code/Magento/Customer/Block/Widget/Dob.php
index 28eb29c524a2ef2ff641da5866fbfce5a9b6f5a8..aeeca73bbcb6573a2a13d5908bf0dee260f3e914 100644
--- a/app/code/Magento/Customer/Block/Widget/Dob.php
+++ b/app/code/Magento/Customer/Block/Widget/Dob.php
@@ -41,6 +41,22 @@ class Dob extends \Magento\Customer\Block\Widget\AbstractWidget
      */
     protected $_dateInputs = array();
 
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Eav\Model\Config $eavConfig
+     * @param \Magento\Customer\Helper\Address $addressHelper
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Eav\Model\Config $eavConfig,
+        \Magento\Customer\Helper\Address $addressHelper,
+        array $data = array()
+    ) {
+        parent::__construct($context, $eavConfig, $addressHelper, $data);
+        $this->_isScopePrivate = true;
+    }
+
     public function _construct()
     {
         parent::_construct();
diff --git a/app/code/Magento/Customer/Block/Widget/Gender.php b/app/code/Magento/Customer/Block/Widget/Gender.php
index d753cbde5aa010e98701da504d3c8141a8d11d0c..0ba5a1a62c4dc893905788f8233c193974df2bc5 100644
--- a/app/code/Magento/Customer/Block/Widget/Gender.php
+++ b/app/code/Magento/Customer/Block/Widget/Gender.php
@@ -64,6 +64,7 @@ class Gender extends \Magento\Customer\Block\Widget\AbstractWidget
         $this->_customerSession = $customerSession;
         $this->_customerResource = $customerResource;
         parent::__construct($context, $eavConfig, $addressHelper, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Customer/Block/Widget/Name.php b/app/code/Magento/Customer/Block/Widget/Name.php
index 65f2d3e0b6a377929c10213587ffae173d71e73b..e2c3a00476580ec70ecef50c11e8fc8ca1b0c66f 100644
--- a/app/code/Magento/Customer/Block/Widget/Name.php
+++ b/app/code/Magento/Customer/Block/Widget/Name.php
@@ -49,6 +49,7 @@ class Name extends \Magento\Customer\Block\Widget\AbstractWidget
     ) {
         $this->_customerHelper = $customerHelper;
         parent::__construct($context, $eavConfig, $addressHelper, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function _construct()
diff --git a/app/code/Magento/Customer/Block/Widget/Taxvat.php b/app/code/Magento/Customer/Block/Widget/Taxvat.php
index 9b5ac635a2e5149e02cf32a3ea6484bc3a126827..d02353b86bf59790171e70ecf32d1b4248ec2d38 100644
--- a/app/code/Magento/Customer/Block/Widget/Taxvat.php
+++ b/app/code/Magento/Customer/Block/Widget/Taxvat.php
@@ -49,6 +49,7 @@ class Taxvat extends \Magento\Customer\Block\Widget\AbstractWidget
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct($context, $eavConfig, $addressHelper, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function _construct()
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index.php b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
index 046953d1a9d59f45adaaf1045ea7c9d7cb780350..ef0a546146e8dd0193342d708bc20cf60a62757c 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index.php
@@ -474,7 +474,7 @@ class Index extends \Magento\Backend\App\Action
         $fileName = 'customers.csv';
         $content = $this->_view->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getCsvFile();
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -484,7 +484,7 @@ class Index extends \Magento\Backend\App\Action
     {
         $fileName = 'customers.xml';
         $content = $this->_view->getLayout()->createBlock('Magento\Customer\Block\Adminhtml\Grid')->getExcelFile();
-        return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -851,9 +851,9 @@ class Index extends \Magento\Backend\App\Action
             throw new NotFoundException();
         }
 
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = $this->_objectManager->get('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = $this->_objectManager->get('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
         $fileName = 'customer' . '/' . ltrim($file, '/');
         $path = $directory->getAbsolutePath($fileName);
         if (!$directory->isFile($fileName)
@@ -901,7 +901,7 @@ class Index extends \Magento\Backend\App\Action
                     'type'  => 'filename',
                     'value' => $fileName
                 ),
-                \Magento\Filesystem::MEDIA
+                \Magento\App\Filesystem::MEDIA_DIR
             )->sendResponse();
         }
 
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Source/Group.php b/app/code/Magento/Customer/Model/Customer/Attribute/Source/Group.php
index d4d9204dde955ed3943493f88ad77ee30f801ecd..70c52cd84b25de4af15cabc0fefc407e88f91a05 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Source/Group.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Source/Group.php
@@ -42,18 +42,18 @@ class Group extends \Magento\Eav\Model\Entity\Attribute\Source\Table
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
      * @param \Magento\Customer\Model\Resource\Group\CollectionFactory $groupsFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory,
         \Magento\Customer\Model\Resource\Group\CollectionFactory $groupsFactory
     ) {
         $this->_groupsFactory = $groupsFactory;
-        parent::__construct($coreData, $attrOptCollFactory, $attrOptionFactory);
+        parent::__construct($coreData, $attrOptionCollectionFactory, $attrOptionFactory);
     }
 
     public function getAllOptions()
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Source/Store.php b/app/code/Magento/Customer/Model/Customer/Attribute/Source/Store.php
index 36edde5fb1aae600f4f4d9c7ee74179e6ba434c7..3199a21e8a1b5386a0037e1af31c53e931cfdade 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Source/Store.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Source/Store.php
@@ -47,19 +47,19 @@ class Store extends \Magento\Eav\Model\Entity\Attribute\Source\Table
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
      * @param \Magento\Core\Model\System\Store $store
      * @param \Magento\Core\Model\Resource\Store\CollectionFactory $storesFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory,
         \Magento\Core\Model\System\Store $store,
         \Magento\Core\Model\Resource\Store\CollectionFactory $storesFactory
     ) {
-        parent::__construct($coreData, $attrOptCollFactory, $attrOptionFactory);
+        parent::__construct($coreData, $attrOptionCollectionFactory, $attrOptionFactory);
         $this->_store = $store;
         $this->_storesFactory = $storesFactory;
     }
diff --git a/app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php b/app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php
index b691481550524cfd57dff6cecea44af63f361466..5b9c3598e4d04c56dfc2e53468bf29c429f1aba2 100644
--- a/app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php
+++ b/app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php
@@ -42,17 +42,17 @@ class Website extends \Magento\Eav\Model\Entity\Attribute\Source\Table
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
      * @param \Magento\Core\Model\System\Store $store
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory,
         \Magento\Core\Model\System\Store $store
     ) {
-        parent::__construct($coreData, $attrOptCollFactory, $attrOptionFactory);
+        parent::__construct($coreData, $attrOptionCollectionFactory, $attrOptionFactory);
         $this->_store = $store;
     }
 
diff --git a/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Country.php b/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Country.php
index 3ebaaa6156bb2ecd2bfac71334909b291e69fdbb..6d71547eb7a23bb724511b0183178930a1d180fc 100644
--- a/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Country.php
+++ b/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Country.php
@@ -43,18 +43,18 @@ class Country extends \Magento\Eav\Model\Entity\Attribute\Source\Table
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
      * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countriesFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory,
         \Magento\Directory\Model\Resource\Country\CollectionFactory $countriesFactory
     ) {
         $this->_countriesFactory = $countriesFactory;
-        parent::__construct($coreData, $attrOptCollFactory, $attrOptionFactory);
+        parent::__construct($coreData, $attrOptionCollectionFactory, $attrOptionFactory);
     }
 
     /**
diff --git a/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Region.php b/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Region.php
index 02c052f31ffc358dfb4c265e2593d1d28a78d784..cb19eff24375ccc4f7d21f19dcbc00df754c8e3f 100644
--- a/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Region.php
+++ b/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Region.php
@@ -43,18 +43,18 @@ class Region extends \Magento\Eav\Model\Entity\Attribute\Source\Table
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
      * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionsFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory,
         \Magento\Directory\Model\Resource\Region\CollectionFactory $regionsFactory
     ) {
         $this->_regionsFactory = $regionsFactory;
-        parent::__construct($coreData, $attrOptCollFactory, $attrOptionFactory);
+        parent::__construct($coreData, $attrOptionCollectionFactory, $attrOptionFactory);
     }
 
     /**
diff --git a/app/code/Magento/Customer/Model/Resource/Setup.php b/app/code/Magento/Customer/Model/Resource/Setup.php
index 661a3361f713dbfba3e29efdeb27fd34a6c39b91..26b71e2ee727e3951bb54a1563766c0d035ae3e8 100644
--- a/app/code/Magento/Customer/Model/Resource/Setup.php
+++ b/app/code/Magento/Customer/Model/Resource/Setup.php
@@ -45,7 +45,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param \Magento\Eav\Model\Config $eavConfig
      * @param string $moduleName
      * @param string $connectionName
@@ -54,13 +54,13 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         \Magento\Eav\Model\Config $eavConfig,
         $moduleName = 'Magento_Customer',
         $connectionName = ''
     ) {
         $this->_eavConfig = $eavConfig;
-        parent::__construct($context, $resourceName, $cache, $attrGrCollFactory, $moduleName, $connectionName);
+        parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName);
     }
 
     /**
diff --git a/app/code/Magento/Customer/etc/module.xml b/app/code/Magento/Customer/etc/module.xml
index d59bdfa32638d62caf62277c9d2edbd420f73db8..46d7f44c09aa68bfe475818f910c4cd89b80583a 100755
--- a/app/code/Magento/Customer/etc/module.xml
+++ b/app/code/Magento/Customer/etc/module.xml
@@ -41,6 +41,11 @@
             <module name="Magento_Index"/>
             <module name="Magento_Log"/>
             <module name="Magento_Theme"/>
+            <module name="Magento_Backend"/>
+            <module name="Magento_Review"/>
+            <module name="Magento_Tax"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Service"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Configuration.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Configuration.php
index 2fb637ac90ffc0bad10bc3041e7547d743747fd5..9a466c482a236a998960f98272c776668950a53b 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Configuration.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Configuration.php
@@ -54,7 +54,7 @@ class Configuration
     protected $_design;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -101,7 +101,7 @@ class Configuration
 
     /**
      * @param \Magento\View\DesignInterface $design
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Event\ManagerInterface $eventDispatcher
      * @param \Magento\View\ConfigInterface $viewConfig
      * @param \Magento\DesignEditor\Model\Config\Control\AbstractControl $configuration
@@ -110,7 +110,7 @@ class Configuration
      */
     public function __construct(
         \Magento\View\DesignInterface $design,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Event\ManagerInterface $eventDispatcher,
         \Magento\View\ConfigInterface $viewConfig,
         \Magento\DesignEditor\Model\Config\Control\AbstractControl $configuration = null,
@@ -304,7 +304,7 @@ class Configuration
     protected function _saveViewConfiguration(\DOMDocument $config)
     {
         $targetPath = $this->_theme->getCustomization()->getCustomViewConfigPath();
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $directory->writeFile($directory->getRelativePath($targetPath), $config->saveXML());
         return $this;
     }
diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php
index 6fb3615313a9e77a90c84d9f926efbe9bd07668f..80cec9c726f940afdb4e9cbb52316c24b41ee087 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php
@@ -64,7 +64,7 @@ class Factory
     protected $fileIteratorFactory;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -72,13 +72,13 @@ class Factory
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\View\FileSystem $viewFileSystem
      * @param \Magento\Config\FileIteratorFactory $fileIteratorFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
         \Magento\View\FileSystem $viewFileSystem,
         \Magento\Config\FileIteratorFactory $fileIteratorFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_objectManager = $objectManager;
         $this->_viewFileSystem = $viewFileSystem;
@@ -133,7 +133,7 @@ class Factory
                 throw new \Magento\Exception("Unknown control configuration type: \"{$type}\"");
                 break;
         }
-        $rootDirectory = $this->filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $rootDirectory = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $paths = array();
         foreach ($files as $file) {
             $paths[] = $rootDirectory->getRelativePath($file);
diff --git a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/ImageUploader.php b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/ImageUploader.php
index 74686f76d2d2ecd6391aa2c7c8f8f9e3bd546c0b..01268fb160d7d48d53fb22ee6fff17972205f3ba 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/ImageUploader.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/ImageUploader.php
@@ -44,7 +44,7 @@ class ImageUploader extends \Magento\Object
     protected $_storagePath;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -65,12 +65,12 @@ class ImageUploader extends \Magento\Object
      * Generic constructor of change instance
      *
      * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         array $data = array()
     ) {
         $this->_uploaderFactory = $uploaderFactory;
@@ -154,7 +154,7 @@ class ImageUploader extends \Magento\Object
      */
     public function removeFile($file)
     {
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $path = $directory->getRelativePath($this->getStoragePath() . '/' . $file);
         if ($directory->isExist($path)) {
             $directory->delete($path);
diff --git a/app/code/Magento/Directory/Block/Currency.php b/app/code/Magento/Directory/Block/Currency.php
index b4a0b701fe6cc51a7e1c0d3847ddaae9f9757bc6..e56e81ec8646d80503ede82b667cdb3152300034 100644
--- a/app/code/Magento/Directory/Block/Currency.php
+++ b/app/code/Magento/Directory/Block/Currency.php
@@ -58,6 +58,7 @@ class Currency extends \Magento\View\Element\Template
         $this->_directoryUrl = $directoryUrl;
         $this->_currencyFactory = $currencyFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Directory/Block/Data.php b/app/code/Magento/Directory/Block/Data.php
index 31f07b6f2211f89b8d761957bf545552b2951e64..92cefbf0d9632e846a3c757be57ebe0f3fbe137c 100644
--- a/app/code/Magento/Directory/Block/Data.php
+++ b/app/code/Magento/Directory/Block/Data.php
@@ -39,12 +39,12 @@ class Data extends \Magento\View\Element\Template
     /**
      * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
-    protected $_regionCollFactory;
+    protected $_regionCollectionFactory;
 
     /**
      * @var \Magento\Directory\Model\Resource\Country\CollectionFactory
      */
-    protected $_countryCollFactory;
+    protected $_countryCollectionFactory;
 
     /**
      * @var \Magento\Json\EncoderInterface
@@ -61,8 +61,8 @@ class Data extends \Magento\View\Element\Template
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Json\EncoderInterface $jsonEncoder
      * @param \Magento\App\Cache\Type\Config $configCacheType
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
      * @param array $data
      */
     public function __construct(
@@ -70,16 +70,16 @@ class Data extends \Magento\View\Element\Template
         \Magento\Core\Helper\Data $coreData,
         \Magento\Json\EncoderInterface $jsonEncoder,
         \Magento\App\Cache\Type\Config $configCacheType,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
         array $data = array()
     ) {
         parent::__construct($context, $data);
         $this->_coreData = $coreData;
         $this->_jsonEncoder = $jsonEncoder;
         $this->_configCacheType = $configCacheType;
-        $this->_regionCollFactory = $regionCollFactory;
-        $this->_countryCollFactory = $countryCollFactory;
+        $this->_regionCollectionFactory = $regionCollectionFactory;
+        $this->_countryCollectionFactory = $countryCollectionFactory;
     }
 
     /**
@@ -97,7 +97,7 @@ class Data extends \Magento\View\Element\Template
     {
         $collection = $this->getData('country_collection');
         if (is_null($collection)) {
-            $collection = $this->_countryCollFactory->create()->loadByStore();
+            $collection = $this->_countryCollectionFactory->create()->loadByStore();
             $this->setData('country_collection', $collection);
         }
 
@@ -145,7 +145,7 @@ class Data extends \Magento\View\Element\Template
     {
         $collection = $this->getData('region_collection');
         if (is_null($collection)) {
-            $collection = $this->_regionCollFactory->create()
+            $collection = $this->_regionCollectionFactory->create()
                 ->addCountryFilter($this->getCountryId())
                 ->load();
 
@@ -204,7 +204,7 @@ class Data extends \Magento\View\Element\Template
             foreach ($this->getCountryCollection() as $country) {
                 $countryIds[] = $country->getCountryId();
             }
-            $collection = $this->_regionCollFactory->create()
+            $collection = $this->_regionCollectionFactory->create()
                 ->addCountryFilter($countryIds)
                 ->load();
             $regions = array();
diff --git a/app/code/Magento/Directory/Helper/Data.php b/app/code/Magento/Directory/Helper/Data.php
index 5dc8434aaa80384293615ecda9bc16a82985673a..6ed3b6ffec17a491baeaa6cd9a6236e6adf07ec9 100644
--- a/app/code/Magento/Directory/Helper/Data.php
+++ b/app/code/Magento/Directory/Helper/Data.php
@@ -89,7 +89,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     /**
      * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
-    protected $_regCollFactory;
+    protected $_regCollectionFactory;
 
     /**
      * @var \Magento\Core\Helper\Data
@@ -115,7 +115,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\App\Cache\Type\Config $configCacheType
      * @param \Magento\Directory\Model\Resource\Country\Collection $countryCollection
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regCollFactory,
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regCollectionFactory,
      * @param \Magento\Core\Helper\Data $coreHelper
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
@@ -125,7 +125,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
         \Magento\App\Helper\Context $context,
         \Magento\App\Cache\Type\Config $configCacheType,
         \Magento\Directory\Model\Resource\Country\Collection $countryCollection,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regCollFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regCollectionFactory,
         \Magento\Core\Helper\Data $coreHelper,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
@@ -134,7 +134,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
         parent::__construct($context);
         $this->_configCacheType = $configCacheType;
         $this->_countryCollection = $countryCollection;
-        $this->_regCollFactory = $regCollFactory;
+        $this->_regCollectionFactory = $regCollectionFactory;
         $this->_coreHelper = $coreHelper;
         $this->_storeManager = $storeManager;
         $this->_currencyFactory = $currencyFactory;
@@ -149,7 +149,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     public function getRegionCollection()
     {
         if (!$this->_regionCollection) {
-            $this->_regionCollection = $this->_regCollFactory->create();
+            $this->_regionCollection = $this->_regCollectionFactory->create();
             $this->_regionCollection->addCountryFilter($this->getAddress()->getCountryId())
                 ->load();
         }
@@ -185,7 +185,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
                 foreach ($this->getCountryCollection() as $country) {
                     $countryIds[] = $country->getCountryId();
                 }
-                $collection = $this->_regCollFactory->create();
+                $collection = $this->_regCollectionFactory->create();
                 $collection->addCountryFilter($countryIds)
                     ->load();
                 $regions = array(
diff --git a/app/code/Magento/Directory/Model/Config/Source/Allregion.php b/app/code/Magento/Directory/Model/Config/Source/Allregion.php
index c64b148da885065f000a375cc891a90856239890..651cb23a0b1ecacb14837bdfd64ba834a442c0e7 100644
--- a/app/code/Magento/Directory/Model/Config/Source/Allregion.php
+++ b/app/code/Magento/Directory/Model/Config/Source/Allregion.php
@@ -41,29 +41,29 @@ class Allregion implements \Magento\Core\Model\Option\ArrayInterface
     /**
      * @var \Magento\Directory\Model\Resource\Country\CollectionFactory
      */
-    protected $_countryCollFactory;
+    protected $_countryCollectionFactory;
 
     /**
      * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
-    protected $_regionCollFactory;
+    protected $_regionCollectionFactory;
 
     /**
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      */
     public function __construct(
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
     ) {
-        $this->_countryCollFactory = $countryCollFactory;
-        $this->_regionCollFactory = $regionCollFactory;
+        $this->_countryCollectionFactory = $countryCollectionFactory;
+        $this->_regionCollectionFactory = $regionCollectionFactory;
     }
 
     public function toOptionArray($isMultiselect = false)
     {
         if (!$this->_options) {
-            $countriesArray = $this->_countryCollFactory->create()->load()
+            $countriesArray = $this->_countryCollectionFactory->create()->load()
                 ->toOptionArray(false);
             $this->_countries = array();
             foreach ($countriesArray as $a) {
@@ -71,7 +71,7 @@ class Allregion implements \Magento\Core\Model\Option\ArrayInterface
             }
 
             $countryRegions = array();
-            $regionsCollection = $this->_regionCollFactory->create()->load();
+            $regionsCollection = $this->_regionCollectionFactory->create()->load();
             foreach ($regionsCollection as $region) {
                 $countryRegions[$region->getCountryId()][$region->getId()] = $region->getDefaultName();
             }
diff --git a/app/code/Magento/Directory/Model/Country.php b/app/code/Magento/Directory/Model/Country.php
index aa31328668d8d956d1db73193fdb0c73f950eec8..786ade7a464c9af0a080dd63c744b37250227329 100644
--- a/app/code/Magento/Directory/Model/Country.php
+++ b/app/code/Magento/Directory/Model/Country.php
@@ -58,14 +58,14 @@ class Country extends \Magento\Core\Model\AbstractModel
     /**
      * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
-    protected $_regionCollFactory;
+    protected $_regionCollectionFactory;
 
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\LocaleInterface $locale
      * @param \Magento\Directory\Model\Country\FormatFactory $formatFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -75,7 +75,7 @@ class Country extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Directory\Model\Country\FormatFactory $formatFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -85,7 +85,7 @@ class Country extends \Magento\Core\Model\AbstractModel
         );
         $this->_locale = $locale;
         $this->_formatFactory = $formatFactory;
-        $this->_regionCollFactory = $regionCollFactory;
+        $this->_regionCollectionFactory = $regionCollectionFactory;
     }
 
     protected function _construct()
@@ -126,7 +126,7 @@ class Country extends \Magento\Core\Model\AbstractModel
      */
     public function getRegionCollection()
     {
-        $collection = $this->_regionCollFactory->create();
+        $collection = $this->_regionCollectionFactory->create();
         $collection->addCountryFilter($this->getId());
         return $collection;
     }
diff --git a/app/code/Magento/Directory/etc/module.xml b/app/code/Magento/Directory/etc/module.xml
index 4d55b7882c7a5ea629babee7409ca2c495516921..ff57ec40faba2e277c24b221cf827e08625d4c3d 100755
--- a/app/code/Magento/Directory/etc/module.xml
+++ b/app/code/Magento/Directory/etc/module.xml
@@ -31,6 +31,7 @@
         <depends>
             <module name="Magento_Core"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php
index 9b1dcffb29d78d5c098986349c4f37fe38903ccb..f0613c86c56ec342bac51a795adeeb7fae467fe9 100644
--- a/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php
+++ b/app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable.php
@@ -47,6 +47,13 @@ class Downloadable
 
     protected $_template = 'product/edit/downloadable.phtml';
 
+    /**
+     * Accordion block id
+     *
+     * @var string
+     */
+    protected $accordionBlockId = 'downloadableInfo';
+
     /**
      * Core registry
      *
@@ -136,6 +143,16 @@ class Downloadable
         return \Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs::ADVANCED_TAB_GROUP_CODE;
     }
 
+    /**
+     * Get downloadable tab content id
+     *
+     * @return string
+     */
+    public function getContentTabId()
+    {
+        return 'tab_content_' . $this->accordionBlockId;
+    }
+
     /**
      * Render block HTML
      *
@@ -144,8 +161,7 @@ class Downloadable
     protected function _toHtml()
     {
         $accordion = $this->getLayout()->createBlock('Magento\Backend\Block\Widget\Accordion')
-            ->setId('downloadableInfo');
-
+            ->setId($this->accordionBlockId);
         $accordion->addItem('samples', array(
             'title'   => __('Samples'),
             'content' => $this->getLayout()
diff --git a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php
index 785e57482430bd9e867930fab2c907b514d80eaa..9bef411e39cff49ec3294e3f6fd22cb59ad83fee 100644
--- a/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php
+++ b/app/code/Magento/Downloadable/Block/Catalog/Product/Links.php
@@ -66,6 +66,7 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Core\Helper\Data $coreData
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -84,7 +85,8 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Tax\Model\Calculation $calculationModel,
         \Magento\Json\EncoderInterface $jsonEncoder,
         \Magento\Core\Helper\Data $coreData,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_calculationModel = $calculationModel;
         $this->jsonEncoder = $jsonEncoder;
@@ -101,8 +103,10 @@ class Links extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php
index 9449224f0ab8a02d87d8755f3824aae3c0a319cd..3e4120bf82031eb938ba37249ec2d7f5912b6ab2 100644
--- a/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php
+++ b/app/code/Magento/Downloadable/Block/Customer/Products/ListProducts.php
@@ -68,6 +68,7 @@ class ListProducts extends \Magento\View\Element\Template
         $this->_linksFactory = $linksFactory;
         $this->_itemsFactory = $itemsFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/DataService/Config/Reader/Factory.php b/app/code/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Downloadable.php
similarity index 57%
rename from app/code/Magento/Core/Model/DataService/Config/Reader/Factory.php
rename to app/code/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Downloadable.php
index eceb286d3375efe37018e17039f906ce95d1e009..e20bcb4699b14402ea1a4cbe29b6cb75894c2c3a 100644
--- a/app/code/Magento/Core/Model/DataService/Config/Reader/Factory.php
+++ b/app/code/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin/Downloadable.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Factory for \Magento\Core\Model\DataService\Config\Reader
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,32 +21,35 @@
  * @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\DataService\Config\Reader;
 
-class Factory
+namespace Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
+
+class Downloadable 
 {
     /**
-     * @var \Magento\ObjectManager
+     * @var \Magento\App\RequestInterface
      */
-    protected $_objectManager;
+    protected $request;
 
     /**
-     * @param \Magento\ObjectManager $objectManager
+     * @param \Magento\App\RequestInterface $request
      */
-    public function __construct(\Magento\ObjectManager $objectManager)
+    public function __construct(\Magento\App\RequestInterface $request)
     {
-        $this->_objectManager = $objectManager;
+        $this->request = $request;
     }
 
     /**
-     * Create new \Magento\Core\Model\DataService\Config\Reader by array of configuration files
+     * Prepare product to save
      *
-     * @param array $configFiles
-     * @return \Magento\Core\Model\DataService\Config\Reader
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
      */
-    public function createReader($configFiles)
+    public function afterInitialize(\Magento\Catalog\Model\Product $product)
     {
-        return $this->_objectManager->create('Magento\Core\Model\DataService\Config\Reader',
-            array('configFiles'  => $configFiles));
+        if ($downloadable = $this->request->getPost('downloadable')) {
+            $product->setDownloadableData($downloadable);
+        }
+        return $product;
     }
-}
+} 
diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php
index b3df50a3d07781c6321d49ee3bb165ba0540c32b..05c58c71b37aeb41f6182e19430c3db398e311d7 100644
--- a/app/code/Magento/Downloadable/Helper/Download.php
+++ b/app/code/Magento/Downloadable/Helper/Download.php
@@ -24,7 +24,7 @@
 
 namespace Magento\Downloadable\Helper;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\Core\Exception as CoreException;
 
 /**
@@ -123,7 +123,7 @@ class Download extends \Magento\App\Helper\AbstractHelper
     protected $_app;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -139,7 +139,7 @@ class Download extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\Downloadable\Helper\File $downloadableFile
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
@@ -147,7 +147,7 @@ class Download extends \Magento\App\Helper\AbstractHelper
         \Magento\Downloadable\Helper\File $downloadableFile,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_coreData = $coreData;
         $this->_downloadableFile = $downloadableFile;
@@ -175,7 +175,7 @@ class Download extends \Magento\App\Helper\AbstractHelper
             if ($this->_linkType == self::LINK_TYPE_URL) {
                 $this->_handle = $this->_filesystem->getRemoteResource($this->_resourceFile);
             } elseif ($this->_linkType == self::LINK_TYPE_FILE) {
-                $this->_workingDirectory = $this->_filesystem->getDirectoryRead(Filesystem::MEDIA);
+                $this->_workingDirectory = $this->_filesystem->getDirectoryRead(Filesystem::MEDIA_DIR);
                 $fileExists = $this->_downloadableFile->ensureFileInFilesystem($this->_resourceFile);
                 if ($fileExists) {
                     $this->_handle = $this->_workingDirectory->openFile($this->_resourceFile);
diff --git a/app/code/Magento/Downloadable/Helper/File.php b/app/code/Magento/Downloadable/Helper/File.php
index 9b5e240bad5ebbeddb8ca715c7e0859347078979..d6d00b4947de6eadd41b7b26d3fa5cf36c5acdde 100644
--- a/app/code/Magento/Downloadable/Helper/File.php
+++ b/app/code/Magento/Downloadable/Helper/File.php
@@ -45,7 +45,7 @@ class File extends \Magento\App\Helper\AbstractHelper
     /**
      * Filesystem object.
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -60,18 +60,18 @@ class File extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $mimeTypes
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         array $mimeTypes = array()
     ) {
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         $this->_filesystem = $filesystem;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite($filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite($filesystem::MEDIA_DIR);
         parent::__construct($context);
         if (!empty($mimeTypes)) {
             foreach ($mimeTypes as $key => $value) {
diff --git a/app/code/Magento/Downloadable/Model/Observer.php b/app/code/Magento/Downloadable/Model/Observer.php
index 2bd10908e7e6988b3cdb6337a9e900c1d99a31f0..9be8023eda3cdbcbdeda0ec5c24066e1dc32b5ab 100644
--- a/app/code/Magento/Downloadable/Model/Observer.php
+++ b/app/code/Magento/Downloadable/Model/Observer.php
@@ -399,73 +399,6 @@ class Observer
         return $this;
     }
 
-    /**
-     * Duplicating downloadable product data
-     *
-     * @param \Magento\Event\Observer $observer
-     * @return \Magento\Downloadable\Model\Observer
-     */
-    public function duplicateProduct($observer)
-    {
-        $currentProduct = $observer->getCurrentProduct();
-        $newProduct = $observer->getNewProduct();
-        if ($currentProduct->getTypeId() !== \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE) {
-            //do nothing if not downloadable
-            return $this;
-        }
-        $downloadableData = array();
-        $type = $currentProduct->getTypeInstance();
-        foreach ($type->getLinks($currentProduct) as $link) {
-            $linkData = $link->getData();
-            $downloadableData['link'][] = array(
-                'is_delete'           => false,
-                'link_id'             => null,
-                'title'               => $linkData['title'],
-                'is_shareable'        => $linkData['is_shareable'],
-                'sample'              => array(
-                    'type'       => $linkData['sample_type'],
-                    'url'        => $linkData['sample_url'],
-                    'file'       => $this->_helper->jsonEncode(array(array(
-                        'file'   => $linkData['sample_file'],
-                        'name'   => $linkData['sample_file'],
-                        'size'   => 0,
-                        'status' => null,
-                    )))
-                ),
-                'file'       => $this->_helper->jsonEncode(array(array(
-                    'file'   => $linkData['link_file'],
-                    'name'   => $linkData['link_file'],
-                    'size'   => 0,
-                    'status' => null,
-                ))),
-                'type'                => $linkData['link_type'],
-                'link_url'            => $linkData['link_url'],
-                'sort_order'          => $linkData['sort_order'],
-                'number_of_downloads' => $linkData['number_of_downloads'],
-                'price'               => $linkData['price'],
-            );
-        }
-        foreach ($type->getSamples($currentProduct) as $sample) {
-            $sampleData = $sample->getData();
-            $downloadableData['sample'][] = array(
-                'is_delete'  => false,
-                'sample_id'  => null,
-                'title'      => $sampleData['title'],
-                'type'       => $sampleData['sample_type'],
-                'file'       => $this->_helper->jsonEncode(array(array(
-                    'file'   => $sampleData['sample_file'],
-                    'name'   => $sampleData['sample_file'],
-                    'size'   => 0,
-                    'status' => null,
-                ))),
-                'sample_url' => $sampleData['sample_url'],
-                'sort_order' => $sampleData['sort_order'],
-            );
-        }
-        $newProduct->setDownloadableData($downloadableData);
-        return $this;
-    }
-
     /**
      * @return \Magento\Downloadable\Model\Link\Purchased
      */
diff --git a/app/code/Magento/Downloadable/Model/Product/CopyConstructor/Downloadable.php b/app/code/Magento/Downloadable/Model/Product/CopyConstructor/Downloadable.php
new file mode 100644
index 0000000000000000000000000000000000000000..36f5782507ad1e27641e799d18c03243c87f099d
--- /dev/null
+++ b/app/code/Magento/Downloadable/Model/Product/CopyConstructor/Downloadable.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\Downloadable\Model\Product\CopyConstructor;
+
+class Downloadable implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * @var \Magento\Core\Helper\Data
+     */
+    protected $encoder;
+
+    /**
+     * @param \Magento\Core\Helper\Data $encoder
+     */
+    public function __construct(\Magento\Core\Helper\Data $encoder)
+    {
+        $this->encoder = $encoder;
+    }
+
+    /**
+     * Duplicating downloadable product data
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        if ($product->getTypeId() !== \Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE) {
+            //do nothing if not downloadable
+            return;
+        }
+        $data = array();
+        /** @var \Magento\Downloadable\Model\Product\Type $type */
+        $type = $product->getTypeInstance();
+        foreach ($type->getLinks($product) as $link) {
+            /* @var \Magento\Downloadable\Model\Link $link */
+            $linkData = $link->getData();
+            $data['link'][] = array(
+                'is_delete'           => false,
+                'link_id'             => null,
+                'title'               => $linkData['title'],
+                'is_shareable'        => $linkData['is_shareable'],
+                'sample'              => array(
+                    'type'       => $linkData['sample_type'],
+                    'url'        => $linkData['sample_url'],
+                    'file'       => $this->encoder->jsonEncode(array(array(
+                            'file'   => $linkData['sample_file'],
+                            'name'   => $linkData['sample_file'],
+                            'size'   => 0,
+                            'status' => null,
+                        )))
+                ),
+                'file'       => $this->encoder->jsonEncode(array(array(
+                        'file'   => $linkData['link_file'],
+                        'name'   => $linkData['link_file'],
+                        'size'   => 0,
+                        'status' => null,
+                    ))),
+                'type'                => $linkData['link_type'],
+                'link_url'            => $linkData['link_url'],
+                'sort_order'          => $linkData['sort_order'],
+                'number_of_downloads' => $linkData['number_of_downloads'],
+                'price'               => $linkData['price'],
+            );
+        }
+
+        /** @var \Magento\Downloadable\Model\Sample $sample */
+        foreach ($type->getSamples($product) as $sample) {
+            $sampleData = $sample->getData();
+            $data['sample'][] = array(
+                'is_delete'  => false,
+                'sample_id'  => null,
+                'title'      => $sampleData['title'],
+                'type'       => $sampleData['sample_type'],
+                'file'       => $this->encoder->jsonEncode(array(array(
+                        'file'   => $sampleData['sample_file'],
+                        'name'   => $sampleData['sample_file'],
+                        'size'   => 0,
+                        'status' => null,
+                    ))),
+                'sample_url' => $sampleData['sample_url'],
+                'sort_order' => $sampleData['sort_order'],
+            );
+        }
+        $duplicate->setDownloadableData($data);
+    }
+}
diff --git a/app/code/Magento/Downloadable/Model/Product/Type.php b/app/code/Magento/Downloadable/Model/Product/Type.php
index be86336d5ca758b9233010e19540d344b28f3943..72906e14cb090be9febe308e1f8358ab37b29539 100644
--- a/app/code/Magento/Downloadable/Model/Product/Type.php
+++ b/app/code/Magento/Downloadable/Model/Product/Type.php
@@ -85,7 +85,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
      * @param \Magento\Downloadable\Helper\File $downloadableFile
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Logger $logger
      * @param \Magento\Downloadable\Model\Resource\SampleFactory $sampleResFactory
@@ -104,7 +104,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Logger $logger,
         \Magento\Downloadable\Helper\File $downloadableFile,
diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php
index 52f5ec3ce7c4806336b9798f34dcfa845dcdc09d..026763a80bce5cdf239ecca6a02d48e99c004563 100644
--- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php
+++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/AbstractItems.php
@@ -59,7 +59,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
      * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory
@@ -71,7 +71,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
         \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory,
diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php
index 539be499cf2cffa09e8c714ec21c0b4ee04083d5..9247d08ef732436a283f7f9e9911e6daea86d9e0 100644
--- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php
+++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Creditmemo.php
@@ -41,7 +41,7 @@ class Creditmemo
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
      * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory
@@ -54,7 +54,7 @@ class Creditmemo
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
         \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory,
diff --git a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php
index 7750ee749f6e756c548b2ae3e088937ff36e823f..0b515c173fa991117f8a364e129476901194b18b 100644
--- a/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php
+++ b/app/code/Magento/Downloadable/Model/Sales/Order/Pdf/Items/Invoice.php
@@ -46,7 +46,7 @@ class Invoice
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
      * @param \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory
@@ -59,7 +59,7 @@ class Invoice
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
         \Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory $itemsFactory,
diff --git a/app/code/Magento/PageCache/etc/frontend/di.xml b/app/code/Magento/Downloadable/etc/adminhtml/di.xml
similarity index 68%
rename from app/code/Magento/PageCache/etc/frontend/di.xml
rename to app/code/Magento/Downloadable/etc/adminhtml/di.xml
index bd7d73e6bdb30d2758a8f530b59b7ad448c9f3b7..8e4ced5f6abcf486b05ba958464f1750c04757ed 100644
--- a/app/code/Magento/PageCache/etc/frontend/di.xml
+++ b/app/code/Magento/Downloadable/etc/adminhtml/di.xml
@@ -24,19 +24,14 @@
  */
 -->
 <config>
-    <type name="Magento\PageCache\Model\Observer">
-        <param name="allowedCache">
+    <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper">
+        <plugin name="Downloadable" type="Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Downloadable" sortOrder="70" />
+    </type>
+    <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
+        <param name="constructors">
             <value>
-                <cms>true</cms>
-                <catalog>
-                    <category>
-                        <view>true</view>
-                    </category>
-                    <product>
-                        <view>true</view>
-                    </product>
-                </catalog>
+                <downloadable>Magento\Downloadable\Model\Product\CopyConstructor\Downloadable</downloadable>
             </value>
         </param>
     </type>
-</config>
\ No newline at end of file
+</config>
diff --git a/app/code/Magento/Downloadable/etc/adminhtml/events.xml b/app/code/Magento/Downloadable/etc/adminhtml/events.xml
index b2e3fe4ca1a27b5545503058a938615bc2dcdb5c..6c175d47eca9d833bbf1680c778eb53055863253 100644
--- a/app/code/Magento/Downloadable/etc/adminhtml/events.xml
+++ b/app/code/Magento/Downloadable/etc/adminhtml/events.xml
@@ -24,12 +24,6 @@
  */
 -->
 <config>
-    <event name="catalog_product_prepare_save">
-        <observer name="downloadable_observer" instance="Magento\Downloadable\Model\Observer" method="prepareProductSave" />
-    </event>
-    <event name="catalog_model_product_duplicate">
-        <observer name="downloadable_observer" instance="Magento\Downloadable\Model\Observer" method="duplicateProduct" />
-    </event>
     <event name="sales_order_item_save_commit_after">
         <observer name="downloadable_observer" instance="Magento\Downloadable\Model\Observer" method="saveDownloadableOrderItem" />
     </event>
diff --git a/app/code/Magento/Downloadable/etc/module.xml b/app/code/Magento/Downloadable/etc/module.xml
index 1de608ef7d90c1ca72ca122a3eeea2156a828891..617c9b1f864f8d97186975d58fd0e63b4860cd93 100755
--- a/app/code/Magento/Downloadable/etc/module.xml
+++ b/app/code/Magento/Downloadable/etc/module.xml
@@ -27,6 +27,7 @@
     <module name="Magento_Downloadable" version="1.6.0.0.3" active="true">
         <sequence>
             <module name="Magento_Catalog"/>
+            <module name="Magento_GroupedProduct" />
         </sequence>
         <depends>
             <module name="Magento_Catalog"/>
diff --git a/app/code/Magento/Downloadable/sql/downloadable_setup/mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/Magento/Downloadable/sql/downloadable_setup/mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php
index 1f4c80b8bf663dde297dabf44dbcc4cdacf04173..b840edd97d64520340417cd92827e681bf1e745e 100644
--- a/app/code/Magento/Downloadable/sql/downloadable_setup/mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php
+++ b/app/code/Magento/Downloadable/sql/downloadable_setup/mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php
@@ -29,7 +29,7 @@
 $installFile = __DIR__ . '/upgrade-1.6.0.0.1-1.6.0.0.2.php';
 
 /** @var \Magento\Filesystem\Directory\Read $moduleDirectory */
-$moduleDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\Filesystem::MODULES);
+$moduleDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
 if ($moduleDirectory->isExist($moduleDirectory->getRelativePath($installFile))) {
     include $installFile;
 }
diff --git a/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable.phtml
index 9914fc5d923c932a43d2b610972e84f0c83b5b69..7609651e5f048bf6e416fd84277899aae01e7037 100644
--- a/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable.phtml
+++ b/app/code/Magento/Downloadable/view/adminhtml/product/edit/downloadable.phtml
@@ -222,7 +222,7 @@ jQuery.mage.extend('validation', 'validation',
 </div>
 <?php if ($this->isReadonly()): ?>
 <script type="text/javascript">
-$('downloadableInfo').select('input', 'select', 'textarea', 'button').each(function (item){
+$(<?= $this->getContentTabId(); ?>).select('input', 'select', 'textarea', 'button').each(function (item){
     item.disabled = true;
     if (item.tagName.toLowerCase() == 'button') {
         item.addClassName('disabled');
diff --git a/app/code/Magento/Downloadable/view/frontend/checkout/cart/item/default.phtml b/app/code/Magento/Downloadable/view/frontend/checkout/cart/item/default.phtml
index 4262743082aa452fd5d9aa8fa3801f7f40402fbb..ce8deef606a3534a8102bfb1e26120fb5ab3bcd0 100644
--- a/app/code/Magento/Downloadable/view/frontend/checkout/cart/item/default.phtml
+++ b/app/code/Magento/Downloadable/view/frontend/checkout/cart/item/default.phtml
@@ -292,7 +292,7 @@ $canApplyMsrp = $this->helper('Magento\Catalog\Helper\Data')->canApplyMsrp($_ite
             <div class="actions">
                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllowInCart()) : ?>
                     <?php if ($isVisibleProduct): ?>
-                        <a href="<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartUrl($_item->getId()); ?>" class="use-ajax action towishlist">
+                        <a href="#" data-post='<?php echo $this->helper('Magento\Wishlist\Helper\Data')->getMoveFromCartParams($_item->getId()); ?>' class="use-ajax action towishlist">
                             <span><?php echo __('Move to Wishlist'); ?></span>
                         </a>
                     <?php endif ?>
diff --git a/app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_addresses.xml b/app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_addresses.xml
similarity index 100%
rename from app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_addresses.xml
rename to app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_addresses.xml
diff --git a/app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_overview.xml b/app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_overview.xml
similarity index 100%
rename from app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_overview.xml
rename to app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_overview.xml
diff --git a/app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_shipping.xml b/app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_shipping.xml
similarity index 100%
rename from app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_shipping.xml
rename to app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_shipping.xml
diff --git a/app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_success.xml b/app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_success.xml
similarity index 100%
rename from app/code/Magento/Downloadable/view/frontend/layout/checkout_multishipping_success.xml
rename to app/code/Magento/Downloadable/view/frontend/layout/multishipping_checkout_success.xml
diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php
index 076e822bb53e42f1266c42e3b18c5667effe02fb..460faf3c31b025c308df84cb03bee1751646f18e 100644
--- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php
+++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Options/Options.php
@@ -39,7 +39,7 @@ class Options extends \Magento\Backend\Block\Template
     protected $_registry;
 
     /** @var \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory */
-    protected $_attrOptCollFactory;
+    protected $_attrOptionCollectionFactory;
 
     /**
      * @inheritdoc
@@ -54,20 +54,20 @@ class Options extends \Magento\Backend\Block\Template
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Validator\UniversalFactory $universalFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Validator\UniversalFactory $universalFactory,
         array $data = array()
     ) {
         parent::__construct($context, $data);
         $this->_registry = $registry;
-        $this->_attrOptCollFactory = $attrOptCollFactory;
+        $this->_attrOptionCollectionFactory = $attrOptionCollectionFactory;
         $this->_universalFactory = $universalFactory;
     }
 
@@ -165,7 +165,7 @@ class Options extends \Magento\Backend\Block\Template
                 ->getAllOptions();
             return $options;
         } else {
-            return $this->_attrOptCollFactory->create()
+            return $this->_attrOptionCollectionFactory->create()
                 ->setAttributeFilter($attribute->getId())
                 ->setPositionOrder('asc', true)
                 ->load();
@@ -248,7 +248,7 @@ class Options extends \Magento\Backend\Block\Template
         $values = $this->getData('store_option_values_'.$storeId);
         if (is_null($values)) {
             $values = array();
-            $valuesCollection = $this->_attrOptCollFactory->create()
+            $valuesCollection = $this->_attrOptionCollectionFactory->create()
                 ->setAttributeFilter($this->getAttributeObject()->getId())
                 ->setStoreFilter($storeId, false)
                 ->load();
diff --git a/app/code/Magento/Eav/Model/Attribute/Data/File.php b/app/code/Magento/Eav/Model/Attribute/Data/File.php
index 79d9b04d817656cec7f53c597c4fdc6f0a035c4a..a4744e929ee0b063c0bb48fd0e50e3fc81b93556 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/File.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php
@@ -64,19 +64,19 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
      * @param \Magento\Logger $logger
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Model\LocaleInterface $locale,
         \Magento\Logger $logger,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         parent::__construct($locale, $logger);
         $this->_coreData = $coreData;
         $this->_fileValidator = $fileValidator;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php
index fb99670e70b33d85030e147985f6e60385d328bd..dd3751e8777e25df203eeb817cf89e996f3e7eab 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Store.php
@@ -38,22 +38,22 @@ class Store extends \Magento\Eav\Model\Entity\Attribute\Source\Table
     /**
      * @var \Magento\Core\Model\Resource\Store\CollectionFactory
      */
-    protected $_storeCollFactory;
+    protected $_storeCollectionFactory;
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
-     * @param \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollFactory
+     * @param \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollectionFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory,
-        \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollFactory
+        \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollectionFactory
     ) {
-        parent::__construct($coreData, $attrOptCollFactory, $attrOptionFactory);
-        $this->_storeCollFactory = $storeCollFactory;
+        parent::__construct($coreData, $attrOptionCollectionFactory, $attrOptionFactory);
+        $this->_storeCollectionFactory = $storeCollectionFactory;
     }
 
     /**
@@ -64,7 +64,7 @@ class Store extends \Magento\Eav\Model\Entity\Attribute\Source\Table
     public function getAllOptions()
     {
         if ($this->_options === null) {
-            $this->_options = $this->_storeCollFactory->create()
+            $this->_options = $this->_storeCollectionFactory->create()
                 ->load()
                 ->toOptionArray();
         }
diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php
index bd36815ec3fa0d31e85ac381f53efec12ac24445..c829baf787a4f4e2b3d48cd42d8d617d16c12383 100644
--- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php
+++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php
@@ -46,7 +46,7 @@ class Table extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
     /**
      * @var \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory
      */
-    protected $_attrOptCollFactory;
+    protected $_attrOptionCollectionFactory;
 
     /**
      * @var \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory
@@ -55,16 +55,16 @@ class Table extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
 
     /**
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory
      * @param \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
      */
     public function __construct(
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Option\CollectionFactory $attrOptionCollectionFactory,
         \Magento\Eav\Model\Resource\Entity\Attribute\OptionFactory $attrOptionFactory
     ) {
         $this->_coreData = $coreData;
-        $this->_attrOptCollFactory = $attrOptCollFactory;
+        $this->_attrOptionCollectionFactory = $attrOptionCollectionFactory;
         $this->_attrOptionFactory = $attrOptionFactory;
     }
 
@@ -85,7 +85,7 @@ class Table extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
             $this->_optionsDefault = array();
         }
         if (!isset($this->_options[$storeId])) {
-            $collection = $this->_attrOptCollFactory->create()
+            $collection = $this->_attrOptionCollectionFactory->create()
                 ->setPositionOrder('asc')
                 ->setAttributeFilter($this->getAttribute()->getId())
                 ->setStoreFilter($this->getAttribute()->getStoreId())
diff --git a/app/code/Magento/Eav/Model/Entity/Setup.php b/app/code/Magento/Eav/Model/Entity/Setup.php
index dbde73d66f4f48798bf4a59d715ec4c8cb8b8709..be3acbc6c250915bbe272a56f58932b1a108a07b 100644
--- a/app/code/Magento/Eav/Model/Entity/Setup.php
+++ b/app/code/Magento/Eav/Model/Entity/Setup.php
@@ -44,13 +44,13 @@ class Setup extends \Magento\Core\Model\Resource\Setup
     /**
      * @var \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory
      */
-    protected $_attrGrCollFactory;
+    protected $_attrGroupCollectionFactory;
 
     /**
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param string $moduleName
      * @param string $connectionName
      */
@@ -58,13 +58,13 @@ class Setup extends \Magento\Core\Model\Resource\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         $moduleName = 'Magento_Eav',
         $connectionName = ''
     ) {
 
         $this->_cache = $cache;
-        $this->_attrGrCollFactory = $attrGrCollFactory;
+        $this->_attrGroupCollectionFactory = $attrGroupCollectionFactory;
         parent::__construct($context, $resourceName, $moduleName, $connectionName);
     }
 
@@ -114,7 +114,7 @@ class Setup extends \Magento\Core\Model\Resource\Setup
      */
     public function getAttributeGroupCollectionFactory()
     {
-        return $this->_attrGrCollFactory->create();
+        return $this->_attrGroupCollectionFactory->create();
     }
 
     /**
diff --git a/app/code/Magento/Email/Model/BackendTemplate.php b/app/code/Magento/Email/Model/BackendTemplate.php
index 1165d9c2cbc838450f3f6d496e0236dd0ffc347a..e5bb5f40689f9cfde37d216053f1a9168d7607a7 100644
--- a/app/code/Magento/Email/Model/BackendTemplate.php
+++ b/app/code/Magento/Email/Model/BackendTemplate.php
@@ -47,7 +47,7 @@ class BackendTemplate extends Template
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\App\Emulation $appEmulation
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Url $viewUrl
      * @param \Magento\View\FileSystem $viewFileSystem
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
@@ -65,7 +65,7 @@ class BackendTemplate extends Template
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\App\Emulation $appEmulation,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Url $viewUrl,
         \Magento\View\FileSystem $viewFileSystem,
         \Magento\Core\Model\Store\Config $coreStoreConfig,
diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php
index e5c9a9a81db0453a7aabca32ef99cf1b324347a7..21138b2d6e48f687b94572c2c818d218ae8a9d32 100644
--- a/app/code/Magento/Email/Model/Template.php
+++ b/app/code/Magento/Email/Model/Template.php
@@ -94,7 +94,7 @@ class Template extends \Magento\Core\Model\Template
     protected $_sendingException = null;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -141,7 +141,7 @@ class Template extends \Magento\Core\Model\Template
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Core\Model\App\Emulation $appEmulation
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Url $viewUrl
      * @param \Magento\View\FileSystem $viewFileSystem
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
@@ -158,7 +158,7 @@ class Template extends \Magento\Core\Model\Template
         \Magento\Core\Model\Registry $registry,
         \Magento\Core\Model\App\Emulation $appEmulation,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Url $viewUrl,
         \Magento\View\FileSystem $viewFileSystem,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
@@ -198,7 +198,7 @@ class Template extends \Magento\Core\Model\Template
         $fileName = $store->getConfig(self::XML_PATH_DESIGN_EMAIL_LOGO);
         if ($fileName) {
             $uploadDir = \Magento\Backend\Model\Config\Backend\Email\Logo::UPLOAD_DIR;
-            $mediaDirectory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
+            $mediaDirectory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
             if ($mediaDirectory->isFile($uploadDir . '/' . $fileName)) {
                 return $this->_storeManager->getStore()->getBaseUrl('media') . $uploadDir . '/' . $fileName;
             }
@@ -284,7 +284,7 @@ class Template extends \Magento\Core\Model\Template
         $templateTypeCode = $templateType == 'html' ? self::TYPE_HTML : self::TYPE_TEXT;
         $this->setTemplateType($templateTypeCode);
 
-        $modulesDirectory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $modulesDirectory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $templateText = $modulesDirectory->readFile($modulesDirectory->getRelativePath($templateFile));
 
         if (preg_match('/<!--@subject\s*(.*?)\s*@-->/u', $templateText, $matches)) {
diff --git a/app/code/Magento/Email/Model/Template/Config/FileResolver.php b/app/code/Magento/Email/Model/Template/Config/FileResolver.php
index ff2dd57f152dd12cba2aff7dbe4ba0d781e6de2d..e62fa17c37379ef35dfc8f908674a2123286aeb5 100644
--- a/app/code/Magento/Email/Model/Template/Config/FileResolver.php
+++ b/app/code/Magento/Email/Model/Template/Config/FileResolver.php
@@ -38,14 +38,14 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     protected $iteratorFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Email\Model\Template\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Email\Model\Template\Config\FileIteratorFactory $iteratorFactory
     ) {
-        $this->directoryRead = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $this->directoryRead = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $this->iteratorFactory = $iteratorFactory;
     }
 
diff --git a/app/code/Magento/Email/etc/module.xml b/app/code/Magento/Email/etc/module.xml
index 56b37bfd6b2c2839232597b28584e47a9cabe2a9..eea112e8314e18223c085eb5ff006609cc82d156 100644
--- a/app/code/Magento/Email/etc/module.xml
+++ b/app/code/Magento/Email/etc/module.xml
@@ -32,6 +32,8 @@
         <depends>
             <module name="Magento_Core"/>
             <module name="Magento_Cms" />
+            <module name="Magento_Backend" />
+            <module name="Magento_Theme" />
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/GiftMessage/Block/Message/Inline.php b/app/code/Magento/GiftMessage/Block/Message/Inline.php
index 9451ed4601c63f1075e3f8defc4b13f348485c95..44c995644041ce9f9ac4e9b55c2171b3f103248d 100644
--- a/app/code/Magento/GiftMessage/Block/Message/Inline.php
+++ b/app/code/Magento/GiftMessage/Block/Message/Inline.php
@@ -77,6 +77,7 @@ class Inline extends \Magento\View\Element\Template
         $this->_giftMessageMessage = $giftMessageMessage;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php b/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php
new file mode 100644
index 0000000000000000000000000000000000000000..05163ed7cedfb7de8f5067282f7d7d09cd4b20d3
--- /dev/null
+++ b/app/code/Magento/GiftMessage/Block/Message/Multishipping/Plugin/ItemsBox.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\GiftMessage\Block\Message\Multishipping\Plugin;
+
+use Magento\Code\Plugin\InvocationChain;
+
+/**
+ * Multishipping items box plugin
+ */
+class ItemsBox
+{
+    /**
+     * Gift message helper
+     *
+     * @var \Magento\GiftMessage\Helper\Message
+     */
+    protected $helper;
+
+    /**
+     * Construct
+     *
+     * @param \Magento\GiftMessage\Helper\Message $helper
+     */
+    public function __construct(\Magento\GiftMessage\Helper\Message $helper)
+    {
+        $this->helper = $helper;
+    }
+
+    /**
+     * Get items box message text for multishipping
+     *
+     * @param array $arguments
+     * @param InvocationChain $invocationChain
+     * @return string
+     */
+    public function aroundGetItemsBoxTextAfter(array $arguments, InvocationChain $invocationChain)
+    {
+        $itemsBoxText = $invocationChain->proceed($arguments);
+        return $itemsBoxText . $this->helper->getInline('multishipping_address', $arguments[0]);
+    }
+}
diff --git a/app/code/Magento/GiftMessage/Helper/Message.php b/app/code/Magento/GiftMessage/Helper/Message.php
index 54ff60f04e252c95d79f419f4703a8c7433f5db5..18a1cbc38f71188fa67612a07a806d3860910295 100644
--- a/app/code/Magento/GiftMessage/Helper/Message.php
+++ b/app/code/Magento/GiftMessage/Helper/Message.php
@@ -120,9 +120,7 @@ class Message extends \Magento\Core\Helper\Data
      */
     public function getInline($type, \Magento\Object $entity, $dontDisplayContainer = false)
     {
-        if (!in_array($type, array('onepage_checkout', 'multishipping_address'))
-            && !$this->isMessagesAvailable($type, $entity)
-        ) {
+        if (!$this->isMessagesAvailable($type, $entity)) {
             return '';
         }
         return $this->_layoutFactory->create()->createBlock('Magento\GiftMessage\Block\Message\Inline')
diff --git a/app/code/Magento/GiftMessage/Model/Resource/Setup.php b/app/code/Magento/GiftMessage/Model/Resource/Setup.php
index 7d2de59769cda378cf7cea34de6f34fd128a8b91..7257cdae6937ebb8cfb6de18a5b8b3c1d633ff3d 100644
--- a/app/code/Magento/GiftMessage/Model/Resource/Setup.php
+++ b/app/code/Magento/GiftMessage/Model/Resource/Setup.php
@@ -40,7 +40,7 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Catalog\Model\Resource\SetupFactory $catalogSetupFactory
      * @param string $moduleName
@@ -50,14 +50,14 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         \Magento\Core\Model\Config $config,
         \Magento\Catalog\Model\Resource\SetupFactory $catalogSetupFactory,
         $moduleName = 'Magento_GiftMessage',
         $connectionName = ''
     ) {
         $this->_catalogSetupFactory = $catalogSetupFactory;
-        parent::__construct($context, $resourceName, $cache, $attrGrCollFactory, $config, $moduleName, $connectionName);
+        parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $config, $moduleName, $connectionName);
     }
 
     /**
diff --git a/app/code/Magento/GiftMessage/etc/frontend/di.xml b/app/code/Magento/GiftMessage/etc/frontend/di.xml
index 2e154abbd84b9e328e16ab8796a4610495319838..c5ccd5d4c4f81c3db2879b30063e5728d490b749 100644
--- a/app/code/Magento/GiftMessage/etc/frontend/di.xml
+++ b/app/code/Magento/GiftMessage/etc/frontend/di.xml
@@ -28,4 +28,7 @@
     <type name="Magento\Sales\Model\Convert\Quote">
         <plugin name="gift_message_quote_item_conversion" type="Magento\GiftMessage\Model\Plugin\QuoteItem"/>
     </type>
+    <type name="Magento\Multishipping\Block\Checkout\Shipping">
+        <plugin name="getItemsBoxTextAfter" type="Magento\GiftMessage\Block\Message\Multishipping\Plugin\ItemsBox"/>
+    </type>
 </config>
diff --git a/app/code/Magento/GiftMessage/view/frontend/inline.phtml b/app/code/Magento/GiftMessage/view/frontend/inline.phtml
index d9deed84ce85ed5053827710186eaa22944a4b4e..a64b5f0a36988aa377285c5e0aaecd29cbc7f5bd 100644
--- a/app/code/Magento/GiftMessage/view/frontend/inline.phtml
+++ b/app/code/Magento/GiftMessage/view/frontend/inline.phtml
@@ -162,8 +162,6 @@
         });
     </script>
 <?php break; ?>
-<?php case 'multishipping_adress_checkbox': ?>
-<?php break; ?>
 
 <?php case 'multishipping_address': ?>
     <fieldset id="add-gift-options-<?php echo $this->getEntity()->getId() ?>" class="fieldset gift message">
diff --git a/app/code/Magento/GoogleAdwords/etc/frontend/events.xml b/app/code/Magento/GoogleAdwords/etc/frontend/events.xml
index 7e6483d63bd3002a9a5e35d022b1028d4e64ea8e..a74209ba25e56603066b72c3da2035d33ecef844 100644
--- a/app/code/Magento/GoogleAdwords/etc/frontend/events.xml
+++ b/app/code/Magento/GoogleAdwords/etc/frontend/events.xml
@@ -27,7 +27,7 @@
     <event name="checkout_onepage_controller_success_action">
         <observer name="googleadwords_order_success" instance="Magento\GoogleAdwords\Model\Observer" method="setConversionValue" />
     </event>
-    <event name="checkout_multishipping_controller_success_action">
+    <event name="multishipping_checkout_controller_success_action">
         <observer name="googleadwords_order_success" instance="Magento\GoogleAdwords\Model\Observer" method="setConversionValue" />
     </event>
 </config>
diff --git a/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml b/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml
index 0f7da9497d735057d673e4107a9b23be78896aec..f8751cd1209507a0e53b5a7ffa3ff84cc02e1afc 100644
--- a/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml
+++ b/app/code/Magento/GoogleAnalytics/etc/frontend/events.xml
@@ -27,7 +27,7 @@
     <event name="checkout_onepage_controller_success_action">
         <observer name="googleanalytics_order_success" instance="Magento\GoogleAnalytics\Model\Observer" method="setGoogleAnalyticsOnOrderSuccessPageView" />
     </event>
-    <event name="checkout_multishipping_controller_success_action">
+    <event name="multishipping_checkout_controller_success_action">
         <observer name="googleanalytics_order_success" instance="Magento\GoogleAnalytics\Model\Observer" method="setGoogleAnalyticsOnOrderSuccessPageView" />
     </event>
     <event name="googlecheckout_block_link_html_before">
diff --git a/app/code/Magento/GoogleCheckout/Block/Link.php b/app/code/Magento/GoogleCheckout/Block/Link.php
index 3829a4e0c4417696f1a0cd657e27e31f563677a7..d86a2f0bf16ece26c5c147c3e706dbb59f386f33 100644
--- a/app/code/Magento/GoogleCheckout/Block/Link.php
+++ b/app/code/Magento/GoogleCheckout/Block/Link.php
@@ -60,6 +60,7 @@ class Link extends \Magento\View\Element\Template
         $this->paymentFactory = $paymentFactory;
         $this->checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     public function getImageStyle()
diff --git a/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php b/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php
index 9589b61b91adb2a206ca5ce26753cb6816f2ee2c..6a290b079ce99c429ee6953bf2ae5e9ec53ddcaa 100644
--- a/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php
+++ b/app/code/Magento/GoogleCheckout/Model/Api/Xml/Callback.php
@@ -58,6 +58,11 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
      */
     protected $_eventManager = null;
 
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
     /**
      * @var \Magento\Stdlib\String
      */
@@ -72,6 +77,7 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
      * @param \Magento\GoogleCheckout\Helper\Data $googleCheckoutData
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Stdlib\String $string
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
      */
     public function __construct(
@@ -83,6 +89,7 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
         \Magento\GoogleCheckout\Helper\Data $googleCheckoutData,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Stdlib\String $string,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
@@ -90,6 +97,7 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
         $this->_googleCheckoutData = $googleCheckoutData;
         $this->_taxData = $taxData;
         $this->string = $string;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct($objectManager, $translator, $coreStoreConfig, $data);
     }
 
@@ -282,7 +290,7 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
                 $address->setCollectShippingRates(true)
                     ->collectShippingRates();
                 foreach ($address->getAllShippingRates() as $rate) {
-                    if ($rate instanceof \Magento\Shipping\Model\Rate\Result\Error) {
+                    if ($rate instanceof \Magento\Sales\Model\Quote\Address\RateResult\Error) {
                         continue;
                     }
                     $methodName = sprintf('%s - %s', $rate->getCarrierTitle(), $rate->getMethodTitle());
@@ -643,13 +651,11 @@ class Callback extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
     {
         $cacheKey = ($storeId === null) ? 'nofilter' : $storeId;
         if (!isset($this->_cachedShippingInfo[$cacheKey])) {
-            /* @var $shipping \Magento\Shipping\Model\Shipping */
-            $shipping = $this->objectManager->create('Magento\Shipping\Model\Shipping');
             $carriers = $this->_coreStoreConfig->getConfig('carriers', $storeId);
             $infos = array();
 
             foreach (array_keys($carriers) as $carrierCode) {
-                $carrier = $shipping->getCarrierByCode($carrierCode);
+                $carrier = $this->_carrierFactory->getIfActive($carrierCode);
                 if (!$carrier) {
                     continue;
                 }
diff --git a/app/code/Magento/GoogleCheckout/Model/Api/Xml/Checkout.php b/app/code/Magento/GoogleCheckout/Model/Api/Xml/Checkout.php
index 75b24778215f2f68772ef2285194e8217aea6dbe..c3fd8c39b3ec763b9c1b919ed0a162b6db69221d 100644
--- a/app/code/Magento/GoogleCheckout/Model/Api/Xml/Checkout.php
+++ b/app/code/Magento/GoogleCheckout/Model/Api/Xml/Checkout.php
@@ -92,6 +92,11 @@ class Checkout extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
      */
     protected $_eventManager = null;
 
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Core\Model\Translate $translator
@@ -101,6 +106,7 @@ class Checkout extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
      * @param \Magento\GoogleCheckout\Helper\Data $googleCheckoutData
      * @param \Magento\Tax\Helper\Data $taxData
      * @param \Magento\Weee\Helper\Data $weeeData
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
      */
     public function __construct(
@@ -112,6 +118,7 @@ class Checkout extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
         \Magento\GoogleCheckout\Helper\Data $googleCheckoutData,
         \Magento\Tax\Helper\Data $taxData,
         \Magento\Weee\Helper\Data $weeeData,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         array $data = array()
     ) {
         $this->_eventManager = $eventManager;
@@ -119,6 +126,7 @@ class Checkout extends \Magento\GoogleCheckout\Model\Api\Xml\AbstractXml
         $this->_googleCheckoutData = $googleCheckoutData;
         $this->_taxData = $taxData;
         $this->_weeeData = $weeeData;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct($objectManager, $translator, $coreStoreConfig, $data);
     }
 
@@ -736,7 +744,6 @@ EOT;
         $xml           = '';
         $methods       = unserialize($methods);
         $taxHelper     = $this->_taxData;
-        $shippingModel = $this->objectManager->create('Magento\Shipping\Model\Shipping');
 
         foreach ($methods['method'] as $i => $method) {
             if (!$i || !$method) {
@@ -744,7 +751,7 @@ EOT;
             }
             list($carrierCode, $methodCode) = explode('/', $method);
             if ($carrierCode) {
-                $carrier = $shippingModel->getCarrierByCode($carrierCode);
+                $carrier = $this->_carrierFactory->getIfActive($carrierCode);
                 if ($carrier) {
                     $allowedMethods = $carrier->getAllowedMethods();
 
diff --git a/app/code/Magento/GoogleCheckout/Model/Shipping.php b/app/code/Magento/GoogleCheckout/Model/Shipping.php
index 76eea4bcba8a94d893e6bdacaf54e03836c8f1a4..481763b06e0dda1b5f55139dd45eea165e5d0bd7 100644
--- a/app/code/Magento/GoogleCheckout/Model/Shipping.php
+++ b/app/code/Magento/GoogleCheckout/Model/Shipping.php
@@ -40,10 +40,10 @@ class Shipping extends \Magento\Shipping\Model\Carrier\AbstractCarrier
     /**
      * Collects rates for user request
      *
-     * @param \Magento\Shipping\Model\Rate\Request $data
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $data
      * @return \Magento\Shipping\Model\Rate\Result
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         // dummy placeholder
         return $this;
diff --git a/app/code/Magento/GoogleShopping/Helper/Price.php b/app/code/Magento/GoogleShopping/Helper/Price.php
index bcb2a42fb2335ee79f498402a77478141af57330..9796713956bcb76ec3cb2d18a4bfc6c6b37dce53 100644
--- a/app/code/Magento/GoogleShopping/Helper/Price.php
+++ b/app/code/Magento/GoogleShopping/Helper/Price.php
@@ -74,7 +74,7 @@ class Price
     public function getCatalogPrice(\Magento\Catalog\Model\Product $product, $store = null, $inclTax = null)
     {
         switch ($product->getTypeId()) {
-            case \Magento\Catalog\Model\Product\Type::TYPE_GROUPED:
+            case \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE:
                 // Workaround to avoid loading stock status by admin's website
                 if ($store instanceof \Magento\Core\Model\Store) {
                     $oldStore = $this->_storeManager->getStore();
@@ -136,7 +136,7 @@ class Price
     public function getCatalogRegularPrice(\Magento\Catalog\Model\Product $product, $store = null)
     {
         switch ($product->getTypeId()) {
-            case \Magento\Catalog\Model\Product\Type::TYPE_GROUPED:
+            case \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE:
             case \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE:
             case 'giftcard':
                 return null;
diff --git a/app/code/Magento/GoogleShopping/Model/Service.php b/app/code/Magento/GoogleShopping/Model/Service.php
index a93e6a5f2cb392b75c4d036a40268a82036925c8..4f9a47d2a89e8be172f53ad4404b619015e4c428 100644
--- a/app/code/Magento/GoogleShopping/Model/Service.php
+++ b/app/code/Magento/GoogleShopping/Model/Service.php
@@ -63,6 +63,18 @@ class Service extends \Magento\Object
      */
     protected $_logAdapterFactory;
 
+    /**
+     * Service
+     * @var \Magento\Gdata\Gshopping\Content
+     */
+    protected $_service;
+
+    /**
+     * Content factory
+     * @var \Magento\Gdata\Gshopping\ContentFactory
+     */
+    protected $_contentFactory;
+
     /**
      * Constructor
      *
@@ -72,17 +84,20 @@ class Service extends \Magento\Object
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\GoogleShopping\Model\Config $config
+     * @param \Magento\Gdata\Gshopping\ContentFactory $contentFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\GoogleShopping\Model\Config $config,
+        \Magento\Gdata\Gshopping\ContentFactory $contentFactory,
         array $data = array()
     ) {
         $this->_logAdapterFactory = $logAdapterFactory;
         $this->_coreRegistry = $coreRegistry;
         $this->_config = $config;
+        $this->_contentFactory = $contentFactory;
         parent::__construct($data);
     }
 
@@ -92,6 +107,7 @@ class Service extends \Magento\Object
      * @param int $storeId
      * @param string $loginToken
      * @param string $loginCaptcha
+     * @throws \Magento\Core\Exception on http connection failure
      * @return \Zend_Http_Client
      */
     public function getClient($storeId = null, $loginToken = null, $loginCaptcha = null)
@@ -188,7 +204,12 @@ class Service extends \Magento\Object
     {
         $accountId = $this->getConfig()->getAccountId($storeId);
         $client = $this->getClient($storeId);
-        $service = new \Magento\Gdata\Gshopping\Content($client, $accountId);
+        $service = $this->_contentFactory->create(
+            array(
+                'client' => $client,
+                'accountId' => $accountId
+            )
+        );
         return $service;
     }
 }
diff --git a/app/code/Magento/GoogleShopping/Model/Service/Item.php b/app/code/Magento/GoogleShopping/Model/Service/Item.php
index d71dc5a077d1e25b63a5dad53e3a0b702bd11c4c..7bb83c7f890ae1dc2e9027417a9b01403f0f6b17 100644
--- a/app/code/Magento/GoogleShopping/Model/Service/Item.php
+++ b/app/code/Magento/GoogleShopping/Model/Service/Item.php
@@ -51,6 +51,7 @@ class Item extends \Magento\GoogleShopping\Model\Service
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\GoogleShopping\Model\Config $config
+     * @param \Magento\Gdata\Gshopping\ContentFactory $contentFactory
      * @param \Magento\Core\Model\Date $date
      * @param \Magento\GoogleShopping\Helper\Data $gsData
      * @param array $data
@@ -59,13 +60,14 @@ class Item extends \Magento\GoogleShopping\Model\Service
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\GoogleShopping\Model\Config $config,
+        \Magento\Gdata\Gshopping\ContentFactory $contentFactory,
         \Magento\Core\Model\Date $date,
         \Magento\GoogleShopping\Helper\Data $gsData,
         array $data = array()
     ) {
         $this->_date = $date;
         $this->_gsData = $gsData;
-        parent::__construct($logAdapterFactory, $coreRegistry, $config, $data);
+        parent::__construct($logAdapterFactory, $coreRegistry, $config, $contentFactory, $data);
     }
 
     /**
diff --git a/app/code/Magento/GoogleShopping/etc/module.xml b/app/code/Magento/GoogleShopping/etc/module.xml
index 711ea84537084df168be2e3036c43b8a3eb659e0..397874cb81e1628ed4077f7833aae45ac57195d9 100755
--- a/app/code/Magento/GoogleShopping/etc/module.xml
+++ b/app/code/Magento/GoogleShopping/etc/module.xml
@@ -37,6 +37,8 @@
             <module name="Magento_Eav"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Theme"/>
+            <module name="Magento_GoogleCheckout"/>
+            <module name="Magento_GroupedProduct"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php b/app/code/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php
similarity index 84%
rename from app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php
rename to app/code/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php
index 8093c5b421f2b556c1ca212151fcc6226bef79d5..267ebe3689759b0fb936ff4eaafef9b20539ee90 100644
--- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php
+++ b/app/code/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/Grouped.php
@@ -27,15 +27,19 @@
 /**
  * Adminhtml block for fieldset of grouped product
  */
-namespace Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset;
+namespace Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset;
 
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class Grouped
-    extends \Magento\Catalog\Block\Product\View\Type\Grouped
+    extends \Magento\GroupedProduct\Block\Product\View\Type\Grouped
 {
+
     /**
-     * @var \Magento\Tax\Model\Calculation
+     * @var \Magento\Catalog\Helper\Product\Price
      */
-    protected $_taxCalculation;
+    protected $priceHelper;
 
     protected $_priceBlockDefaultTemplate = 'catalog/product/price.phtml';
 
@@ -57,9 +61,10 @@ class Grouped
      * @param \Magento\Theme\Helper\Layout $layoutHelper
      * @param \Magento\Catalog\Helper\Image $imageHelper
      * @param \Magento\Stdlib\ArrayUtils $arrayUtils
-     * @param \Magento\Tax\Model\Calculation $taxCalculation
+     * @param \Magento\Catalog\Helper\Product\Price $priceHelper
      * @param \Magento\Core\Helper\Data $coreHelper
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -76,12 +81,13 @@ class Grouped
         \Magento\Theme\Helper\Layout $layoutHelper,
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Stdlib\ArrayUtils $arrayUtils,
-        \Magento\Tax\Model\Calculation $taxCalculation,
+        \Magento\Catalog\Helper\Product\Price $priceHelper,
         \Magento\Core\Helper\Data $coreHelper,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_coreHelper = $coreHelper;
-        $this->_taxCalculation = $taxCalculation;
+        $this->priceHelper = $priceHelper;
         parent::__construct(
             $context,
             $catalogConfig,
@@ -95,7 +101,8 @@ class Grouped
             $layoutHelper,
             $imageHelper,
             $arrayUtils,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
@@ -110,8 +117,8 @@ class Grouped
         $this->_block = 'Magento\Catalog\Block\Adminhtml\Product\Price';
         $this->_useLinkForAsLowAs = false;
 
-        if (!$this->_taxCalculation->getCustomer() && $this->_coreRegistry->registry('current_customer')) {
-            $this->_taxCalculation->setCustomer($this->_coreRegistry->registry('current_customer'));
+        if (!$this->priceHelper->getCustomer() && $this->_coreRegistry->registry('current_customer')) {
+            $this->priceHelper->setCustomer($this->_coreRegistry->registry('current_customer'));
         }
     }
 
@@ -159,9 +166,10 @@ class Grouped
     /**
      * Set preconfigured values to grouped associated products
      *
-     * @return \Magento\Catalog\Block\Product\View\Type\Grouped
+     * @return \Magento\GroupedProduct\Block\Product\View\Type\Grouped
      */
-    public function setPreconfiguredValue() {
+    public function setPreconfiguredValue()
+    {
         $configValues = $this->getProduct()->getPreconfiguredValues()->getSuperGroup();
         if (is_array($configValues)) {
             $associatedProducts = $this->getAssociatedProducts();
@@ -179,6 +187,9 @@ class Grouped
      *
      * @param \Magento\Catalog\Model\Product $product
      * @return bool
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @SuppressWarnings(PHPMD.BooleanGetMethodName)
      */
     public function getCanShowProductPrice($product)
     {
@@ -189,6 +200,8 @@ class Grouped
      * Checks whether block is last fieldset in popup
      *
      * @return bool
+     *
+     * @SuppressWarnings(PHPMD.BooleanGetMethodName)
      */
     public function getIsLastFieldset()
     {
diff --git a/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts.php b/app/code/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts.php
similarity index 96%
rename from app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts.php
rename to app/code/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts.php
index dbd83506c0d8d0e19365c7c3e608b242d8ad4ea5..2bf5d644e64f0aaec758aca55fdb89940c938f53 100644
--- a/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts.php
+++ b/app/code/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts.php
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Catalog\Block\Product\Grouped;
+namespace Magento\GroupedProduct\Block\Product\Grouped;
 
 class AssociatedProducts
     extends \Magento\Backend\Block\Catalog\Product\Tab\Container
diff --git a/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php b/app/code/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php
similarity index 97%
rename from app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php
rename to app/code/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php
index d27e1e54d2f3288912187d64e3388d4d841b70ef..312717b86927e9cef307114d210f86343b4a6226 100644
--- a/app/code/Magento/Catalog/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php
+++ b/app/code/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProducts.php
@@ -31,7 +31,7 @@
  * @package    Magento_Catalog
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Catalog\Block\Product\Grouped\AssociatedProducts;
+namespace Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts;
 
 class ListAssociatedProducts extends \Magento\Backend\Block\Template
 {
diff --git a/app/code/Magento/Catalog/Block/Product/View/Type/Grouped.php b/app/code/Magento/GroupedProduct/Block/Product/View/Type/Grouped.php
similarity index 68%
rename from app/code/Magento/Catalog/Block/Product/View/Type/Grouped.php
rename to app/code/Magento/GroupedProduct/Block/Product/View/Type/Grouped.php
index 13dca25f09b06b2a3abe5729071b22061d75df11..53490947c06b0cd1d9f721f80ed909720423364c 100644
--- a/app/code/Magento/Catalog/Block/Product/View/Type/Grouped.php
+++ b/app/code/Magento/GroupedProduct/Block/Product/View/Type/Grouped.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Catalog grouped product info block
+ *
  * 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_Catalog
  * @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)
  */
-
-
-/**
- * Catalog grouped product info block
- *
- * @category   Magento
- * @package    Magento_Catalog
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Catalog\Block\Product\View\Type;
+namespace Magento\GroupedProduct\Block\Product\View\Type;
 
 class Grouped extends \Magento\Catalog\Block\Product\View\AbstractView
 {
@@ -42,13 +33,13 @@ class Grouped extends \Magento\Catalog\Block\Product\View\AbstractView
             ->getAssociatedProducts($this->getProduct());
     }
 
-
     /**
      * Set preconfigured values to grouped associated products
      *
-     * @return \Magento\Catalog\Block\Product\View\Type\Grouped
+     * @return \Magento\GroupedProduct\Block\Product\View\Type\Grouped
      */
-    public function setPreconfiguredValue() {
+    public function setPreconfiguredValue()
+    {
         $configValues = $this->getProduct()->getPreconfiguredValues()->getSuperGroup();
         if (is_array($configValues)) {
             $associatedProducts = $this->getAssociatedProducts();
@@ -60,4 +51,24 @@ class Grouped extends \Magento\Catalog\Block\Product\View\AbstractView
         }
         return $this;
     }
+
+    /**
+     * Returns product tier price block html
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return string
+     */
+    public function getTierPriceHtml($product = null)
+    {
+        if (is_null($product)) {
+            $product = $this->getProduct();
+        }
+        return $this->_getPriceBlock($product->getTypeId())
+            ->setTemplate($this->getTierPriceTemplate())
+            ->setProduct($product)
+            ->setListClass('tier prices grouped items')
+            ->setShowDetailedPrice(false)
+            ->setCanDisplayQty(false)
+            ->toHtml();
+    }
 }
diff --git a/app/code/Magento/GroupedProduct/Controller/Adminhtml/Edit.php b/app/code/Magento/GroupedProduct/Controller/Adminhtml/Edit.php
new file mode 100644
index 0000000000000000000000000000000000000000..57a627c6b53565d8b0834a8a98ce05c6fe279e2b
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Controller/Adminhtml/Edit.php
@@ -0,0 +1,107 @@
+<?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\GroupedProduct\Controller\Adminhtml;
+
+class Edit extends \Magento\Backend\App\AbstractAction
+{
+    /**
+     * @var \Magento\Core\Model\Registry
+     */
+    protected $registry;
+
+    /**
+     * @var \Magento\Catalog\Model\ProductFactory
+     */
+    protected $factory;
+
+    /**
+     * @var \Magento\Logger
+     */
+    protected $logger;
+
+    /**
+     * @param \Magento\Backend\App\Action\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Catalog\Model\ProductFactory $factory
+     * @param \Magento\Logger $logger
+     */
+    public function __construct(
+        \Magento\Backend\App\Action\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Catalog\Model\ProductFactory $factory,
+        \Magento\Logger $logger
+    ) {
+        $this->registry = $registry;
+        $this->factory = $factory;
+        $this->logger = $logger;
+        parent::__construct($context);
+    }
+
+    /**
+     * Check for is allowed
+     *
+     * @return boolean
+     */
+    protected function _isAllowed()
+    {
+        return $this->_authorization->isAllowed('Magento_Catalog::products');
+    }
+
+    /**
+     * Get associated grouped products grid popup
+     */
+    public function popupAction()
+    {
+        $productId  = (int)$this->getRequest()->getParam('id');
+
+        /** @var $product \Magento\Catalog\Model\Product */
+        $product = $this->factory->create();
+        $product->setStoreId($this->getRequest()->getParam('store', 0));
+
+        $typeId = $this->getRequest()->getParam('type');
+        if (!$productId && $typeId) {
+            $product->setTypeId($typeId);
+        }
+        $product->setData('_edit_mode', true);
+
+        if ($productId) {
+            try {
+                $product->load($productId);
+            } catch (\Exception $e) {
+                $product->setTypeId(\Magento\Catalog\Model\Product\Type::DEFAULT_TYPE);
+                $this->logger->logException($e);
+            }
+        }
+
+        $setId = (int)$this->getRequest()->getParam('set');
+        if ($setId) {
+            $product->setAttributeSetId($setId);
+        }
+        $this->registry->register('current_product', $product);
+
+        $this->_view->loadLayout(false);
+        $this->_view->renderLayout();
+    }
+} 
diff --git a/app/code/Magento/GroupedProduct/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks/Plugin/Grouped.php b/app/code/Magento/GroupedProduct/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks/Plugin/Grouped.php
new file mode 100644
index 0000000000000000000000000000000000000000..a02edc6ad23c3e1008ab70c5399658228d6939b8
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks/Plugin/Grouped.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\GroupedProduct\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks\Plugin;
+
+class Grouped
+{
+    /**
+     * @var \Magento\App\RequestInterface
+     */
+    protected $request;
+
+    /**
+     * @param \Magento\App\RequestInterface $request
+     */
+    public function __construct(\Magento\App\RequestInterface $request)
+    {
+        $this->request = $request;
+    }
+
+    /**
+     * Initialize grouped product links
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Product
+     */
+    public function afterInitializeLinks(\Magento\Catalog\Model\Product $product)
+    {
+        $links = $this->request->getPost('links');
+
+        if (isset($links['grouped']) && !$product->getGroupedReadonly()) {
+            $product->setGroupedLinkData((array)$links['grouped']);
+        }
+
+        return $product;
+    }
+} 
diff --git a/app/code/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/Grouped.php b/app/code/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/Grouped.php
new file mode 100644
index 0000000000000000000000000000000000000000..abab75e6fb1a543213c95fe0d8e1a6c82287a143
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/Grouped.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\GroupedProduct\Helper\Product\Configuration\Plugin;
+
+class Grouped
+{
+    /**
+     * Retrieves grouped product options list
+     *
+     * @param array $arguments
+     * @param \Magento\Code\Plugin\InvocationChain $invocationChain
+     * @return mixed
+     */
+    public function aroundGetOptions(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain)
+    {
+        /** @var \Magento\Catalog\Model\Product\Configuration\Item\ItemInterface $item */
+        $item = $arguments['item'];
+        $product = $item->getProduct();
+        $typeId  = $product->getTypeId();
+        if ($typeId == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE) {
+            $options = array();
+            /** @var \Magento\GroupedProduct\Model\Product\Type\Grouped $typeInstance */
+            $typeInstance = $product->getTypeInstance();
+            $associatedProducts = $typeInstance->getAssociatedProducts($product);
+
+            if ($associatedProducts) {
+                foreach ($associatedProducts as $associatedProduct) {
+                    $qty = $item->getOptionByCode('associated_product_' . $associatedProduct->getId());
+                    $option = array(
+                        'label' => $associatedProduct->getName(),
+                        'value' => ($qty && $qty->getValue()) ? $qty->getValue() : 0
+                    );
+                    $options[] = $option;
+                }
+            }
+
+            $options = array_merge($options, $invocationChain->proceed($arguments));
+            $isUnConfigured = true;
+            foreach ($options as &$option) {
+                if ($option['value']) {
+                    $isUnConfigured = false;
+                    break;
+                }
+            }
+            return $isUnConfigured ? array() : $options;
+        }
+        return $invocationChain->proceed($arguments);
+    }
+} 
diff --git a/app/code/Magento/GroupedProduct/Model/Product/CopyConstructor/Grouped.php b/app/code/Magento/GroupedProduct/Model/Product/CopyConstructor/Grouped.php
new file mode 100644
index 0000000000000000000000000000000000000000..aeaca6f30988b963348e1733151c4d1d365f274e
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Model/Product/CopyConstructor/Grouped.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\GroupedProduct\Model\Product\CopyConstructor;
+
+class Grouped implements \Magento\Catalog\Model\Product\CopyConstructorInterface
+{
+    /**
+     * Retrieve collection grouped link
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @return \Magento\Catalog\Model\Resource\Product\Link\Collection
+     */
+    protected function _getGroupedLinkCollection(\Magento\Catalog\Model\Product $product)
+    {
+        /** @var \Magento\Catalog\Model\Product\Link  $links */
+        $links = $product->getLinkInstance();
+        $links->setLinkTypeId(\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
+
+        $collection = $links->getLinkCollection();
+        $collection->setProduct($product);
+        $collection->addLinkTypeIdFilter();
+        $collection->addProductIdFilter();
+        $collection->joinAttributes();
+        return $collection;
+    }
+
+    /**
+     * Build product links
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param \Magento\Catalog\Model\Product $duplicate
+     */
+    public function build(\Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate)
+    {
+        if ($product->getTypeId() !== \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE) {
+            //do nothing if not grouped product
+            return;
+        }
+
+        $data = array();
+        $attributes = array();
+        $link = $product->getLinkInstance();
+        $link->setLinkTypeId(\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
+        foreach ($link->getAttributes() as $attribute) {
+            if (isset($attribute['code'])) {
+                $attributes[] = $attribute['code'];
+            }
+        }
+
+        /** @var \Magento\Catalog\Model\Product\Link $link  */
+        foreach ($this->_getGroupedLinkCollection($product) as $link) {
+            $data[$link->getLinkedProductId()] = $link->toArray($attributes);
+        }
+        $duplicate->setGroupedLinkData($data);
+    }
+}
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Grouped.php b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
similarity index 85%
rename from app/code/Magento/Catalog/Model/Product/Type/Grouped.php
rename to app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
index 9d758ad65c1b13dfc6b422f4d5ed521b85e59f2a..d5c0707de2fc13850f651617d44c12d4aee30ada 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Grouped.php
+++ b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Grouped product type implementation
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -19,20 +21,15 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Catalog
+ * @package     Magento_GroupedProduct
  * @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\GroupedProduct\Model\Product\Type;
 
 /**
- * Grouped product type implementation
- *
- * @category   Magento
- * @package    Magento_Catalog
- * @author      Magento Core Team <core@magentocommerce.com>
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-namespace Magento\Catalog\Model\Product\Type;
-
 class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
 {
     const TYPE_CODE = 'grouped';
@@ -89,9 +86,9 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
     /**
      * Catalog product link
      *
-     * @var \Magento\Catalog\Model\Resource\Product\Link
+     * @var \Magento\GroupedProduct\Model\Resource\Product\Link
      */
-    protected $_catalogProductLink;
+    protected $productLinks;
 
     /**
      * @var \Magento\App\State
@@ -106,15 +103,15 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Registry $coreRegistry
      * @param \Magento\Logger $logger
-     * @param \Magento\Catalog\Model\Resource\Product\Link $catalogProductLink
+     * @param \Magento\GroupedProduct\Model\Resource\Product\Link $catalogProductLink
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product\Status $catalogProductStatus
      * @param \Magento\App\State $appState
      * @param array $data
-     * 
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -125,16 +122,16 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Registry $coreRegistry,
         \Magento\Logger $logger,
-        \Magento\Catalog\Model\Resource\Product\Link $catalogProductLink,
+        \Magento\GroupedProduct\Model\Resource\Product\Link $catalogProductLink,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\Status $catalogProductStatus,
         \Magento\App\State $appState,
         array $data = array()
     ) {
-        $this->_catalogProductLink = $catalogProductLink;
+        $this->productLinks = $catalogProductLink;
         $this->_storeManager = $storeManager;
         $this->_catalogProductStatus = $catalogProductStatus;
         $this->_appState = $appState;
@@ -164,7 +161,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
         $info->setTable('catalog_product_link')
             ->setParentFieldName('product_id')
             ->setChildFieldName('linked_product_id')
-            ->setWhere('link_type_id=' . \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED);
+            ->setWhere('link_type_id=' . \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
         return $info;
     }
 
@@ -177,25 +174,31 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param int $parentId
      * @param bool $required
      * @return array
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function getChildrenIds($parentId, $required = true)
     {
-        return $this->_catalogProductLink
-            ->getChildrenIds($parentId,
-                \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED);
+        return $this->productLinks
+            ->getChildrenIds(
+                $parentId,
+                \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED
+            );
     }
 
     /**
-     * Retrieve parent ids array by requered child
+     * Retrieve parent ids array by requested child
      *
      * @param int|array $childId
      * @return array
      */
     public function getParentIdsByChild($childId)
     {
-        return $this->_catalogProductLink
-            ->getParentIdsByChild($childId,
-                \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED);
+        return $this->productLinks
+            ->getParentIdsByChild(
+                $childId,
+                \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED
+            );
     }
 
     /**
@@ -232,7 +235,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      *
      * @param  int $status
      * @param  \Magento\Catalog\Model\Product $product
-     * @return \Magento\Catalog\Model\Product\Type\Grouped
+     * @return \Magento\GroupedProduct\Model\Product\Type\Grouped
      */
     public function addStatusFilter($status, $product)
     {
@@ -251,12 +254,11 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * Set only saleable filter
      *
      * @param  \Magento\Catalog\Model\Product $product
-     * @return \Magento\Catalog\Model\Product\Type\Grouped
+     * @return \Magento\GroupedProduct\Model\Product\Type\Grouped
      */
     public function setSaleableStatus($product)
     {
-        $product->setData($this->_keyStatusFilters,
-            $this->_catalogProductStatus->getSaleableStatusIds());
+        $product->setData($this->_keyStatusFilters, $this->_catalogProductStatus->getSaleableStatusIds());
         return $this;
     }
 
@@ -287,6 +289,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
     {
         if (!$product->hasData($this->_keyAssociatedProductIds)) {
             $associatedProductIds = array();
+            /** @var $item \Magento\Catalog\Model\Product */
             foreach ($this->getAssociatedProducts($product) as $item) {
                 $associatedProductIds[] = $item->getId();
             }
@@ -303,8 +306,10 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      */
     public function getAssociatedProductCollection($product)
     {
-        $collection = $product->getLinkInstance()->useGroupedLinks()
-            ->getProductCollection()
+        /** @var \Magento\Catalog\Model\Product\Link  $links */
+        $links = $product->getLinkInstance();
+        $links->setLinkTypeId(\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
+        $collection = $links->getProductCollection()
             ->setFlag('require_stock_items', true)
             ->setFlag('product_children', true)
             ->setIsStrongMode();
@@ -312,36 +317,20 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
         return $collection;
     }
 
-    /**
-     * Check is product available for sale
-     *
-     * @param \Magento\Catalog\Model\Product $product
-     * @return bool
-     */
-    public function isSalable($product)
-    {
-        $salable = parent::isSalable($product);
-        if (!is_null($salable)) {
-            return $salable;
-        }
-
-        $salable = false;
-        foreach ($this->getAssociatedProducts($product) as $associatedProduct) {
-            $salable = $salable || $associatedProduct->isSalable();
-        }
-        return $salable;
-    }
-
     /**
      * Save type related data
      *
      * @param \Magento\Catalog\Model\Product $product
-     * @return \Magento\Catalog\Model\Product\Type\Grouped
+     * @return \Magento\GroupedProduct\Model\Product\Type\Grouped
      */
     public function save($product)
     {
         parent::save($product);
-        $product->getLinkInstance()->saveGroupedLinks($product);
+
+        $data = $product->getGroupedLinkData();
+        if (!is_null($data)) {
+            $this->productLinks->saveGroupedLinks($product, $data);
+        }
         return $this;
     }
 
@@ -353,6 +342,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Catalog\Model\Product $product
      * @param string $processMode
      * @return array|string
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
     protected function _prepareProduct(\Magento\Object $buyRequest, $product, $processMode)
     {
@@ -366,7 +356,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
             if ($associatedProducts || !$isStrictProcessMode) {
                 foreach ($associatedProducts as $subProduct) {
                     $subProductId = $subProduct->getId();
-                    if(isset($productsInfo[$subProductId])) {
+                    if (isset($productsInfo[$subProductId])) {
                         $qty = $productsInfo[$subProductId];
                         if (!empty($qty) && is_numeric($qty)) {
 
@@ -434,6 +424,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param  \Magento\Catalog\Model\Product $product
      * @param  \Magento\Object $buyRequest
      * @return array
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function processBuyRequest($product, $buyRequest)
     {
@@ -459,6 +450,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * Delete data specific for Grouped product type
      *
      * @param \Magento\Catalog\Model\Product $product
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function deleteTypeSpecificData(\Magento\Catalog\Model\Product $product)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Grouped/Backend.php b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped/Backend.php
similarity index 83%
rename from app/code/Magento/Catalog/Model/Product/Type/Grouped/Backend.php
rename to app/code/Magento/GroupedProduct/Model/Product/Type/Grouped/Backend.php
index 93507485b3cdab4fdc4a4d4bf6498acf5118f999..7d7c5917b333f2c59112b3d3f84f020cddf9286f 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Grouped/Backend.php
+++ b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped/Backend.php
@@ -19,23 +19,23 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Catalog
+ * @package     Magento_GroupedProduct
  * @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\Catalog\Model\Product\Type\Grouped;
+namespace Magento\GroupedProduct\Model\Product\Type\Grouped;
 
 /**
  * Grouped product type implementation for backend
  */
-class Backend extends \Magento\Catalog\Model\Product\Type\Grouped
+class Backend extends \Magento\GroupedProduct\Model\Product\Type\Grouped
 {
     /**
      * No filters required in backend
      *
      * @param  \Magento\Catalog\Model\Product $product
-     * @return \Magento\Catalog\Model\Product\Type\Grouped
+     * @return \Magento\GroupedProduct\Model\Product\Type\Grouped
      */
     public function setSaleableStatus($product)
     {
diff --git a/app/code/Magento/Catalog/Model/Product/Type/Grouped/Price.php b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped/Price.php
similarity index 89%
rename from app/code/Magento/Catalog/Model/Product/Type/Grouped/Price.php
rename to app/code/Magento/GroupedProduct/Model/Product/Type/Grouped/Price.php
index aba1591e1d8ef5758b8109a80ab3968e9c014b51..730b64e8685e666c6d1f39ee419731c0a20a12d0 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/Grouped/Price.php
+++ b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped/Price.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Grouped product price model
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -19,19 +21,12 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Catalog
+ * @package     Magento_GroupedProduct
  * @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)
  */
 
-/**
- * Grouped product price model
- *
- * @category    Magento
- * @package     Magento_Catalog
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Catalog\Model\Product\Type\Grouped;
+namespace Magento\GroupedProduct\Model\Product\Type\Grouped;
 
 class Price extends \Magento\Catalog\Model\Product\Type\Price
 {
@@ -50,7 +45,7 @@ class Price extends \Magento\Catalog\Model\Product\Type\Price
 
         $finalPrice = parent::getFinalPrice($qty, $product);
         if ($product->hasCustomOptions()) {
-            /* @var $typeInstance \Magento\Catalog\Model\Product\Type\Grouped */
+            /* @var $typeInstance \Magento\GroupedProduct\Model\Product\Type\Grouped */
             $typeInstance = $product->getTypeInstance();
             $associatedProducts = $typeInstance->setStoreFilter($product->getStore(), $product)
                 ->getAssociatedProducts($product);
diff --git a/app/code/Magento/PageCache/Model/Control/Zend.php b/app/code/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/Grouped.php
similarity index 62%
rename from app/code/Magento/PageCache/Model/Control/Zend.php
rename to app/code/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/Grouped.php
index beafe3c44f123ccf52bb86dcf8971b45de3dce1a..1869b53a1f320fd014fe03f740c0da00abda0543 100644
--- a/app/code/Magento/PageCache/Model/Control/Zend.php
+++ b/app/code/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/Grouped.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Plugin for product type configuration converter
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -18,32 +20,25 @@
  * 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_PageCache
  * @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)
  */
 
-/**
- * Zend server page cache control model
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\PageCache\Model\Control;
+namespace Magento\GroupedProduct\Model\ProductTypes\Config\Converter\Plugin;
 
-class Zend implements \Magento\PageCache\Model\Control\ControlInterface
+class Grouped
 {
     /**
-     * Clean zend server page cache
+     * Set value to product type configuration data that grouped product type is a set of products
      *
-     * @return void
+     * @param array $config
+     * @return array
      */
-    public function clean()
+    public function afterConvert(array $config)
     {
-        if (extension_loaded('Zend Page Cache') && function_exists('page_cache_remove_all_cached_contents')) {
-            page_cache_remove_all_cached_contents();
+        if (isset($config[\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE])) {
+            $config[\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE]['is_product_set'] = true;
         }
+        return $config;
     }
-}
+} 
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php b/app/code/Magento/GroupedProduct/Model/Resource/Product/Indexer/Price/Grouped.php
similarity index 89%
rename from app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php
rename to app/code/Magento/GroupedProduct/Model/Resource/Product/Indexer/Price/Grouped.php
index a5e76a66eecefd9a10271800832c6e26ba761531..8ec870d149a6e41a33c2e042d6996be65ce34863 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php
+++ b/app/code/Magento/GroupedProduct/Model/Resource/Product/Indexer/Price/Grouped.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Grouped Products Price Indexer Resource model
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -19,20 +21,11 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Catalog
+ * @package     Magento_GroupedProduct
  * @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)
  */
-
-
-/**
- * Configurable Products Price Indexer Resource model
- *
- * @category    Magento
- * @package     Magento_Catalog
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Catalog\Model\Resource\Product\Indexer\Price;
+namespace Magento\GroupedProduct\Model\Resource\Product\Indexer\Price;
 
 class Grouped
     extends \Magento\Catalog\Model\Resource\Product\Indexer\Price\DefaultPrice
@@ -40,7 +33,7 @@ class Grouped
     /**
      * Reindex temporary (price result data) for all products
      *
-     * @return \Magento\Catalog\Model\Resource\Product\Indexer\Price\Grouped
+     * @return \Magento\GroupedProduct\Model\Resource\Product\Indexer\Price\Grouped
      */
     public function reindexAll()
     {
@@ -60,7 +53,7 @@ class Grouped
      * Reindex temporary (price result data) for defined product(s)
      *
      * @param int|array $entityIds
-     * @return \Magento\Catalog\Model\Resource\Product\Indexer\Price\Grouped
+     * @return \Magento\GroupedProduct\Model\Resource\Product\Indexer\Price\Grouped
      */
     public function reindexEntity($entityIds)
     {
@@ -74,7 +67,7 @@ class Grouped
      * Use calculated price for relation products
      *
      * @param int|array $entityIds  the parent entity ids limitation
-     * @return \Magento\Catalog\Model\Resource\Product\Indexer\Price\Grouped
+     * @return \Magento\GroupedProduct\Model\Resource\Product\Indexer\Price\Grouped
      */
     protected function _prepareGroupedProductPriceData($entityIds = null)
     {
@@ -85,7 +78,8 @@ class Grouped
             ->from(array('e' => $this->getTable('catalog_product_entity')), 'entity_id')
             ->joinLeft(
                 array('l' => $this->getTable('catalog_product_link')),
-                'e.entity_id = l.product_id AND l.link_type_id=' . \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED,
+                'e.entity_id = l.product_id AND l.link_type_id='
+                . \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED,
                 array())
             ->join(
                 array('cg' => $this->getTable('customer_group')),
diff --git a/app/code/Magento/GroupedProduct/Model/Resource/Product/Link.php b/app/code/Magento/GroupedProduct/Model/Resource/Product/Link.php
new file mode 100644
index 0000000000000000000000000000000000000000..36845c5bc0901b6bb2e0cabb16784c621bd55bbe
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Model/Resource/Product/Link.php
@@ -0,0 +1,104 @@
+<?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\GroupedProduct\Model\Resource\Product;
+
+class Link extends \Magento\Catalog\Model\Resource\Product\Link
+{
+    const LINK_TYPE_GROUPED = 3;
+
+    /**
+     * Save grouped product relations
+     *
+     * @param \Magento\Catalog\Model\Product $product
+     * @param array $data
+     *
+     * @return \Magento\GroupedProduct\Model\Resource\Product\Link
+     */
+    public function saveGroupedLinks($product, $data)
+    {
+        $adapter = $this->_getWriteAdapter();
+        // check for change relations
+        $bind    = array(
+            'product_id'    => (int)$product->getId(),
+            'link_type_id'  => self::LINK_TYPE_GROUPED
+        );
+        $select = $adapter->select()
+            ->from($this->getMainTable(), array('linked_product_id'))
+            ->where('product_id = :product_id')
+            ->where('link_type_id = :link_type_id');
+        $old = $adapter->fetchCol($select, $bind);
+        $new = array_keys($data);
+
+        if (array_diff($old, $new) || array_diff($new, $old)) {
+            $product->setIsRelationsChanged(true);
+        }
+
+        // save product links attributes
+        $this->saveProductLinks($product, $data, self::LINK_TYPE_GROUPED);
+
+        // Grouped product relations should be added to relation table
+        $this->_catalogProductRelation->processRelations($product->getId(), $new);
+
+        return $this;
+    }
+
+    /**
+     * Retrieve Required children ids
+     * Return grouped array, ex array(
+     *   group => array(ids)
+     * )
+     *
+     * @param int $parentId
+     * @param int $typeId
+     * @return array
+     */
+    public function getChildrenIds($parentId, $typeId)
+    {
+        $adapter     = $this->_getReadAdapter();
+        $childrenIds = array();
+        $bind        = array(
+            ':product_id'    => (int)$parentId,
+            ':link_type_id'  => (int)$typeId
+        );
+        $select = $adapter->select()
+            ->from(array('l' => $this->getMainTable()), array('linked_product_id'))
+            ->where('product_id = :product_id')
+            ->where('link_type_id = :link_type_id');
+
+        $select->join(
+            array('e' => $this->getTable('catalog_product_entity')),
+            'e.entity_id = l.linked_product_id AND e.required_options = 0',
+            array()
+        );
+
+        $childrenIds[$typeId] = array();
+        $result = $adapter->fetchAll($select, $bind);
+        foreach ($result as $row) {
+            $childrenIds[$typeId][$row['linked_product_id']] = $row['linked_product_id'];
+        }
+
+        return $childrenIds;
+    }
+} 
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php b/app/code/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
similarity index 96%
rename from app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
rename to app/code/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
index 7bf223b2ba4a0d2cdd97bf70840499f89fe93eea..e6a4f07bba84abd35187ccfb840da3c214874669 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
+++ b/app/code/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollection.php
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Associated products collection
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -19,20 +21,16 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Catalog
+ * @package     Magento_GroupedProduct
  * @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\GroupedProduct\Model\Resource\Product\Type\Grouped;
+
 /**
- * Associated products collection
- *
- * @category    Magento
- * @package     Magento_Catalog
- * @author      Magento Core Team <core@magentocommerce.com>
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
-namespace Magento\Catalog\Model\Resource\Product\Type\Grouped;
-
 class AssociatedProductsCollection
     extends \Magento\Catalog\Model\Resource\Product\Link\Product\Collection
 {
diff --git a/app/code/Magento/GroupedProduct/data/groupedproduct_setup/data-install-0.0.1.php b/app/code/Magento/GroupedProduct/data/groupedproduct_setup/data-install-0.0.1.php
new file mode 100644
index 0000000000000000000000000000000000000000..eddeef59cb4086b76a16e0cce07e587295a33450
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/data/groupedproduct_setup/data-install-0.0.1.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Catalog\Model\Resource\Setup */
+$installer = $this;
+
+/**
+ * Install grouped product link type
+ */
+$data = array(
+    'link_type_id'  => \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED,
+    'code'  => 'super'
+);
+$installer->getConnection()->insertOnDuplicate($installer->getTable('catalog_product_link_type'), $data);
+
+/**
+ * Install grouped product link attributes
+ */
+$select = $installer->getConnection()
+    ->select()
+    ->from(array('c' => $installer->getTable('catalog_product_link_attribute')))
+    ->where("c.link_type_id=?", \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
+$result = $installer->getConnection()->fetchAll($select);
+
+if (!$result) {
+
+    $data = array(
+        array(
+            'link_type_id'                  => \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED,
+            'product_link_attribute_code'   => 'position',
+            'data_type'                     => 'int'
+        ),
+        array(
+            'link_type_id'                  => \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED,
+            'product_link_attribute_code'   => 'qty',
+            'data_type'                     => 'decimal'
+        )
+    );
+
+    $installer->getConnection()->insertMultiple($installer->getTable('catalog_product_link_attribute'), $data);
+}
diff --git a/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5ee459ff6b1fa778b1474279f7c08850075b2c58
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/etc/adminhtml/di.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<config>
+    <preference for="Magento\GroupedProduct\Model\Product\Type\Grouped" type="Magento\GroupedProduct\Model\Product\Type\Grouped\Backend" />
+    <type name="Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks">
+        <plugin name="GroupedProduct" type="Magento\GroupedProduct\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks\Plugin\Grouped" />
+    </type>
+    <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
+        <param name="constructors">
+            <value>
+                <grouped>Magento\GroupedProduct\Model\Product\CopyConstructor\Grouped</grouped>
+            </value>
+        </param>
+    </type>
+</config>
diff --git a/app/code/Magento/PageCache/etc/adminhtml/routes.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml
similarity index 89%
rename from app/code/Magento/PageCache/etc/adminhtml/routes.xml
rename to app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml
index 56861269b0f6a6e9ea2f9cbc9276a793f77103ad..7504e143f139b89463c761aea43c5a046e607dc5 100644
--- a/app/code/Magento/PageCache/etc/adminhtml/routes.xml
+++ b/app/code/Magento/GroupedProduct/etc/adminhtml/routes.xml
@@ -25,8 +25,8 @@
 -->
 <config>
     <router id="admin">
-        <route id="adminhtml">
-            <module name="Magento_PageCache" before="Magento_Adminhtml" />
+        <route id="groupedProduct" frontName="groupedProduct">
+            <module name="Magento_GroupedProduct" />
         </route>
     </router>
 </config>
diff --git a/app/code/Magento/Paygate/etc/frontend/di.xml b/app/code/Magento/GroupedProduct/etc/di.xml
similarity index 73%
rename from app/code/Magento/Paygate/etc/frontend/di.xml
rename to app/code/Magento/GroupedProduct/etc/di.xml
index b8963ac937dca631a8718859e7ba1518d8f68a4c..87eca94a6e5e37d3e445fd3f03bc3048e92880af 100644
--- a/app/code/Magento/Paygate/etc/frontend/di.xml
+++ b/app/code/Magento/GroupedProduct/etc/di.xml
@@ -24,16 +24,16 @@
  */
 -->
 <config>
-    <type name="Magento\Core\Model\Url\SecurityInfo">
-        <param name="secureUrlList">
+    <type name="Magento\Catalog\Model\ProductTypes\Config\Converter">
+        <plugin name="groupedProductType" type="Magento\GroupedProduct\Model\ProductTypes\Config\Converter\Plugin\Grouped" />
+    </type>
+    <type name="Magento\Module\Updater\SetupFactory">
+        <param name="resourceTypes">
             <value>
-                <authorizenet_paygate>/paygate/authorizenet_payment</authorizenet_paygate>
+                <groupedproduct_setup>Magento\Catalog\Model\Resource\Setup</groupedproduct_setup>
             </value>
         </param>
     </type>
-    <type name="Magento\Paygate\Model\Authorizenet">
-        <param name="session">
-            <instance type="Magento\Checkout\Model\Session" />
-        </param>
-    </type>
 </config>
+
+
diff --git a/app/code/Magento/GroupedProduct/etc/frontend/di.xml b/app/code/Magento/GroupedProduct/etc/frontend/di.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4e79f98ef09f7e027d4714c2c2fa50c71604b014
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/etc/frontend/di.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<config>
+    <type name="Magento\Catalog\Block\Product\AbstractProduct">
+        <param name="priceBlockTypes">
+            <value>
+                <grouped>
+                    <block>Magento\Catalog\Block\Product\Price</block>
+                    <template>Magento_GroupedProduct::product/price.phtml</template>
+                </grouped>
+            </value>
+        </param>
+    </type>
+    <type name="Magento\Catalog\Block\Product\Price\Template">
+        <param name="priceBlockTypes">
+            <value>
+                <grouped>
+                    <block>Magento\Catalog\Block\Product\Price</block>
+                    <template>Magento_GroupedProduct::product/price.phtml</template>
+                </grouped>
+            </value>
+        </param>
+    </type>
+</config>
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Last/etc/module.xml b/app/code/Magento/GroupedProduct/etc/module.xml
old mode 100755
new mode 100644
similarity index 62%
rename from dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Last/etc/module.xml
rename to app/code/Magento/GroupedProduct/etc/module.xml
index 8d46a062cee4a8fca69f82a51383f21e2d189eab..dc97cb059543f4a121cec6acfdbe69c9287840d6
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Last/etc/module.xml
+++ b/app/code/Magento/GroupedProduct/etc/module.xml
@@ -24,9 +24,21 @@
  */
 -->
 <config>
-    <module name="Magento_Last" version="1.6.0.0.23" active="true">
+    <module name="Magento_GroupedProduct" version="0.0.1" active="true">
         <sequence>
-            <module name="Magento_Test"/>
+            <module name="Magento_Catalog" />
+            <module name="Magento_CatalogInventory" />
         </sequence>
+        <depends>
+            <module name="Magento_Catalog" />
+            <module name="Magento_Core" />
+            <module name="Magento_Tax" />
+            <module name="Magento_Checkout" />
+            <module name="Magento_Wishlist" />
+            <module name="Magento_Backend" />
+            <module name="Magento_Eav" />
+            <module name="Magento_Customer" />
+            <module name="Magento_Theme" />
+        </depends>
     </module>
 </config>
diff --git a/app/code/Magento/PageCache/etc/events.xml b/app/code/Magento/GroupedProduct/etc/product_types.xml
similarity index 62%
rename from app/code/Magento/PageCache/etc/events.xml
rename to app/code/Magento/GroupedProduct/etc/product_types.xml
index 30dbc16805b33cb0e7d44c8883a78fdb7f28b41e..b5620233e5c9bf0253016369e3df6dd370914ee8 100644
--- a/app/code/Magento/PageCache/etc/events.xml
+++ b/app/code/Magento/GroupedProduct/etc/product_types.xml
@@ -24,10 +24,13 @@
  */
 -->
 <config>
-    <event name="design_editor_activate">
-        <observer name="magento_pagecache" instance="Magento\PageCache\Model\Observer" method="setNoCacheCookie" />
-    </event>
-    <event name="design_editor_deactivate">
-        <observer name="magento_pagecache" instance="Magento\PageCache\Model\Observer" method="deleteNoCacheCookie" />
-    </event>
+    <type name="grouped" label="Grouped Product" modelInstance="Magento\GroupedProduct\Model\Product\Type\Grouped" composite='true' indexPriority="50">
+        <priceModel instance="Magento\GroupedProduct\Model\Product\Type\Grouped\Price" />
+        <indexerModel instance="Magento\GroupedProduct\Model\Resource\Product\Indexer\Price\Grouped" />
+        <stockIndexerModel instance="Magento\CatalogInventory\Model\Resource\Indexer\Stock\Grouped" />
+        <allowProductTypes>
+            <type name="simple" />
+            <type name="virtual" />
+        </allowProductTypes>
+    </type>
 </config>
diff --git a/app/code/Magento/GroupedProduct/i18n/de_DE.csv b/app/code/Magento/GroupedProduct/i18n/de_DE.csv
new file mode 100644
index 0000000000000000000000000000000000000000..c7768a0a21dcb3b33de348a5ac5770c47dcdde57
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/de_DE.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","Produktansicht des Katalogs (in Gruppen)"
+"Grouped Product","Gruppiertes Produkt"
diff --git a/app/code/Magento/GroupedProduct/i18n/en_US.csv b/app/code/Magento/GroupedProduct/i18n/en_US.csv
new file mode 100644
index 0000000000000000000000000000000000000000..f0c636a3c8e7e71bba8b0692d9e8bcc2b934b048
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/en_US.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","Catalog Product View (Grouped)"
+"Grouped Product","Grouped Product"
diff --git a/app/code/Magento/GroupedProduct/i18n/es_ES.csv b/app/code/Magento/GroupedProduct/i18n/es_ES.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3ee3ba2a1f54cf3fb8842121d1da8c4f074016fe
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/es_ES.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","Vista del Catálogo de Producto (Agrupada)"
+"Grouped Product","Producto agrupado"
diff --git a/app/code/Magento/GroupedProduct/i18n/fr_FR.csv b/app/code/Magento/GroupedProduct/i18n/fr_FR.csv
new file mode 100644
index 0000000000000000000000000000000000000000..b0d1941b9785fba6285845bc0b973f74e620fb2f
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/fr_FR.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","Affichage du Produit Catalogue (Groupé)"
+"Grouped Product","Produits  groupés"
diff --git a/app/code/Magento/GroupedProduct/i18n/nl_NL.csv b/app/code/Magento/GroupedProduct/i18n/nl_NL.csv
new file mode 100644
index 0000000000000000000000000000000000000000..410a26f0142121221217f58a5cfbdd1f4f360c0e
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/nl_NL.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","Catalogus Product Bezichtiging (Gegroepeerd)"
+"Grouped Product","Gegroepeerd Product"
diff --git a/app/code/Magento/GroupedProduct/i18n/pt_BR.csv b/app/code/Magento/GroupedProduct/i18n/pt_BR.csv
new file mode 100644
index 0000000000000000000000000000000000000000..d4585d81ed46dc07d8bed454462ea52aba050cc6
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/pt_BR.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","Visualizar Produto de Catálogo (Agrupado)"
+"Grouped Product","Produto Agrupado"
diff --git a/app/code/Magento/GroupedProduct/i18n/zh_CN.csv b/app/code/Magento/GroupedProduct/i18n/zh_CN.csv
new file mode 100644
index 0000000000000000000000000000000000000000..416c91d0186203eea2439a12708abcb26552e4c0
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/i18n/zh_CN.csv
@@ -0,0 +1,2 @@
+"Catalog Product View (Grouped)","分类产品视图(分组)"
+"Grouped Product","分组产品"
diff --git a/app/code/Magento/Paygate/sql/paygate_setup/install-1.6.0.0.php b/app/code/Magento/GroupedProduct/sql/groupedproduct_setup/install-0.0.1.php
similarity index 70%
rename from app/code/Magento/Paygate/sql/paygate_setup/install-1.6.0.0.php
rename to app/code/Magento/GroupedProduct/sql/groupedproduct_setup/install-0.0.1.php
index 1dff0b5467087db41cc8ce5ca1619b3a481740b4..2973162b448e19fed5e99372ea1dc232ee30b8dc 100644
--- a/app/code/Magento/Paygate/sql/paygate_setup/install-1.6.0.0.php
+++ b/app/code/Magento/GroupedProduct/sql/groupedproduct_setup/install-0.0.1.php
@@ -18,11 +18,16 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Paygate
  * @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 */
+/** @var $installer \Magento\Catalog\Model\Resource\Setup */
 $installer = $this;
+
+$field = 'country_of_manufacture';
+$applyTo = explode(',', $installer->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to'));
+if (!in_array('grouped', $applyTo)) {
+    $applyTo[] = 'grouped';
+    $installer->updateAttribute(\Magento\Catalog\Model\Product::ENTITY, $field, 'apply_to', implode(',', $applyTo));
+}
diff --git a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml
similarity index 96%
rename from app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml
rename to app/code/Magento/GroupedProduct/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml
index 8f20a88832dd8202ed043d6bd5faa980e38fccb1..69728afe86d418880d81f0bbafbf8f40dd9db84c 100644
--- a/app/code/Magento/Catalog/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml
@@ -25,7 +25,7 @@
  */
  ?>
 
-<?php /* @var $this \Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Grouped */ ?>
+<?php /* @var $this \Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped */ ?>
 <?php $_skipSaleableCheck = $this->helper('Magento\Catalog\Helper\Product')->getSkipSaleableCheck(); ?>
 <div id="catalog_product_composite_configure_fields_grouped" class="grid <?php echo $this->getIsLastFieldset() ? 'last-fieldset' : '' ?>">
     <h4><?php echo __('Associated Products') ?></h4>
@@ -60,7 +60,7 @@
             <?php if ($_hasAssociatedProducts): ?>
                 <?php $i = 0 ?>
             <?php foreach ($_associatedProducts as $_item): ?>
-                <?php $_finalPriceInclTax = $this->helper('Magento\Tax\Helper\Data')->getPrice($_item, $_item->getFinalPrice(), true) ?>
+                <?php $_finalPriceInclTax = $this->helper('Magento\Catalog\Helper\Product\Price')->getPrice($_item, $_item->getFinalPrice(), true) ?>
                 <tr class="<?php echo (++$i % 2) ? 'even' : 'odd' ?>">
                     <td><?php echo $_item->getId() ?></td>
                     <td><?php echo $this->escapeHtml($_item->getSku()) ?></td>
diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/css/grouped-product.css b/app/code/Magento/GroupedProduct/view/adminhtml/css/grouped-product.css
new file mode 100644
index 0000000000000000000000000000000000000000..a3ebc2baf5a10cb5e225214fc0916b8bb830bc99
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/css/grouped-product.css
@@ -0,0 +1,42 @@
+/**
+ * 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)
+ */
+
+#grouped_grid .col-name {
+    width: 25%;
+}
+
+#grouped_grid .col-sku {
+    width: 10%;
+}
+
+#grouped_grid .col-qty {
+    width: 7%;
+}
+
+.ui-dialog.grouped .massaction {
+    display: none;
+}
+
+.ui-dialog.grouped .col-entity_id {
+    width: 2%;
+}
diff --git a/app/code/Magento/Catalog/view/adminhtml/js/grouped-product.js b/app/code/Magento/GroupedProduct/view/adminhtml/js/grouped-product.js
similarity index 100%
rename from app/code/Magento/Catalog/view/adminhtml/js/grouped-product.js
rename to app/code/Magento/GroupedProduct/view/adminhtml/js/grouped-product.js
diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml b/app/code/Magento/GroupedProduct/view/adminhtml/layout/catalog_product_grouped.xml
similarity index 54%
rename from app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml
rename to app/code/Magento/GroupedProduct/view/adminhtml/layout/catalog_product_grouped.xml
index 4fe9dfb32e5ea0d633a681b8488fde6906b5139c..c3a2e591ba8291aacc1835ab9ad9a1ad1632962d 100644
--- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped.xml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/layout/catalog_product_grouped.xml
@@ -24,11 +24,18 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="catalog_product_grouped_grid_popup"/>
+    <update handle="groupedproduct_popup_grid"/>
+    <referenceBlock name="head">
+        <block class="Magento\Theme\Block\Html\Head\Css" name="magento-grouped-product-css-grouped-product-css">
+            <arguments>
+                <argument name="file" xsi:type="string">Magento_GroupedProduct::css/grouped-product.css</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
     <referenceBlock name="product_tabs">
-        <block class="Magento\Catalog\Block\Product\Grouped\AssociatedProducts" name="catalog.product.edit.grouped.container" template="Magento_Catalog::product/grouped/container.phtml">
-            <block class="Magento\View\Element\Template" name="catalog.product.edit.tab.super.container" template="Magento_Catalog::product/grouped/grouped.phtml">
-                <block class="Magento\Catalog\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts" name="catalog.product.edit.tab.super.list" as="list" template="Magento_Catalog::product/grouped/list.phtml">
+        <block class="Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts" name="catalog.product.edit.grouped.container" template="product/grouped/container.phtml">
+            <block class="Magento\View\Element\Template" name="catalog.product.edit.tab.super.container" template="Magento_GroupedProduct::product/grouped/grouped.phtml">
+                <block class="Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts" name="catalog.product.edit.tab.super.list" as="list" template="product/grouped/list.phtml">
                 </block>
                 <block class="Magento\View\Element\Template" name="catalog.product.edit.tab.super.grid.popup.container" as="catalog.product.group.grid.popup.container"/>
             </block>
@@ -37,5 +44,15 @@
             <argument name="name" xsi:type="string">grouped</argument>
             <argument name="block" xsi:type="string">catalog.product.edit.grouped.container</argument>
         </action>
+        <referenceBlock name="product_tabs.customer_options">
+            <arguments>
+                <argument name="can_show" xsi:type="boolean">false</argument>
+            </arguments>
+        </referenceBlock>
+        <referenceBlock name="product_tabs.product-alerts">
+            <arguments>
+                <argument name="can_show" xsi:type="boolean">false</argument>
+            </arguments>
+        </referenceBlock>
     </referenceBlock>
 </layout>
diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_view_type_grouped.xml b/app/code/Magento/GroupedProduct/view/adminhtml/layout/catalog_product_view_type_grouped.xml
similarity index 82%
rename from app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_view_type_grouped.xml
rename to app/code/Magento/GroupedProduct/view/adminhtml/layout/catalog_product_view_type_grouped.xml
index 6bba2b253874ea4a732e7a4433ac059dd185986b..6f2026deca804e62aeb88d388140e6396af92c96 100644
--- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_view_type_grouped.xml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/layout/catalog_product_view_type_grouped.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceBlock name="product.composite.fieldset">
-        <block class="Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Grouped" name="product.composite.fieldset.grouped" before="product.composite.fieldset.options" template="catalog/product/composite/fieldset/grouped.phtml"/>
+        <block class="Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped" name="product.composite.fieldset.grouped" before="product.composite.fieldset.options" template="catalog/product/composite/fieldset/grouped.phtml"/>
         <remove name="product.composite.fieldset.qty"/>
     </referenceBlock>
 </layout>
diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_supergrouppopup.xml b/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_edit_popup.xml
similarity index 96%
rename from app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_supergrouppopup.xml
rename to app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_edit_popup.xml
index c4c35e6e86672cb3fe87fecf87932a3a17bd7d29..0dc6a947c2bc89b71e718ff56f1416df7a250601 100644
--- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_supergrouppopup.xml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_edit_popup.xml
@@ -24,6 +24,6 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="catalog_product_grouped"/>
+    <update handle="catalog_product_grouped" />
     <block class="Magento\Backend\Block\Widget\Grid\Container" name="catalog.product.edit.tab.super.grid.popup.container" template="Magento_Backend::widget/grid/container/empty.phtml" output="1"/>
 </layout>
diff --git a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped_grid_popup.xml b/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml
similarity index 95%
rename from app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped_grid_popup.xml
rename to app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml
index fdca16f4bd8c7b507f266d87a4f5c929557bbe6c..e211f37cd0e28105bacbaed6d1ab71b879bd7c26 100644
--- a/app/code/Magento/Catalog/view/adminhtml/layout/catalog_product_grouped_grid_popup.xml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/layout/groupedproduct_popup_grid.xml
@@ -28,12 +28,12 @@
         <block class="Magento\Backend\Block\Widget\Grid" name="catalog.product.edit.tab.super.group.popup" as="grid">
             <arguments>
                 <argument name="id" xsi:type="string">grouped_grid_popup</argument>
-                <argument name="dataSource" xsi:type="object">Magento\Catalog\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection</argument>
+                <argument name="dataSource" xsi:type="object">Magento\GroupedProduct\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection</argument>
                 <argument name="use_ajax" xsi:type="string">1</argument>
                 <argument name="default_sort" xsi:type="string">id</argument>
                 <argument name="default_dir" xsi:type="string">ASC</argument>
                 <argument name="save_parameters_in_session" xsi:type="string">0</argument>
-                <argument name="grid_url" xsi:type="url" path="*/*/superGroupPopup">
+                <argument name="grid_url" xsi:type="url" path="groupedProduct/edit/popup">
                     <param name="_current">1</param>
                 </argument>
             </arguments>
diff --git a/app/code/Magento/Catalog/view/adminhtml/product/grouped/container.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/container.phtml
similarity index 94%
rename from app/code/Magento/Catalog/view/adminhtml/product/grouped/container.phtml
rename to app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/container.phtml
index 4fab9f2373904ce499bd857f8ed4886061eb18ac..945dd4a6e87ee199836ecb123a8b37cab665c2e1 100644
--- a/app/code/Magento/Catalog/view/adminhtml/product/grouped/container.phtml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/container.phtml
@@ -25,7 +25,7 @@
  */
  ?>
 
-<?php /* @var $this \Magento\Catalog\Block\Product\Grouped\AssociatedProducts  */ ?>
+<?php /* @var $this \Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts  */ ?>
 <div class="entry-edit" id="<?php echo $this->getId() ?>">
     <div class="fieldset-wrapper collapsable-wrapper" id="<?php echo $this->getId() ?>-wrapper">
         <div class="fieldset-wrapper-title">
diff --git a/app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/grouped.phtml
similarity index 94%
rename from app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml
rename to app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/grouped.phtml
index 5f4b3469a0d3c524129a6172716d40517e5b2450..e759f76c8245f6862a55a0a9fe147de9ce97bf75 100644
--- a/app/code/Magento/Catalog/view/adminhtml/product/grouped/grouped.phtml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/grouped.phtml
@@ -43,7 +43,7 @@ $_helper = $this->helper('Magento\Core\Helper\Data');
     <button type="button" data-role="add-product">Add Products to Group</button>
     <script type="text/javascript">
         jQuery(function($) {
-            head.js("<?php echo $this->getViewFileUrl('Magento_Catalog::js/grouped-product.js') ?>", function() {
+            head.js("<?php echo $this->getViewFileUrl('Magento_GroupedProduct::js/grouped-product.js') ?>", function() {
                 $('#grouped-product-container').mage('groupedProduct', {
                     gridPopup: window.<?php echo $_gridPopupBlock->getJsObjectName() ?>
                 });
diff --git a/app/code/Magento/Catalog/view/adminhtml/product/grouped/list.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/list.phtml
similarity index 96%
rename from app/code/Magento/Catalog/view/adminhtml/product/grouped/list.phtml
rename to app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/list.phtml
index 05095c4ff9201a849ea85897d5535be920a113b0..aa3be6ac9e3d63f409cdfb1969c08c49ec1ce462 100644
--- a/app/code/Magento/Catalog/view/adminhtml/product/grouped/list.phtml
+++ b/app/code/Magento/GroupedProduct/view/adminhtml/product/grouped/list.phtml
@@ -23,7 +23,7 @@
  * @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)
  */
-/* @var $this \Magento\Catalog\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts */
+/* @var $this \Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts */
 ?>
 <script type="text/x-jquery-tmpl" id="group-product-template">
 <tr title="#" class="pointer" data-role="row">
diff --git a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view_type_grouped.xml b/app/code/Magento/GroupedProduct/view/frontend/layout/catalog_product_view_type_grouped.xml
similarity index 87%
rename from app/code/Magento/Catalog/view/frontend/layout/catalog_product_view_type_grouped.xml
rename to app/code/Magento/GroupedProduct/view/frontend/layout/catalog_product_view_type_grouped.xml
index adf68a426922b4317f4e24018031e3f2975f5db8..1b3d0eb71b27788b8e0cb5e0a180db68aa9d8cdc 100644
--- a/app/code/Magento/Catalog/view/frontend/layout/catalog_product_view_type_grouped.xml
+++ b/app/code/Magento/GroupedProduct/view/frontend/layout/catalog_product_view_type_grouped.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="product.info.form.content">
-        <block class="Magento\Catalog\Block\Product\View\Type\Grouped" name="product.info.grouped" before="product.info.addtocart" template="product/view/type/grouped.phtml"/>
+        <block class="Magento\GroupedProduct\Block\Product\View\Type\Grouped" name="product.info.grouped" before="product.info.addtocart" template="product/view/type/grouped.phtml"/>
         <container name="product.info.grouped.extra" after="product.info.grouped" before="product.info.grouped" as="product_type_data_extra" label="Product Extra Info"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/GroupedProduct/view/frontend/layout/rss_catalog_category.xml b/app/code/Magento/GroupedProduct/view/frontend/layout/rss_catalog_category.xml
new file mode 100644
index 0000000000000000000000000000000000000000..efd78c1b381cc4675e890ba5a95ef50e0f60f4d7
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/view/frontend/layout/rss_catalog_category.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="rss.catalog.category">
+        <action method="addPriceBlockType">
+            <argument name="type" xsi:type="string">grouped</argument>
+            <argument name="block" xsi:type="string">Magento\Catalog\Block\Product\Price</argument>
+            <argument name="template" xsi:type="string">Magento_GroupedProduct::rss/product/price.phtml</argument>
+        </action>
+    </referenceBlock>
+</layout>
diff --git a/app/code/Magento/GroupedProduct/view/frontend/layout/rss_catalog_new.xml b/app/code/Magento/GroupedProduct/view/frontend/layout/rss_catalog_new.xml
new file mode 100644
index 0000000000000000000000000000000000000000..974fd752c71ab820091e19280fe057fbfe41a8c6
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/view/frontend/layout/rss_catalog_new.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="rss.catalog.new">
+        <action method="addPriceBlockType">
+            <argument name="type" xsi:type="string">grouped</argument>
+            <argument name="block" xsi:type="string">Magento\Catalog\Block\Product\Price</argument>
+            <argument name="template" xsi:type="string">Magento_GroupedProduct::rss/product/price.phtml</argument>
+        </action>
+    </referenceBlock>
+</layout>
diff --git a/app/code/Magento/GroupedProduct/view/frontend/product/price.phtml b/app/code/Magento/GroupedProduct/view/frontend/product/price.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..111c5b4780f3bc0c434451c4a0d491c215e8b158
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/view/frontend/product/price.phtml
@@ -0,0 +1,83 @@
+<?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.
+ *
+ * @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)
+ */
+
+/**
+ * Template for displaying grouped product price in different places (products grid, product view page etc)
+ */
+?>
+<?php
+/* @var $_coreHelper \Magento\Core\Helper\Data */
+$_coreHelper = $this->helper('Magento\Core\Helper\Data');
+/* @var $priceHelper \Magento\Catalog\Helper\Product\Price */
+$priceHelper  = $this->helper('Magento\Catalog\Helper\Product\Price');
+
+$_product = $this->getProduct();
+$_id = $_product->getId();
+$_minimalPriceValue = $_product->getMinimalPrice();
+$showMinPrice = $this->getDisplayMinimalPrice();
+
+if ($showMinPrice && $_minimalPriceValue) {
+    $_exclTax = $priceHelper->getPrice($_product, $_minimalPriceValue);
+    $_inclTax = $priceHelper->getPrice($_product, $_minimalPriceValue, true);
+    $price    = $showMinPrice ? $_minimalPriceValue : 0;
+} else {
+    $price    = $_product->getFinalPrice();
+    $_exclTax = $priceHelper->getPrice($_product, $price);
+    $_inclTax = $priceHelper->getPrice($_product, $price, true);
+}
+?>
+
+<?php if ($price): ?>
+    <div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+        <p<?php if ($showMinPrice): ?> class="minimal-price"<?php endif ?>>
+            <?php if ($showMinPrice): ?>
+                <span class="price-label"><?php echo __('Starting at:') ?></span>
+            <?php endif ?>
+            <?php if ($priceHelper->displayBothPrices()): ?>
+                <span class="price-excluding-tax">
+                        <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                        <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price">
+                            <?php echo $_coreHelper->currency($_exclTax, true, false) ?>
+                        </span>
+                    </span>
+                <span class="price-including-tax">
+                        <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                        <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>">
+                            <?php echo $_coreHelper->currency($_inclTax, true, false) ?>
+                        </span>
+                    </span>
+            <?php else: ?>
+                <?php
+                $_showPrice = $_inclTax;
+                if (!$priceHelper->displayPriceIncludingTax()) {
+                    $_showPrice = $_exclTax;
+                }
+                ?>
+                <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>" itemprop="price">
+                    <?php echo $_coreHelper->currency($_showPrice, true, false) ?>
+                </span>
+            <?php endif; ?>
+        </p>
+    </div>
+<?php endif; ?>
diff --git a/app/code/Magento/Catalog/view/frontend/product/view/type/grouped.phtml b/app/code/Magento/GroupedProduct/view/frontend/product/view/type/grouped.phtml
similarity index 95%
rename from app/code/Magento/Catalog/view/frontend/product/view/type/grouped.phtml
rename to app/code/Magento/GroupedProduct/view/frontend/product/view/type/grouped.phtml
index 073475a699d70e7c3165704687c3f4a9202cabed..e609f0b4048f8eae292146a4f5feb476fd8e4594 100644
--- a/app/code/Magento/Catalog/view/frontend/product/view/type/grouped.phtml
+++ b/app/code/Magento/GroupedProduct/view/frontend/product/view/type/grouped.phtml
@@ -26,7 +26,7 @@
  * Grouped product data template
  *
  * @var $this \Magento\Catalog\Block\Product\View\BaseImage
- * @var $this \Magento\Catalog\Block\Product\View\Type\Grouped
+ * @var $this \Magento\GroupedProduct\Block\Product\View\Type\Grouped
  */
 ?>
 <?php $this->setPreconfiguredValue(); ?>
@@ -80,7 +80,8 @@
                            value="<?php echo $_item->getQty() * 1 ?>"
                            title="<?php echo __('Qty') ?>"
                            class="input-text qty"
-                           data-validate="{'validate-grouped-qty':'#super-product-table'}"/>
+                           data-validate="{'validate-grouped-qty':'#super-product-table'}"
+                           data-validate-message-box="#validate-message-box"/>
                 </div>
             <?php else: ?>
                 <p class="stock unavailable" title="<?php echo __('Availability') ?>">
@@ -101,3 +102,4 @@
     <?php endif; ?>
     </tbody>
 </table>
+<div id="validation-message-box"></div>
diff --git a/app/code/Magento/GroupedProduct/view/frontend/rss/product/price.phtml b/app/code/Magento/GroupedProduct/view/frontend/rss/product/price.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..ef9c29e5e049a7820400e382af3162e082239619
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/view/frontend/rss/product/price.phtml
@@ -0,0 +1,67 @@
+<?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.
+ *
+ * @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)
+ */
+/**
+ * Template for displaying product price in RSS feeds
+ *
+ * @var $this \Magento\Catalog\Block\Product\Price
+ */
+?>
+<?php
+$_product = $this->getProduct();
+$_id = $_product->getId();
+$_minimalPriceValue = $_product->getMinimalPrice();
+
+/** @var \Magento\Catalog\Helper\Product\Price $priceHelper */
+$priceHelper = $this->helper('Magento\Catalog\Helper\Product\Price');
+$_exclTax = $priceHelper->getPrice($_product, $_minimalPriceValue, $includingTax = null);
+$_inclTax = $priceHelper->getPrice($_product, $_minimalPriceValue, $includingTax = true);
+?>
+
+<?php if ($_product->getCanShowPrice() !== false):?>
+    <?php if ($this->getDisplayMinimalPrice() && $_minimalPriceValue): ?>
+        <div class="price-box">
+            <p class="minimal-price">
+                <span class="price-label"><?php echo __('Starting at:') ?></span>
+                <?php if ($this->helper('Magento\Tax\Helper\Data')->displayBothPrices()): ?>
+                    <span class="price-excluding-tax">
+                        <span class="label"><?php echo __('Excl. Tax:') ?></span>
+                        <span class="price" id="price-excluding-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_exclTax, true, false) ?></span>
+                    </span>
+                    <span class="price-including-tax">
+                        <span class="label"><?php echo __('Incl. Tax:') ?></span>
+                        <span class="price" id="price-including-tax-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_inclTax, true, false) ?></span>
+                    </span>
+                <?php else: ?>
+                    <?php
+                    $_showPrice = $_inclTax;
+                    if (!$priceHelper->displayPriceIncludingTax()) {
+                        $_showPrice = $_exclTax;
+                    }
+                    ?>
+                    <span class="price" id="product-minimal-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"><?php echo $this->helper('Magento\Core\Helper\Data')->currency($_showPrice, true, false) ?></span>
+                <?php endif; ?>
+            </p>
+        </div>
+    <?php endif; ?>
+<?php endif; ?>
diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php
index 03e67a9fbd9d5f9a7b76228d36e21031fd916680..45c7456ec2b0f420ce1289d03ca7dd4da61d758b 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export.php
@@ -92,7 +92,7 @@ class Export extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     $model->getFileName(),
                     $model->export(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     $model->getContentType()
                 );
             } catch (\Magento\Core\Exception $e) {
diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php
index 585cf25a0e4657a58189e957868ee875ea5c03cc..b4df770b8db85442eda0c1473f44e836186346cc 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Import.php
@@ -134,7 +134,8 @@ class Import extends \Magento\Backend\App\Action
                 $import = $this->_objectManager->create('Magento\ImportExport\Model\Import')->setData($data);
                 $source = \Magento\ImportExport\Model\Import\Adapter::findAdapterFor(
                     $import->uploadSource(),
-                    $this->_objectManager->create('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::ROOT)
+                    $this->_objectManager->create('Magento\App\Filesystem')
+                        ->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR)
                 );
                 $validationResult = $import->validateSource($source);
 
diff --git a/app/code/Magento/ImportExport/Model/AbstractModel.php b/app/code/Magento/ImportExport/Model/AbstractModel.php
index 33a13a971821ca9e985af8d7ffadfe94fab826d4..03cd96f6f3b692abbc60f1c6b45f1ddca919423f 100644
--- a/app/code/Magento/ImportExport/Model/AbstractModel.php
+++ b/app/code/Magento/ImportExport/Model/AbstractModel.php
@@ -79,18 +79,18 @@ abstract class AbstractModel extends \Magento\Object
 
     /**
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Log\AdapterFactory $adapterFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Log\AdapterFactory $adapterFactory,
         array $data = array()
     ) {
         $this->_logger = $logger;
-        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->_adapterFactory = $adapterFactory;
         parent::__construct($data);
     }
diff --git a/app/code/Magento/ImportExport/Model/Export.php b/app/code/Magento/ImportExport/Model/Export.php
index 13acf89f6300633d131e78e96ebfca4203868987..e4f8bcd7e8fa1008c67426b4617ba3c706bbb076 100644
--- a/app/code/Magento/ImportExport/Model/Export.php
+++ b/app/code/Magento/ImportExport/Model/Export.php
@@ -77,7 +77,7 @@ class Export extends \Magento\ImportExport\Model\AbstractModel
 
     /**
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Log\AdapterFactory $adapterFactory
      * @param \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig
      * @param \Magento\ImportExport\Model\Export\Entity\Factory $entityFactory
@@ -86,7 +86,7 @@ class Export extends \Magento\ImportExport\Model\AbstractModel
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Log\AdapterFactory $adapterFactory,
         \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig,
         \Magento\ImportExport\Model\Export\Entity\Factory $entityFactory,
diff --git a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php
index 85f88718e9f120fb6c60a47527d65434fd29fc56..449cf6ec2acf5dc0123a21af2c790a8aae8a61ad 100644
--- a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php
+++ b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php
@@ -57,13 +57,13 @@ abstract class AbstractAdapter
     /**
      * Constructor
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param null                $destination
      * @throws \Magento\Core\Exception
      */
-    public function __construct(\Magento\Filesystem $filesystem, $destination = null)
+    public function __construct(\Magento\App\Filesystem $filesystem, $destination = null)
     {
-        $this->_directoryHandle = $filesystem->getDirectoryWrite(\Magento\Filesystem::SYS_TMP);
+        $this->_directoryHandle = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::SYS_TMP_DIR);
         if (!$destination) {
             $destination = uniqid('importexport_');
             $this->_directoryHandle->touch($destination);
diff --git a/app/code/Magento/ImportExport/Model/Export/Entity/Product.php b/app/code/Magento/ImportExport/Model/Export/Entity/Product.php
index 04c36d20d6f3d4f7cd2d1813f4983a8ae054b736..af6a748089c29aa25e9ec2ac26e51b24c16c84d5 100644
--- a/app/code/Magento/ImportExport/Model/Export/Entity/Product.php
+++ b/app/code/Magento/ImportExport/Model/Export/Entity/Product.php
@@ -527,7 +527,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
                 \Magento\Catalog\Model\Product\Link::LINK_TYPE_RELATED,
                 \Magento\Catalog\Model\Product\Link::LINK_TYPE_UPSELL,
                 \Magento\Catalog\Model\Product\Link::LINK_TYPE_CROSSSELL,
-                \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED
+                \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED,
             ))
             ->where('cpl.product_id IN (?)', $productIds);
 
@@ -825,7 +825,7 @@ class Product extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
                 \Magento\Catalog\Model\Product\Link::LINK_TYPE_RELATED   => '_links_related_',
                 \Magento\Catalog\Model\Product\Link::LINK_TYPE_UPSELL    => '_links_upsell_',
                 \Magento\Catalog\Model\Product\Link::LINK_TYPE_CROSSSELL => '_links_crosssell_',
-                \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED   => '_associated_'
+                \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED   => '_associated_'
             );
             $configurableProductsCollection = $this->_entityCollection;
             $configurableProductsCollection->addAttributeToFilter(
diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php
index ff9f7e40ff36b538fe7d2ff0a03ad798046d9cc9..0d8dd9299f059932fe137f1fb327d7ae7f85f328 100644
--- a/app/code/Magento/ImportExport/Model/Import.php
+++ b/app/code/Magento/ImportExport/Model/Import.php
@@ -133,13 +133,13 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
     protected $_behaviorFactory;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Log\AdapterFactory $adapterFactory
      * @param \Magento\ImportExport\Helper\Data $importExportData
      * @param \Magento\Core\Model\Config $coreConfig
@@ -155,7 +155,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Log\AdapterFactory $adapterFactory,
         \Magento\ImportExport\Helper\Data $importExportData,
         \Magento\Core\Model\Config $coreConfig,
@@ -236,7 +236,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
     {
         return \Magento\ImportExport\Model\Import\Adapter::findAdapterFor(
             $sourceFile,
-            $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT)
+            $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR)
         );
     }
 
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php
index 4449f311ec6fb3676e16591edeb3b2ed97b07681..5a6bffeb3acc08e75a8ef07a83598878a9b00a6f 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Product.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product.php
@@ -425,7 +425,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
      * @param \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory
      * @param \Magento\ImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory
      * @param \Magento\ImportExport\Model\Import\UploaderFactory $uploaderFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac
      * @param \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -456,7 +456,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory,
         \Magento\ImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory,
         \Magento\ImportExport\Model\Import\UploaderFactory $uploaderFactory,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac,
         \Magento\CatalogInventory\Model\Stock\ItemFactory $stockItemFactory,
         \Magento\Core\Model\LocaleInterface $locale,
@@ -478,7 +478,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         $this->_linkFactory = $linkFactory;
         $this->_proxyProdFactory = $proxyProdFactory;
         $this->_uploaderFactory = $uploaderFactory;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_stockResItemFac = $stockResItemFac;
         $this->_stockItemFactory = $stockItemFactory;
         $this->_locale = $locale;
@@ -1254,13 +1254,13 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
                 if (!is_null($productType)) {
                     $previousType = $productType;
                 }
-                if (!is_null($rowData[self::COL_ATTR_SET])) {
-                    $prevAttributeSet = $rowData[\Magento\ImportExport\Model\Import\Entity\Product::COL_ATTR_SET];
+                if (isset($rowData[self::COL_ATTR_SET])) {
+                    $prevAttributeSet = $rowData[self::COL_ATTR_SET];
                 }
                 if (self::SCOPE_NULL == $rowScope) {
                     // for multiselect attributes only
                     if (!is_null($prevAttributeSet)) {
-                        $rowData[\Magento\ImportExport\Model\Import\Entity\Product::COL_ATTR_SET] = $prevAttributeSet;
+                        $rowData[self::COL_ATTR_SET] = $prevAttributeSet;
                     }
                     if (is_null($productType) && !is_null($previousType)) {
                         $productType = $previousType;
diff --git a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php
index f6aad4ebf51bd138be63e19eb51460f19e7f62e8..4ddcf479a9f0ed649a158320328c159c2d97456e 100644
--- a/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php
+++ b/app/code/Magento/ImportExport/Model/Import/Entity/Product/Type/Grouped.php
@@ -109,7 +109,7 @@ class Grouped
      */
     public function saveData()
     {
-        $groupedLinkId = \Magento\Catalog\Model\Product\Link::LINK_TYPE_GROUPED;
+        $groupedLinkId = \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED;
         $connection    = $this->_resource->getConnection('write');
         $resource      = $this->_productLinkFactory->create();
         $mainTable     = $resource->getMainTable();
diff --git a/app/code/Magento/ImportExport/Model/Import/Uploader.php b/app/code/Magento/ImportExport/Model/Import/Uploader.php
index bb17d269b0e28e7f7c4c053f4d9d9a7983479f59..c5829d581ca84c43983382d1af11909be383de7e 100644
--- a/app/code/Magento/ImportExport/Model/Import/Uploader.php
+++ b/app/code/Magento/ImportExport/Model/Import/Uploader.php
@@ -67,7 +67,7 @@ class Uploader extends \Magento\Core\Model\File\Uploader
         \Magento\Core\Helper\File\Storage $coreFileStorage,
         \Magento\Image\AdapterFactory $imageFactory,
         \Magento\Core\Model\File\Validator\NotProtectedExtension $validator,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $filePath = null
     ) {
         if (!is_null($filePath)) {
@@ -77,7 +77,7 @@ class Uploader extends \Magento\Core\Model\File\Uploader
         $this->_coreFileStorageDb = $coreFileStorageDb;
         $this->_coreFileStorage = $coreFileStorage;
         $this->_validator = $validator;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
diff --git a/app/code/Magento/ImportExport/etc/module.xml b/app/code/Magento/ImportExport/etc/module.xml
index b5bfb7199eb12ec517b7c6889f64dadd3c19fe4e..c5b14149ce874670c31de32e3e4b9e7b96e10b0e 100755
--- a/app/code/Magento/ImportExport/etc/module.xml
+++ b/app/code/Magento/ImportExport/etc/module.xml
@@ -37,6 +37,7 @@
             <module name="Magento_CatalogInventory"/>
             <module name="Magento_Customer"/>
             <module name="Magento_Directory"/>
+            <module name="Magento_GroupedProduct"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Index/App/Indexer.php b/app/code/Magento/Index/App/Indexer.php
index 924ddf0dea6aa174d5429052f69b7e637401e1ad..5f9826cc567e837c9f6958053877852016286c42 100644
--- a/app/code/Magento/Index/App/Indexer.php
+++ b/app/code/Magento/Index/App/Indexer.php
@@ -25,6 +25,7 @@
  */
 namespace Magento\Index\App;
 
+use Magento\App\Console\Response;
 use Magento\AppInterface;
 
 class Indexer implements AppInterface
@@ -37,7 +38,7 @@ class Indexer implements AppInterface
     protected $_reportDir;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -46,30 +47,38 @@ class Indexer implements AppInterface
      */
     protected $_indexerFactory;
 
+    /**
+     * @var \Magento\App\Console\Response
+     */
+    protected $_response;
+
     /**
      * @param string $reportDir
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Index\Model\IndexerFactory $indexerFactory
+     * @param Response $response
      */
     public function __construct(
         $reportDir,
-        \Magento\Filesystem $filesystem,
-        \Magento\Index\Model\IndexerFactory $indexerFactory
+        \Magento\App\Filesystem $filesystem,
+        \Magento\Index\Model\IndexerFactory $indexerFactory,
+        Response $response
     ) {
         $this->_reportDir = $reportDir;
         $this->_filesystem = $filesystem;
         $this->_indexerFactory = $indexerFactory;
+        $this->_response = $response;
     }
 
     /**
      * Run application
      *
-     * @return int
+     * @return \Magento\App\ResponseInterface
      */
     public function execute()
     {
         /* Clean reports */
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $path = $directory->getRelativePath($this->_reportDir);
         if ($directory->isExist($path)) {
             $directory->delete($path);
@@ -84,7 +93,8 @@ class Indexer implements AppInterface
                 $process->reindexEverything();
             }
         }
-        return 0;
+        $this->_response->setCode(0);
+        return $this->_response;
     }
 }
 
diff --git a/app/code/Magento/Index/App/Shell.php b/app/code/Magento/Index/App/Shell.php
index 60c1c33b70e8d8edfc7869980394714f3bb2ba89..fc90a6021676eed50b37b8043870c1f2d595db71 100644
--- a/app/code/Magento/Index/App/Shell.php
+++ b/app/code/Magento/Index/App/Shell.php
@@ -25,8 +25,8 @@
  */
 namespace Magento\Index\App;
 
-use Magento\AppInterface,
-    Magento\Index\App\Shell\ErrorHandler;
+use Magento\App\Console\Response;
+use Magento\AppInterface;
 
 class Shell implements AppInterface
 {
@@ -38,34 +38,34 @@ class Shell implements AppInterface
     protected $_entryFileName;
 
     /**
-     * @var \Magento\Index\App\Shell\ErrorHandler
+     * @var \Magento\Index\Model\ShellFactory
      */
-    protected $_errorHandler;
+    protected $_shellFactory;
 
     /**
-     * @var \Magento\Index\Model\ShellFactory
+     * @var \Magento\App\Console\Response
      */
-    protected $_shellFactory;
+    protected $_response;
 
     /**
      * @param string $entryFileName
      * @param \Magento\Index\Model\ShellFactory $shellFactory
-     * @param ErrorHandler $errorHandler
+     * @param Response $response
      */
     public function __construct(
         $entryFileName,
         \Magento\Index\Model\ShellFactory $shellFactory,
-        ErrorHandler $errorHandler
+        Response $response
     ) {
         $this->_entryFileName = $entryFileName;
         $this->_shellFactory = $shellFactory;
-        $this->_errorHandler = $errorHandler;
+        $this->_response = $response;
     }
 
     /**
      * Run application
      *
-     * @return int
+     * @return \Magento\App\ResponseInterface
      */
     public function execute()
     {
@@ -73,8 +73,10 @@ class Shell implements AppInterface
         $shell = $this->_shellFactory->create(array('entryPoint' => $this->_entryFileName));
         $shell->run();
         if ($shell->hasErrors()) {
-            $this->_errorHandler->terminate(1);
+            $this->_response->setCode(-1);
+        } else {
+            $this->_response->setCode(0);
         }
-        return 0;
+        return $this->_response;
     }
 }
diff --git a/app/code/Magento/Index/Model/Lock/Storage.php b/app/code/Magento/Index/Model/Lock/Storage.php
index 832dbe2d90794e9d2a6312663c2846b8e7293b66..e0e783d8c773df80788bc3affad81bcf731f9cb2 100644
--- a/app/code/Magento/Index/Model/Lock/Storage.php
+++ b/app/code/Magento/Index/Model/Lock/Storage.php
@@ -52,14 +52,14 @@ class Storage
 
     /**
      * @param \Magento\Index\Model\Process\FileFactory $fileFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Index\Model\Process\FileFactory $fileFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_fileFactory   = $fileFactory;
-        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Index/Model/Shell.php b/app/code/Magento/Index/Model/Shell.php
index cfdbf181f91d4cd1f45a595f684815894bb41c80..cc69d816146e9e0c238915c66ea93fae67956f40 100644
--- a/app/code/Magento/Index/Model/Shell.php
+++ b/app/code/Magento/Index/Model/Shell.php
@@ -48,12 +48,12 @@ class Shell extends \Magento\Core\Model\AbstractShell
     protected $_indexer;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $entryPoint
      * @param Indexer $indexer
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $entryPoint,
         \Magento\Index\Model\Indexer $indexer
     ) {
diff --git a/app/code/Magento/Install/App/Action/Plugin/Dir.php b/app/code/Magento/Install/App/Action/Plugin/Dir.php
index 780e00ffd36f7ed17e019dbff2ca0da51f177f92..348085244ff56058c62da5c608f26b0d5f808ca5 100644
--- a/app/code/Magento/Install/App/Action/Plugin/Dir.php
+++ b/app/code/Magento/Install/App/Action/Plugin/Dir.php
@@ -25,7 +25,7 @@
 
 namespace Magento\Install\App\Action\Plugin;
 
-use Magento\Filesystem,
+use Magento\App\Filesystem,
     Magento\Filesystem\FilesystemException,
     Magento\Filesystem\Directory\Write,
     Magento\App\State,
diff --git a/app/code/Magento/Install/App/Console.php b/app/code/Magento/Install/App/Console.php
index 99a673f7e44a7c13a7db78e1bd82e4122a90bb1d..e35f7491681326e3bda95364264f4dc013b0d967 100644
--- a/app/code/Magento/Install/App/Console.php
+++ b/app/code/Magento/Install/App/Console.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Install\App;
 
+use Magento\App\Console\Response;
+
 class Console implements \Magento\AppInterface
 {
     /**
@@ -58,13 +60,19 @@ class Console implements \Magento\AppInterface
      */
     protected $rootDirectory;
 
+    /**
+     * @var \Magento\App\Console\Response
+     */
+    protected $_response;
+
     /**
      * @param \Magento\Install\Model\Installer\ConsoleFactory $installerFactory
      * @param Output $output
      * @param \Magento\App\State $state
      * @param \Magento\App\ObjectManager\ConfigLoader $loader
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Filesystem $filesystem
+     * @param Response $response
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $arguments
      */
     public function __construct(
@@ -73,15 +81,17 @@ class Console implements \Magento\AppInterface
         \Magento\App\State $state,
         \Magento\App\ObjectManager\ConfigLoader $loader,
         \Magento\ObjectManager $objectManager,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
+        Response $response,
         array $arguments = array()
     ) {
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $this->_loader = $loader;
         $this->_state  = $state;
         $this->_installerFactory = $installerFactory;
         $this->_arguments = $this->_buildInitArguments($arguments);
         $this->_output = $output;
+        $this->_response = $response;
         $this->_objectManager = $objectManager;
     }
 
@@ -97,13 +107,13 @@ class Console implements \Magento\AppInterface
         if (!empty($args[\Magento\Install\Model\Installer\Console::OPTION_URIS])) {
             $uris = unserialize(base64_decode($args[\Magento\Install\Model\Installer\Console::OPTION_URIS]));
             foreach ($uris as $code => $uri) {
-                $args[\Magento\Filesystem::PARAM_APP_DIRS][$code]['uri'] = $uri;
+                $args[\Magento\App\Filesystem::PARAM_APP_DIRS][$code]['uri'] = $uri;
             }
         }
         if (!empty($args[\Magento\Install\Model\Installer\Console::OPTION_DIRS])) {
             $dirs = unserialize(base64_decode($args[\Magento\Install\Model\Installer\Console::OPTION_DIRS]));
             foreach ($dirs as $code => $dir) {
-                $args[\Magento\Filesystem::PARAM_APP_DIRS][$code]['path'] = $dir;
+                $args[\Magento\App\Filesystem::PARAM_APP_DIRS][$code]['path'] = $dir;
             }
         }
         return $args;
@@ -141,8 +151,9 @@ class Console implements \Magento\AppInterface
     }
 
     /**
-     * Execute application
-     * @return int
+     * Run application
+     *
+     * @return \Magento\App\ResponseInterface
      */
     public function execute()
     {
@@ -162,6 +173,7 @@ class Console implements \Magento\AppInterface
         } else {
             $this->_handleInstall($installer);
         }
-        return 0;
+        $this->_response->setCode(0);
+        return $this->_response;
     }
 }
diff --git a/app/code/Magento/Install/Block/AbstractBlock.php b/app/code/Magento/Install/Block/AbstractBlock.php
index 72028f87e5808442af2345c3654887746730c00f..67a06eb14705f3c4e24f81abcdea6de19d59f19a 100644
--- a/app/code/Magento/Install/Block/AbstractBlock.php
+++ b/app/code/Magento/Install/Block/AbstractBlock.php
@@ -72,6 +72,7 @@ abstract class AbstractBlock extends \Magento\View\Element\Template
         $this->_installer = $installer;
         $this->_installWizard = $installWizard;
         $this->_session = $session;
+        $this->_isScopePrivate = true;
     }
 
 
diff --git a/app/code/Magento/Install/Block/Begin.php b/app/code/Magento/Install/Block/Begin.php
index e407601b5bf46ce2616e51e2d11670b5c4f5e15d..a88d772ad912eb72ef7b051392abd86f77b3ae65 100644
--- a/app/code/Magento/Install/Block/Begin.php
+++ b/app/code/Magento/Install/Block/Begin.php
@@ -79,7 +79,7 @@ class Begin extends \Magento\Install\Block\AbstractBlock
     public function getLicenseHtml()
     {
         return ($this->_eulaFile)
-            ? $this->_filesystem->getDirectoryRead(\Magento\Filesystem::ROOT)->readFile($this->_eulaFile)
+            ? $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR)->readFile($this->_eulaFile)
             : '';
     }
 }
diff --git a/app/code/Magento/Install/Block/Download.php b/app/code/Magento/Install/Block/Download.php
index 195e888cd343bd99cd8f82388f81fbe7d7f6f6c8..9b53e921fc3c2f339d8e19227be84f570244194a 100644
--- a/app/code/Magento/Install/Block/Download.php
+++ b/app/code/Magento/Install/Block/Download.php
@@ -89,7 +89,7 @@ class Download extends \Magento\Install\Block\AbstractBlock
     public function hasLocalCopy()
     {
         $path = $this->_moduleReader->getModuleDir('etc', 'Magento_Adminhtml');
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $directory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
 
         if ($path && $directory->isDirectory($directory->getRelativePath($path))) {
             return true;
diff --git a/app/code/Magento/Install/Block/State.php b/app/code/Magento/Install/Block/State.php
index eabe10c20a955f434428ebc1cbe355fddaaec49c..72f503e62581d5a53f2918f03ea75c7d0049a8a7 100644
--- a/app/code/Magento/Install/Block/State.php
+++ b/app/code/Magento/Install/Block/State.php
@@ -54,7 +54,7 @@ class State extends \Magento\View\Element\Template
         array $data = array()
     ) {
         parent::__construct($context, $data);
-
+        $this->_isScopePrivate = true;
         $this->assign('steps', $wizard->getSteps());
     }
 
diff --git a/app/code/Magento/Install/Model/Config.php b/app/code/Magento/Install/Model/Config.php
index 0a2ba993d10e023e11b12ff64f9208c9bb82f5b7..f95272ee31d88415e58d0ecefce98b9a30c66aea 100644
--- a/app/code/Magento/Install/Model/Config.php
+++ b/app/code/Magento/Install/Model/Config.php
@@ -46,7 +46,7 @@ class Config
     /**
      * Filesystem
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -54,11 +54,11 @@ class Config
      * Constructor
      *
      * @param Config\Data $dataStorage
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Install\Model\Config\Data  $dataStorage,
-        \Magento\Filesystem                 $filesystem
+        \Magento\App\Filesystem                 $filesystem
     ) {
         $this->_dataStorage = $dataStorage;
         $this->filesystem   = $filesystem;
diff --git a/app/code/Magento/Install/Model/Installer/Config.php b/app/code/Magento/Install/Model/Installer/Config.php
index 3cc67560343b45e4b8be987c1389ec4de380702e..3ac3817922180fa0bb5d7fbcb432cffdafb5f776 100644
--- a/app/code/Magento/Install/Model/Installer/Config.php
+++ b/app/code/Magento/Install/Model/Installer/Config.php
@@ -49,7 +49,7 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller
     protected $_configData = array();
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -78,14 +78,14 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller
     /**
      * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\App\RequestInterface $request
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Message\ManagerInterface $messageManager
      */
     public function __construct(
         \Magento\Install\Model\Installer $installer,
         \Magento\App\RequestInterface $request,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Message\ManagerInterface $messageManager
     ) {
@@ -93,8 +93,8 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller
         $this->_request = $request;
         $this->_storeManager = $storeManager;
         $this->_filesystem = $filesystem;
-        $this->_pubDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::PUB_LIB);
-        $this->_configDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::CONFIG);
+        $this->_pubDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::PUB_LIB_DIR);
+        $this->_configDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::CONFIG_DIR);
         $this->messageManager = $messageManager;
     }
 
@@ -119,9 +119,9 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller
         $data = $this->getConfigData();
 
         $defaults = array(
-            'root_dir' => $this->_filesystem->getPath(\Magento\Filesystem::ROOT),
-            'app_dir'  => $this->_filesystem->getPath(\Magento\Filesystem::APP),
-            'var_dir'  => $this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR),
+            'root_dir' => $this->_filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR),
+            'app_dir'  => $this->_filesystem->getPath(\Magento\App\Filesystem::APP_DIR),
+            'var_dir'  => $this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR),
             'base_url' => $this->_request->getDistroBaseUrl(),
         );
         foreach ($defaults as $index => $value) {
@@ -205,7 +205,7 @@ class Config extends \Magento\Install\Model\Installer\AbstractInstaller
     {
         try {
             $staticFile = $this->_findFirstFileRelativePath('', '/.+\.(html?|js|css|gif|jpe?g|png)$/');
-            $staticUrl = $baseUrl . $this->_filesystem->getUri(\Magento\Filesystem::PUB_LIB) . '/' . $staticFile;
+            $staticUrl = $baseUrl . $this->_filesystem->getUri(\Magento\App\Filesystem::PUB_LIB_DIR) . '/' . $staticFile;
             $client = new \Magento\HTTP\ZendClient($staticUrl);
             $response = $client->request('GET');
         } catch (\Exception $e){
diff --git a/app/code/Magento/Install/Model/Installer/Console.php b/app/code/Magento/Install/Model/Installer/Console.php
index a5fef73d0c20303c7e2cbe0997e1d465729ef7bf..761c921c3b137d355419e19e1b3cf5142f8318db 100644
--- a/app/code/Magento/Install/Model/Installer/Console.php
+++ b/app/code/Magento/Install/Model/Installer/Console.php
@@ -75,7 +75,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
     );
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -132,7 +132,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
      * @param \Magento\Install\Model\Installer $installer
      * @param \Magento\App\Resource\Config $resourceConfig
      * @param \Magento\Module\UpdaterInterface $dbUpdater
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Install\Model\Installer\Data $installerData
      * @param \Magento\App\State $appState
      * @param \Magento\Core\Model\LocaleInterface $locale
@@ -142,7 +142,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
         \Magento\Install\Model\Installer $installer,
         \Magento\App\Resource\Config $resourceConfig,
         \Magento\Module\UpdaterInterface $dbUpdater,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Install\Model\Installer\Data $installerData,
         \Magento\App\State $appState,
         \Magento\Core\Model\LocaleInterface $locale,
@@ -361,7 +361,7 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
              * Change directories mode to be writable by apache user
              */
             $this->_filesystem
-                ->getDirectoryWrite(\Magento\Filesystem::VAR_DIR)
+                ->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR)
                 ->changePermissions('', 0777);
 
             return $encryptionKey;
@@ -402,13 +402,13 @@ class Console extends \Magento\Install\Model\Installer\AbstractInstaller
         $this->_cleanUpDatabase();
 
         /* Remove temporary directories and local.xml */
-        $varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         foreach ($varDirectory->read() as $path) {
             if ($varDirectory->isDirectory($path)) {
                 $varDirectory->delete($path);
             }
         }
-        $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::CONFIG)->delete('local.xml');
+        $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::CONFIG_DIR)->delete('local.xml');
         return true;
     }
 
diff --git a/app/code/Magento/Install/Model/Installer/Filesystem.php b/app/code/Magento/Install/Model/Installer/Filesystem.php
index 641fd7a64142c22c10e878416e8838cd81842909..15c629a5118fc9d635c2b769d5abeb53e1df221b 100644
--- a/app/code/Magento/Install/Model/Installer/Filesystem.php
+++ b/app/code/Magento/Install/Model/Installer/Filesystem.php
@@ -39,7 +39,7 @@ class Filesystem extends \Magento\Install\Model\Installer\AbstractInstaller
     /**#@- */
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -64,13 +64,13 @@ class Filesystem extends \Magento\Install\Model\Installer\AbstractInstaller
 
     /**
      * @param \Magento\Install\Model\Installer $installer
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Install\Model\Config $installConfig
      * @param \Magento\Message\ManagerInterface $messageManager
      */
     public function __construct(
         \Magento\Install\Model\Installer $installer,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Install\Model\Config $installConfig,
         \Magento\Message\ManagerInterface $messageManager
     ) {
@@ -124,7 +124,7 @@ class Filesystem extends \Magento\Install\Model\Installer\AbstractInstaller
     protected function _checkFullPath($fullPath, $recursive, $existence)
     {
         $result = true;
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $path = $directory->getRelativePath($fullPath);
         if ($recursive && $directory->isDirectory($path)) {
             $pathsToCheck = $directory->read($path);
diff --git a/app/code/Magento/Install/etc/module.xml b/app/code/Magento/Install/etc/module.xml
index b64b00ab7fe83a96c3fea49d6fe00863b6919216..6856394109ab1459ac592abde150c6eda4cff7c9 100755
--- a/app/code/Magento/Install/etc/module.xml
+++ b/app/code/Magento/Install/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Directory"/>
             <module name="Magento_User"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Integration/etc/module.xml b/app/code/Magento/Integration/etc/module.xml
index c6d174207db766ba0a114dead21e38a974f97210..8205cd2e4c42bf26b0128d6102d784e1a7228170 100755
--- a/app/code/Magento/Integration/etc/module.xml
+++ b/app/code/Magento/Integration/etc/module.xml
@@ -31,6 +31,8 @@
         <depends>
             <module name="Magento_Core"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Customer"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Log/App/Shell.php b/app/code/Magento/Log/App/Shell.php
index 809d740fcb7ad079d63fcbb65a56cdcc794da984..fb56d6e8004cdcc3e7d45e2ae1c401421d4073e3 100644
--- a/app/code/Magento/Log/App/Shell.php
+++ b/app/code/Magento/Log/App/Shell.php
@@ -25,6 +25,7 @@
  */
 namespace Magento\Log\App;
 
+use Magento\App\Console\Response;
 use Magento\AppInterface;
 
 class Shell implements AppInterface
@@ -41,29 +42,38 @@ class Shell implements AppInterface
      */
     protected $_shellFactory;
 
+    /**
+     * @var \Magento\App\Console\Response
+     */
+    protected $_response;
+
     /**
      * @param string $entryFileName
      * @param \Magento\Log\Model\ShellFactory $shellFactory
+     * @param Response $response
      */
     public function __construct(
         $entryFileName,
-        \Magento\Log\Model\ShellFactory $shellFactory
+        \Magento\Log\Model\ShellFactory $shellFactory,
+        Response $response
     ) {
         $this->_entryFileName = $entryFileName;
         $this->_shellFactory = $shellFactory;
+        $this->_response = $response;
     }
 
 
     /**
      * Run application
      *
-     * @return int
+     * @return \Magento\App\ResponseInterface
      */
     public function execute()
     {
         /** @var $shell \Magento\Log\Model\Shell */
         $shell = $this->_shellFactory->create(array('entryPoint' => $this->_entryFileName));
         $shell->run();
-        return 0;
+        $this->_response->setCode(0);
+        return $this->_response;
     }
 }
diff --git a/app/code/Magento/Log/Model/Shell.php b/app/code/Magento/Log/Model/Shell.php
index c2bb07aabad33923cee940fe25720d4c32e1196f..2fa004b9672d3d990b8fcf9b1bc355edc15e955d 100644
--- a/app/code/Magento/Log/Model/Shell.php
+++ b/app/code/Magento/Log/Model/Shell.php
@@ -41,12 +41,12 @@ class Shell extends \Magento\Core\Model\AbstractShell
     protected $_commandFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $entryPoint
      * @param Shell\Command\Factory $commandFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $entryPoint,
         \Magento\Log\Model\Shell\Command\Factory $commandFactory
     ) {
diff --git a/app/code/Magento/Log/etc/module.xml b/app/code/Magento/Log/etc/module.xml
index 5a11ddf352b06a3b7118570503f93687d44c0d3d..f3d7e8dd56d0d222ae14de03711afe22df9cdcf3 100755
--- a/app/code/Magento/Log/etc/module.xml
+++ b/app/code/Magento/Log/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php b/app/code/Magento/Multishipping/Block/Checkout/AbstractMultishipping.php
similarity index 83%
rename from app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php
rename to app/code/Magento/Multishipping/Block/Checkout/AbstractMultishipping.php
index 04a71946dcab20a58302944b15f1923f2250fe50..b1d755d62db83298a940d4cb25f69186ebdc1b47 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/AbstractMultishipping.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/AbstractMultishipping.php
@@ -31,23 +31,23 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class AbstractMultishipping extends \Magento\View\Element\Template
 {
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         array $data = array()
     ) {
         $this->_multishipping = $multishipping;
@@ -57,7 +57,7 @@ class AbstractMultishipping extends \Magento\View\Element\Template
     /**
      * Retrieve multishipping checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function getCheckout()
     {
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Address/Select.php b/app/code/Magento/Multishipping/Block/Checkout/Address/Select.php
similarity index 91%
rename from app/code/Magento/Checkout/Block/Multishipping/Address/Select.php
rename to app/code/Magento/Multishipping/Block/Checkout/Address/Select.php
index aa64538839d5378444a806fb413b5926895d304f..38abc9578479f6939e7a86328bf3542a6f9a7799 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Address/Select.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Address/Select.php
@@ -31,10 +31,15 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping\Address;
+namespace Magento\Multishipping\Block\Checkout\Address;
 
-class Select extends \Magento\Checkout\Block\Multishipping\AbstractMultishipping
+class Select extends \Magento\Multishipping\Block\Checkout\AbstractMultishipping
 {
+    /**
+     * @var bool
+     */
+    protected $_isScopePrivate = true;
+
     protected function _prepareLayout()
     {
         if ($headBlock = $this->getLayout()->getBlock('head')) {
@@ -80,6 +85,6 @@ class Select extends \Magento\Checkout\Block\Multishipping\AbstractMultishipping
 
     public function getBackUrl()
     {
-        return $this->getUrl('*/multishipping/billing');
+        return $this->getUrl('*/checkout/billing');
     }
 }
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Addresses.php b/app/code/Magento/Multishipping/Block/Checkout/Addresses.php
similarity index 91%
rename from app/code/Magento/Checkout/Block/Multishipping/Addresses.php
rename to app/code/Magento/Multishipping/Block/Checkout/Addresses.php
index 549994f15558ed884c961275da0a71e0108ae525..6c089de62afc0a39ac59fd3d27874f92826b382c 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Addresses.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Addresses.php
@@ -31,7 +31,7 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class Addresses extends \Magento\Sales\Block\Items\AbstractItems
 {
@@ -41,31 +41,32 @@ class Addresses extends \Magento\Sales\Block\Items\AbstractItems
     protected $_filterGridFactory;
 
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Filter\Object\GridFactory $filterGridFactory
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
         \Magento\Filter\Object\GridFactory $filterGridFactory,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         array $data = array()
     ) {
         $this->_filterGridFactory = $filterGridFactory;
         $this->_multishipping = $multishipping;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
      * Retrieve multishipping checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function getCheckout()
     {
@@ -175,7 +176,7 @@ class Addresses extends \Magento\Sales\Block\Items\AbstractItems
      */
     public function getNewAddressUrl()
     {
-        return $this->getUrl('*/multishipping_address/newShipping');
+        return $this->getUrl('*/checkout_address/newShipping');
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Billing.php b/app/code/Magento/Multishipping/Block/Checkout/Billing.php
similarity index 91%
rename from app/code/Magento/Checkout/Block/Multishipping/Billing.php
rename to app/code/Magento/Multishipping/Block/Checkout/Billing.php
index c487dd9ac52afe1f6207fdca49f841c01281c3b7..55fc5a4cf353fbdc7432c59dfb019a14f61cba3d 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Billing.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Billing.php
@@ -31,12 +31,12 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class Billing extends \Magento\Payment\Block\Form\Container
 {
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
@@ -48,20 +48,21 @@ class Billing extends \Magento\Payment\Block\Form\Container
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Payment\Helper\Data $paymentHelper
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
         \Magento\Payment\Helper\Data $paymentHelper,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         \Magento\Checkout\Model\Session $checkoutSession,
         array $data = array()
     ) {
         $this->_multishipping = $multishipping;
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $paymentHelper, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -146,7 +147,7 @@ class Billing extends \Magento\Payment\Block\Form\Container
      */
     public function getSelectAddressUrl()
     {
-        return $this->getUrl('*/multishipping_address/selectBilling');
+        return $this->getUrl('*/checkout_address/selectBilling');
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php b/app/code/Magento/Multishipping/Block/Checkout/Billing/Items.php
similarity index 87%
rename from app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php
rename to app/code/Magento/Multishipping/Block/Checkout/Billing/Items.php
index 61042a2145a195eed810a64dcbbba723c93cd583..45f53e4f86ede1f88cfebde4b17fbb7dce3f1d21 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Billing/Items.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Billing/Items.php
@@ -31,12 +31,12 @@
  * @package    Magento_Checkout
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping\Billing;
+namespace Magento\Multishipping\Block\Checkout\Billing;
 
 class Items extends \Magento\Sales\Block\Items\AbstractItems
 {
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
@@ -47,25 +47,26 @@ class Items extends \Magento\Sales\Block\Items\AbstractItems
 
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         \Magento\Checkout\Model\Session $checkoutSession,
         array $data = array()
     ) {
         $this->_multishipping = $multishipping;
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
      * Get multishipping checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function getCheckout()
     {
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Link.php b/app/code/Magento/Multishipping/Block/Checkout/Link.php
similarity index 94%
rename from app/code/Magento/Checkout/Block/Multishipping/Link.php
rename to app/code/Magento/Multishipping/Block/Checkout/Link.php
index 141d68e941cbadb24cc91b815f8f25ffa7206b15..3e905e54906b97fe7968c03e7fc402d249dde504 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Link.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Link.php
@@ -27,7 +27,7 @@
 /**
  * Multishipping cart link
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class Link extends \Magento\View\Element\Template
 {
@@ -58,6 +58,7 @@ class Link extends \Magento\View\Element\Template
         $this->_checkoutData = $checkoutData;
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -65,7 +66,7 @@ class Link extends \Magento\View\Element\Template
      */
     public function getCheckoutUrl()
     {
-        return $this->getUrl('checkout/multishipping', array('_secure'=>true));
+        return $this->getUrl('multishipping/checkout', array('_secure'=>true));
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Overview.php b/app/code/Magento/Multishipping/Block/Checkout/Overview.php
similarity index 93%
rename from app/code/Magento/Checkout/Block/Multishipping/Overview.php
rename to app/code/Magento/Multishipping/Block/Checkout/Overview.php
index 9b569070834da886899d933b85643e68ec6c6dbc..9e1caad669920206a25a7dc15c55fec2c4a51498 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Overview.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Overview.php
@@ -31,7 +31,7 @@
  * @package    Magento_Checkout
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class Overview extends \Magento\Sales\Block\Items\AbstractItems
 {
@@ -41,7 +41,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
     const DEFAULT_TYPE = 'default';
 
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
@@ -52,19 +52,20 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
 
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param \Magento\Tax\Helper\Data $taxHelper
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         \Magento\Tax\Helper\Data $taxHelper,
         array $data = array()
     ) {
         $this->_taxHelper = $taxHelper;
         $this->_multishipping = $multishipping;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -77,7 +78,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
             $this->addChild(
                 $rowItemType,
                 'Magento\Checkout\Block\Cart\Item\Renderer',
-                array('template' => 'multishipping/overview/item.phtml')
+                array('template' => 'Magento_Multishipping::checkout/overview/item.phtml')
             );
         }
         $headBlock = $this->getLayout()->getBlock('head');
@@ -92,7 +93,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
     /**
      * Get multishipping checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function getCheckout()
     {
@@ -243,7 +244,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
      */
     public function getEditShippingAddressUrl($address)
     {
-        return $this->getUrl('*/multishipping_address/editShipping', array('id'=>$address->getCustomerAddressId()));
+        return $this->getUrl('*/checkout_address/editShipping', array('id'=>$address->getCustomerAddressId()));
     }
 
     /**
@@ -252,7 +253,7 @@ class Overview extends \Magento\Sales\Block\Items\AbstractItems
      */
     public function getEditBillingAddressUrl($address)
     {
-        return $this->getUrl('*/multishipping_address/editBilling', array('id'=>$address->getCustomerAddressId()));
+        return $this->getUrl('*/checkout_address/editBilling', array('id'=>$address->getCustomerAddressId()));
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php b/app/code/Magento/Multishipping/Block/Checkout/Payment/Info.php
similarity index 88%
rename from app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php
rename to app/code/Magento/Multishipping/Block/Checkout/Payment/Info.php
index b89d53e13102d7075cfaee2e4745458267ea719d..35021a7c5ddc0ed617c184c8b7017e334b38a044 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Payment/Info.php
@@ -31,25 +31,25 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping\Payment;
+namespace Magento\Multishipping\Block\Checkout\Payment;
 
 class Info extends \Magento\Payment\Block\Info\AbstractContainer
 {
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Payment\Helper\Data $paymentData
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
         \Magento\Payment\Helper\Data $paymentData,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         array $data = array()
     ) {
         $this->_multishipping = $multishipping;
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Shipping.php b/app/code/Magento/Multishipping/Block/Checkout/Shipping.php
similarity index 86%
rename from app/code/Magento/Checkout/Block/Multishipping/Shipping.php
rename to app/code/Magento/Multishipping/Block/Checkout/Shipping.php
index 2c8cf055332d45dab3a9a432c9eadb533ea42ea1..1325daba0e856d9b169f40addaa122c6d3e1b60a 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Shipping.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Shipping.php
@@ -31,7 +31,7 @@
  * @package    Magento_Checkout
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class Shipping extends \Magento\Sales\Block\Items\AbstractItems
 {
@@ -48,14 +48,14 @@ class Shipping extends \Magento\Sales\Block\Items\AbstractItems
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Filter\Object\GridFactory $filterGridFactory
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param \Magento\Tax\Helper\Data $taxHelper
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
         \Magento\Filter\Object\GridFactory $filterGridFactory,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         \Magento\Tax\Helper\Data $taxHelper,
         array $data = array()
     ) {
@@ -63,12 +63,13 @@ class Shipping extends \Magento\Sales\Block\Items\AbstractItems
         $this->_filterGridFactory = $filterGridFactory;
         $this->_multishipping = $multishipping;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
      * Get multishipping checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function getCheckout()
     {
@@ -134,7 +135,7 @@ class Shipping extends \Magento\Sales\Block\Items\AbstractItems
 
     public function getAddressEditUrl($address)
     {
-        return $this->getUrl('*/multishipping_address/editShipping', array('id'=>$address->getCustomerAddressId()));
+        return $this->getUrl('*/checkout_address/editShipping', array('id'=>$address->getCustomerAddressId()));
     }
 
     public function getItemsEditUrl()
@@ -156,4 +157,17 @@ class Shipping extends \Magento\Sales\Block\Items\AbstractItems
     {
         return $address->getQuote()->getStore()->convertPrice($this->_taxHelper->getShippingPrice($price, $flag, $address), true);
     }
+
+    /**
+     * Retrieve text for items box
+     *
+     * @param \Magento\Object $addressEntity
+     * @return string
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function getItemsBoxTextAfter(\Magento\Object $addressEntity)
+    {
+        return '';
+    }
 }
diff --git a/app/code/Magento/Checkout/Block/Multishipping/State.php b/app/code/Magento/Multishipping/Block/Checkout/State.php
similarity index 84%
rename from app/code/Magento/Checkout/Block/Multishipping/State.php
rename to app/code/Magento/Multishipping/Block/Checkout/State.php
index 209f7145527899b4e741bd671ea453d5d1982e32..75aed072f01def9b2067ce14afbb6268884c78a2 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/State.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/State.php
@@ -31,23 +31,23 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 class State extends \Magento\View\Element\Template
 {
     /**
-     * @var \Magento\Checkout\Model\Type\Multishipping\State
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping\State
      */
     protected $_multishippingState;
 
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Checkout\Model\Type\Multishipping\State $multishippingState
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping\State $multishippingState
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Checkout\Model\Type\Multishipping\State $multishippingState,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping\State $multishippingState,
         array $data = array()
     ) {
         $this->_multishippingState = $multishippingState;
diff --git a/app/code/Magento/Checkout/Block/Multishipping/Success.php b/app/code/Magento/Multishipping/Block/Checkout/Success.php
similarity index 87%
rename from app/code/Magento/Checkout/Block/Multishipping/Success.php
rename to app/code/Magento/Multishipping/Block/Checkout/Success.php
index 5f27e8d0f9dca11dfc3451af60a6cb419b478f67..da4cb2c1d351192a20603917b42c2e139a642b71 100644
--- a/app/code/Magento/Checkout/Block/Multishipping/Success.php
+++ b/app/code/Magento/Multishipping/Block/Checkout/Success.php
@@ -31,21 +31,22 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
-class Success extends \Magento\Checkout\Block\Multishipping\AbstractMultishipping
+class Success extends \Magento\Multishipping\Block\Checkout\AbstractMultishipping
 {
     /**
      * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Checkout\Model\Type\Multishipping $multishipping
+     * @param \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
      * @param array $data
      */
     public function __construct(
         \Magento\View\Element\Template\Context $context,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping,
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping,
         array $data = array()
     ) {
         parent::__construct($context, $multishipping, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Checkout/Controller/Multishipping.php b/app/code/Magento/Multishipping/Controller/Checkout.php
similarity index 82%
rename from app/code/Magento/Checkout/Controller/Multishipping.php
rename to app/code/Magento/Multishipping/Controller/Checkout.php
index c51a1d2ec7a16dc2222917333561aa9069363646..b63b4d91fe42562a76ff5599c545f66f1b37b33a 100644
--- a/app/code/Magento/Checkout/Controller/Multishipping.php
+++ b/app/code/Magento/Multishipping/Controller/Checkout.php
@@ -29,41 +29,42 @@
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Controller;
+namespace Magento\Multishipping\Controller;
 
 use Magento\App\Action\NotFoundException;
 use Magento\App\RequestInterface;
+use Magento\Multishipping\Model\Checkout\Type\Multishipping\State;
 
-class Multishipping extends \Magento\Checkout\Controller\Action
+class Checkout extends \Magento\Checkout\Controller\Action
 {
     /**
      * Retrieve checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected function _getCheckout()
     {
-        return $this->_objectManager->get('Magento\Checkout\Model\Type\Multishipping');
+        return $this->_objectManager->get('Magento\Multishipping\Model\Checkout\Type\Multishipping');
     }
 
     /**
      * Retrieve checkout state model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping\State
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping\State
      */
     protected function _getState()
     {
-        return $this->_objectManager->get('Magento\Checkout\Model\Type\Multishipping\State');
+        return $this->_objectManager->get('Magento\Multishipping\Model\Checkout\Type\Multishipping\State');
     }
 
     /**
      * Retrieve checkout url helper
      *
-     * @return \Magento\Checkout\Helper\Url
+     * @return \Magento\Multishipping\Helper\Url
      */
     protected function _getHelper()
     {
-        return $this->_objectManager->get('Magento\Checkout\Helper\Url');
+        return $this->_objectManager->get('Magento\Multishipping\Helper\Url');
     }
 
     /**
@@ -229,17 +230,13 @@ class Multishipping extends \Magento\Checkout\Controller\Action
     {
         // If customer do not have addresses
         if (!$this->_getCheckout()->getCustomerDefaultShippingAddress()) {
-            $this->_redirect('*/multishipping_address/newShipping');
+            $this->_redirect('*/checkout_address/newShipping');
             return;
         }
 
-        $this->_getState()->unsCompleteStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING
-        );
+        $this->_getState()->unsCompleteStep(State::STEP_SHIPPING);
 
-        $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_SELECT_ADDRESSES
-        );
+        $this->_getState()->setActiveStep(State::STEP_SELECT_ADDRESSES);
         if (!$this->_getCheckout()->validateMinimumAmount()) {
             $message = $this->_getCheckout()->getMinimumAmountDescription();
             $this->messageManager->addNotice($message);
@@ -255,21 +252,17 @@ class Multishipping extends \Magento\Checkout\Controller\Action
     public function addressesPostAction()
     {
         if (!$this->_getCheckout()->getCustomerDefaultShippingAddress()) {
-            $this->_redirect('*/multishipping_address/newShipping');
+            $this->_redirect('*/checkout_address/newShipping');
             return;
         }
         try {
             if ($this->getRequest()->getParam('continue', false)) {
                 $this->_getCheckout()->setCollectRatesFlag(true);
-                $this->_getState()->setActiveStep(
-                    \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING
-                );
-                $this->_getState()->setCompleteStep(
-                    \Magento\Checkout\Model\Type\Multishipping\State::STEP_SELECT_ADDRESSES
-                );
+                $this->_getState()->setActiveStep(State::STEP_SHIPPING);
+                $this->_getState()->setCompleteStep(State::STEP_SELECT_ADDRESSES);
                 $this->_redirect('*/*/shipping');
             } elseif ($this->getRequest()->getParam('new_address')) {
-                $this->_redirect('*/multishipping_address/newShipping');
+                $this->_redirect('*/checkout_address/newShipping');
             } else {
                 $this->_redirect('*/*/addresses');
             }
@@ -290,12 +283,8 @@ class Multishipping extends \Magento\Checkout\Controller\Action
 
     public function backToAddressesAction()
     {
-        $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_SELECT_ADDRESSES
-        );
-        $this->_getState()->unsCompleteStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING
-        );
+        $this->_getState()->setActiveStep(State::STEP_SELECT_ADDRESSES);
+        $this->_getState()->unsCompleteStep(State::STEP_SHIPPING);
         $this->_redirect('*/*/addresses');
     }
 
@@ -338,13 +327,11 @@ class Multishipping extends \Magento\Checkout\Controller\Action
             return;
         }
 
-        if (!$this->_getState()->getCompleteStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_SELECT_ADDRESSES)) {
+        if (!$this->_getState()->getCompleteStep(State::STEP_SELECT_ADDRESSES)) {
             return $this->_redirect('*/*/addresses');
         }
 
-        $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING
-        );
+        $this->_getState()->setActiveStep(State::STEP_SHIPPING);
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
         $this->_view->renderLayout();
@@ -352,12 +339,8 @@ class Multishipping extends \Magento\Checkout\Controller\Action
 
     public function backToShippingAction()
     {
-        $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING
-        );
-        $this->_getState()->unsCompleteStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING
-        );
+        $this->_getState()->setActiveStep(State::STEP_SHIPPING);
+        $this->_getState()->unsCompleteStep(State::STEP_BILLING);
         $this->_redirect('*/*/shipping');
     }
 
@@ -370,12 +353,8 @@ class Multishipping extends \Magento\Checkout\Controller\Action
                 array('request'=>$this->getRequest(), 'quote'=>$this->_getCheckout()->getQuote())
             );
             $this->_getCheckout()->setShippingMethods($shippingMethods);
-            $this->_getState()->setActiveStep(
-                \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING
-            );
-            $this->_getState()->setCompleteStep(
-                \Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING
-            );
+            $this->_getState()->setActiveStep(State::STEP_BILLING);
+            $this->_getState()->setCompleteStep(State::STEP_SHIPPING);
             $this->_redirect('*/*/billing');
         } catch (\Exception $e) {
             $this->messageManager->addError($e->getMessage());
@@ -396,13 +375,11 @@ class Multishipping extends \Magento\Checkout\Controller\Action
             return;
         }
 
-        if (!$this->_getState()->getCompleteStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING)) {
+        if (!$this->_getState()->getCompleteStep(State::STEP_SHIPPING)) {
             return $this->_redirect('*/*/shipping');
         }
 
-        $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING
-        );
+        $this->_getState()->setActiveStep(State::STEP_BILLING);
 
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
@@ -417,7 +394,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
     protected function _validateBilling()
     {
         if (!$this->_getCheckout()->getQuote()->getBillingAddress()->getFirstname()) {
-            $this->_redirect('*/multishipping_address/selectBilling');
+            $this->_redirect('*/checkout_address/selectBilling');
             return false;
         }
         return true;
@@ -428,12 +405,8 @@ class Multishipping extends \Magento\Checkout\Controller\Action
      */
     public function backToBillingAction()
     {
-        $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING
-        );
-        $this->_getState()->unsCompleteStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_OVERVIEW
-        );
+        $this->_getState()->setActiveStep(State::STEP_BILLING);
+        $this->_getState()->unsCompleteStep(State::STEP_OVERVIEW);
         $this->_redirect('*/*/billing');
     }
 
@@ -446,7 +419,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
             return;
         }
 
-        $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_OVERVIEW);
+        $this->_getState()->setActiveStep(State::STEP_OVERVIEW);
 
         try {
             $payment = $this->getRequest()->getPost('payment', array());
@@ -457,9 +430,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
                 | \Magento\Payment\Model\Method\AbstractMethod::CHECK_ZERO_TOTAL;
             $this->_getCheckout()->setPaymentMethod($payment);
 
-            $this->_getState()->setCompleteStep(
-                \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING
-            );
+            $this->_getState()->setCompleteStep(State::STEP_BILLING);
 
             $this->_view->loadLayout();
             $this->_view->getLayout()->initMessages();
@@ -506,12 +477,8 @@ class Multishipping extends \Magento\Checkout\Controller\Action
                 $paymentInstance->setCcCid($payment['cc_cid']);
             }
             $this->_getCheckout()->createOrders();
-            $this->_getState()->setActiveStep(
-                \Magento\Checkout\Model\Type\Multishipping\State::STEP_SUCCESS
-            );
-            $this->_getState()->setCompleteStep(
-                \Magento\Checkout\Model\Type\Multishipping\State::STEP_OVERVIEW
-            );
+            $this->_getState()->setActiveStep(State::STEP_SUCCESS);
+            $this->_getState()->setCompleteStep(State::STEP_OVERVIEW);
             $this->_getCheckout()->getCheckoutSession()->clearQuote();
             $this->_getCheckout()->getCheckoutSession()->setDisplaySuccess(true);
             $this->_redirect('*/*/success');
@@ -546,7 +513,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
      */
     public function successAction()
     {
-        if (!$this->_getState()->getCompleteStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_OVERVIEW)) {
+        if (!$this->_getState()->getCompleteStep(State::STEP_OVERVIEW)) {
             $this->_redirect('*/*/addresses');
             return;
         }
@@ -554,7 +521,7 @@ class Multishipping extends \Magento\Checkout\Controller\Action
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
         $ids = $this->_getCheckout()->getOrderIds();
-        $this->_eventManager->dispatch('checkout_multishipping_controller_success_action', array('order_ids' => $ids));
+        $this->_eventManager->dispatch('multishipping_checkout_controller_success_action', array('order_ids' => $ids));
         $this->_view->renderLayout();
     }
 
diff --git a/app/code/Magento/Checkout/Controller/Multishipping/Address.php b/app/code/Magento/Multishipping/Controller/Checkout/Address.php
similarity index 84%
rename from app/code/Magento/Checkout/Controller/Multishipping/Address.php
rename to app/code/Magento/Multishipping/Controller/Checkout/Address.php
index 36e2cd6a1e109482eaf5bbc53c96e80785f2f98a..a54a0847a66cc4dc400e8ec96d5c30677711c4a8 100644
--- a/app/code/Magento/Checkout/Controller/Multishipping/Address.php
+++ b/app/code/Magento/Multishipping/Controller/Checkout/Address.php
@@ -31,28 +31,28 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Controller\Multishipping;
+namespace Magento\Multishipping\Controller\Checkout;
 
 class Address extends \Magento\App\Action\Action
 {
     /**
      * Retrieve multishipping checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected function _getCheckout()
     {
-        return $this->_objectManager->get('Magento\Checkout\Model\Type\Multishipping');
+        return $this->_objectManager->get('Magento\Multishipping\Model\Checkout\Type\Multishipping');
     }
 
     /**
      * Retrieve checkout state model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping\State
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping\State
      */
     protected function _getState()
     {
-        return $this->_objectManager->get('Magento\Checkout\Model\Type\Multishipping\State');
+        return $this->_objectManager->get('Magento\Multishipping\Model\Checkout\Type\Multishipping\State');
     }
 
 
@@ -61,7 +61,9 @@ class Address extends \Magento\App\Action\Action
      */
     public function newShippingAction()
     {
-        $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_SELECT_ADDRESSES);
+        $this->_getState()->setActiveStep(
+            \Magento\Multishipping\Model\Checkout\Type\Multishipping\State::STEP_SELECT_ADDRESSES
+        );
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
         if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) {
@@ -74,7 +76,7 @@ class Address extends \Magento\App\Action\Action
             }
 
             if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) {
-                $addressForm->setBackUrl($this->_url->getUrl('*/multishipping/addresses'));
+                $addressForm->setBackUrl($this->_url->getUrl('*/checkout/addresses'));
             } else {
                 $addressForm->setBackUrl($this->_url->getUrl('*/cart/'));
             }
@@ -90,12 +92,14 @@ class Address extends \Magento\App\Action\Action
         if (count($this->_getCheckout()->getCustomer()->getAddresses()) == 1) {
             $this->_getCheckout()->reset();
         }
-        $this->_redirect('*/multishipping/addresses');
+        $this->_redirect('*/checkout/addresses');
     }
 
     public function editShippingAction()
     {
-        $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_SHIPPING);
+        $this->_getState()->setActiveStep(
+            \Magento\Multishipping\Model\Checkout\Type\Multishipping\State::STEP_SHIPPING
+        );
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
         if ($addressForm = $this->_view->getLayout()->getBlock('customer_address_edit')) {
@@ -117,7 +121,7 @@ class Address extends \Magento\App\Action\Action
     public function editShippingPostAction()
     {
         if ($addressId = $this->getRequest()->getParam('id')) {
-            $this->_objectManager->create('Magento\Checkout\Model\Type\Multishipping')
+            $this->_objectManager->create('Magento\Multishipping\Model\Checkout\Type\Multishipping')
                 ->updateQuoteCustomerShippingAddress($addressId);
         }
         $this->_redirect('*/multishipping/shipping');
@@ -125,7 +129,7 @@ class Address extends \Magento\App\Action\Action
 
     public function selectBillingAction()
     {
-        $this->_getState()->setActiveStep(\Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING);
+        $this->_getState()->setActiveStep(\Magento\Multishipping\Model\Checkout\Type\Multishipping\State::STEP_BILLING);
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
         $this->_view->renderLayout();
@@ -168,7 +172,7 @@ class Address extends \Magento\App\Action\Action
     public function editBillingAction()
     {
         $this->_getState()->setActiveStep(
-            \Magento\Checkout\Model\Type\Multishipping\State::STEP_BILLING
+            \Magento\Multishipping\Model\Checkout\Type\Multishipping\State::STEP_BILLING
         );
         $this->_view->loadLayout();
         $this->_view->getLayout()->initMessages();
@@ -187,7 +191,7 @@ class Address extends \Magento\App\Action\Action
     public function setBillingAction()
     {
         if ($addressId = $this->getRequest()->getParam('id')) {
-            $this->_objectManager->create('Magento\Checkout\Model\Type\Multishipping')
+            $this->_objectManager->create('Magento\Multishipping\Model\Checkout\Type\Multishipping')
                 ->setQuoteCustomerBillingAddress($addressId);
         }
         $this->_redirect('*/multishipping/billing');
@@ -196,7 +200,7 @@ class Address extends \Magento\App\Action\Action
     public function saveBillingAction()
     {
         if ($addressId = $this->getRequest()->getParam('id')) {
-            $this->_objectManager->create('Magento\Checkout\Model\Type\Multishipping')
+            $this->_objectManager->create('Magento\Multishipping\Model\Checkout\Type\Multishipping')
                 ->setQuoteCustomerBillingAddress($addressId);
         }
         $this->_redirect('*/multishipping/overview');
diff --git a/app/code/Magento/Multishipping/Helper/Url.php b/app/code/Magento/Multishipping/Helper/Url.php
new file mode 100644
index 0000000000000000000000000000000000000000..5b7e663dba297e0c6394124d04d7d0dc7bc423c8
--- /dev/null
+++ b/app/code/Magento/Multishipping/Helper/Url.php
@@ -0,0 +1,95 @@
+<?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_Checkout
+ * @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)
+ */
+
+/**
+ * Multi Shipping urls helper
+ *
+ * @author      Magento Core Team <core@magentocommerce.com>
+ */
+namespace Magento\Multishipping\Helper;
+
+class Url extends \Magento\Core\Helper\Url
+{
+    /**
+     * Retrieve shopping cart url
+     *
+     * @return string
+     */
+    public function getCartUrl()
+    {
+        return $this->_getUrl('checkout/cart');
+    }
+
+    /**
+     * Retrieve checkout url
+     *
+     * @return string
+     */
+    public function getMSCheckoutUrl()
+    {
+        return $this->_getUrl('multishipping/checkout');
+    }
+
+    /**
+     * Retrieve login url
+     *
+     * @return string
+     */
+    public function getMSLoginUrl()
+    {
+        return $this->_getUrl('multishipping/checkout/login', array('_secure' => true, '_current' => true));
+    }
+
+    /**
+     * Retrieve address url
+     *
+     * @return string
+     */
+    public function getMSAddressesUrl()
+    {
+        return $this->_getUrl('multishipping/checkout/addresses');
+    }
+
+    /**
+     * Retrieve shipping address save url
+     *
+     * @return string
+     */
+    public function getMSShippingAddressSavedUrl()
+    {
+        return $this->_getUrl('multishipping/checkout_address/shippingSaved');
+    }
+
+    /**
+     * Retrieve register url
+     *
+     * @return string
+     */
+    public function getMSRegisterUrl()
+    {
+        return $this->_getUrl('multishipping/checkout/register');
+    }
+}
diff --git a/app/code/Magento/Checkout/Model/Type/Multishipping.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php
similarity index 96%
rename from app/code/Magento/Checkout/Model/Type/Multishipping.php
rename to app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php
index 2cb1c4a718210015ac1d856f8d774e6a90b59a38..27a560705c83f3c5f05a75a60da7e2ad2edbf2b1 100644
--- a/app/code/Magento/Checkout/Model/Type/Multishipping.php
+++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php
@@ -31,7 +31,7 @@
  * @package     Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Model\Type;
+namespace Magento\Multishipping\Model\Checkout\Type;
 
 class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
 {
@@ -114,7 +114,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      * Initialize multishipping checkout.
      * Split virtual/not virtual items between default billing/shipping addresses
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected function _init()
     {
@@ -218,7 +218,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      *
      * @param int $addressId
      * @param int $itemId
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function removeAddressItem($addressId, $itemId)
     {
@@ -269,7 +269,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      * )
      *
      * @param array $info
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      * @throws \Magento\Core\Exception
      */
     public function setShippingItemsInformation($info)
@@ -352,7 +352,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      *
      * @param int $quoteItemId
      * @param array $data array('qty'=>$qty, 'address'=>$customerAddressId)
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected function _addShippingItem($quoteItemId, $data)
     {
@@ -397,7 +397,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      * Reimport customer address info to quote shipping address
      *
      * @param int $addressId customer address id
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function updateQuoteCustomerShippingAddress($addressId)
     {
@@ -416,7 +416,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      * Reimport customer billing address to quote
      *
      * @param int $addressId customer address id
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function setQuoteCustomerBillingAddress($addressId)
     {
@@ -434,7 +434,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      * Assign shipping methods to addresses
      *
      * @param  array $methods
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      * @throws \Magento\Core\Exception
      */
     public function setShippingMethods($methods)
@@ -455,7 +455,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
      * Set payment method info to quote payment
      *
      * @param array $payment
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      * @throws \Magento\Core\Exception
      */
     public function setPaymentMethod($payment)
@@ -527,7 +527,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
     /**
      * Validate quote data
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      * @throws \Magento\Core\Exception
      */
     protected function _validate()
@@ -565,7 +565,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
     /**
      * Create orders per each quote address
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      * @throws \Exception
      */
     public function createOrders()
@@ -618,7 +618,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
     /**
      * Collect quote totals and save quote object
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function save()
     {
@@ -630,7 +630,7 @@ class Multishipping extends \Magento\Checkout\Model\Type\AbstractType
     /**
      * Specify BEGIN state in checkout session whot allow reinit multishipping checkout
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function reset()
     {
diff --git a/app/code/Magento/Checkout/Model/Type/Multishipping/State.php b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php
similarity index 92%
rename from app/code/Magento/Checkout/Model/Type/Multishipping/State.php
rename to app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php
index f771662450c1611d03cd98ed091160fe09bd8454..0f4888bd0e730b599eebb23cd8a1fa0a85cce632 100644
--- a/app/code/Magento/Checkout/Model/Type/Multishipping/State.php
+++ b/app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping/State.php
@@ -31,7 +31,7 @@
  * @package    Magento_Checkout
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Checkout\Model\Type\Multishipping;
+namespace Magento\Multishipping\Model\Checkout\Type\Multishipping;
 
 class State extends \Magento\Object
 {
@@ -51,7 +51,7 @@ class State extends \Magento\Object
     /**
      * Checkout model
      *
-     * @var \Magento\Checkout\Model\Type\Multishipping
+     * @var \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     protected $_multishipping;
 
@@ -66,7 +66,7 @@ class State extends \Magento\Object
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
-        \Magento\Checkout\Model\Type\Multishipping $multishipping
+        \Magento\Multishipping\Model\Checkout\Type\Multishipping $multishipping
     ) {
         $this->_checkoutSession = $checkoutSession;
         $this->_multishipping = $multishipping;
@@ -98,7 +98,7 @@ class State extends \Magento\Object
     /**
      * Retrieve checkout model
      *
-     * @return \Magento\Checkout\Model\Type\Multishipping
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
      */
     public function getCheckout()
     {
@@ -152,7 +152,7 @@ class State extends \Magento\Object
      * Mark step as completed
      *
      * @param string $step
-     * @return \Magento\Checkout\Model\Type\Multishipping\State
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping\State
      */
     public function setCompleteStep($step)
     {
@@ -180,7 +180,7 @@ class State extends \Magento\Object
      * Unset complete status from step
      *
      * @param string $step
-     * @return \Magento\Checkout\Model\Type\Multishipping\State
+     * @return \Magento\Multishipping\Model\Checkout\Type\Multishipping\State
      */
     public function unsCompleteStep($step)
     {
diff --git a/app/code/Magento/Paygate/etc/adminhtml/di.xml b/app/code/Magento/Multishipping/etc/frontend/di.xml
similarity index 81%
rename from app/code/Magento/Paygate/etc/adminhtml/di.xml
rename to app/code/Magento/Multishipping/etc/frontend/di.xml
index 1bb666a12b6f18ff63f3cd9fd10f5a392753e39b..b8ee929ff009aaa33f5f2f7596bf69f3bbe12ac8 100644
--- a/app/code/Magento/Paygate/etc/adminhtml/di.xml
+++ b/app/code/Magento/Multishipping/etc/frontend/di.xml
@@ -24,9 +24,11 @@
  */
 -->
 <config>
-    <type name="Magento\Paygate\Model\Authorizenet">
-        <param name="session">
-            <instance type="Magento\Backend\Model\Session\Quote" />
+    <type name="Magento\Core\Model\Url\SecurityInfo">
+        <param name="secureUrlList">
+            <value>
+                <multishipping_checkout>/multishipping/checkout</multishipping_checkout>
+            </value>
         </param>
     </type>
 </config>
diff --git a/app/code/Magento/Multishipping/etc/frontend/page_types.xml b/app/code/Magento/Multishipping/etc/frontend/page_types.xml
new file mode 100644
index 0000000000000000000000000000000000000000..77eaed71dc4f7a4f4cb113e64058bf013f1865e9
--- /dev/null
+++ b/app/code/Magento/Multishipping/etc/frontend/page_types.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<page_types>
+    <type id="checkout_cart_multishipping" label="Catalog Quick Search Form Suggestions"/>
+    <type id="checkout_cart_multishipping_address_editaddress" label="Multishipping Checkout One Address Edit Form"/>
+    <type id="checkout_cart_multishipping_address_editbilling" label="Multishipping Checkout Billing Address Edit Form"/>
+    <type id="checkout_cart_multishipping_address_editshipping" label="Multishipping Checkout Shipping Address Edit Form"/>
+    <type id="checkout_cart_multishipping_address_newbilling" label="Multishipping Checkout Billing Address Creation"/>
+    <type id="checkout_cart_multishipping_address_newshipping" label="Multishipping Checkout Shipping Address Creation"/>
+    <type id="checkout_cart_multishipping_address_selectbilling" label="Multishipping Checkout Billing Address Selection"/>
+    <type id="checkout_cart_multishipping_addresses" label="Multishipping Checkout Address (Any) Form"/>
+    <type id="checkout_cart_multishipping_billing" label="Multishipping Checkout Billing Information Step"/>
+    <type id="checkout_cart_multishipping_customer_address" label="Multishipping Checkout Customer Address Edit Form"/>
+    <type id="checkout_cart_multishipping_login" label="Multishipping Checkout Login User Form"/>
+    <type id="checkout_cart_multishipping_overview" label="Multishipping Checkout Overview"/>
+    <type id="checkout_cart_multishipping_register" label="Multishipping Checkout Register User Form"/>
+    <type id="checkout_cart_multishipping_shipping" label="Multishipping Checkout Shipping Information Step"/>
+    <type id="checkout_cart_multishipping_success" label="Multishipping Checkout Success"/>
+</page_types>
diff --git a/app/code/Magento/Paygate/etc/frontend/routes.xml b/app/code/Magento/Multishipping/etc/frontend/routes.xml
similarity index 89%
rename from app/code/Magento/Paygate/etc/frontend/routes.xml
rename to app/code/Magento/Multishipping/etc/frontend/routes.xml
index 529aced74905b385d0d16d1af784f67075096f0c..66c9077ab97f605b3f8842e39add7d845e167288 100644
--- a/app/code/Magento/Paygate/etc/frontend/routes.xml
+++ b/app/code/Magento/Multishipping/etc/frontend/routes.xml
@@ -25,8 +25,8 @@
 -->
 <config>
     <router id="standard">
-        <route id="paygate" frontName="paygate">
-            <module name="Magento_Paygate" />
+        <route id="multishipping" frontName="multishipping">
+            <module name="Magento_Multishipping"/>
         </route>
     </router>
-</config>
\ No newline at end of file
+</config>
diff --git a/app/code/Magento/Paygate/etc/module.xml b/app/code/Magento/Multishipping/etc/module.xml
old mode 100755
new mode 100644
similarity index 80%
rename from app/code/Magento/Paygate/etc/module.xml
rename to app/code/Magento/Multishipping/etc/module.xml
index 7cee8faf7a5b482f7dfc0d7afe3163598fa09329..be22fcbcb2dd2f8308145f6d4f3158d258f9d1c1
--- a/app/code/Magento/Paygate/etc/module.xml
+++ b/app/code/Magento/Multishipping/etc/module.xml
@@ -24,17 +24,19 @@
  */
 -->
 <config>
-    <module name="Magento_Paygate" version="1.6.0.0" active="true">
+    <module name="Magento_Multishipping" version="2.0.0.0" active="true">
         <sequence>
-            <module name="Magento_Payment"/>
+            <module name="Magento_Core"/>
+            <module name="Magento_Catalog"/>
         </sequence>
         <depends>
-            <module name="Magento_Payment"/>
             <module name="Magento_Core"/>
             <module name="Magento_Checkout"/>
-            <module name="Magento_Backend"/>
             <module name="Magento_Sales"/>
-            <module name="Magento_Centinel"/>
+            <module name="Magento_Payment"/>
+            <module name="Magento_Tax"/>
+            <module name="Magento_Customer"/>
+            <module name="Magento_Weee"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/address/select.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/address/select.phtml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/multishipping/address/select.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/address/select.phtml
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/addresses.phtml
similarity index 96%
rename from app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/addresses.phtml
index 202d2a5fd12c0e9d804e0c8154209b7f622dfa23..eb1d010e7314b292570a1a48f0a79eee6da8e557 100644
--- a/app/code/Magento/Checkout/view/frontend/multishipping/addresses.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/checkout/addresses.phtml
@@ -26,7 +26,7 @@
 /**
  * Ship to multiple address template
  *
- * @var $this \Magento\Checkout\Block\Multishipping\Addresses
+ * @var $this \Magento\Multishipping\Block\Checkout\Addresses
  */
 ?>
 <form id="checkout_multishipping_form" action="<?php echo $this->getPostActionUrl() ?>" method="post" class="multicheckout address form">
@@ -87,7 +87,7 @@
         "<?php echo $this->getViewFileUrl('jquery/jquery.metadata.js') ?>",
         "<?php echo $this->getViewFileUrl('mage/validation.js')?>",
         "<?php echo $this->getViewFileUrl('mage/validation/validation.js') ?>",
-        "<?php echo $this->getViewFileUrl('Magento_Checkout::js/multi-shipping.js') ?>",
+        "<?php echo $this->getViewFileUrl('Magento_Multishipping::js/multi-shipping.js') ?>",
         function () {
             jQuery('#checkout_multishipping_form').multiShipping().validation();
         }
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/billing.phtml
similarity index 98%
rename from app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/billing.phtml
index 8cd62bb5fe4953f71e9136beb3e1c058aad9123c..a84c1ceade9272b6784abfdc1c9defc3b16ca768 100644
--- a/app/code/Magento/Checkout/view/frontend/multishipping/billing.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/checkout/billing.phtml
@@ -26,7 +26,7 @@
 /**
  * Multishipping checkout billing information
  *
- * @var $this \Magento\Checkout\Block\Multishipping\Billing
+ * @var $this \Magento\Multishipping\Block\Checkout\Billing
  */
 ?>
 <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="multishipping-billing-form" class="form multicheckout billing">
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/billing/items.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/billing/items.phtml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/multishipping/billing/items.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/billing/items.phtml
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/item/default.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/item/default.phtml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/multishipping/item/default.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/item/default.phtml
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/link.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/link.phtml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/multishipping/link.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/link.phtml
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/overview.phtml
similarity index 99%
rename from app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/overview.phtml
index 3f85335afdd538c76405b6757d90fea5fc3897cc..bf9a1aec575ee635d86e6d173ae95759b89d4712 100644
--- a/app/code/Magento/Checkout/view/frontend/multishipping/overview.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/checkout/overview.phtml
@@ -23,7 +23,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-<?php /** @var $this \Magento\Checkout\Block\Multishipping\Overview */ ?>
+<?php /** @var $this \Magento\Multishipping\Block\Checkout\Overview */ ?>
 <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="review-order-form" class="form multicheckout overview">
     <div class="block billing">
         <div class="title"><strong><?php echo __('Billing Information') ?></strong></div>
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/overview/item.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/overview/item.phtml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/multishipping/overview/item.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/overview/item.phtml
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/shipping.phtml
similarity index 95%
rename from app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/shipping.phtml
index f0ff80d5e6e66e6ab4756b04743f222155be7099..41684a6dc26380e6ee2137182f207781be26c806 100644
--- a/app/code/Magento/Checkout/view/frontend/multishipping/shipping.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/checkout/shipping.phtml
@@ -26,7 +26,7 @@
 /**
  * Multishipping checkout shipping template
  *
- * @var $this \Magento\Checkout\Block\Multishipping\Shipping
+ * @var $this \Magento\Multishipping\Block\Checkout\Shipping
  */
 ?>
 <form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="shipping_method_form" class="form multicheckout shipping">
@@ -82,7 +82,6 @@
                 <?php endif; ?>
             </div>
             <div class="box items">
-                <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_adress_checkbox', $_address); ?>
                 <strong class="subtitle">
                     <span><?php echo __('Items') ?></span>
                     <a href="<?php echo $this->getItemsEditUrl($_address) ?>" class="action edit"><span><?php echo __('Edit Items') ?></span></a>
@@ -103,7 +102,7 @@
                     <?php endforeach; ?>
                     </tbody>
                 </table>
-                <?php echo $this->helper('Magento\GiftMessage\Helper\Message')->getInline('multishipping_address', $_address); ?>
+                <?php echo $this->getItemsBoxTextAfter($_address); ?>
             </div>
         </div>
     </div>
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/state.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/state.phtml
similarity index 96%
rename from app/code/Magento/Checkout/view/frontend/multishipping/state.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/state.phtml
index 14dcad6c94c5a327af9a0c9a9eae2d329b97a6a0..067e0d8a7b60cd31f9366605ce2612854bccb8ba 100644
--- a/app/code/Magento/Checkout/view/frontend/multishipping/state.phtml
+++ b/app/code/Magento/Multishipping/view/frontend/checkout/state.phtml
@@ -28,7 +28,7 @@
 /**
  * Mustishipping state
  *
- * @see \Magento\Checkout\Block\Multishipping\State
+ * @see \Magento\Multishipping\Block\Checkout\State
  */
 ?>
 <ol class="block multicheckout progress items" id="checkout-progress-state">
diff --git a/app/code/Magento/Checkout/view/frontend/multishipping/success.phtml b/app/code/Magento/Multishipping/view/frontend/checkout/success.phtml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/multishipping/success.phtml
rename to app/code/Magento/Multishipping/view/frontend/checkout/success.phtml
diff --git a/app/code/Magento/Checkout/view/frontend/js/multi-shipping.js b/app/code/Magento/Multishipping/view/frontend/js/multi-shipping.js
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/js/multi-shipping.js
rename to app/code/Magento/Multishipping/view/frontend/js/multi-shipping.js
diff --git a/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml b/app/code/Magento/Multishipping/view/frontend/layout/checkout_cart_index.xml
similarity index 84%
rename from app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/checkout_cart_index.xml
index c4d9742b97bfdf6f74976dde8808f1b377a36528..7bad42509278b8fb1a76aefd3e55a77b6fc2dcfd 100644
--- a/app/code/Magento/PageCache/view/frontend/layout/catalog_product_view.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/checkout_cart_index.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <referenceContainer name="page.bottom">
-        <block class="Magento\View\Element\Template" name="external.pagecache.cookie" template="Magento_PageCache::cookie.phtml"/>
+    <referenceContainer name="checkout.cart.methods">
+        <block class="Magento\Multishipping\Block\Checkout\Link" name="checkout.cart.methods.multishipping" template="checkout/link.phtml"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout.xml
similarity index 90%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout.xml
index d8baa137e4130d0f28381290a733bd4819f5e634..6a07a5c304f5c94672d2a6e1eeb2401daea356fe 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout.xml
@@ -26,6 +26,6 @@
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Multishipping Checkout" design_abstraction="custom">
     <update handle="page_two_columns_left"/>
     <referenceContainer name="left">
-        <block class="Magento\Checkout\Block\Multishipping\State" name="checkout_state" template="multishipping/state.phtml"/>
+        <block class="Magento\Multishipping\Block\Checkout\State" name="checkout_state" template="checkout/state.phtml"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editaddress.xml
similarity index 91%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editaddress.xml
index 3387898cbb9e5f26cf64506f3ecc58b0df044e74..e97d42cf89553369f8455855babcc232b9d36f31 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editaddress.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editaddress.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
-    <update handle="checkout_multishipping_customer_address"/>
+    <update handle="multishipping_checkout"/>
+    <update handle="multishipping_checkout_customer_address"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Edit Address</argument>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editbilling.xml
similarity index 91%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editbilling.xml
index 69101b2465153c774e60d1a6f3fe3371b1a875ba..13e5e34cc79bfb6b772d253c284d464ebe301938 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editbilling.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editbilling.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
-    <update handle="checkout_multishipping_customer_address"/>
+    <update handle="multishipping_checkout"/>
+    <update handle="multishipping_checkout_customer_address"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Change Billing Address</argument>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editshipping.xml
similarity index 91%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editshipping.xml
index 2be647bbebc3ac99ece4e67da295df8ede78801a..4fb6e59248002a4492a46881d0572bbacc1621e5 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_editshipping.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_editshipping.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
-    <update handle="checkout_multishipping_customer_address"/>
+    <update handle="multishipping_checkout"/>
+    <update handle="multishipping_checkout_customer_address"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Edit Shipping Address</argument>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_newbilling.xml
similarity index 91%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_newbilling.xml
index efc3993ba56d774581d062929e5bbf1256443cfe..6de50272418b4b2e1fa5068e447578cb3ca81943 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newbilling.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_newbilling.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
-    <update handle="checkout_multishipping_customer_address"/>
+    <update handle="multishipping_checkout"/>
+    <update handle="multishipping_checkout_customer_address"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Create Billing Address</argument>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_newshipping.xml
similarity index 91%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_newshipping.xml
index ccb46c73aa7b89a682c2c6bebba4f23abadafc4b..6e4075e3d0dd34b1056f4ce23078c9134c92fd0f 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_newshipping.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_newshipping.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
-    <update handle="checkout_multishipping_customer_address"/>
+    <update handle="multishipping_checkout"/>
+    <update handle="multishipping_checkout_customer_address"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Create Shipping Address</argument>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_select.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_select.xml
similarity index 84%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_select.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_select.xml
index c5fe4930435a07eb8fc9a6341783ca706d264148..5ba9cf9215e9cb5dddca30d8c9c714617a6aa314 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_select.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_select.xml
@@ -24,8 +24,8 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" label="Multishipping Checkout Shipping Address Selection" design_abstraction="custom">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Address\Select" name="checkout_address_select" template="multishipping/address/select.phtml" cacheable="false"/>
+        <block class="Magento\Multishipping\Block\Checkout\Address\Select" name="checkout_address_select" template="checkout/address/select.phtml" cacheable="false"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_selectbilling.xml
similarity index 85%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_selectbilling.xml
index c5aa54a45f9769fa6f460fb5360e410d2eccf133..343aa739a5879b5bfbd9e0d322f7cadd06af9e83 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_address_selectbilling.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_address_selectbilling.xml
@@ -24,13 +24,13 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument name="label" translate="true" xsi:type="string">Change Billing Address</argument>
         </action>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Address\Select" name="checkout_address_select" template="multishipping/address/select.phtml" cacheable="false"/>
+        <block class="Magento\Multishipping\Block\Checkout\Address\Select" name="checkout_address_select" template="checkout/address/select.phtml" cacheable="false"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_addresses.xml
similarity index 77%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_addresses.xml
index 6df01b9e51ba08b77ac9d9e15873e15490f8386e..1169fa4cb3afef8bee5288f1e8e5e321c13d3a0e 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_addresses.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_addresses.xml
@@ -24,17 +24,17 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Ship to Multiple Addresses</argument>
         </action>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Addresses" name="checkout_addresses" template="multishipping/addresses.phtml" cacheable="false">
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml" cacheable="false"/>
+        <block class="Magento\Multishipping\Block\Checkout\Addresses" name="checkout_addresses" template="checkout/addresses.phtml" cacheable="false">
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
         </block>
     </referenceContainer>
     <block class="Magento\View\Element\Template" name="additional.product.info" template="Magento_Core::template.phtml"/>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_billing.xml
similarity index 90%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_billing.xml
index 78fa0930ea68dc539c5af654a9756f726cb0a008..99c75c94652c358576aab3ae1c6a8c04b245bad4 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_billing.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_billing.xml
@@ -24,14 +24,14 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Billing Information</argument>
         </action>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Billing" name="checkout_billing" template="multishipping/billing.phtml" cacheable="false">
+        <block class="Magento\Multishipping\Block\Checkout\Billing" name="checkout_billing" template="checkout/billing.phtml" cacheable="false">
             <action method="setMethodFormTemplate">
                 <argument name="method" xsi:type="string">purchaseorder</argument>
                 <argument name="template" xsi:type="string">Magento_Payment::form/purchaseorder.phtml</argument>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_customer_address.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_customer_address.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_customer_address.xml
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_login.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_login.xml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_login.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_login.xml
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_overview.xml
similarity index 75%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_overview.xml
index 1ed00cd9ce2800375d4b497c87a6970f57502118..f52b3d6220be483a186a2838f9f57bb4f971ebf2 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_overview.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_overview.xml
@@ -24,20 +24,20 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="label" xsi:type="string">Review Order</argument>
         </action>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Overview" name="checkout_overview" template="multishipping/overview.phtml" cacheable="false">
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="row-grouped" template="multishipping/overview/item.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="row-configurable" template="multishipping/overview/item.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Multishipping\Payment\Info" name="payment_info">
+        <block class="Magento\Multishipping\Block\Checkout\Overview" name="checkout_overview" template="checkout/overview.phtml" cacheable="false">
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="row-grouped" template="Magento_Multishipping::checkout/overview/item.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="row-configurable" template="Magento_Multishipping::checkout/overview/item.phtml" cacheable="false"/>
+            <block class="Magento\Multishipping\Block\Checkout\Payment\Info" name="payment_info">
                 <action method="setInfoTemplate">
                     <argument name="method" xsi:type="string"/>
                     <argument name="template" xsi:type="string"/>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_register.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_register.xml
similarity index 100%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_register.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_register.xml
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_shipping.xml
similarity index 66%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_shipping.xml
index e06feab2fd564e09d09de052f1e33f1d6c902c41..ab98a3006c98bb9953e15e5ddd63f09572ebda48 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_shipping.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_shipping.xml
@@ -24,21 +24,21 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="title" xsi:type="string">Shipping Information</argument>
         </action>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Shipping" name="checkout_shipping" template="multishipping/shipping.phtml" cacheable="false">
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml" cacheable="false"/>
-            <block class="Magento\Checkout\Block\Multishipping\Billing\Items" name="checkout_billing_items" template="multishipping/billing/items.phtml" cacheable="false">
-                <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="multishipping/item/default.phtml" cacheable="false"/>
-                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="multishipping/item/default.phtml" cacheable="false"/>
-                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="multishipping/item/default.phtml" cacheable="false"/>
+        <block class="Magento\Multishipping\Block\Checkout\Shipping" name="checkout_shipping" template="checkout/shipping.phtml" cacheable="false">
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+            <block class="Magento\Multishipping\Block\Checkout\Billing\Items" name="checkout_billing_items" template="Magento_Multishipping::checkout/billing/items.phtml" cacheable="false">
+                <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Grouped" as="grouped" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
+                <block class="Magento\Checkout\Block\Cart\Item\Renderer\Configurable" as="configurable" template="Magento_Multishipping::checkout/item/default.phtml" cacheable="false"/>
             </block>
         </block>
     </referenceContainer>
diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml
similarity index 87%
rename from app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml
rename to app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml
index b6d955c6428166bdd887eefe00809ee3bd9504d7..3c977719cc1aeefa224670742d4b9b45008eb281 100644
--- a/app/code/Magento/Checkout/view/frontend/layout/checkout_multishipping_success.xml
+++ b/app/code/Magento/Multishipping/view/frontend/layout/multishipping_checkout_success.xml
@@ -24,13 +24,13 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <update handle="checkout_multishipping"/>
+    <update handle="multishipping_checkout"/>
     <referenceBlock name="page.main.title">
         <action method="setPageTitle">
             <argument translate="true" name="title" xsi:type="string">Your order has been received.</argument>
         </action>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Checkout\Block\Multishipping\Success" name="checkout_success" template="multishipping/success.phtml" cacheable="false"/>
+        <block class="Magento\Multishipping\Block\Checkout\Success" name="checkout_success" template="checkout/success.phtml" cacheable="false"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Multishipping/view/frontend/multishipping/item/default.phtml b/app/code/Magento/Multishipping/view/frontend/multishipping/item/default.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..7708607582b106ae5882837803e3c72890f0abeb
--- /dev/null
+++ b/app/code/Magento/Multishipping/view/frontend/multishipping/item/default.phtml
@@ -0,0 +1,47 @@
+<?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
+ * @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)
+ */
+?>
+<div class="product details">
+    <strong class="product name"><a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a></strong>
+    <?php if ($_options = $this->getOptionList()): ?>
+        <dl class="item options">
+            <?php foreach ($_options as $_option) : ?>
+                <?php $_formatedOptionValue = $this->getFormatedOptionValue($_option) ?>
+                <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
+                <dd<?php if (isset($_formatedOptionValue['full_view'])): ?> class="truncated" data-mage-init="{truncateOptions:[]}"<?php endif; ?>><?php echo $_formatedOptionValue['value'] ?>
+                    <?php if (isset($_formatedOptionValue['full_view'])): ?>
+                        <dl class="item options">
+                            <dt><?php echo $this->escapeHtml($_option['label']) ?></dt>
+                            <dd><?php echo $_formatedOptionValue['full_view'] ?></dd>
+                        </dl>
+                    <?php endif; ?>
+                </dd>
+            <?php endforeach; ?>
+        </dl>
+    <?php endif; ?>
+    <?php if ($addtInfoBlock = $this->getProductAdditionalInformationBlock()): ?>
+        <?php echo $addtInfoBlock->setItem($this->getItem())->toHtml() ?>
+    <?php endif; ?>
+</div>
diff --git a/app/code/Magento/Newsletter/Block/Subscribe.php b/app/code/Magento/Newsletter/Block/Subscribe.php
index 6f365290e0325fce2000ff35634a3408e5cff55b..4451b423089f31766c7d3cb081db5191bc113416 100644
--- a/app/code/Magento/Newsletter/Block/Subscribe.php
+++ b/app/code/Magento/Newsletter/Block/Subscribe.php
@@ -55,6 +55,7 @@ class Subscribe extends \Magento\View\Element\Template
     ) {
         parent::__construct($context, $data);
         $this->_newsletterSession = $newsletterSession;
+        $this->_isScopePrivate = true;
     }
 
     public function getSuccessMessage()
diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber.php
index 1735bdb1359e6277d745d0269591d988518b9f1b..3817fe028d51cf1b52e37d081202e121d3290c80 100644
--- a/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber.php
+++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber.php
@@ -82,7 +82,11 @@ class Subscriber extends \Magento\Backend\App\Action
         $fileName = 'subscribers.csv';
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
 
-        return $this->_fileFactory->create($fileName, $content->getCsvFile($fileName), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create(
+            $fileName,
+            $content->getCsvFile($fileName),
+            \Magento\App\Filesystem::VAR_DIR
+        );
     }
 
     /**
@@ -93,7 +97,11 @@ class Subscriber extends \Magento\Backend\App\Action
         $this->_view->loadLayout();
         $fileName = 'subscribers.xml';
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $content->getExcelFile($fileName), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create(
+            $fileName,
+            $content->getExcelFile($fileName),
+            \Magento\App\Filesystem::VAR_DIR
+        );
     }
 
     public function massUnsubscribeAction()
diff --git a/app/code/Magento/Newsletter/etc/module.xml b/app/code/Magento/Newsletter/etc/module.xml
index f4a73ca22dafb5f4c82ad12d358250e8eb82e0d4..ede53cc6925b595bcbc52b0786f2120cfc5eb1a8 100755
--- a/app/code/Magento/Newsletter/etc/module.xml
+++ b/app/code/Magento/Newsletter/etc/module.xml
@@ -36,6 +36,9 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Widget"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Cms"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Ogone/Block/Placeform.php b/app/code/Magento/Ogone/Block/Placeform.php
index e8fb2b74b3829d04b599b33b05c827991161584f..165e06a5bc0ca37bc9c2b531fcd1d9d42ae402e4 100644
--- a/app/code/Magento/Ogone/Block/Placeform.php
+++ b/app/code/Magento/Ogone/Block/Placeform.php
@@ -61,6 +61,7 @@ class Placeform extends \Magento\View\Element\Template
         $this->_ogoneApi = $ogoneApi;
         $this->_salesOrderFactory = $salesOrderFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php b/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php
deleted file mode 100644
index 4cc040404aee021b0de759ad92fbb512f5085285..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/Controller/Adminhtml/PageCache.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @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\PageCache\Controller\Adminhtml;
-
-/**
- * Page cache admin controller
- */
-class PageCache extends \Magento\Backend\App\Action
-{
-    /**
-     * Clean external cache action
-     *
-     * @return void
-     */
-    public function cleanAction()
-    {
-        try {
-            $pageCacheData = $this->_objectManager->get('Magento\PageCache\Helper\Data');
-            if ($pageCacheData->isEnabled()) {
-                $pageCacheData->getCacheControlInstance()->clean();
-                $this->messageManager->addSuccess(
-                    __('The external full page cache has been cleaned.')
-                );
-            }
-        } catch (\Magento\Core\Exception $e) {
-            $this->messageManager->addError($e->getMessage());
-        } catch (\Exception $e) {
-            $this->messageManager->addException(
-                $e,
-                __('Something went wrong while clearing the external full page cache.')
-            );
-        }
-        $this->_redirect('adminhtml/cache/index');
-    }
-
-    /**
-     * Check current user permission on resource and privilege
-     *
-     * @return bool
-     */
-    protected function _isAllowed()
-    {
-        return $this->_authorization->isAllowed('Magento_PageCache::page_cache');
-    }
-}
diff --git a/app/code/Magento/PageCache/Helper/Data.php b/app/code/Magento/PageCache/Helper/Data.php
index 7ea70ddd05951c3d74cc8277b876eb4833109b82..777d68e72b5a8d6e9cdbc9a9e90d197812f45e97 100644
--- a/app/code/Magento/PageCache/Helper/Data.php
+++ b/app/code/Magento/PageCache/Helper/Data.php
@@ -35,140 +35,5 @@ namespace Magento\PageCache\Helper;
 
 class Data extends \Magento\App\Helper\AbstractHelper
 {
-    /**
-     * Paths to external cache config options
-     */
-    const XML_PATH_EXTERNAL_CACHE_ENABLED  = 'system/external_page_cache/enabled';
-    const XML_PATH_EXTERNAL_CACHE_LIFETIME = 'system/external_page_cache/cookie_lifetime';
 
-    /**
-     * Cookie name for disabling external caching
-     */
-    const NO_CACHE_COOKIE = 'external_no_cache';
-
-    /**
-     * Cookie name for locking the NO_CACHE_COOKIE for modification
-     */
-    const NO_CACHE_LOCK_COOKIE = 'external_no_cache_cookie_locked';
-
-    /**
-     * @var bool
-     */
-    protected $_isNoCacheCookieLocked = false;
-
-    /**
-     * Core store config
-     *
-     * @var \Magento\Core\Model\Store\Config
-     */
-    protected $_coreStoreConfig;
-
-    /**
-     * @param \Magento\App\Helper\Context $context
-     * @param \Magento\PageCache\Model\CacheControlFactory $ccFactory
-     * @param \Magento\Stdlib\Cookie $cookie
-     * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     */
-    function __construct(
-        \Magento\App\Helper\Context $context,
-        \Magento\PageCache\Model\CacheControlFactory $ccFactory,
-        \Magento\Stdlib\Cookie $cookie,
-        \Magento\Core\Model\Store\Config $coreStoreConfig
-    ) {
-        parent::__construct($context);
-        $this->_coreStoreConfig = $coreStoreConfig;
-        $this->_isNoCacheCookieLocked = (bool)$cookie->get(self::NO_CACHE_LOCK_COOKIE);
-        $this->_cookie = $cookie;
-        $this->_ccFactory = $ccFactory;
-    }
-
-    /**
-     * Check whether external cache is enabled
-     *
-     * @return bool
-     */
-    public function isEnabled()
-    {
-        return (bool)$this->_coreStoreConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_ENABLED);
-    }
-
-    /**
-     * Initialize proper external cache control model
-     *
-     * @throws \Magento\Core\Exception
-     * @return \Magento\PageCache\Model\Control\ControlInterface
-     */
-    public function getCacheControlInstance()
-    {
-        return $this->_ccFactory->getCacheControlInstance();
-    }
-
-    /**
-     * Disable caching on external storage side by setting special cookie, if the cookie has not been locked
-     *
-     * @param int|null $lifetime
-     * @return \Magento\PageCache\Helper\Data
-     */
-    public function setNoCacheCookie($lifetime = null)
-    {
-        if ($this->_isNoCacheCookieLocked) {
-            return $this;
-        }
-        $lifetime = $lifetime !== null
-            ? $lifetime
-            : $this->_coreStoreConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME);
-        if ($this->_cookie->get(self::NO_CACHE_COOKIE)) {
-            $this->_cookie->renew(self::NO_CACHE_COOKIE, $lifetime);
-        } else {
-            $this->_cookie->set(self::NO_CACHE_COOKIE, '1', $lifetime);
-        }
-        return $this;
-    }
-
-    /**
-     * Remove the 'no cache' cookie, if it has not been locked
-     *
-     * @return \Magento\PageCache\Helper\Data
-     */
-    public function removeNoCacheCookie()
-    {
-        if (!$this->_isNoCacheCookieLocked) {
-            $this->_cookie->set(self::NO_CACHE_COOKIE, null);
-        }
-        return $this;
-    }
-
-    /**
-     * Disable modification of the 'no cache' cookie
-     *
-     * @return \Magento\PageCache\Helper\Data
-     */
-    public function lockNoCacheCookie()
-    {
-        $this->_cookie->set(self::NO_CACHE_LOCK_COOKIE, '1', 0);
-        $this->_isNoCacheCookieLocked = true;
-        return $this;
-    }
-
-    /**
-     * Enable modification of the 'no cache' cookie
-     *
-     * @return \Magento\PageCache\Helper\Data
-     */
-    public function unlockNoCacheCookie()
-    {
-        $this->_cookie->set(self::NO_CACHE_LOCK_COOKIE, null);
-        $this->_isNoCacheCookieLocked = false;
-        return $this;
-    }
-
-    /**
-     * Returns a lifetime of cookie for external cache
-     *
-     * @return string Time in seconds
-     */
-    public function getNoCacheCookieLifetime()
-    {
-        return $this->_coreStoreConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME);
-    }
 }
diff --git a/app/code/Magento/PageCache/Model/App/FrontController/HeaderPlugin.php b/app/code/Magento/PageCache/Model/App/FrontController/HeaderPlugin.php
new file mode 100644
index 0000000000000000000000000000000000000000..70cf007729b7a5fde15d7c8fce52543f01e409a7
--- /dev/null
+++ b/app/code/Magento/PageCache/Model/App/FrontController/HeaderPlugin.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\PageCache\Model\App\FrontController;
+
+/**
+ * Class HeadPlugin
+ */
+class HeaderPlugin
+{
+    /**
+     * @var \Magento\Core\Model\Layout
+     */
+    protected $layout;
+
+    /**
+     * @var \Magento\Core\Model\ConfigInterface
+     */
+    protected $config;
+
+    /**
+     * Constructor
+     *
+     * @param \Magento\Core\Model\Layout $layout
+     * @param \Magento\Core\Model\ConfigInterface $config
+     */
+    public function __construct(
+        \Magento\Core\Model\Layout $layout,
+        \Magento\Core\Model\ConfigInterface $config
+    ){
+        $this->layout = $layout;
+        $this->config = $config;
+    }
+
+    /**
+     * Modify response after dispatch
+     *
+     * @param \Magento\App\Response\Http $response
+     * @return \Magento\App\Response\Http
+     */
+    public function afterDispatch(\Magento\App\Response\Http $response)
+    {
+        $maxAge = $this->config->getValue('system/headers/max-age');
+        if ($this->layout->isCacheable()) {
+            $response->setHeader('pragma', 'cache', true);
+            if($this->layout->isPrivate()) {
+                $response->setHeader('cache-control', 'private, max-age=' . $maxAge, true);
+                $response->setHeader('expires',
+                    gmdate('D, d M Y H:i:s T', strtotime('+' . $maxAge . ' seconds')), true);
+            } else {
+                $response->setHeader('cache-control', 'public, max-age=' . $maxAge, true);
+                $response->setHeader('expires',
+                    gmdate('D, d M Y H:i:s T', strtotime('+' . $maxAge . ' seconds')), true);
+            }
+        } else {
+            $response->setHeader('pragma', 'no-cache', true);
+            $response->setHeader('cache-control', 'no-store, no-cache, must-revalidate, max-age=0', true);
+            $response->setHeader('expires',
+                gmdate('D, d M Y H:i:s T', strtotime('-' . $maxAge . ' seconds')), true);
+        }
+        return $response;
+    }
+}
diff --git a/app/code/Magento/PageCache/Model/CacheControlFactory.php b/app/code/Magento/PageCache/Model/CacheControlFactory.php
deleted file mode 100644
index e61b43d9052ec28c0dc35d5cfc17ccea011100a8..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/Model/CacheControlFactory.php
+++ /dev/null
@@ -1,101 +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_PageCache
- * @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)
- */
-
-/**
- * Factory class for cache control interface
- */
-namespace Magento\PageCache\Model;
-
-class CacheControlFactory
-{
-    /**
-     * Paths to external cache config option
-     */
-    const XML_PATH_EXTERNAL_CACHE_CONTROL  = 'system/external_page_cache/control';
-
-    /**
-     * Object manager
-     *
-     * @var \Magento\ObjectManager
-     */
-    protected $_objectManager;
-
-    /**
-     * Core store config
-     *
-     * @var \Magento\Core\Model\Store\Config
-     */
-    protected $_storeConfig;
-
-    /**
-     * @var array
-     */
-    protected $_cacheControls;
-
-    /**
-     * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\Store\Config $storeConfig
-     * @param array $cacheControls
-     */
-    public function __construct(
-        \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\Store\Config $storeConfig,
-        array $cacheControls = array()
-    ) {
-        $this->_objectManager = $objectManager;
-        $this->_storeConfig = $storeConfig;
-        $this->_cacheControls = $cacheControls;
-    }
-
-    /**
-     * Return all available external cache controls
-     *
-     * @return array
-     */
-    public function getCacheControls()
-    {
-        return $this->_cacheControls;
-    }
-
-    /**
-     * Initialize proper external cache control model
-     *
-     * @throws \Magento\Core\Exception
-     * @return \Magento\PageCache\Model\Control\ControlInterface
-     */
-    public function getCacheControlInstance()
-    {
-        $usedControl = $this->_storeConfig->getConfig(self::XML_PATH_EXTERNAL_CACHE_CONTROL);
-        if ($usedControl) {
-            foreach ($this->getCacheControls() as $control => $info) {
-                if ($control == $usedControl && !empty($info['instance'])) {
-                    return $this->_objectManager->get($info['instance']);
-                }
-            }
-        }
-        throw new \Magento\Core\Exception(__('Failed to load external cache control'));
-    }
-}
diff --git a/app/code/Magento/PageCache/Model/Observer.php b/app/code/Magento/PageCache/Model/Observer.php
deleted file mode 100644
index 92e7c7ba2e78463aad6fb499e2e5e9c809219125..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/Model/Observer.php
+++ /dev/null
@@ -1,150 +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_PageCache
- * @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)
- */
-
-/**
- * Page cache observer model
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\PageCache\Model;
-
-class Observer
-{
-    const XML_NODE_ALLOWED_CACHE = 'frontend/cache/allowed_requests';
-
-    /**
-     * Page cache data
-     *
-     * @var \Magento\PageCache\Helper\Data
-     */
-    protected $_pageCacheData = null;
-
-    /**
-     * @var array
-     */
-    protected $_allowedCache;
-
-    /**
-     * @param \Magento\PageCache\Helper\Data $pageCacheData
-     * @param array $allowedCache
-     */
-    public function __construct(\Magento\PageCache\Helper\Data $pageCacheData, array $allowedCache = array())
-    {
-        $this->_pageCacheData = $pageCacheData;
-        $this->_allowedCache = $allowedCache;
-    }
-
-    /**
-     * Check if full page cache is enabled
-     *
-     * @return bool
-     */
-    public function isCacheEnabled()
-    {
-        return $this->_pageCacheData->isEnabled();
-    }
-
-    /**
-     * Check when cache should be disabled
-     *
-     * @param \Magento\Event\Observer $observer
-     * @return \Magento\PageCache\Model\Observer
-     */
-    public function processPreDispatch(\Magento\Event\Observer $observer)
-    {
-        if (!$this->isCacheEnabled()) {
-            return $this;
-        }
-        $action = $observer->getEvent()->getControllerAction();
-        $request = $action->getRequest();
-        $needCaching = true;
-
-        if ($request->isPost()) {
-            $needCaching = false;
-        }
-
-        if (empty($this->_allowedCache)) {
-            $needCaching = false;
-        }
-
-        $module = $request->getModuleName();
-        $controller = $request->getControllerName();
-        $action = $request->getActionName();
-
-
-        if (!isset($this->_allowedCache[$module])) {
-            $needCaching = false;
-        }
-
-        if (isset($this->_allowedCache[$module]['controller'])
-            && $this->_allowedCache[$module]['controller'] != $controller
-        ) {
-            $needCaching = false;
-        }
-
-        if (isset($this->_allowedCache[$module]['action']) && $this->_allowedCache[$module]['action'] != $action) {
-            $needCaching = false;
-        }
-
-        if (!$needCaching) {
-            $this->_pageCacheData->setNoCacheCookie();
-        }
-
-        return $this;
-    }
-
-    /**
-     * Temporary disabling full page caching by setting bo-cache cookie
-     *
-     * @param \Magento\Event\Observer $observer
-     * @return \Magento\PageCache\Model\Observer
-     */
-    public function setNoCacheCookie(\Magento\Event\Observer $observer)
-    {
-        if (!$this->isCacheEnabled()) {
-            return $this;
-        }
-        $this->_pageCacheData->setNoCacheCookie(0)->lockNoCacheCookie();
-        return $this;
-    }
-
-    /**
-     * Activating full page cache aby deleting no-cache cookie
-     *
-     * @param \Magento\Event\Observer $observer
-     * @return \Magento\PageCache\Model\Observer
-     */
-    public function deleteNoCacheCookie(\Magento\Event\Observer $observer)
-    {
-        if (!$this->isCacheEnabled()) {
-            return $this;
-        }
-        $this->_pageCacheData->unlockNoCacheCookie()->removeNoCacheCookie();
-        return $this;
-    }
-}
diff --git a/app/code/Magento/PageCache/Model/System/Config/Source/Controls.php b/app/code/Magento/PageCache/Model/System/Config/Source/Controls.php
deleted file mode 100644
index e39887d5c52c285eeccb81bb4128f00865761e43..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/Model/System/Config/Source/Controls.php
+++ /dev/null
@@ -1,70 +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_PageCache
- * @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)
- */
-
-/**
- * Page cache system config source model
- *
- * @category   Magento
- * @package    Magento_PageCache
- * @author     Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\PageCache\Model\System\Config\Source;
-
-class Controls implements \Magento\Core\Model\Option\ArrayInterface
-{
-    /**
-     * Page cache data
-     *
-     * @var \Magento\PageCache\Model\CacheControlFactory
-     */
-    protected $_pageCacheData = null;
-
-    /**
-     * @param \Magento\PageCache\Model\CacheControlFactory $pageCacheData
-     */
-    public function __construct(
-        \Magento\PageCache\Model\CacheControlFactory $pageCacheData
-    ) {
-        $this->_pageCacheData = $pageCacheData;
-    }
-
-    /**
-     * Return array of external cache controls for using as options
-     *
-     * @return array
-     */
-    public function toOptionArray()
-    {
-        $options = array();
-        foreach ($this->_pageCacheData->getCacheControls() as $code => $type) {
-            $options[] = array(
-                'value' => $code,
-                'label' => $type['label']
-            );
-        }
-        return $options;
-    }
-}
diff --git a/app/code/Magento/PageCache/etc/adminhtml/acl.xml b/app/code/Magento/PageCache/etc/adminhtml/acl.xml
deleted file mode 100644
index 94b992cae431afb16432c5066c869a8e7addd671..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/etc/adminhtml/acl.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @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>
-    <acl>
-        <resources>
-            <resource id="Magento_Adminhtml::admin">
-                <resource id="Magento_PageCache::page_cache" title="External Page Cache" sortOrder="0" />
-            </resource>
-        </resources>
-    </acl>
-</config>
diff --git a/app/code/Magento/PageCache/etc/adminhtml/system.xml b/app/code/Magento/PageCache/etc/adminhtml/system.xml
deleted file mode 100644
index 2aa47e165d1549662938d6c6374db2527d92070b..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/etc/adminhtml/system.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @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>
-    <system>
-        <section id="system">
-            <group id="external_page_cache" translate="label" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="500">
-                <label>External Full Page Cache Settings</label>
-                <field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
-                    <label>Enable External Cache</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="cookie_lifetime" translate="label comment" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0">
-                    <label>Cookie Lifetime (seconds)</label>
-                    <depends>
-                        <field id="enabled">1</field>
-                    </depends>
-                    <comment>If you leave this empty, we'll use the default value.</comment>
-                </field>
-                <field id="control" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
-                    <label>External Cache Control</label>
-                    <source_model>Magento\PageCache\Model\System\Config\Source\Controls</source_model>
-                    <depends>
-                        <field id="enabled">1</field>
-                    </depends>
-                </field>
-            </group>
-        </section>
-    </system>
-</config>
diff --git a/app/code/Magento/PageCache/etc/config.xml b/app/code/Magento/PageCache/etc/config.xml
index cc2325ffa1c1a0c3b0d2150a68c9bab41c33af8c..7f604fac8dc5b967f3617c2bfb3dc513d1ec213e 100644
--- a/app/code/Magento/PageCache/etc/config.xml
+++ b/app/code/Magento/PageCache/etc/config.xml
@@ -28,11 +28,9 @@
 <config>
     <default>
         <system>
-            <external_page_cache>
-                <enabled>0</enabled>
-                <control>zend_page_cache</control>
-                <cookie_lifetime>3600</cookie_lifetime>
-            </external_page_cache>
+            <headers>
+                <max-age>28800</max-age>
+            </headers>
         </system>
     </default>
 </config>
diff --git a/app/code/Magento/PageCache/etc/di.xml b/app/code/Magento/PageCache/etc/di.xml
index 9a6348f2a14ab8423c5bb8dfb3bd168b1d86542b..8a37a88079fc23cfae2c241ba9deeb6e4dfd4399 100644
--- a/app/code/Magento/PageCache/etc/di.xml
+++ b/app/code/Magento/PageCache/etc/di.xml
@@ -24,14 +24,8 @@
  */
 -->
 <config>
-    <type name="Magento\PageCache\Model\CacheControlFactory">
-        <param name="cacheControls">
-            <value>
-                <zendPageCache>
-                    <instance>Magento\PageCache\Model\Control\Zend</instance>
-                    <label>Zend Full Page Cache</label>
-                </zendPageCache>
-            </value>
-        </param>
+    <type name="Magento\App\FrontControllerInterface">
+        <plugin name="front-controller-head"
+            type="Magento\PageCache\Model\App\FrontController\HeaderPlugin" disabled="true"/>
     </type>
-</config>
\ No newline at end of file
+</config>
diff --git a/app/code/Magento/PageCache/etc/module.xml b/app/code/Magento/PageCache/etc/module.xml
index 3d982d29ce4db48203a18e6ebe79b9a17ceab287..7b213139f7fb85840668fc86e02b8abafa9d94f9 100755
--- a/app/code/Magento/PageCache/etc/module.xml
+++ b/app/code/Magento/PageCache/etc/module.xml
@@ -24,13 +24,12 @@
  */
 -->
 <config>
-    <module name="Magento_PageCache" version="1.6.0.0" active="true">
+    <module name="Magento_PageCache" version="1.6.0.0" active="false">
         <sequence>
             <module name="Magento_Core"/>
         </sequence>
         <depends>
             <module name="Magento_Core"/>
-            <module name="Magento_Backend"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/PageCache/view/adminhtml/cache/additional.phtml b/app/code/Magento/PageCache/view/adminhtml/cache/additional.phtml
deleted file mode 100644
index ab47d88fecced253006fc48a523e929cff4011d9..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/view/adminhtml/cache/additional.phtml
+++ /dev/null
@@ -1,39 +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->canShowButton()): ?>
-<table class="form-list">
-    <tr>
-        <td class="scope-label">
-            <button onclick="setLocation('<?php echo $this->getCleanExternalCacheUrl()?>')" type="button" class="scalable"><span><?php echo __('Flush External Page Cache') ?></span></button>
-        </td>
-        <td class="scope-label">
-            <?php echo __('External full page cache.')?>
-        </td>
-    </tr>
-</table>
-<?php endif;?>
diff --git a/app/code/Magento/PageCache/view/frontend/cookie.phtml b/app/code/Magento/PageCache/view/frontend/cookie.phtml
deleted file mode 100644
index a3099644ba4d95b9db79e585cfd66189dc3ba077..0000000000000000000000000000000000000000
--- a/app/code/Magento/PageCache/view/frontend/cookie.phtml
+++ /dev/null
@@ -1,40 +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     base_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)
- */
-?>
-
-<script type="text/javascript">
-    //<![CDATA[
-    (function($) {
-        head.js("<?php echo $this->getViewFileUrl('mage/cookies.js')?>", function() {
-            $.mage.cookies.set(
-                '<?php echo \Magento\PageCache\Helper\Data::NO_CACHE_COOKIE ?>',
-                1,
-                {lifetime: <?php echo $this->helper('Magento\PageCache\Helper\Data')->getNoCacheCookieLifetime() ?>}
-            )
-        });
-    })(jQuery);
-    //]]>
-</script>
diff --git a/app/code/Magento/Paygate/Helper/Data.php b/app/code/Magento/Paygate/Helper/Data.php
deleted file mode 100644
index e5ffbd11d1b4527246f163b421f90e58f8e7384c..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/Helper/Data.php
+++ /dev/null
@@ -1,149 +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_Paygate
- * @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)
- */
-
-/**
- * Paygate data helper
- */
-namespace Magento\Paygate\Helper;
-
-class Data extends \Magento\App\Helper\AbstractHelper
-{
-    /**
-     * Converts a lot of messages to message
-     *
-     * @param  array $messages
-     * @return string
-     */
-    public function convertMessagesToMessage($messages)
-    {
-        return implode(' | ', $messages);
-    }
-
-    /**
-     * Return message for gateway transaction request
-     *
-     * @param  \Magento\Payment\Model\Info $payment
-     * @param  string $requestType
-     * @param  string $lastTransactionId
-     * @param  \Magento\Object $card
-     * @param float $amount
-     * @param string $exception
-     * @return bool|string
-     */
-    public function getTransactionMessage($payment, $requestType, $lastTransactionId, $card, $amount = false,
-        $exception = false
-    ) {
-        return $this->getExtendedTransactionMessage(
-            $payment, $requestType, $lastTransactionId, $card, $amount, $exception
-        );
-    }
-
-    /**
-     * Return message for gateway transaction request
-     *
-     * @param  \Magento\Payment\Model\Info $payment
-     * @param  string $requestType
-     * @param  string $lastTransactionId
-     * @param  \Magento\Object $card
-     * @param float $amount
-     * @param string $exception
-     * @param string $additionalMessage Custom message, which will be added to the end of generated message
-     * @return bool|string
-     */
-    public function getExtendedTransactionMessage($payment, $requestType, $lastTransactionId, $card, $amount = false,
-        $exception = false, $additionalMessage = false
-    ) {
-        $operation = $this->_getOperation($requestType);
-
-        if (!$operation) {
-            return false;
-        }
-
-        if ($amount) {
-            $amount = __('amount %1', $this->_formatPrice($payment, $amount));
-        }
-
-        if ($exception) {
-            $result = __('failed');
-        } else {
-            $result = __('successful');
-        }
-
-        $card = __('Credit Card: xxxx-%1', $card->getCcLast4());
-
-        $pattern = '%s %s %s - %s.';
-        $texts = array($card, $amount, $operation, $result);
-
-        if (!is_null($lastTransactionId)) {
-            $pattern .= ' %s.';
-            $texts[] = __('Authorize.Net Transaction ID %1', $lastTransactionId);
-        }
-
-        if ($additionalMessage) {
-            $pattern .= ' %s.';
-            $texts[] = $additionalMessage;
-        }
-        $pattern .= ' %s';
-        $texts[] = $exception;
-
-        return call_user_func_array('__', array_merge(array($pattern), $texts));
-    }
-
-    /**
-     * Return operation name for request type
-     *
-     * @param  string $requestType
-     * @return bool|string
-     */
-    protected function _getOperation($requestType)
-    {
-        switch ($requestType) {
-            case \Magento\Paygate\Model\Authorizenet::REQUEST_TYPE_AUTH_ONLY:
-                return __('authorize');
-            case \Magento\Paygate\Model\Authorizenet::REQUEST_TYPE_AUTH_CAPTURE:
-                return __('authorize and capture');
-            case \Magento\Paygate\Model\Authorizenet::REQUEST_TYPE_PRIOR_AUTH_CAPTURE:
-                return __('capture');
-            case \Magento\Paygate\Model\Authorizenet::REQUEST_TYPE_CREDIT:
-                return __('refund');
-            case \Magento\Paygate\Model\Authorizenet::REQUEST_TYPE_VOID:
-                return __('void');
-            default:
-                return false;
-        }
-    }
-
-    /**
-     * Format price with currency sign
-     * @param  \Magento\Payment\Model\Info $payment
-     * @param float $amount
-     * @return string
-     */
-    protected function _formatPrice($payment, $amount)
-    {
-        return $payment->getOrder()->getBaseCurrency()->formatTxt($amount);
-    }
-}
diff --git a/app/code/Magento/Paygate/etc/adminhtml/system.xml b/app/code/Magento/Paygate/etc/adminhtml/system.xml
deleted file mode 100644
index 1ca30c8093fc818660114329e9d3bcf9f2a45bb7..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/etc/adminhtml/system.xml
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Paygate
- * @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>
-    <system>
-        <section id="payment">
-            <group id="authorizenet" translate="label" type="text" sortOrder="34" showInDefault="1" showInWebsite="1" showInStore="1">
-                <label>Authorize.net</label>
-                <comment>
-                    <![CDATA[<a href="http://celinks.magento.com/authorize_netRegistration" target="_blank">Click here to sign up for an Authorize.net account</a>]]>
-                </comment>
-                <field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Enabled</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="cctypes" translate="label" type="multiselect" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Credit Card Types</label>
-                    <source_model>Magento\Paygate\Model\Authorizenet\Source\Cctype</source_model>
-                </field>
-                <field id="useccv" translate="label" type="select" sortOrder="16" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Credit Card Verification</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="email_customer" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Email Customer</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="login" translate="label" type="obscure" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>API Login ID</label>
-                    <backend_model>Magento\Backend\Model\Config\Backend\Encrypted</backend_model>
-                </field>
-                <field id="merchant_email" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Merchant's Email</label>
-                    <validate>validate-email</validate>
-                </field>
-                <field id="order_status" translate="label" type="select" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>New Order Status</label>
-                    <source_model>Magento\Sales\Model\Config\Source\Order\Status\Processing</source_model>
-                </field>
-                <field id="sort_order" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Sort Order</label>
-                </field>
-                <field id="test" translate="label" type="select" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Test Mode</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="debug" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Debug</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="title" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
-                    <label>Title</label>
-                </field>
-                <field id="trans_key" translate="label" type="obscure" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Transaction Key</label>
-                    <backend_model>Magento\Backend\Model\Config\Backend\Encrypted</backend_model>
-                </field>
-                <field id="payment_action" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Payment Action</label>
-                    <source_model>Magento\Paygate\Model\Authorizenet\Source\PaymentAction</source_model>
-                </field>
-                <field id="cgi_url" type="text" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Gateway URL</label>
-                </field>
-                <field id="currency" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Accepted Currency</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Currency</source_model>
-                </field>
-                <field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Payment from Applicable Countries</label>
-                    <source_model>Magento\Payment\Model\Config\Source\Allspecificcountries</source_model>
-                </field>
-                <field id="specificcountry" translate="label" type="multiselect" sortOrder="51" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Payment from Specific Countries</label>
-                    <source_model>Magento\Directory\Model\Config\Source\Country</source_model>
-                </field>
-                <field id="min_order_total" translate="label" type="text" sortOrder="98" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Minimum Order Total</label>
-                </field>
-                <field id="max_order_total" translate="label" type="text" sortOrder="99" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Maximum Order Total</label>
-                </field>
-                <field id="allow_partial_authorization" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0">
-                    <label>Allow Partial Authorization</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="heading_3dsecure" translate="label" sortOrder="120" showInDefault="1" showInWebsite="1">
-                    <label>3D Secure</label>
-                    <frontend_model>Magento\Backend\Block\System\Config\Form\Field\Heading</frontend_model>
-                </field>
-                <field id="centinel" translate="label" type="select" sortOrder="125" showInDefault="1" showInWebsite="1">
-                    <label>3D Secure Card Validation</label>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                </field>
-                <field id="centinel_is_mode_strict" translate="label comment" type="select" sortOrder="130" showInDefault="1" showInWebsite="1">
-                    <label>Severe 3D Secure Card Validation</label>
-                    <comment>Severe Validation Removes Chargeback Liability on Merchant</comment>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                    <depends>
-                        <field id="centinel">1</field>
-                    </depends>
-                </field>
-                <field id="centinel_api_url" translate="label comment" type="text" sortOrder="135" showInDefault="1" showInWebsite="1">
-                    <label>Centinel API URL</label>
-                    <comment>If you leave this empty, we'll use a default value. The custom URL may be provided by CardinalCommerce agreement.</comment>
-                    <source_model>Magento\Backend\Model\Config\Source\Yesno</source_model>
-                    <depends>
-                        <field id="centinel">1</field>
-                    </depends>
-                </field>
-                <field id="model"></field>
-            </group>
-        </section>
-    </system>
-</config>
diff --git a/app/code/Magento/Paygate/etc/config.xml b/app/code/Magento/Paygate/etc/config.xml
deleted file mode 100644
index 7333fe8fc003b6ff6bb9c1042305fef75a7f1b5d..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/etc/config.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Paygate
- * @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>
-    <default>
-        <payment>
-            <authorizenet>
-                <active>0</active>
-                <cctypes>AE,VI,MC,DI</cctypes>
-                <cgi_url>https://secure.authorize.net/gateway/transact.dll</cgi_url>
-                <debug>0</debug>
-                <email_customer>0</email_customer>
-                <login backend_model="Magento\Backend\Model\Config\Backend\Encrypted" />
-                <merchant_email />
-                <model>Magento\Paygate\Model\Authorizenet</model>
-                <order_status>processing</order_status>
-                <payment_action>authorize</payment_action>
-                <test>1</test>
-                <title>Credit Card (Authorize.net)</title>
-                <trans_key backend_model="Magento\Backend\Model\Config\Backend\Encrypted" />
-                <allowspecific>0</allowspecific>
-                <currency>USD</currency>
-                <partial_authorization_checksum_checking>1</partial_authorization_checksum_checking>
-            </authorizenet>
-        </payment>
-    </default>
-</config>
diff --git a/app/code/Magento/Paygate/i18n/de_DE.csv b/app/code/Magento/Paygate/i18n/de_DE.csv
deleted file mode 100644
index e82f34921b66df38e1d253b6637ddd27ac6729d5..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/de_DE.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","3D Secure"
-"3D Secure Card Validation","3D Secure-Kartenbestätigung"
-"API Login ID","API Login-ID"
-"Accepted Currency","Akzeptierte Währung"
-"Allow Partial Authorization","Teilweise Autorisierung erlauben"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Sind Sie sicher, dass Sie die Zahlung abbrechen möchten? Klicken Sie auf OK, um Ihre Zahlung abzubrechen und den Betrag wieder frei verfügbar zu machen. Klicken Sie auf Abbrechen, um eine andere Kreditkarte anzugeben und mit der Zahlung fortzufahren."
-"Authorize Only","Nur genehmigen"
-"Authorize and Capture","Genehmigen und erfassen"
-"Authorize.Net Transaction ID %s","Authorize.Net Transaktions-ID %s"
-"Authorize.net","Genehmigen.net"
-"Cancel","Abbrechen"
-"Centinel API URL","Centinel API-URL"
-"Credit Card Types","Arten von Kreditkarten"
-"Credit Card Verification","Überprüfung der Kreditkarte"
-"Credit Card: xxxx-%s","Kreditkarte: xxxx-%s"
-"Debug","Debug"
-"Email Customer","Kunden E-Mail"
-"Enabled","Aktiviert"
-"Error in payment gateway.","Fehler beim Payment Gateway."
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Gateway-Aktionen wurden gesperrt, weil der Gateway eine oder mehrere Transaktionen nicht verarbeiten konnte. Bitte loggen Sie sich in Ihren Authorize.Net-Account ein, um dieses Problem manuell zu beheben."
-"Gateway error: %s","Fehler des Gateway: %s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Es wird ein Standardwert verwendet, falls das Feld freigelassen wird. Eine benutzerdefinierte URL darf nach der CardinalCommerce-Vereinbarung angegeben werden."
-"Invalid amount for authorization.","Ungültiger Betrag um genehmigt zu werden."
-"Invalid amount for capture.","Ungültiger Betrag für die Erfassung."
-"Invalid amount for partial authorization.","Ungültiger Betrag für die teilweise Autorisierung."
-"Invalid amount for refund.","Ungültiger Betrag für eine Rückerstattung."
-"Invalid split tenderId ID.","Ungültige gespaltene Angebotsidentität"
-"Maximum Order Total","Höchstsumme der Bestellung"
-"Merchant's Email","E-Mail des Händlers"
-"Minimum Order Total","Mindestsumme der Bestellung"
-"New Order Status","Stand der neuen Bestellung"
-"Payment Action","Zahlungsvorgang"
-"Payment authorization error.","Fehler bei der Zahlungsermächtigung."
-"Payment canceling error.","Fehler bei Zahlungsabbruch."
-"Payment capturing error.","Fehler bei Zahlungserfassung."
-"Payment from Applicable Countries","Bezahlung aus den entsprechenden Ländern"
-"Payment from Specific Countries","Bezahlung aus bestimmten Ländern"
-"Payment partial authorization error.","Fehler bei teilweiser Autorisierung."
-"Payment refunding error.","Fehler bei der Rückerstattung."
-"Payment updating error.","Fehler beim Zahlungsupdate."
-"Payment voiding error.","Fehler beim Stornieren der Zahlung."
-"Processed Amount","Bearbeiteter Betrag"
-"Remaining Balance","Verbleibender Betrag"
-"Severe 3D Secure Card Validation","Strenge Absicherung der 3D geschützten Karte"
-"Severe Validation Removes Chargeback Liability on Merchant","Die bestehende strenge Absicherung entzieht den Verkäufer der Verbindlichkeit Ausgleichsbuchungen nachkommen zu müssen"
-"Shopping cart contents and/or address has been changed.","Artikel im Einkaufswagen und/oder die Adresse wurden geändert."
-"Sort Order","Sortierreihenfolge"
-"Test Mode","Testmodus"
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","Der Betrag auf Ihrer Kreditkarte reicht nicht aus, um den Kauf durchzuführen. Auf den verfügbaren Betrag kann nicht zugegriffen werden. Um den Kauf durchzuführen, klicken Sie bitte auf OK und geben Sie eine weitere Kreditkartennummer an. Um den Kauf abzubrechen und auf den Betrag wieder zugreifen zu können, klicken Sie bitte auf Abbrechen."
-"There was an error canceling transactions. Please contact us or try again later.","Es ist ein Fehler beim Abbruch der Transaktion aufgetreten. Bitte kontaktieren Sie uns oder probieren Sie es später noch einmal."
-"Title","Titel"
-"Transaction Key","Transaction key"
-"You have reached the maximum number of credit card allowed to be used for the payment.","Sie haben die maximale Anzahl an Kreditkarten erreicht, die Sie für die Bezahlung verwenden dürfen."
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Sie haben die maximale Anzahl an Kreditkarten erreicht, die Sie für eine Bezahlung verwenden dürfen. Die verfügbaren Beträge auf allen verwendeten Karten reichten nicht aus, um die Bezahlung abschließen zu können. Der Zahlungsprozess wurde abgebrochen und die Beträge sind wieder frei verfügbar."
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Ihre Kredtikarte wurde abgelehnt. Klicken Sie OK, um eine andere Kreditkarte anzugeben, damit Sie den Zahlungsvorgang abschließen können. Klicken Sie auf Abbrechen, um den verwendeten Betrag wieder verfügbar zu machen und eine andere Zahlungsmethode auszuwählen."
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Ihre Bestellung wurde nicht aufgegeben, weil Artikel in Ihrem Einkaufswagen und/oder die Adresse geändert wurden. Bereits autorisierte, ausstehende Beträge von Ihrer vorherigen Zahlung sind wieder frei verfügbar. Bitte führen Sie den Zahlungsvorgang noch einmal durch, um Ihre neu hinzugekommenen Artikel zu erfassen."
-"Your payment has been cancelled. All authorized amounts have been released.","Ihre Zahlung wurde abgebrochen. Alle autorisierten Beträge sind wieder frei verfügbar."
-"amount %s","Betrag %s"
-"authorize","Autorisieren"
-"authorize and capture","Autorisieren und Erfassen"
-"capture","Erfassen"
-"failed","fehlgeschlagen"
-"refund","Rückerstattung"
-"successful","erfolgreich"
-"void","ungültig"
diff --git a/app/code/Magento/Paygate/i18n/en_US.csv b/app/code/Magento/Paygate/i18n/en_US.csv
deleted file mode 100644
index 841297c09bedfe2aebca18a9f77a73d216952098..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/en_US.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","3D Secure"
-"3D Secure Card Validation","3D Secure Card Validation"
-"API Login ID","API Login ID"
-"Accepted Currency","Accepted Currency"
-"Allow Partial Authorization","Allow Partial Authorization"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment."
-"Authorize Only","Authorize Only"
-"Authorize and Capture","Authorize and Capture"
-"Authorize.Net Transaction ID %s","Authorize.Net Transaction ID %s"
-"Authorize.net","Authorize.net"
-"Cancel","Cancel"
-"Centinel API URL","Centinel API URL"
-"Credit Card Types","Credit Card Types"
-"Credit Card Verification","Credit Card Verification"
-"Credit Card: xxxx-%s","Credit Card: xxxx-%s"
-"Debug","Debug"
-"Email Customer","Email Customer"
-"Enabled","Enabled"
-"Error in payment gateway.","Error in payment gateway."
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s)."
-"Gateway error: %s","Gateway error: %s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement."
-"Invalid amount for authorization.","Invalid amount for authorization."
-"Invalid amount for capture.","Invalid amount for capture."
-"Invalid amount for partial authorization.","Invalid amount for partial authorization."
-"Invalid amount for refund.","Invalid amount for refund."
-"Invalid split tenderId ID.","Invalid split tenderId ID."
-"Maximum Order Total","Maximum Order Total"
-"Merchant's Email","Merchant's Email"
-"Minimum Order Total","Minimum Order Total"
-"New Order Status","New Order Status"
-"Payment Action","Payment Action"
-"Payment authorization error.","Payment authorization error."
-"Payment canceling error.","Payment canceling error."
-"Payment capturing error.","Payment capturing error."
-"Payment from Applicable Countries","Payment from Applicable Countries"
-"Payment from Specific Countries","Payment from Specific Countries"
-"Payment partial authorization error.","Payment partial authorization error."
-"Payment refunding error.","Payment refunding error."
-"Payment updating error.","Payment updating error."
-"Payment voiding error.","Payment voiding error."
-"Processed Amount","Processed Amount"
-"Remaining Balance","Remaining Balance"
-"Severe 3D Secure Card Validation","Severe 3D Secure Card Validation"
-"Severe Validation Removes Chargeback Liability on Merchant","Severe Validation Removes Chargeback Liability on Merchant"
-"Shopping cart contents and/or address has been changed.","Shopping cart contents and/or address has been changed."
-"Sort Order","Sort Order"
-"Test Mode","Test Mode"
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel."
-"There was an error canceling transactions. Please contact us or try again later.","There was an error canceling transactions. Please contact us or try again later."
-"Title","Title"
-"Transaction Key","Transaction Key"
-"You have reached the maximum number of credit card allowed to be used for the payment.","You have reached the maximum number of credit card allowed to be used for the payment."
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released."
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method."
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents."
-"Your payment has been cancelled. All authorized amounts have been released.","Your payment has been cancelled. All authorized amounts have been released."
-"amount %s","amount %s"
-"authorize","authorize"
-"authorize and capture","authorize and capture"
-"capture","capture"
-"failed","failed"
-"refund","refund"
-"successful","successful"
-"void","void"
diff --git a/app/code/Magento/Paygate/i18n/es_ES.csv b/app/code/Magento/Paygate/i18n/es_ES.csv
deleted file mode 100644
index fbd610a2edefbf8d900cf07af0af078ddbb40d90..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/es_ES.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","3D Secure"
-"3D Secure Card Validation","Validación de Tarjeta 3D Secure"
-"API Login ID","ID de inicio de sesión en API"
-"Accepted Currency","Moneda aceptada"
-"Allow Partial Authorization","Permitir Autorización Parcial"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","¿Está seguro de que desea cancelar su pago? Pinche en Aceptar para cancelar el pago y liberar la cantidad retenida. Pinche en ""Cancelar"" para introducir otra tarjeta de crédito y continuar con su pago."
-"Authorize Only","Sólo autorizar"
-"Authorize and Capture","Autorizar y capturar"
-"Authorize.Net Transaction ID %s","Identificación de la Transacción %s Authorize.Net"
-"Authorize.net","Authorize.net"
-"Cancel","Cancelar"
-"Centinel API URL","Centinel API URL"
-"Credit Card Types","Tipos de tarjeta de crédito"
-"Credit Card Verification","Verificación de tarjeta de crédito"
-"Credit Card: xxxx-%s","Tarjeta de Crédito: xxxx-%s"
-"Debug","Depurar"
-"Email Customer","Enviar mensaje de correo electrónico al cliente"
-"Enabled","Habilitado"
-"Error in payment gateway.","Error en el proceso de pago."
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Las acciones de Gateway se han bloqueadas ya que gateway no puede completar una o varias transacciones. Por favor, inicie sesión manualmente en su cuenta Authorize.Net para resolver el/los problema/s."
-"Gateway error: %s","Error de proceso: %s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Al dejarlo en blanco, se utilizará un valor por defecto. Se puede proporcionar un URL personalizado por el acuerdo CardinalCommerce."
-"Invalid amount for authorization.","Monto no válido para la autorización."
-"Invalid amount for capture.","Cantidad para retención no válida."
-"Invalid amount for partial authorization.","Cantidad de autorización parcial no válida."
-"Invalid amount for refund.","Cantidad de reembolso no válida."
-"Invalid split tenderId ID.","La identificación tenderId no se puede separar."
-"Maximum Order Total","Total máximo de pedido"
-"Merchant's Email","Correo electrónico del vendedor"
-"Minimum Order Total","Total mínimo de pedido"
-"New Order Status","Nuevo estado de pedido"
-"Payment Action","Acción de pago"
-"Payment authorization error.","Error de autorización de pago."
-"Payment canceling error.","Error en el pago de cancelación."
-"Payment capturing error.","Error en el pago de retención."
-"Payment from Applicable Countries","Pago desde países aceptados"
-"Payment from Specific Countries","Pago desde países específicos"
-"Payment partial authorization error.","Error en el pago parcial de la autorización."
-"Payment refunding error.","Error en el pago de reembolso."
-"Payment updating error.","Error de actualización del pago."
-"Payment voiding error.","Error en la anulación del pago."
-"Processed Amount","Cantidad Procesada"
-"Remaining Balance","Saldo Restante"
-"Severe 3D Secure Card Validation","Validación de Tarjeta Severe 3D Secure"
-"Severe Validation Removes Chargeback Liability on Merchant","La Validación Severe Suprime la Responsabilidad de Cancelación de Cargo del Comerciante"
-"Shopping cart contents and/or address has been changed.","El contenido de la cesta de compra y/o la dirección han cambiado."
-"Sort Order","Ordenar Pedido"
-"Test Mode","Modo de prueba"
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","No tiene suficiente dinero en su tarjeta de crédito para completar la compra. El dinero disponible ha sido retenido. Para completar la compra, pulse OK y especifique un número de tarjeta de crédito adicional. Para cancelar la compra y liberar el dinero retenido, pulse Cancelar."
-"There was an error canceling transactions. Please contact us or try again later.","Ha habido un error en la cancelación de las transacciones. Por favor, póngase en contacto con nosotros o inténtelo más tarde de nuevo."
-"Title","Título"
-"Transaction Key","Clave de transacción"
-"You have reached the maximum number of credit card allowed to be used for the payment.","Ha alcanzado el máximo permitido por su tarjeta de crédito para efectuar el pago."
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Ha alcanzado el número máximo de tarjetas de crédito que se pueden usar para un solo pago. El dinero disponible en todas las tarjetas usadas era insuficiente para completar el pago. El pago se ha cancelado y el dinero retenido se ha liberado."
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Su tarjeta de crédito se ha rechazado. Pulse OK para especificar otra tarjeta de crédito para completar la compra. Pulse Cancelar para liberar el dinero retenido y seleccionar otra forma de pago."
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Su orden no ha sido cursada, porque el contenido de la cesta de la compra y/o la dirección se han cambiado. El dinero autorizado en su pago previo, como adelanto, ahora lo tiene disponible. Por favor, revise el proceso de pago para su pedido reciente."
-"Your payment has been cancelled. All authorized amounts have been released.","Su pago se ha cancelado. Dispone de todo el dinero que había avanzado."
-"amount %s","dinero %s"
-"authorize","autorizar"
-"authorize and capture","autorizar y capturar"
-"capture","capturar"
-"failed","error"
-"refund","reembolso"
-"successful","exitoso"
-"void","vacío"
diff --git a/app/code/Magento/Paygate/i18n/fr_FR.csv b/app/code/Magento/Paygate/i18n/fr_FR.csv
deleted file mode 100644
index 7c0c074d3add81b3e7f17cf5bc0447fca1857851..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/fr_FR.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","Sécurité 3D"
-"3D Secure Card Validation","Validation de carte sécurité 3D"
-"API Login ID","Identifiant de l'API"
-"Accepted Currency","Monnaie acceptée"
-"Allow Partial Authorization","Permettre autorisation partielle"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Etes-vous sûr de vouloir annuler votre paiement ?  Cliquez sur OK pour annuler le paiement et débloquer le montant en attente. Cliquez sur Quitter pour entrer une autre carte bancaire et continuer le paiemetn."
-"Authorize Only","Autoriser uniquement"
-"Authorize and Capture","Autoriser et enregistrer"
-"Authorize.Net Transaction ID %s","Identifiant de transaction %s Authorize.Net"
-"Authorize.net","Authorize.net"
-"Cancel","Annuler"
-"Centinel API URL","URP API Centinel"
-"Credit Card Types","Types de cartes de crédit"
-"Credit Card Verification","Vérification de la carte de crédit"
-"Credit Card: xxxx-%s","Carte de crédit : xxxx-%s"
-"Debug","Déboguer"
-"Email Customer","Envoyer un email au client"
-"Enabled","Activé"
-"Error in payment gateway.","Erreur dans le transfert du paiement."
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Les actions de passerelle sont verouillées car la passerelle ne peut pas compléter une ou plusieurs transactions. Veuillez vous connecter à Authorize.net pour résoudre manuellement le problème."
-"Gateway error: %s","Erreur de la passerelle : %s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Si vide, une valeur par défaut sera utilisée. Une URL personnalisée peut être fournie par CardinalCommerce."
-"Invalid amount for authorization.","Montant invalide pour autorisation."
-"Invalid amount for capture.","Montant invalide"
-"Invalid amount for partial authorization.","Montant invalide pour l'autorisation partielle"
-"Invalid amount for refund.","Montant invalide pour un remboursement"
-"Invalid split tenderId ID.","Identifiant invalide"
-"Maximum Order Total","Montant total maximum"
-"Merchant's Email","Email du marchand"
-"Minimum Order Total","Montant total minimum"
-"New Order Status","Nouveau statut de la commande"
-"Payment Action","Paiement"
-"Payment authorization error.","Erreur d'autorisation du paiement."
-"Payment canceling error.","Erreur dans l'annulation du paiement."
-"Payment capturing error.","Erreur lors de la saisie du paiement"
-"Payment from Applicable Countries","Paiement depuis les pays disponibles."
-"Payment from Specific Countries","Paiement depuis les pays spécifiques"
-"Payment partial authorization error.","Erreur de l'autorisation partielle du paiement"
-"Payment refunding error.","Erreur de remboursement du paiement"
-"Payment updating error.","Erreur lors de la mise à jour du paiement."
-"Payment voiding error.","Erreur annulant le paiement"
-"Processed Amount","Montant réalisé"
-"Remaining Balance","Balance restante"
-"Severe 3D Secure Card Validation","Validation de carte sécurité 3D sévère"
-"Severe Validation Removes Chargeback Liability on Merchant","Validation sévère supprime le risque de remboursement pour le vendeur"
-"Shopping cart contents and/or address has been changed.","Le contenu du panier et/ou l'adresse ont été changés."
-"Sort Order","Trier les widgets"
-"Test Mode","Mode test."
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","Le montant disponible sur votre carte de crédit est insuffisant pour pouvoir finaliser votre commande. Le montant disponible a été mis en attente. Pour finaliser votre commande, cliquez sur OK et indiquez le numéro d'une autre carte de crédit. Pour annuler la commande et débloquer le montant mis en attente, cliquez sur Annuler."
-"There was an error canceling transactions. Please contact us or try again later.","Une erreur s'est produite lors de l'annulation de transactions. Veuillez nous contacter ou réessayer ultérieurement."
-"Title","Titre"
-"Transaction Key","Clé de la transaction"
-"You have reached the maximum number of credit card allowed to be used for the payment.","Vous avez atteint le nombre maximum autorisé de cartes de crédit à utiliser pour le paiement."
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Vous avez atteint le nombre maximum autorisé de cartes de crédits à utiliser pour un paiement. Les montants disponibles sur l'ensemble des cartes de crédit étaient insuffisants pour finaliser le paiement. Le paiement a été annulé et les montants mis en attente débloqués."
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Votre carte de crédit a été refusée. Cliquez sur OK pour indiquer une autre carte de crédit pour finaliser votre paiement. Cliquez sur Annuler pour débloquer le montant mis attente et sélectionner un autre moyen de paiement."
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Votre commande n'a pas été enregistrée car les contenus du panier et/ou de l'adresse ont été modifiés. Les montants autorisés en attente de votre paiement précédent sont désormais débloqués. Veuillez procéder au paiement pour les contenus de votre dernier panier."
-"Your payment has been cancelled. All authorized amounts have been released.","Votre paiement a été annulé. Tous les montants autorisés ont été débloqués."
-"amount %s","Montant %s"
-"authorize","autoriser"
-"authorize and capture","autoriser et saisir"
-"capture","saisir"
-"failed","échoué"
-"refund","remboursement"
-"successful","réussi"
-"void","vide"
diff --git a/app/code/Magento/Paygate/i18n/nl_NL.csv b/app/code/Magento/Paygate/i18n/nl_NL.csv
deleted file mode 100644
index d31ec24003b783308bb0cec2339e032f823b0087..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/nl_NL.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","3D Secure"
-"3D Secure Card Validation","3D Secure Card Validation"
-"API Login ID","API Login ID"
-"Accepted Currency","Geaccepteerde munteenheid"
-"Allow Partial Authorization","Gedeeltelijke autorisatie toestaan"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Weet u zeker dat u uw betaling wilt annuleren? Klik op OK om uw betaling te annuleren en het geld vrij te geven. Klik op Cancel om een andere kredietkaart te gebruiken en verder te gaan met uw betaling."
-"Authorize Only","Alleen authoriseren"
-"Authorize and Capture","Authoriseren en opnemen"
-"Authorize.Net Transaction ID %s","Authorize.Net Transactie ID %s"
-"Authorize.net","Authorize.net"
-"Cancel","Annuleren"
-"Centinel API URL","Centinel API URL"
-"Credit Card Types","Types credit card"
-"Credit Card Verification","Credit Card Verificatie"
-"Credit Card: xxxx-%s","Kredietkaart: xxxx-%s"
-"Debug","Debug"
-"Email Customer","E-mail Klant"
-"Enabled","Aan"
-"Error in payment gateway.","Fout in betaling gateway."
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Gateway acties zijn vergrendeld omdat de gateway een of meerdere transacties niet kan voltooien. Log alstublieft in op uw Authorize.Net account om zelf het problem/de problemen op te lossen."
-"Gateway error: %s","Gateway fout: %s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Indien leeg, een standaard waarde kan worden gebruikt. Een aangepaste URL kan worden geleverd volgens de CardinalCommerce overeenkomst"
-"Invalid amount for authorization.","Ongeldig bedrag voor autorisatie."
-"Invalid amount for capture.","Ongeldige aantal voor vangst."
-"Invalid amount for partial authorization.","Ongeldig aantal voor gedeeltelijke autorisatie."
-"Invalid amount for refund.","Ongeldige aantal voor teruggave."
-"Invalid split tenderId ID.","Ongeldige split tenderld ID."
-"Maximum Order Total","Maximale Bestelling"
-"Merchant's Email","Verkopers e-mail"
-"Minimum Order Total","Minimale Bestelling"
-"New Order Status","Nieuwe Status van de Bestelling"
-"Payment Action","Betaling"
-"Payment authorization error.","Fout bij autorisatie betaling."
-"Payment canceling error.","Probleem met het annuleren van de betaling."
-"Payment capturing error.","Fout in het ophalen van de betaling."
-"Payment from Applicable Countries","Betaling van Geëigende Landen"
-"Payment from Specific Countries","Betaling van Specifieke Landen"
-"Payment partial authorization error.","Fout in de gedeeltelijke autorisatie van de betaling."
-"Payment refunding error.","Fout in het terugbetalen van de betaling."
-"Payment updating error.","Fout bij het bijwerken van de betaling."
-"Payment voiding error.","Fout in het vernietigen van de betaling."
-"Processed Amount","Verwerkte hoeveelheid"
-"Remaining Balance","Resterend balans"
-"Severe 3D Secure Card Validation","Strenge 3D Secure Card Validation"
-"Severe Validation Removes Chargeback Liability on Merchant","Strenge validatie verwijdert terugboekingsaansprakelijkheid voor de handelaar"
-"Shopping cart contents and/or address has been changed.","Winkel wagen inhoud en/of adres is gewijzigd."
-"Sort Order","Sorteer Bestelling"
-"Test Mode","Test modus"
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","U heeft onvoldoende tegoed op uw creditcard om de aankoop te voltooien. Het bedrag is vastgezet. Om de aankoop te voltooien, klik op OK en geef een extra creditcardnummer op. Om de aankoop te annuleren en het geld terug te zetten, klik op Cancel."
-"There was an error canceling transactions. Please contact us or try again later.","Er heeft zich een fout voorgedaan tijdens het annuleren van de transacties. Neem contact met ons op of probeer later."
-"Title","Titel"
-"Transaction Key","Transactiesleutel"
-"You have reached the maximum number of credit card allowed to be used for the payment.","Het aantal toegestane creditcards voor deze betaling is bereikt."
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Het aantal toegestane creditcards voor één betaling is bereikt. Het saldo is nog steeds onvoldoende om de betaling te voltooien. De betaling is geannuleerd en de vastgezette bedragen zijn vrijgegeven."
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Uw creditcard is geweigerd. Klik op OK om een andere creditcard te gebruiken voor uw betaling. Klik op Cancel om het bedrag vrij te geven en kies een andere betaalmethode."
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Uw order kan niet worden geplaatst, omdat de inhoud van uw winkelwagentje en/of adres gewijzigd zijn. Geautoriseerde bedragen van uw vorige betaling zijn vrijgegeven. Ga naar het betalingsproces voor de inhoud van uw huidige winkelwagen."
-"Your payment has been cancelled. All authorized amounts have been released.","Uw betaling is geannuleerd. Alle geautoriseerde bedragen zijn vrijgegeven."
-"amount %s","bedrag %s"
-"authorize","autoriseer"
-"authorize and capture","autoriseer en vang"
-"capture","vang"
-"failed","mislukt"
-"refund","teruggave"
-"successful","succesvol"
-"void","ongeldig"
diff --git a/app/code/Magento/Paygate/i18n/pt_BR.csv b/app/code/Magento/Paygate/i18n/pt_BR.csv
deleted file mode 100644
index 895c8956ba73a9546d93e025130fc0e7b6b0d010..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/pt_BR.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","3D Secure"
-"3D Secure Card Validation","Validação de Cartão 3D Secure"
-"API Login ID","ID de Login API"
-"Accepted Currency","Moeda Aceita"
-"Allow Partial Authorization","Permitir Autorização Parcial"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","Tem certeza de que deseja cancelar o seu pagamento? Clique em OK para cancelar o seu pagamento e liberar o montante em espera. Clique em Cancelar para inserir outro cartão de crédito e continuar com o seu pagamento."
-"Authorize Only","Somente Autorizar"
-"Authorize and Capture","Autorizar e Controlar"
-"Authorize.Net Transaction ID %s","ID Transação Authorize.Net %s"
-"Authorize.net","Authorize.net"
-"Cancel","Cancelar"
-"Centinel API URL","URL Centinel API"
-"Credit Card Types","Tipos de Cartão de Crédito"
-"Credit Card Verification","Verificação de Cartão de Crédito"
-"Credit Card: xxxx-%s","Cartão de crédito: xxxx-%s"
-"Debug","Debug"
-"Email Customer","Enviar Email ao Cliente"
-"Enabled","Ativado"
-"Error in payment gateway.","Erro no portal de pagamento."
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","Ações de portal são bloqueadas porque o portal não consegue completar uma ou mais das transações. Por favor entre na sua conta Authorize.Net manualmente para resolver o(s) problema(s)."
-"Gateway error: %s","Erro do portal: %s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","Se vazio, um valor definido será usado. URL personalizado pode ser fornecido por acordo CardinalCommerce."
-"Invalid amount for authorization.","Valor inválido para autorização."
-"Invalid amount for capture.","Valor inválido para captura."
-"Invalid amount for partial authorization.","Valor inválido para autorização parcial."
-"Invalid amount for refund.","Valor inválido para reembolso."
-"Invalid split tenderId ID.","ID tenderId de divisão inválida."
-"Maximum Order Total","Total Máximo do Pedido"
-"Merchant's Email","Email do Vendedor"
-"Minimum Order Total","Total Mínimo do Pedido"
-"New Order Status","Status do Novo Pedido"
-"Payment Action","Ação de Pagamento"
-"Payment authorization error.","Erro na autorização de pagamento."
-"Payment canceling error.","Erro de cancelamento de pagamento."
-"Payment capturing error.","Erro de captura de pagamento."
-"Payment from Applicable Countries","Pagamento de Países Aplicáveis"
-"Payment from Specific Countries","Pagamento de Países Específicos"
-"Payment partial authorization error.","Erro de autorização de pagamento parcial."
-"Payment refunding error.","Erro de reembolso de pagamento."
-"Payment updating error.","Erro de atualização de pagamento."
-"Payment voiding error.","Erro de anulamento de pagamento."
-"Processed Amount","Valor Processado"
-"Remaining Balance","Balanço Restante"
-"Severe 3D Secure Card Validation","Validação de Cartão Severe 3D Secure"
-"Severe Validation Removes Chargeback Liability on Merchant","Validação Severe Remove a Responsabilidade de Cobrança Retroativa no Comerciante"
-"Shopping cart contents and/or address has been changed.","Conteúdo do carrinho de compras e/ou endereço foi alterado."
-"Sort Order","Classificar pedido"
-"Test Mode","Modo de Teste"
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","O valor no seu cartão de crédito é insuficiente para concluir a compra. O montante disponível foi colocado em espera. Para concluir a sua compra, clique em OK e especifique o número do cartão de crédito adicional. Para cancelar a compra e liberar o montante em espera, clique em Cancelar."
-"There was an error canceling transactions. Please contact us or try again later.","Ocorreu um erro ao cancelar as transações. Por favor entre em contato conosco ou tente novamente mais tarde."
-"Title","Título"
-"Transaction Key","Chave de Transação"
-"You have reached the maximum number of credit card allowed to be used for the payment.","Você atingiu o número máximo de cartão de crédito autorizado a ser utilizado para o pagamento."
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","Você atingiu o número máximo de cartões de crédito que pode ser usado para um único pagamento. Os montantes disponíveis em todos os cartões utilizados foram insuficientes para completar o pagamento. O pagamento foi cancelado e os valores em espera foram liberados."
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","Seu cartão de crédito foi recusado. Clique em OK para especificar outro cartão de crédito para concluir a compra. Clique em Cancelar para liberar a quantia em espera e selecione outro método de pagamento."
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","Seu pedido não tenha sido colocado, porque o conteúdo do carrinho de compras e/ou endereço foi alterado. Montantes autorizados a partir do seu pagamento anterior que ficaram pendentes são agora liberados. Por favor siga através do processo de compra para o seu conteúdo recente do carrinho."
-"Your payment has been cancelled. All authorized amounts have been released.","O seu pagamento foi cancelado. Todos os valores autorizados foram liberados."
-"amount %s","valor %s"
-"authorize","autorizar"
-"authorize and capture","autorizar e capturar"
-"capture","capturar"
-"failed","fracassado"
-"refund","reembolso"
-"successful","bem sucedido"
-"void","vazio"
diff --git a/app/code/Magento/Paygate/i18n/zh_CN.csv b/app/code/Magento/Paygate/i18n/zh_CN.csv
deleted file mode 100644
index 61b048be7fd1aa30165a635f66a39a6978f7774b..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paygate/i18n/zh_CN.csv
+++ /dev/null
@@ -1,65 +0,0 @@
-"3D Secure","3D 安全"
-"3D Secure Card Validation","3D 安全信用卡验证"
-"API Login ID","API 登录 ID"
-"Accepted Currency","接受的汇率"
-"Allow Partial Authorization","允许部分身份验证"
-"Are you sure you want to cancel your payment? Click OK to cancel your payment and release the amount on hold. Click Cancel to enter another credit card and continue with your payment.","您是否确定要取消支付?单击确定可取消您的支付,并释放占用的额度。单击取消可输入其他信用卡,并继续进行支付。"
-"Authorize Only","仅供授权"
-"Authorize and Capture","授权和捕获"
-"Authorize.Net Transaction ID %s","Authorize.Net 交易 ID %s"
-"Authorize.net","Authorize.net"
-"Cancel","取消"
-"Centinel API URL","Centinel API URL"
-"Credit Card Types","信用卡类型"
-"Credit Card Verification","信用卡验证"
-"Credit Card: xxxx-%s","信用卡:xxxx-%s"
-"Debug","调试"
-"Email Customer","发送电子邮件给客户"
-"Enabled","已启用"
-"Error in payment gateway.","支付网关出错。"
-"Gateway actions are locked because the gateway cannot complete one or more of the transactions. Please log in to your Authorize.Net account to manually resolve the issue(s).","网关操作被锁定,因为网关无法完成一个或多个交易。请登录到您的 Authorize.Net 帐户并手工解决该问题。"
-"Gateway error: %s","网关错误:%s"
-"If empty, a default value will be used. Custom URL may be provided by CardinalCommerce agreement.","如果为空,则会使用默认值。自定义URL可通过 CardinalCommerce 协议提供。"
-"Invalid amount for authorization.","授权的额度无效。"
-"Invalid amount for capture.","获取的额度无效。"
-"Invalid amount for partial authorization.","部分身份验证无效。"
-"Invalid amount for refund.","退款额度无效。"
-"Invalid split tenderId ID.","拆分的 tenderId ID 无效。"
-"Maximum Order Total","最大订单总数"
-"Merchant's Email","商家电子邮件"
-"Minimum Order Total","最小订单总数"
-"New Order Status","新订单状态"
-"Payment Action","支付操作"
-"Payment authorization error.","支付授权错误。"
-"Payment canceling error.","取消支付过程出错。"
-"Payment capturing error.","支付捕获出错。"
-"Payment from Applicable Countries","从可接受的国家支付"
-"Payment from Specific Countries","从指定的国家支付"
-"Payment partial authorization error.","支付的部分身份验证出错。"
-"Payment refunding error.","支付的退款出错。"
-"Payment updating error.","支付更新错误。"
-"Payment voiding error.","支付的作废出错。"
-"Processed Amount","处理的额度"
-"Remaining Balance","剩下的余额"
-"Severe 3D Secure Card Validation","提供 3D 安全信用卡验证"
-"Severe Validation Removes Chargeback Liability on Merchant","正式验证将撤销银行的退款责任"
-"Shopping cart contents and/or address has been changed.","购物车内容和/或地址已被更改。"
-"Sort Order","排序顺序"
-"Test Mode","测试模式"
-"The amount on your credit card is insufficient to complete your purchase. The available amount has been put on hold. To complete your purchase click OK and specify additional credit card number. To cancel the purchase and release the amount on hold, click Cancel.","您信用卡的余额不足以完成本次购买。可用余额已经被暂挂。为完成您的购买,请点击确定并提供另一个信用卡号码。要取消购买并退回暂挂的余额,请点击取消。"
-"There was an error canceling transactions. Please contact us or try again later.","取消交易时遇到了错误。请联系我们或稍候重试。"
-"Title","标题"
-"Transaction Key","交易密钥"
-"You have reached the maximum number of credit card allowed to be used for the payment.","您已经达到了可用于交易的信用卡数量最大值。"
-"You have reached the maximum number of credit cards that can be used for one payment. The available amounts on all used cards were insufficient to complete payment. The payment has been cancelled and amounts on hold have been released.","您已经达到了一次支付可使用信用卡数量的最大值。所有用过卡片的可用额度都不足以完成支付。付款已被取消,暂挂的额度已经被返还。"
-"Your credit card has been declined. Click OK to specify another credit card to complete your purchase. Click Cancel to release the amount on hold and select another payment method.","您的信用卡被拒绝。点击确定以指定另一张可完成此次交易的信用卡。点击取消以返还被暂挂的额度,并选择其他支付方式。"
-"Your order has not been placed, because contents of the shopping cart and/or address has been changed. Authorized amounts from your previous payment that were left pending are now released. Please go through the checkout process for your recent cart contents.","您的订单创建不成功,因为购物车的内容和/或地址已经有变动。您的上次支付中通过预授权被暂挂的额度已经返还。请为购物车中的新内容重新执行付款流程。"
-"Your payment has been cancelled. All authorized amounts have been released.","您的付款已被取消。所有授权的额度已经被返还。"
-"amount %s","额度 %s"
-"authorize","授权"
-"authorize and capture","授权和获取"
-"capture","获取"
-"failed","失败"
-"refund","退款"
-"successful","成功"
-"void","避免"
diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php
index aec544dea26853fb188cb75294864d9b50bed4c9..1dbaf1064aa8b275589613d9b7dbc6b835e76029 100644
--- a/app/code/Magento/Payment/Helper/Data.php
+++ b/app/code/Magento/Payment/Helper/Data.php
@@ -69,6 +69,11 @@ class Data extends \Magento\App\Helper\AbstractHelper
      */
     protected $_appEmulation;
 
+    /**
+     * @var \Magento\Core\Model\Config\Initial
+     */
+    protected $_initialConfig;
+
     /**
      * Construct
      *
@@ -79,6 +84,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Core\Model\App\Emulation $appEmulation
      * @param \Magento\Payment\Model\Config $paymentConfig
+     * @param \Magento\Core\Model\Config\Initial $initialConfig
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
@@ -87,7 +93,8 @@ class Data extends \Magento\App\Helper\AbstractHelper
         \Magento\Payment\Model\Method\Factory $paymentMethodFactory,
         \Magento\Core\Model\Config $config,
         \Magento\Core\Model\App\Emulation $appEmulation,
-        \Magento\Payment\Model\Config $paymentConfig
+        \Magento\Payment\Model\Config $paymentConfig,
+        \Magento\Core\Model\Config\Initial $initialConfig
     ) {
         parent::__construct($context);
         $this->_coreStoreConfig = $coreStoreConfig;
@@ -96,6 +103,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
         $this->_config = $config;
         $this->_appEmulation = $appEmulation;
         $this->_paymentConfig = $paymentConfig;
+        $this->_initialConfig = $initialConfig;
     }
 
     /**
@@ -124,7 +132,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     public function getStoreMethods($store = null, $quote = null)
     {
         $res = array();
-        $methods = $this->getPaymentMethods($store);
+        $methods = $this->getPaymentMethods();
         uasort($methods, array($this, '_sortMethods'));
         foreach ($methods as $code => $methodConfig) {
             $prefix = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/';
@@ -243,7 +251,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
     public function getRecurringProfileMethods($store = null)
     {
         $result = array();
-        foreach ($this->getPaymentMethods($store) as $code => $data) {
+        foreach ($this->getPaymentMethods() as $code => $data) {
             $method = $this->getMethodInstance($code);
             if ($method && $method->canManageRecurringProfiles()) {
                 $result[] = $method;
@@ -255,12 +263,11 @@ class Data extends \Magento\App\Helper\AbstractHelper
     /**
      * Retrieve all payment methods
      *
-     * @param mixed $store
      * @return array
      */
-    public function getPaymentMethods($store = null)
+    public function getPaymentMethods()
     {
-        return $this->_coreStoreConfig->getConfig(self::XML_PATH_PAYMENT_METHODS, $store);
+        return $this->_initialConfig->getDefault()[self::XML_PATH_PAYMENT_METHODS];
     }
 
     /**
@@ -290,7 +297,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
         $groups = array();
         $groupRelations = array();
 
-        foreach ($this->getPaymentMethods($store) as $code => $data) {
+        foreach ($this->getPaymentMethods() as $code => $data) {
             if ((isset($data['title']))) {
                 $methods[$code] = $data['title'];
             } else {
diff --git a/app/code/Magento/Payment/etc/module.xml b/app/code/Magento/Payment/etc/module.xml
index abad25efe2d44cc1b207793e3e99914e0e41ffdc..8e7c3f3b0db2217314d08e9a8f56e07f87cd7776 100755
--- a/app/code/Magento/Payment/etc/module.xml
+++ b/app/code/Magento/Payment/etc/module.xml
@@ -34,7 +34,7 @@
             <module name="Magento_Catalog"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Centinel"/>
-            <module name="Magento_Checkout" type="soft"/>
+            <module name="Magento_Checkout"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Paypal/Block/Express/Form.php b/app/code/Magento/Paypal/Block/Express/Form.php
index 66f9e2c6a31a2fa73c1f97ef40a851407734dc90..0d3becb661669aa860c7d0955794f1f68e94c17e 100644
--- a/app/code/Magento/Paypal/Block/Express/Form.php
+++ b/app/code/Magento/Paypal/Block/Express/Form.php
@@ -67,6 +67,7 @@ class Form extends \Magento\Paypal\Block\Standard\Form
         $this->_paypalData = $paypalData;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $paypalConfigFactory, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Paypal/Block/Express/Shortcut.php b/app/code/Magento/Paypal/Block/Express/Shortcut.php
index 37731635dbfa69cd5b3f16231aeb926ac602bb63..8d12c03ee2d4133abfeda6bb77f8559fa8e0fbf1 100644
--- a/app/code/Magento/Paypal/Block/Express/Shortcut.php
+++ b/app/code/Magento/Paypal/Block/Express/Shortcut.php
@@ -111,6 +111,11 @@ class Shortcut extends \Magento\View\Element\Template
      */
     protected $mathRandom;
 
+    /**
+     * @var \Magento\Catalog\Model\ProductTypes\ConfigInterface
+     */
+    protected $productTypeConfig;
+
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Paypal\Helper\Data $paypalData
@@ -121,6 +126,7 @@ class Shortcut extends \Magento\View\Element\Template
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory
      * @param \Magento\Math\Random $mathRandom
+     * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig
      * @param array $data
      */
     public function __construct(
@@ -133,6 +139,7 @@ class Shortcut extends \Magento\View\Element\Template
         \Magento\Checkout\Model\Session $checkoutSession,
         \Magento\Paypal\Model\Express\Checkout\Factory $checkoutFactory,
         \Magento\Math\Random $mathRandom,
+        \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
         array $data = array()
     ) {
         $this->_registry = $registry;
@@ -143,7 +150,9 @@ class Shortcut extends \Magento\View\Element\Template
         $this->_checkoutSession = $checkoutSession;
         $this->_checkoutFactory = $checkoutFactory;
         $this->mathRandom = $mathRandom;
+        $this->productTypeConfig = $productTypeConfig;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -170,7 +179,7 @@ class Shortcut extends \Magento\View\Element\Template
             $currentProduct = $this->_registry->registry('current_product');
             if (!is_null($currentProduct)) {
                 $productPrice = (float)$currentProduct->getFinalPrice();
-                if (empty($productPrice) && !$currentProduct->isGrouped()) {
+                if (empty($productPrice) && !$this->productTypeConfig->isProductSet($currentProduct->getTypeId())) {
                     $this->_shouldRender = false;
                     return $result;
                 }
diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php
index 4caa495127c24be6893e5d1604fbac9ae06219d9..4dda948abb7c78c03159ccda17186f9eee9d4ab3 100644
--- a/app/code/Magento/Paypal/Block/Iframe.php
+++ b/app/code/Magento/Paypal/Block/Iframe.php
@@ -97,6 +97,7 @@ class Iframe extends \Magento\Payment\Block\Form
         $this->_orderFactory = $orderFactory;
         $this->_checkoutSession = $checkoutSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -114,7 +115,7 @@ class Iframe extends \Magento\Payment\Block\Form
             $templatePath = str_replace('_', '', $paymentCode);
             $templateFile = "{$templatePath}/iframe.phtml";
 
-            $directory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+            $directory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
             $file = $this->_viewFileSystem->getFilename($templateFile, array('module' => 'Magento_Paypal'));
             if ($directory->isExist($directory->getRelativePath($file))) {
                 $this->setTemplate($templateFile);
diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php
index e4d4ff463aedf1c170af165cc83efbf56fb3f627..901a183c4aecfeaa136ce3a607131960aef29e01 100644
--- a/app/code/Magento/Paypal/Model/Api/Nvp.php
+++ b/app/code/Magento/Paypal/Model/Api/Nvp.php
@@ -518,7 +518,7 @@ class Nvp extends \Magento\Paypal\Model\Api\AbstractApi
      * @var array
      */
     protected $_doReferenceTransactionRequest = array('REFERENCEID', 'PAYMENTACTION', 'AMT', 'ITEMAMT', 'SHIPPINGAMT',
-        'TAXAMT', 'INVNUM', 'NOTIFYURL'
+        'TAXAMT', 'INVNUM', 'NOTIFYURL', 'CURRENCYCODE'
     );
     protected $_doReferenceTransactionResponse = array('BILLINGAGREEMENTID', 'TRANSACTIONID');
 
diff --git a/app/code/Magento/Paypal/Model/Cert.php b/app/code/Magento/Paypal/Model/Cert.php
index db1de4ec154a67056fe70361400a278fb4973709..af12fbe703f99dbd593470c0ed6b9e21384b164c 100644
--- a/app/code/Magento/Paypal/Model/Cert.php
+++ b/app/code/Magento/Paypal/Model/Cert.php
@@ -51,7 +51,7 @@ class Cert extends \Magento\Core\Model\AbstractModel
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -60,13 +60,13 @@ class Cert extends \Magento\Core\Model\AbstractModel
     public function __construct(
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->encryptor = $encryptor;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
diff --git a/app/code/Magento/Paypal/Model/Method/Agreement.php b/app/code/Magento/Paypal/Model/Method/Agreement.php
index e84dad333550f9b699da9365ef6bfd7050eed9f2..e28db8951fc4b2bf04821f121e8c2e42d87a8d7a 100644
--- a/app/code/Magento/Paypal/Model/Method/Agreement.php
+++ b/app/code/Magento/Paypal/Model/Method/Agreement.php
@@ -349,13 +349,15 @@ class Agreement extends \Magento\Sales\Model\Payment\Method\Billing\AbstractAgre
         );
 
         $parameters = array('params' => array($order));
+        $proConfig = $this->_pro->getConfig();
         $api = $this->_pro->getApi()
             ->setReferenceId($billingAgreement->getReferenceId())
-            ->setPaymentAction($this->_pro->getConfig()->paymentAction)
+            ->setPaymentAction($proConfig->paymentAction)
             ->setAmount($amount)
+            ->setCurrencyCode($payment->getOrder()->getBaseCurrencyCode())
             ->setNotifyUrl($this->_urlBuilder->getUrl('paypal/ipn/'))
             ->setPaypalCart($this->_cartFactory->create($parameters))
-            ->setIsLineItemsEnabled($this->_pro->getConfig()->lineItemsEnabled)
+            ->setIsLineItemsEnabled($proConfig->lineItemsEnabled)
             ->setInvNum($order->getIncrementId());
 
         // call api and import transaction and other payment information
diff --git a/app/code/Magento/Paypal/Model/Report/Settlement.php b/app/code/Magento/Paypal/Model/Report/Settlement.php
index 691f98356c13f33f9b4ceb7eb4d5ceab23fc7863..9ea857983fdf45e94228da76f471c96fa1099fce 100644
--- a/app/code/Magento/Paypal/Model/Report/Settlement.php
+++ b/app/code/Magento/Paypal/Model/Report/Settlement.php
@@ -171,7 +171,7 @@ class Settlement extends \Magento\Core\Model\AbstractModel
     /**
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -180,13 +180,13 @@ class Settlement extends \Magento\Core\Model\AbstractModel
     public function __construct(
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::SYS_TMP);
+        $this->_tmpDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::SYS_TMP_DIR);
         $this->_storeManager = $storeManager;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
diff --git a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
index f98d2117d1b0821ff143a13bbed893685f94b300..7795617eac352fddf3d3b1881b41dc187ad1b82d 100644
--- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
+++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
@@ -53,7 +53,7 @@ class Cert extends \Magento\Core\Model\Config\Value
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Paypal\Model\CertFactory $certFactory
      * @param \Magento\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -65,14 +65,14 @@ class Cert extends \Magento\Core\Model\Config\Value
         \Magento\Core\Model\Config $config,
         \Magento\Paypal\Model\CertFactory $certFactory,
         \Magento\Encryption\EncryptorInterface $encryptor,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_certFactory = $certFactory;
         $this->_encryptor = $encryptor;
-        $this->_tmpDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::SYS_TMP);
+        $this->_tmpDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::SYS_TMP_DIR);
         parent::__construct($context, $registry, $storeManager, $config, $resource, $resourceCollection, $data);
     }
 
diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php b/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php
index 84d26e2d886f6ca7979fae471e5ea1d896888674..341b31c8e3ab4e1b7e34b3fd1a5914cb5b81f5f2 100644
--- a/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php
+++ b/app/code/Magento/Paypal/Model/System/Config/Source/BuyerCountry.php
@@ -39,18 +39,18 @@ class BuyerCountry implements \Magento\Core\Model\Option\ArrayInterface
     /**
      * @var \Magento\Directory\Model\Resource\Country\CollectionFactory
      */
-    protected $_countryCollFactory;
+    protected $_countryCollectionFactory;
 
     /**
      * @param \Magento\Paypal\Model\ConfigFactory $configFactory
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
      */
     public function __construct(
         \Magento\Paypal\Model\ConfigFactory $configFactory,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
     ) {
         $this->_configFactory = $configFactory;
-        $this->_countryCollFactory = $countryCollFactory;
+        $this->_countryCollectionFactory = $countryCollectionFactory;
     }
 
     /**
@@ -60,7 +60,7 @@ class BuyerCountry implements \Magento\Core\Model\Option\ArrayInterface
     public function toOptionArray($isMultiselect = false)
     {
         $supported = $this->_configFactory->create()->getSupportedBuyerCountryCodes();
-        $options = $this->_countryCollFactory->create()->addCountryCodeFilter($supported, 'iso2')
+        $options = $this->_countryCollectionFactory->create()->addCountryCodeFilter($supported, 'iso2')
             ->loadData()
             ->toOptionArray($isMultiselect ? false : __('--Please Select--'));
 
diff --git a/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php b/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php
index e30b6ef4a8a73d83a545bc2bb23e87383c5fd4f9..0d98d5cc45f777d1230944ca57ad8f6d990b818b 100644
--- a/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php
+++ b/app/code/Magento/Paypal/Model/System/Config/Source/MerchantCountry.php
@@ -39,18 +39,18 @@ class MerchantCountry implements \Magento\Core\Model\Option\ArrayInterface
     /**
      * @var \Magento\Directory\Model\Resource\Country\CollectionFactory
      */
-    protected $_countryCollFactory;
+    protected $_countryCollectionFactory;
 
     /**
      * @param \Magento\Paypal\Model\ConfigFactory $configFactory
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
      */
     public function __construct(
         \Magento\Paypal\Model\ConfigFactory $configFactory,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
     ) {
         $this->_configFactory = $configFactory;
-        $this->_countryCollFactory = $countryCollFactory;
+        $this->_countryCollectionFactory = $countryCollectionFactory;
     }
 
     /**
@@ -60,7 +60,7 @@ class MerchantCountry implements \Magento\Core\Model\Option\ArrayInterface
     public function toOptionArray($isMultiselect = false)
     {
         $supported = $this->_configFactory->create()->getSupportedMerchantCountryCodes();
-        $options = $this->_countryCollFactory->create()->addCountryCodeFilter($supported, 'iso2')
+        $options = $this->_countryCollectionFactory->create()->addCountryCodeFilter($supported, 'iso2')
             ->loadData()
             ->toOptionArray($isMultiselect ? false : __('--Please Select--'));
 
diff --git a/app/code/Magento/Paypal/etc/module.xml b/app/code/Magento/Paypal/etc/module.xml
index 724186575d7b7991dd4f38b8720b83373adbdf90..9e9cffd45e341bab4a02c5d22c079601dbbc7c8d 100755
--- a/app/code/Magento/Paypal/etc/module.xml
+++ b/app/code/Magento/Paypal/etc/module.xml
@@ -26,7 +26,6 @@
 <config>
     <module name="Magento_Paypal" version="1.6.0.3" active="true">
         <sequence>
-            <module name="Magento_Paygate"/>
             <module name="Magento_Checkout"/>
             <module name="Magento_Sales"/>
         </sequence>
@@ -41,6 +40,7 @@
             <module name="Magento_Directory"/>
             <module name="Magento_Theme"/>
             <module name="Magento_Centinel"/>
+            <module name="Magento_Catalog"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/PaypalUk/etc/module.xml b/app/code/Magento/PaypalUk/etc/module.xml
index 0e0b7b2ae1ceb644f5976773bfa097f5567ffc54..89ca2937a36d17cfacf2c4630b0294c009a6ea19 100755
--- a/app/code/Magento/PaypalUk/etc/module.xml
+++ b/app/code/Magento/PaypalUk/etc/module.xml
@@ -26,7 +26,6 @@
 <config>
     <module name="Magento_PaypalUk" version="1.6.0.0" active="true">
         <sequence>
-            <module name="Magento_Paygate"/>
             <module name="Magento_Checkout"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Paypal"/>
diff --git a/app/code/Magento/Persistent/Block/Header/Additional.php b/app/code/Magento/Persistent/Block/Header/Additional.php
index 15a069f7bd116dc9929378b7ec8c2f4b5ef6f121..10bf7c675d76be2e2f8003de477f6d4a60b861f6 100644
--- a/app/code/Magento/Persistent/Block/Header/Additional.php
+++ b/app/code/Magento/Persistent/Block/Header/Additional.php
@@ -55,6 +55,7 @@ class Additional extends \Magento\View\Element\Html\Link
     ) {
         $this->_persistentSession = $persistentSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /*
diff --git a/app/code/Magento/Persistent/Model/Persistent/Config.php b/app/code/Magento/Persistent/Model/Persistent/Config.php
index 116199b0a463e18edac61a86f6c648d19abc108b..eadc9b3b713103ecc8ca742680644b7c99c06ca6 100644
--- a/app/code/Magento/Persistent/Model/Persistent/Config.php
+++ b/app/code/Magento/Persistent/Model/Persistent/Config.php
@@ -82,7 +82,7 @@ class Config
      * @param \Magento\View\LayoutInterface $layout
      * @param \Magento\App\State $appState
      * @param \Magento\Persistent\Model\Factory $persistentFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Config\DomFactory $domFactory,
@@ -90,14 +90,14 @@ class Config
         \Magento\View\LayoutInterface $layout,
         \Magento\App\State $appState,
         \Magento\Persistent\Model\Factory $persistentFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_domFactory = $domFactory;
         $this->_moduleReader = $moduleReader;
         $this->_layout = $layout;
         $this->_appState = $appState;
         $this->_persistentFactory = $persistentFactory;
-        $this->_modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $this->_modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
     }
 
     /**
diff --git a/app/code/Magento/Persistent/etc/frontend/events.xml b/app/code/Magento/Persistent/etc/frontend/events.xml
index 5eb094195c6cdba2fb0ae46a0490700947d78e00..ce099785c6afca6bb807a300cc370b18319bae46 100644
--- a/app/code/Magento/Persistent/etc/frontend/events.xml
+++ b/app/code/Magento/Persistent/etc/frontend/events.xml
@@ -82,7 +82,7 @@
     <event name="controller_action_predispatch_googlecheckout_redirect_checkout">
         <observer name="persistent" instance="Magento\Persistent\Model\Observer" method="preventExpressCheckout" />
     </event>
-    <event name="controller_action_predispatch_checkout_multishipping_index">
+    <event name="controller_action_predispatch_multishipping_checkout_index">
         <observer name="persistent" instance="Magento\Persistent\Model\Observer" method="preventExpressCheckout" />
     </event>
     <event name="render_block">
diff --git a/app/code/Magento/ProductAlert/etc/module.xml b/app/code/Magento/ProductAlert/etc/module.xml
index ebac0744f61dbb1fd2338eb05d13d850180a64fa..40d29f0c30a3dbcd000154e290f585c1ed937f79 100755
--- a/app/code/Magento/ProductAlert/etc/module.xml
+++ b/app/code/Magento/ProductAlert/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Core"/>
             <module name="Magento_Tax"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Rating/etc/module.xml b/app/code/Magento/Rating/etc/module.xml
index 705ee56b5b8f95c80a5cef17e3ee6185cd0ef39b..9086e51999d0b9aa82cad63906cfa04043ffa1d3 100755
--- a/app/code/Magento/Rating/etc/module.xml
+++ b/app/code/Magento/Rating/etc/module.xml
@@ -33,6 +33,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Review"/>
             <module name="Magento_Customer"/>
+            <module name="Magento_Backend"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Reports/Block/Product/AbstractProduct.php b/app/code/Magento/Reports/Block/Product/AbstractProduct.php
index ec74cdc047c14a8c59767976775c7c98b72a59f7..03ab396976e89ddfa49916649abb74092a2a9c1d 100644
--- a/app/code/Magento/Reports/Block/Product/AbstractProduct.php
+++ b/app/code/Magento/Reports/Block/Product/AbstractProduct.php
@@ -75,6 +75,7 @@ abstract class AbstractProduct extends \Magento\Catalog\Block\Product\AbstractPr
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
      * @param \Magento\Reports\Model\Product\Index\Factory $indexFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -92,7 +93,8 @@ abstract class AbstractProduct extends \Magento\Catalog\Block\Product\AbstractPr
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
         \Magento\Reports\Model\Product\Index\Factory $indexFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         parent::__construct(
             $context,
@@ -106,10 +108,12 @@ abstract class AbstractProduct extends \Magento\Catalog\Block\Product\AbstractPr
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
         $this->_productVisibility = $productVisibility;
         $this->_indexFactory = $indexFactory;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Index.php b/app/code/Magento/Reports/Controller/Adminhtml/Index.php
index bfe3bf7a9bccf34693ce194729b7d9098b9ee215..f74044ba2f3889622519962ec186feafff45b9aa 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Index.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Index.php
@@ -79,7 +79,7 @@ class Index extends \Magento\Backend\App\Action
     {
         $this->_view->loadLayout(false);
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
-        return $this->_fileFactory->create('search.csv', $content->getCsvFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('search.csv', $content->getCsvFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -89,7 +89,7 @@ class Index extends \Magento\Backend\App\Action
     {
         $this->_view->loadLayout(false);
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
-        return $this->_fileFactory->create('search.xml', $content->getExcelFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('search.xml', $content->getExcelFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     protected function _isAllowed()
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer.php
index 84a840000f8947647c595bc60d8d9875735b2de0..d1a1d76fd83e8d26e8cf5e2134773d24e9afc2b8 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer.php
@@ -94,7 +94,7 @@ class Customer extends \Magento\Backend\App\Action
         $fileName = 'new_accounts.csv';
         /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock  */
         $exportBlock = $this->_view->getLayout()->getChildBlock('adminhtml.report.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -109,7 +109,7 @@ class Customer extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Filesystem::VAR_DIR
+            \Magento\App\Filesystem::VAR_DIR
         );
     }
 
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review.php
index 91d9307fed24da63d85092cd84ad97cc71cdece6..9bde9bd8683007831111555b835130cf3d2bbff2 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review.php
@@ -89,7 +89,7 @@ class Review extends \Magento\Backend\App\Action
         $exportBlock = $this->_view
             ->getLayout()
             ->getChildBlock('adminhtml.block.report.review.customer.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -102,7 +102,7 @@ class Review extends \Magento\Backend\App\Action
         $exportBlock = $this->_view
             ->getLayout()
             ->getChildBlock('adminhtml.block.report.review.customer.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), \Magento\App\Filesystem::VAR_DIR);
 
     }
 
@@ -129,7 +129,7 @@ class Review extends \Magento\Backend\App\Action
         $exportBlock = $this->_view
             ->getLayout()
             ->getChildBlock('adminhtml.block.report.review.product.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -142,7 +142,7 @@ class Review extends \Magento\Backend\App\Action
         $exportBlock = $this->_view
             ->getLayout()
             ->getChildBlock('adminhtml.block.report.review.product.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     public function productDetailAction()
@@ -168,7 +168,7 @@ class Review extends \Magento\Backend\App\Action
         $content    = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Review\Detail\Grid')
             ->getCsv();
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -180,7 +180,7 @@ class Review extends \Magento\Backend\App\Action
         $content    = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Review\Detail\Grid')
             ->getExcel($fileName);
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
     }
 
     protected function _isAllowed()
diff --git a/app/code/Magento/Reports/etc/module.xml b/app/code/Magento/Reports/etc/module.xml
index 4f7730b78e8e09e121b01cfb8817a9d43d8a1f4a..4c6de7c795afc9cf5b30b22c2fc732cee5487acb 100755
--- a/app/code/Magento/Reports/etc/module.xml
+++ b/app/code/Magento/Reports/etc/module.xml
@@ -47,6 +47,10 @@
             <module name="Magento_CatalogInventory"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Rating"/>
+            <module name="Magento_Downloadable"/>
+            <module name="Magento_SalesRule"/>
+            <module name="Magento_Checkout"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Reports/sql/reports_setup/mysql4-install-1.6.0.0.php b/app/code/Magento/Reports/sql/reports_setup/mysql4-install-1.6.0.0.php
index d97551f702e8de3594cfc4e86cb3c0100dd695ba..dc748d5a1d66e99c6ae6ec1420f8c52098b4e639 100644
--- a/app/code/Magento/Reports/sql/reports_setup/mysql4-install-1.6.0.0.php
+++ b/app/code/Magento/Reports/sql/reports_setup/mysql4-install-1.6.0.0.php
@@ -131,7 +131,7 @@ $this->getConnection()->createTable($table);
 $installFile = __DIR__ . '/install-1.6.0.0.php';
 
 /** @var \Magento\Filesystem\Directory\Read $modulesDirectory */
-$modulesDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\Filesystem::MODULES);
+$modulesDirectory = $this->getFilesystem()->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
 if ($modulesDirectory->isExist($modulesDirectory->getRelativePath($installFile))) {
     include $installFile;
 }
diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_default_list.phtml b/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_default_list.phtml
index a516de7c2456a7d64e7703a8b46bf410d6f881e9..33c2d571384be750f713c3d5c159acec3bee798d 100644
--- a/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_default_list.phtml
+++ b/app/code/Magento/Reports/view/frontend/widget/compared/column/compared_default_list.phtml
@@ -67,8 +67,23 @@ if ($exist = $this->getRecentlyComparedProducts()) {
                 <?php echo $this->getPriceHtml($_product, true, '-widget-compared-'.$suffix) ?>
                 <?php if($_product->isSaleable()): ?>
                     <div class="actions">
-                        <a href="<?php echo $this->getAddToCartUrl($_product) ?>"
-                           class="action tocart"><span><?php echo __('Add to Cart') ?></span></a>
+                        <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?>
+                            <button class="action tocart"
+                                    data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_product) ?>'}}"
+                                    type="button" title="<?php echo __('Add to Cart') ?>">
+                                <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 class="action tocart"
+                                    data-post='<?php echo $postData; ?>'
+                                    type="button" title="<?php echo __('Add to Cart') ?>">
+                                <span><?php echo __('Add to Cart') ?></span>
+                            </button>
+                        <?php endif; ?>
                     </div>
                 <?php else: ?>
                     <?php if ($_product->getIsSalable()): ?>
diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_grid.phtml b/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_grid.phtml
index 114ce964a6944eca63cb58abe8d11395f77af306..e840d9f54c83aaedea1ae6e3f2d5618fe8c40162 100644
--- a/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_grid.phtml
+++ b/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_grid.phtml
@@ -24,6 +24,7 @@
 ?>
 
 <?php
+/** @var \Magento\Catalog\Block\Product\Compare\ListCompare $this */
 if ($exist = $this->getRecentlyComparedProducts()) {
     $type = 'widget-compared';
     $mode = 'grid';
@@ -77,11 +78,23 @@ if ($exist = $this->getRecentlyComparedProducts()) {
                                     <?php if($showCart): ?>
                                         <div class="primary">
                                             <?php if($_item->isSaleable()): ?>
-                                                <button class="action tocart"
-                                                        data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
-                                                        type="button" title="<?php echo __('Add to Cart') ?>">
-                                                    <span><?php echo __('Add to Cart') ?></span>
-                                                </button>
+                                                <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                                    <button class="action tocart"
+                                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php else: ?>
+                                                    <?php
+                                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
+                                                    ?>
+                                                    <button class="action tocart"
+                                                            data-post='<?php echo $postData; ?>'
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php endif; ?>
                                             <?php else: ?>
                                                 <?php if ($_item->getIsSalable()): ?>
                                                     <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -93,17 +106,21 @@ if ($exist = $this->getRecentlyComparedProducts()) {
                                     <?php endif; ?>
 
                                     <?php if($showWishlist || $showCompare): ?>
-                                        <div class="secondary addto links">
+                                        <div class="secondary addto links" data-role="add-to-links">
                                             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                                <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
+                                                <a href="#"
+                                                   data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'
+                                                   data-action="add-to-wishlist"
                                                    class="action towishlist"
                                                    title="<?php echo __('Add to Wishlist') ?>">
                                                     <span><?php echo __('Add to Wishlist') ?></span>
                                                 </a>
                                             <?php endif; ?>
-                                            <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                                <a href="<?php echo $this->getAddToCompareUrl($_item) ?>"
-                                                   class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                            <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                                <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); ?>
+                                                <a href="#" class="action tocompare"
+                                                   data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'
+                                                   title="<?php echo __('Add to Compare') ?>">
                                                     <span><?php echo __('Add to Compare') ?></span>
                                                 </a>
                                             <?php endif; ?>
@@ -118,4 +135,4 @@ if ($exist = $this->getRecentlyComparedProducts()) {
             </ol>
         </div>
     </div>
-<?php endif;?>
+<?php endif;?>
\ No newline at end of file
diff --git a/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_list.phtml b/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_list.phtml
index 0a5060e53fa13cdaeb0a9497a03ead2f353db2c8..cf2d934b134775863fa168e92d856048d8235754 100644
--- a/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_list.phtml
+++ b/app/code/Magento/Reports/view/frontend/widget/compared/content/compared_list.phtml
@@ -24,6 +24,7 @@
 ?>
 
 <?php
+/** @var \Magento\Catalog\Block\Product\Compare\ListCompare $this */
 if ($exist = $this->getRecentlyComparedProducts()) {
     $type = 'widget-compared';
     $mode = 'list';
@@ -77,11 +78,23 @@ if ($exist = $this->getRecentlyComparedProducts()) {
                                     <?php if($showCart): ?>
                                         <div class="primary">
                                             <?php if($_item->isSaleable()): ?>
-                                                <button class="action tocart"
-                                                        data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
-                                                        type="button" title="<?php echo __('Add to Cart') ?>">
-                                                    <span><?php echo __('Add to Cart') ?></span>
-                                                </button>
+                                                <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                                    <button class="action tocart"
+                                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php else: ?>
+                                                    <?php
+                                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
+                                                    ?>
+                                                    <button class="action tocart"
+                                                            data-post='<?php echo $postData; ?>'
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php endif; ?>
                                             <?php else: ?>
                                                 <?php if ($_item->getIsSalable()): ?>
                                                     <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -93,17 +106,21 @@ if ($exist = $this->getRecentlyComparedProducts()) {
                                     <?php endif; ?>
 
                                     <?php if($showWishlist || $showCompare): ?>
-                                        <div class="secondary addto links">
+                                        <div class="secondary addto links" data-role="add-to-links">
                                             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                                <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
+                                                <a href="#"
+                                                   data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'
+                                                   data-action="add-to-wishlist"
                                                    class="action towishlist"
                                                    title="<?php echo __('Add to Wishlist') ?>">
                                                     <span><?php echo __('Add to Wishlist') ?></span>
                                                 </a>
                                             <?php endif; ?>
-                                            <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                                <a href="<?php echo $this->getAddToCompareUrl($_item) ?>"
-                                                   class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                            <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                                <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
+                                                <a href="#" class="action tocompare"
+                                                   data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'
+                                                   title="<?php echo __('Add to Compare') ?>">
                                                     <span><?php echo __('Add to Compare') ?></span>
                                                 </a>
                                             <?php endif; ?>
diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_default_list.phtml b/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_default_list.phtml
index 9908bae11ae3e8ce37ff1ca3c3e2cb174bef09f0..1b50f80a3f5973593c3b8a14acf3e234355c8f4b 100644
--- a/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_default_list.phtml
+++ b/app/code/Magento/Reports/view/frontend/widget/viewed/column/viewed_default_list.phtml
@@ -75,7 +75,20 @@ if ($exist = $this->getRecentlyViewedProducts()) {
                         <div class="product actions">
                             <?php if($_product->isSaleable()): ?>
                             <div class="primary">
-                                <a href="<?php echo $this->getAddToCartUrl($_product) ?>" class="action tocart"><span><?php echo __('Add to Cart') ?></span></a>
+                                <?php if ($_product->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                    <button class="action tocart"
+                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                    <span><?php echo __('Add to Cart') ?></span>
+                                <?php else: ?>
+                                    <?php
+                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]);
+                                    ?>
+                                    <button type="button" class="action tocart" data-post='<?php echo $postData; ?>'>
+                                        <span><?php echo __('Add to Cart') ?></span>
+                                    </button>
+                                <?php endif; ?>
                             </div>
                             <?php else: ?>
                                 <?php if ($_product->getIsSalable()): ?>
diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_grid.phtml b/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_grid.phtml
index f19a1ad2203798058c19c259a86dc8fe0d2ee410..151add3d1fcbbeebdb14fd23298a59751670283a 100644
--- a/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_grid.phtml
+++ b/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_grid.phtml
@@ -80,9 +80,21 @@ if ($exist = $this->getRecentlyViewedProducts()) {
                                     <?php if($showCart): ?>
                                         <div class="primary">
                                             <?php if($_item->isSaleable()): ?>
-                                                <button class="action tocart" data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}" type="button" title="<?php echo __('Add to Cart') ?>">
-                                                    <span><?php echo __('Add to Cart') ?></span>
-                                                </button>
+                                                <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                                    <button class="action tocart" data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}" type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php else: ?>
+                                                    <?php
+                                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()])
+                                                    ?>
+                                                    <button class="action tocart"
+                                                            data-post='<?php echo $postData; ?>'
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php endif; ?>
                                             <?php else: ?>
                                                 <?php if ($_item->getIsSalable()): ?>
                                                     <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -93,17 +105,20 @@ if ($exist = $this->getRecentlyViewedProducts()) {
                                         </div>
                                     <?php endif; ?>
                                     <?php if($showWishlist || $showCompare): ?>
-                                        <div class="secondary addto links">
+                                        <div class="secondary addto links" data-role="add-to-links">
                                             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                                <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
+                                                <a href="#"
                                                    class="action towishlist" data-action="add-to-wishlist"
+                                                   data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'
                                                    title="<?php echo __('Add to Wishlist') ?>">
                                                     <span><?php echo __('Add to Wishlist') ?></span>
                                                 </a>
                                             <?php endif; ?>
-                                            <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                                <a href="<?php echo $this->getAddToCompareUrl($_item) ?>"
-                                                   class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                            <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                                <?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
+                                                <a href="#" class="action tocompare"
+                                                   data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'
+                                                   title="<?php echo __('Add to Compare') ?>">
                                                     <span><?php echo __('Add to Compare') ?></span>
                                                 </a>
                                             <?php endif; ?>
diff --git a/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_list.phtml b/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_list.phtml
index 2c0298105116aadc97543ec6ee8140f0e131c9e6..bdd10e82d43b67b865183b170d8e36d717c4848d 100644
--- a/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_list.phtml
+++ b/app/code/Magento/Reports/view/frontend/widget/viewed/content/viewed_list.phtml
@@ -81,11 +81,23 @@ if ($exist = $this->getRecentlyViewedProducts()) {
                                     <?php if($showCart): ?>
                                         <div class="primary">
                                             <?php if($_item->isSaleable()): ?>
-                                                <button class="action tocart"
-                                                        data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>'}}"
-                                                        type="button" title="<?php echo __('Add to Cart') ?>">
-                                                    <span><?php echo __('Add to Cart') ?></span>
-                                                </button>
+                                                <?php if ($_item->getTypeInstance()->hasRequiredOptions($_item)): ?>
+                                                    <button class="action tocart"
+                                                            data-mage-init="{redirectUrl: {url: '<?php echo $this->getAddToCartUrl($_item) ?>
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                <?php else: ?>
+                                                    <?php
+                                                        $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                        $postData = $postDataHelper->getPostData($this->getAddToCartUrl($_item), ['product' => $_item->getEntityId()]);
+                                                    ?>
+                                                    <button class="action tocart"
+                                                            data-post='<?php echo $postData; ?>'
+                                                            type="button" title="<?php echo __('Add to Cart') ?>">
+                                                        <span><?php echo __('Add to Cart') ?></span>
+                                                    </button>
+                                                    <?php endif; ?>
                                             <?php else: ?>
                                                 <?php if ($_item->getIsSalable()): ?>
                                                     <p class="stock available"><span><?php echo __('In stock') ?></span></p>
@@ -97,17 +109,20 @@ if ($exist = $this->getRecentlyViewedProducts()) {
                                     <?php endif; ?>
 
                                     <?php if($showWishlist || $showCompare): ?>
-                                        <div class="secondary addto links">
+                                        <div class="secondary addto links" data-role="add-to-links">
                                             <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow() && $showWishlist): ?>
-                                                <a href="<?php echo $this->getAddToWishlistUrl($_item) ?>"
+                                                <a href="#"
                                                    class="action towishlist" data-action="add-to-wishlist"
+                                                   data-post='<?php echo $this->getAddToWishlistParams($_item); ?>'
                                                    title="<?php echo __('Add to Wishlist') ?>">
                                                     <span><?php echo __('Add to Wishlist') ?></span>
                                                 </a>
                                             <?php endif; ?>
-                                            <?php if($this->getAddToCompareUrl($_item) && $showCompare): ?>
-                                                <a href="<?php echo $this->getAddToCompareUrl($_item) ?>"
-                                                   class="action tocompare" title="<?php echo __('Add to Compare') ?>">
+                                            <?php if($this->getAddToCompareUrl() && $showCompare): ?>
+                                                <?php  $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
+                                                <a href="#" class="action tocompare"
+                                                   data-post='<?php echo $compareHelper->getPostDataParams($_item);?>'
+                                                   title="<?php echo __('Add to Compare') ?>">
                                                     <span><?php echo __('Add to Compare') ?></span>
                                                 </a>
                                             <?php endif; ?>
diff --git a/app/code/Magento/Review/Block/Customer/ListCustomer.php b/app/code/Magento/Review/Block/Customer/ListCustomer.php
index b7d25cd032ab07b390b70d6da44e7d08674cc0b5..ce91b039562c58991e32853a4c783f0abd338cbe 100644
--- a/app/code/Magento/Review/Block/Customer/ListCustomer.php
+++ b/app/code/Magento/Review/Block/Customer/ListCustomer.php
@@ -64,6 +64,7 @@ class ListCustomer extends \Magento\Customer\Block\Account\Dashboard
     ) {
         $this->_collectionFactory = $collectionFactory;
         parent::__construct($context, $customerSession, $subscriberFactory, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _initCollection()
diff --git a/app/code/Magento/Review/Block/Customer/Recent.php b/app/code/Magento/Review/Block/Customer/Recent.php
index 52ceee84611d3f816e1cede920aeab1d7ef53a98..3e2ea6e2bb482dde1a1c4088e6cd0834295fa3a8 100644
--- a/app/code/Magento/Review/Block/Customer/Recent.php
+++ b/app/code/Magento/Review/Block/Customer/Recent.php
@@ -68,6 +68,7 @@ class Recent extends \Magento\View\Element\Template
         $this->_collectionFactory = $collectionFactory;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php
index 02618f360122572e682555b889c11fd873c9dd35..f2514ef107a534ae04928e800fb871f2eeb11e79 100644
--- a/app/code/Magento/Review/Block/Customer/View.php
+++ b/app/code/Magento/Review/Block/Customer/View.php
@@ -81,6 +81,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Rating\Model\RatingFactory $ratingFactory
      * @param \Magento\Customer\Model\Session $customerSession
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -101,7 +102,8 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Rating\Model\Rating\Option\VoteFactory $voteFactory,
         \Magento\Rating\Model\RatingFactory $ratingFactory,
         \Magento\Customer\Model\Session $customerSession,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_productFactory = $productFactory;
         $this->_reviewFactory = $reviewFactory;
@@ -121,8 +123,10 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
 
diff --git a/app/code/Magento/Review/Block/Form.php b/app/code/Magento/Review/Block/Form.php
index dd29ec89793fb8321dfc3d2863911a3c04b33604..31361997ee1b7fb7a4e401b75e1c7e035f15c63b 100644
--- a/app/code/Magento/Review/Block/Form.php
+++ b/app/code/Magento/Review/Block/Form.php
@@ -102,6 +102,7 @@ class Form extends \Magento\View\Element\Template
         $this->_ratingFactory = $ratingFactory;
         $this->messageManager = $messageManager;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Review/Block/Product/View.php b/app/code/Magento/Review/Block/Product/View.php
index e3fec80bdfa9e6a7b4e794128bdff2379d402df7..9ad39b65b6a2667037427cdf3abcb76be9b8f4cc 100644
--- a/app/code/Magento/Review/Block/Product/View.php
+++ b/app/code/Magento/Review/Block/Product/View.php
@@ -63,9 +63,11 @@ class View extends \Magento\Catalog\Block\Product\View
      * @param \Magento\Tax\Model\Calculation $taxCalculation
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Catalog\Helper\Product $productHelper
+     * @param \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig
      * @param \Magento\Review\Model\Resource\Review\CollectionFactory $collectionFactory
      * @param array $data
-     * 
+     * @param array $priceBlockTypes
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -86,8 +88,10 @@ class View extends \Magento\Catalog\Block\Product\View
         \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Stdlib\String $string,
         \Magento\Catalog\Helper\Product $productHelper,
+        \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
         \Magento\Review\Model\Resource\Review\CollectionFactory $collectionFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_reviewsColFactory = $collectionFactory;
         parent::__construct(
@@ -108,7 +112,9 @@ class View extends \Magento\Catalog\Block\Product\View
             $taxCalculation,
             $string,
             $productHelper,
-            $data
+            $productTypeConfig,
+            $data,
+            $priceBlockTypes
         );
     }
 
@@ -133,8 +139,11 @@ class View extends \Magento\Catalog\Block\Product\View
      * @param bool $displayIfNoReviews
      * @return string
      */
-    public function getReviewsSummaryHtml(\Magento\Catalog\Model\Product $product, $templateType = false, $displayIfNoReviews = false)
-    {
+    public function getReviewsSummaryHtml(
+        \Magento\Catalog\Model\Product $product,
+        $templateType = false,
+        $displayIfNoReviews = false
+    ) {
         return
             $this->getLayout()->createBlock('Magento\Rating\Block\Entity\Detailed')
                 ->setEntityId($this->getProduct()->getId())
diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php
index 3f9264a3fbc7c19bf96bfa8c1a21184da66f386a..b66af65dd345053f8011e97da5af37895a24b7da 100644
--- a/app/code/Magento/Review/Block/View.php
+++ b/app/code/Magento/Review/Block/View.php
@@ -69,6 +69,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
      * @param \Magento\Rating\Model\RatingFactory $ratingFactory
      * @param \Magento\Review\Model\ReviewFactory $reviewFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -87,7 +88,8 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
         \Magento\Rating\Model\Rating\Option\VoteFactory $voteFactory,
         \Magento\Rating\Model\RatingFactory $ratingFactory,
         \Magento\Review\Model\ReviewFactory $reviewFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_voteFactory = $voteFactory;
         $this->_reviewFactory = $reviewFactory;
@@ -104,7 +106,8 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Review/etc/module.xml b/app/code/Magento/Review/etc/module.xml
index 0140f07ecf49004cbd3575d4ca9af694ab772886..dd9449558cff9c0fcb5a72e49502f430bdf522c5 100755
--- a/app/code/Magento/Review/etc/module.xml
+++ b/app/code/Magento/Review/etc/module.xml
@@ -39,6 +39,8 @@
             <module name="Magento_Backend"/>
             <module name="Magento_Tax"/>
             <module name="Magento_Newsletter"/>
+            <module name="Magento_Checkout"/>
+            <module name="Magento_Wishlist"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Rss/Block/AbstractBlock.php b/app/code/Magento/Rss/Block/AbstractBlock.php
index 3e0b12645ca203b3a992988746a837c8b5a73214..b46724381614a9e3399fcf65f2ea39e3dc934eab 100644
--- a/app/code/Magento/Rss/Block/AbstractBlock.php
+++ b/app/code/Magento/Rss/Block/AbstractBlock.php
@@ -45,6 +45,7 @@ class AbstractBlock extends \Magento\View\Element\Template
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php b/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php
index 3b1db06f81cb863eba05ee77d1e5059cf55b3420..5244c5699c48bdcbd5f40502230bdfd9fb297e3c 100644
--- a/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php
+++ b/app/code/Magento/Rss/Block/Catalog/AbstractCatalog.php
@@ -81,6 +81,7 @@ class AbstractCatalog extends \Magento\Rss\Block\AbstractBlock
     ) {
         $this->_catalogData = $catalogData;
         parent::__construct($context, $customerSession, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Rss/Block/ListBlock.php b/app/code/Magento/Rss/Block/ListBlock.php
index 048adc0ded5bbe5604aab8df673edc3e26e71a35..b488abdd6b1dd353e386de4894dbb0dfa9f04dbf 100644
--- a/app/code/Magento/Rss/Block/ListBlock.php
+++ b/app/code/Magento/Rss/Block/ListBlock.php
@@ -60,6 +60,7 @@ class ListBlock extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_categoryFactory = $categoryFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Rss/Block/Wishlist.php b/app/code/Magento/Rss/Block/Wishlist.php
index 8e81a685718af10725a3ee026c37fc2c50f50de5..5f983466ca0fffc79cbc37f995c5497231c41ed7 100644
--- a/app/code/Magento/Rss/Block/Wishlist.php
+++ b/app/code/Magento/Rss/Block/Wishlist.php
@@ -94,6 +94,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
      * @param \Magento\Rss\Model\RssFactory $rssFactory
      * @param \Magento\Catalog\Helper\Output $outputHelper
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -116,7 +117,8 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Rss\Model\RssFactory $rssFactory,
         \Magento\Catalog\Helper\Output $outputHelper,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_outputHelper = $outputHelper;
         $this->_coreData = $coreData;
@@ -137,7 +139,8 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
             $imageHelper,
             $customerSession,
             $productFactory,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Rss/etc/module.xml b/app/code/Magento/Rss/etc/module.xml
index a61ce5e03fef6d4ff63cb673f62d3d533a4322b9..b3bc7f9007f2e31a1b27202f4f293759445a447f 100755
--- a/app/code/Magento/Rss/etc/module.xml
+++ b/app/code/Magento/Rss/etc/module.xml
@@ -46,6 +46,8 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Backend"/>
             <module name="Magento_GiftMessage"/>
+            <module name="Magento_Checkout"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php
index c748d6822b71280f703b5860b4dc541e7509784f..f5857360a1fb96b788499ebe4c294efe771b9dd1 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php
@@ -85,7 +85,7 @@ class View extends \Magento\Backend\Block\Template
 
     public function getSubmitUrl()
     {
-        return $this->getUrl('sales/*/addComment', array('id' => $this->getEntity()->getId()));
+        return $this->getUrl('*/*/addComment', array('id' => $this->getEntity()->getId()));
     }
 
     public function canSendCommentEmail()
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Qty.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Qty.php
index ab25fe9add3dc046ca2670c68ce07d13a03ac808..734d7e96276702fee025ae194ff1f3f770dd5f5a 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Qty.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Search/Grid/Renderer/Qty.php
@@ -44,7 +44,7 @@ class Qty
      */
     protected function _isInactive($row)
     {
-        return $row->getTypeId() == \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE;
+        return $row->getTypeId() == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
index 726c203935d4d067d94725933905e5028d24d46e..cd6c7eae37060b7b6170a928b8626bd5bd6e0264 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Form.php
@@ -65,13 +65,6 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
         return $this->_coreRegistry->registry('current_invoice');
     }
 
-    protected function _prepareLayout()
-    {
-        $trackingBlock = $this->getLayout()->createBlock('Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Tracking');
-        $this->setChild('tracking', $trackingBlock);
-        return parent::_prepareLayout();
-    }
-
     public function getSaveUrl()
     {
         return $this->getUrl('sales/*/save', array('order_id' => $this->getInvoice()->getOrderId()));
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php
deleted file mode 100644
index 918ede8407952b36eed32fa0ce059663e4476a09..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Invoice/Create/Tracking.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Shipment tracking control form
- *
- * @category   Magento
- * @package    Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Block\Adminhtml\Order\Invoice\Create;
-
-class Tracking extends \Magento\Backend\Block\Template
-{
-    /**
-     * Core registry
-     *
-     * @var \Magento\Core\Model\Registry
-     */
-    protected $_coreRegistry = null;
-
-    /**
-     * @var \Magento\Shipping\Model\Config
-     */
-    protected $_shippingConfig;
-
-    /**
-     * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\Shipping\Model\Config $shippingConfig
-     * @param \Magento\Core\Model\Registry $registry
-     * @param array $data
-     */
-    public function __construct(
-        \Magento\Backend\Block\Template\Context $context,
-        \Magento\Shipping\Model\Config $shippingConfig,
-        \Magento\Core\Model\Registry $registry,
-        array $data = array()
-    ) {
-        $this->_shippingConfig = $shippingConfig;
-        $this->_coreRegistry = $registry;
-        parent::__construct($context, $data);
-    }
-
-    public function _construct()
-    {
-        $this->setTemplate('order/invoice/create/tracking.phtml');
-    }
-
-    /**
-     * Prepares layout of block
-     *
-     * @return \Magento\Sales\Block\Adminhtml\Order\View\Giftmessage
-     */
-    protected function _prepareLayout()
-    {
-        $this->addChild('add_button', 'Magento\Backend\Block\Widget\Button', array(
-            'label'   => __('Add Tracking Number'),
-            'class'   => '',
-            'onclick' => 'trackingControl.add()'
-        ));
-    }
-
-    /**
-     * Retrieve shipment model instance
-     *
-     * @return \Magento\Sales\Model\Order\Shipment
-     */
-    public function getShipment()
-    {
-        return $this->_coreRegistry->registry('current_shipment');
-    }
-
-    /**
-     * Retrieve shipment model instance
-     *
-     * @return \Magento\Sales\Model\Order\Shipment
-     */
-    public function getInvoice()
-    {
-        return $this->_coreRegistry->registry('current_invoice');
-    }
-
-    /**
-     * Retrieve
-     *
-     * @return unknown
-     */
-    public function getCarriers()
-    {
-
-        $carriers = array();
-        $carrierInstances = $this->_shippingConfig->getAllCarriers(
-            $this->getInvoice()->getStoreId()
-        );
-        $carriers['custom'] = __('Custom Value');
-        foreach ($carrierInstances as $code => $carrier) {
-            if ($carrier->isTrackingAvailable()) {
-                $carriers[$code] = $carrier->getConfigData('title');
-            }
-        }
-        return $carriers;
-    }
-}
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php
index 5e7bae068a1aa6aa65f37e157feb8f7597e9bb6f..5c01a6f55c9fa4efcacf9db66841a4c9f4400ceb 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/View.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View.php
@@ -296,7 +296,7 @@ class View extends \Magento\Backend\Block\Widget\Form\Container
 
     public function getShipUrl()
     {
-        return $this->getUrl('sales/order_shipment/start');
+        return $this->getUrl('adminhtml/order_shipment/start');
     }
 
     public function getCommentUrl()
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php
index 79182e44b0fbc371560f431bf22845b8539d7419..9d7598bc97c09d5d2f896f7bf2cbc8382495540c 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/Shipments.php
@@ -145,7 +145,7 @@ class Shipments
     public function getRowUrl($row)
     {
         return $this->getUrl(
-            '*/order_shipment/view',
+            'adminhtml/order_shipment/view',
             array(
                 'shipment_id'=> $row->getId(),
                 'order_id'  => $row->getOrderId()
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php
index 1a69129c256fbf7a4a6265061c1c49b42dbf11ac..8661059a14ad71264cd19d8873bdaaf84cff4be8 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View.php
@@ -61,7 +61,7 @@ class View extends \Magento\Backend\Block\Widget\Container
     {
         $this->_addButton('back', array(
             'label'     => __('Back'),
-            'onclick'   => "setLocation('{$this->getUrl('adminhtml/*/')}')",
+            'onclick'   => "setLocation('{$this->getUrl('*/*/')}')",
             'class'     => 'back',
         ));
 
@@ -70,7 +70,7 @@ class View extends \Magento\Backend\Block\Widget\Container
 
         // cancel
         if ($profile->canCancel()) {
-            $url = $this->getUrl('adminhtml/*/updateState', array('profile' => $profile->getId(), 'action' => 'cancel'));
+            $url = $this->getUrl('*/*/updateState', array('profile' => $profile->getId(), 'action' => 'cancel'));
             $this->_addButton('cancel', array(
                 'label'     => __('Cancel'),
                 'onclick'   => "confirmSetLocation('{$confirmationMessage}', '{$url}')",
@@ -80,7 +80,7 @@ class View extends \Magento\Backend\Block\Widget\Container
 
         // suspend
         if ($profile->canSuspend()) {
-            $url = $this->getUrl('adminhtml/*/updateState', array('profile' => $profile->getId(), 'action' => 'suspend'));
+            $url = $this->getUrl('*/*/updateState', array('profile' => $profile->getId(), 'action' => 'suspend'));
             $this->_addButton('suspend', array(
                 'label'     => __('Suspend'),
                 'onclick'   => "confirmSetLocation('{$confirmationMessage}', '{$url}')",
@@ -90,7 +90,7 @@ class View extends \Magento\Backend\Block\Widget\Container
 
         // activate
         if ($profile->canActivate()) {
-            $url = $this->getUrl('adminhtml/*/updateState', array('profile' => $profile->getId(), 'action' => 'activate'));
+            $url = $this->getUrl('*/*/updateState', array('profile' => $profile->getId(), 'action' => 'activate'));
             $this->_addButton('activate', array(
                 'label'     => __('Activate'),
                 'onclick'   => "confirmSetLocation('{$confirmationMessage}', '{$url}')",
@@ -100,7 +100,7 @@ class View extends \Magento\Backend\Block\Widget\Container
 
         // get update
         if ($profile->canFetchUpdate()) {
-            $url = $this->getUrl('adminhtml/*/updateProfile', array('profile' => $profile->getId(),));
+            $url = $this->getUrl('*/*/updateProfile', array('profile' => $profile->getId(),));
             $this->_addButton('update', array(
                 'label'     => __('Get Update'),
                 'onclick'   => "confirmSetLocation('{$confirmationMessage}', '{$url}')",
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php
index 7cfa36190f42ffb790f7500af1545f02d261bf6a..422dcefdea86341267f79d1675c86a99f846aa8b 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php
@@ -216,7 +216,7 @@ class Orders
     public function getTabUrl()
     {
         $recurringProfile = $this->_coreRegistry->registry('current_recurring_profile');
-        return $this->getUrl('adminhtml/*/orders', array('profile' => $recurringProfile->getId()));
+        return $this->getUrl('*/*/orders', array('profile' => $recurringProfile->getId()));
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php b/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php
index 1082ce1f26dfae512c07b9cc0fc4185a29a64dd9..f69d9a75faea80000df3363f4195af164f9a9137 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php
+++ b/app/code/Magento/Sales/Block/Adminhtml/Shipment/Grid.php
@@ -206,7 +206,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended
 
         $this->getMassactionBlock()->addItem('print_shipping_label', array(
             'label' => __('Print Shipping Labels'),
-            'url' => $this->getUrl('sales/order_shipment/massPrintShippingLabel'),
+            'url' => $this->getUrl('adminhtml/order_shipment/massPrintShippingLabel'),
         ));
 
         return $this;
diff --git a/app/code/Magento/Sales/Block/Billing/Agreement/View.php b/app/code/Magento/Sales/Block/Billing/Agreement/View.php
index 0a5c566d6336b6ef31db5201b66382512018d8df..59a5c435e2b12a9536fd80eab2f78f03c5b92b12 100644
--- a/app/code/Magento/Sales/Block/Billing/Agreement/View.php
+++ b/app/code/Magento/Sales/Block/Billing/Agreement/View.php
@@ -105,6 +105,7 @@ class View extends \Magento\View\Element\Template
         $this->_orderConfig = $orderConfig;
         $this->_coreRegistry = $registry;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Billing/Agreements.php b/app/code/Magento/Sales/Block/Billing/Agreements.php
index c82fff5e6a5d92eb435064a216e7e0dbfa840b39..d1acdb294875654cb7ca26726e05c1abe0245ead 100644
--- a/app/code/Magento/Sales/Block/Billing/Agreements.php
+++ b/app/code/Magento/Sales/Block/Billing/Agreements.php
@@ -80,6 +80,7 @@ class Agreements extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_agreementCollection = $agreementCollection;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Guest/Link.php b/app/code/Magento/Sales/Block/Guest/Link.php
index 4e05f59da131d358f30a09557c02075a8c4921fd..b4fb1d11eddda0a15c3f37010af5a5f342e462a0 100644
--- a/app/code/Magento/Sales/Block/Guest/Link.php
+++ b/app/code/Magento/Sales/Block/Guest/Link.php
@@ -48,6 +48,7 @@ class Link extends \Magento\View\Element\Html\Link\Current
     ) {
         parent::__construct($context, $defaultPath, $data);
         $this->_customerSession = $customerSession;
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Order/Comments.php b/app/code/Magento/Sales/Block/Order/Comments.php
index b9eff231c7ff11a2125c7892a89b1ff2cf04d394..d199ceb686cecdcdb9a518fa4541dfd1a0c9eaf7 100644
--- a/app/code/Magento/Sales/Block/Order/Comments.php
+++ b/app/code/Magento/Sales/Block/Order/Comments.php
@@ -27,19 +27,21 @@ namespace Magento\Sales\Block\Order;
 
 class Comments extends \Magento\View\Element\Template
 {
+
     /**
-     * @param \Magento\View\Element\Template\Context $context
-     * @param \Magento\Sales\Model\ResourceFactory $resourceFactory
-     * @param array $data
+     * @var \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory
      */
-    public function __construct(
-        \Magento\View\Element\Template\Context $context,
-        \Magento\Sales\Model\ResourceFactory $resourceFactory,
-        array $data = array()
-    ) {
-        $this->_resourceFactory = $resourceFactory;
-        parent::__construct($context, $data);
-    }
+    protected $_invoiceCollectionFactory;
+
+    /**
+     * @var \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory
+     */
+    protected $_memoCollectionFactory;
+
+    /**
+     * @var \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory
+     */
+    protected $_shipmentCollectionFactory;
 
     /**
      * Current entity (model instance) with getCommentsCollection() method
@@ -55,6 +57,26 @@ class Comments extends \Magento\View\Element\Template
      */
     protected $_commentCollection;
 
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $invoiceCollectionFactory
+     * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $memoCollectionFactory
+     * @param \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $shipmentCollectionFactory
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $invoiceCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $memoCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $shipmentCollectionFactory,
+        array $data = array()
+    ) {
+        parent::__construct($context, $data);
+        $this->_invoiceCollectionFactory = $invoiceCollectionFactory;
+        $this->_memoCollectionFactory = $memoCollectionFactory;
+        $this->_shipmentCollectionFactory = $shipmentCollectionFactory;
+    }
+
     /**
      * Sets comments parent model instance
      *
@@ -89,16 +111,15 @@ class Comments extends \Magento\View\Element\Template
         if (is_null($this->_commentCollection)) {
             $entity = $this->getEntity();
             if ($entity instanceof \Magento\Sales\Model\Order\Invoice) {
-                $collectionClass = 'Magento\Sales\Model\Resource\Order\Invoice\Comment\Collection';
+                $this->_commentCollection = $this->_invoiceCollectionFactory->create();
             } else if ($entity instanceof \Magento\Sales\Model\Order\Creditmemo) {
-                $collectionClass = 'Magento\Sales\Model\Resource\Order\Creditmemo\Comment\Collection';
+                $this->_commentCollection = $this->_memoCollectionFactory->create();
             } else if ($entity instanceof \Magento\Sales\Model\Order\Shipment) {
-                $collectionClass = 'Magento\Sales\Model\Resource\Order\Shipment\Comment\Collection';
+                $this->_commentCollection = $this->_shipmentCollectionFactory->create();
             } else {
                 throw new \Magento\Core\Exception(__('We found an invalid entity model.'));
             }
 
-            $this->_commentCollection = $this->_resourceFactory->create($collectionClass);
             $this->_commentCollection->setParentFilter($entity)
                ->setCreatedAtOrder()
                ->addVisibleOnFrontFilter();
diff --git a/app/code/Magento/Sales/Block/Order/Creditmemo.php b/app/code/Magento/Sales/Block/Order/Creditmemo.php
index 4bc8fad15504a54ab22a4ee8a7d442fb1745ceaa..5051f6b8e1545aa1ff2307cfcab6af7eefd15dcc 100644
--- a/app/code/Magento/Sales/Block/Order/Creditmemo.php
+++ b/app/code/Magento/Sales/Block/Order/Creditmemo.php
@@ -67,6 +67,7 @@ class Creditmemo extends \Magento\Sales\Block\Order\Creditmemo\Items
         $this->_paymentHelper = $paymentHelper;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $registry, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php b/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php
index b8f17de366fd0ee1124f37a1ee0e9814a0597b97..9609d7a6789c6f23594fb13343e7b12cadcd31a2 100644
--- a/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php
+++ b/app/code/Magento/Sales/Block/Order/Creditmemo/Totals.php
@@ -27,6 +27,20 @@ namespace Magento\Sales\Block\Order\Creditmemo;
 
 class Totals extends \Magento\Sales\Block\Order\Totals
 {
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        array $data = array()
+    ) {
+        parent::__construct($context, $registry, $data);
+        $this->_isScopePrivate = true;
+    }
+
     protected $_creditmemo = null;
 
     public function getCreditmemo()
diff --git a/app/code/Magento/Sales/Block/Order/History.php b/app/code/Magento/Sales/Block/Order/History.php
index bda9b94898ccf1b1d08c5c0d6eafdef6eb3591af..35dc5af27725f69996e305328d7e90046ecdf6e4 100644
--- a/app/code/Magento/Sales/Block/Order/History.php
+++ b/app/code/Magento/Sales/Block/Order/History.php
@@ -69,6 +69,7 @@ class History extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_orderConfig = $orderConfig;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Sales/Block/Order/Info/Buttons.php b/app/code/Magento/Sales/Block/Order/Info/Buttons.php
index 4314569c5bbda458a0c5f8fe9e8fc405f8277006..e78513db515e59f24c9a4a69a3e3c274f47d38c9 100644
--- a/app/code/Magento/Sales/Block/Order/Info/Buttons.php
+++ b/app/code/Magento/Sales/Block/Order/Info/Buttons.php
@@ -64,6 +64,7 @@ class Buttons extends \Magento\View\Element\Template
         $this->_coreRegistry = $registry;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Order/Invoice.php b/app/code/Magento/Sales/Block/Order/Invoice.php
index 9d81a7d6a11c66b472a3aad62b496eb2854d460a..4b84a76d58a870e839618d3b1a4efd6ae93bd196 100644
--- a/app/code/Magento/Sales/Block/Order/Invoice.php
+++ b/app/code/Magento/Sales/Block/Order/Invoice.php
@@ -63,6 +63,7 @@ class Invoice extends \Magento\Sales\Block\Order\Invoice\Items
         $this->_paymentHelper = $paymentHelper;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $registry, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/Sales/Block/Order/Invoice/Totals.php b/app/code/Magento/Sales/Block/Order/Invoice/Totals.php
index 7baa212236493b34c29de780922e6f02a620da5a..b762ef093fc98b64cdeacbcb2abcb30f9882128a 100644
--- a/app/code/Magento/Sales/Block/Order/Invoice/Totals.php
+++ b/app/code/Magento/Sales/Block/Order/Invoice/Totals.php
@@ -27,6 +27,20 @@ namespace Magento\Sales\Block\Order\Invoice;
 
 class Totals extends \Magento\Sales\Block\Order\Totals
 {
+    /**
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        array $data = array()
+    ) {
+        parent::__construct($context, $registry, $data);
+        $this->_isScopePrivate = true;
+    }
+
     protected $_invoice = null;
 
     public function getInvoice()
diff --git a/app/code/Magento/Sales/Block/Order/Recent.php b/app/code/Magento/Sales/Block/Order/Recent.php
index f3836b6549875ab7f22dbba732642d072653fbd9..312f041bdeccd181dda4235cced1b08d269e0b30 100644
--- a/app/code/Magento/Sales/Block/Order/Recent.php
+++ b/app/code/Magento/Sales/Block/Order/Recent.php
@@ -64,6 +64,7 @@ class Recent extends \Magento\View\Element\Template
         $this->_customerSession = $customerSession;
         $this->_orderConfig = $orderConfig;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Sales/Block/Order/View.php b/app/code/Magento/Sales/Block/Order/View.php
index 45e04e584cada62743abcccd93d1a157f556033a..764853bf3d0591c44f70734ed2a9300c612e4fdd 100644
--- a/app/code/Magento/Sales/Block/Order/View.php
+++ b/app/code/Magento/Sales/Block/Order/View.php
@@ -71,6 +71,7 @@ class View extends \Magento\View\Element\Template
         $this->_coreRegistry = $registry;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php b/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php
index 25f7d4b33a78441e4bfbcab1083c2e4b4c2a96fc..9e483abd50235402b4e8e083c53d417a9e51ee3e 100644
--- a/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php
+++ b/app/code/Magento/Sales/Block/Payment/Form/Billing/Agreement.php
@@ -53,6 +53,7 @@ class Agreement extends \Magento\Payment\Block\Form
     ) {
         $this->_agreementFactory = $agreementFactory;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _construct()
diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php b/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php
index 3a68d1e93ccacf7e29c5f8f07d89d63a26cc69a6..af49a62aaecb556b922780d3df7a4dff8d5f25c2 100644
--- a/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php
+++ b/app/code/Magento/Sales/Block/Recurring/Profile/Grid.php
@@ -63,7 +63,7 @@ class Grid extends \Magento\Sales\Block\Recurring\Profiles
         $this->_recurringProfile = $profile;
         $this->_registry = $registry;
         parent::__construct($context, $data);
-
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php b/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php
index 8fdc585f6184970f320ca63846a1e3b407e90646..73ea983ea6ae51910eba24725cad704c39c7f924 100644
--- a/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php
+++ b/app/code/Magento/Sales/Block/Recurring/Profile/Related/Orders/Grid.php
@@ -65,6 +65,7 @@ class Grid extends \Magento\Sales\Block\Recurring\Profile\View
         parent::__construct($context, $registry, $data);
         $this->_orderCollection = $collection;
         $this->_config = $config;
+        $this->_isScopePrivate = true;
     }
     /**
      * Prepare related orders collection
diff --git a/app/code/Magento/Sales/Block/Recurring/Profiles.php b/app/code/Magento/Sales/Block/Recurring/Profiles.php
index 7f69a54463f51e3ee43d617b338472b75bc3ea4a..39d2dcacdf3de114c5de561cbbf0365a417ea458 100644
--- a/app/code/Magento/Sales/Block/Recurring/Profiles.php
+++ b/app/code/Magento/Sales/Block/Recurring/Profiles.php
@@ -32,6 +32,18 @@ namespace Magento\Sales\Block\Recurring;
 class Profiles extends \Magento\View\Element\Template
 {
 
+    /**
+     * @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;
+    }
+
     /**
      * Set back Url
      *
diff --git a/app/code/Magento/Sales/Block/Reorder/Sidebar.php b/app/code/Magento/Sales/Block/Reorder/Sidebar.php
index 86dcad5fb2cfc737b2f119c72e16c6ef8dd34b50..feef9f90c6c0f6a07415142272d715a2c5e5ddb7 100644
--- a/app/code/Magento/Sales/Block/Reorder/Sidebar.php
+++ b/app/code/Magento/Sales/Block/Reorder/Sidebar.php
@@ -69,6 +69,7 @@ class Sidebar extends \Magento\View\Element\Template
         $this->_orderConfig = $orderConfig;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Block/Widget/Guest/Form.php b/app/code/Magento/Sales/Block/Widget/Guest/Form.php
index c86887ae55ef84193ebb45f747e4b0ad7100b127..4b5464bc05562de84df8ce5d2179ec667dd24571 100644
--- a/app/code/Magento/Sales/Block/Widget/Guest/Form.php
+++ b/app/code/Magento/Sales/Block/Widget/Guest/Form.php
@@ -50,6 +50,7 @@ class Form
     ) {
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php
index 9b703cfebe4409c166b937f87e6b85d4e679c80f..b87a90e317c93bdb06b0e410ee7f84e41a79cb68 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo.php
@@ -131,7 +131,7 @@ class AbstractCreditmemo extends \Magento\Backend\App\Action
             return $this->_fileFactory->create(
                 'creditmemo' . $date . '.pdf',
                 $pdf->render(),
-                \Magento\Filesystem::VAR_DIR,
+                \Magento\App\Filesystem::VAR_DIR,
                 'application/pdf'
             );
         }
@@ -151,7 +151,7 @@ class AbstractCreditmemo extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'creditmemo' . $date . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php
index 282aa1dc44e03e1d2d0145b3fd454b909fbfe695..2aa4d18f581a55130fc237c75358239aa7b816ec 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice.php
@@ -133,7 +133,7 @@ class AbstractInvoice
                 return $this->_fileFactory->create(
                     'invoice' . $date . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             }
@@ -161,7 +161,7 @@ class AbstractInvoice
             return $this->_fileFactory->create(
                 'invoice' . $date . '.pdf',
                 $pdf->render(),
-                \Magento\Filesystem::VAR_DIR,
+                \Magento\App\Filesystem::VAR_DIR,
                 'application/pdf'
             );
         }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order.php b/app/code/Magento/Sales/Controller/Adminhtml/Order.php
index e580e81b29eaa239b68cdc0406086cf86edbbb9c..f5de7c9f885b347a178a8ec941a970bca3741058 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order.php
@@ -529,7 +529,7 @@ class Order extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'invoice' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             } else {
@@ -568,7 +568,7 @@ class Order extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'packingslip' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             } else {
@@ -607,7 +607,7 @@ class Order extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'creditmemo' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             } else {
@@ -672,7 +672,7 @@ class Order extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'docs' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             } else {
@@ -761,7 +761,7 @@ class Order extends \Magento\Backend\App\Action
         $fileName = 'orders.csv';
         /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock  */
         $exportBlock = $this->_view->getLayout()->getChildBlock('sales.order.grid', 'grid.export');
-        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -776,7 +776,7 @@ class Order extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Filesystem::VAR_DIR
+            \Magento\App\Filesystem::VAR_DIR
         );
     }
 
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php
index 15456ce7a7eaa4d28a3cfe8775a27122c53d41da..f17d5d245175a6868acbeba4f8748aa90446012c 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment.php
@@ -81,7 +81,7 @@ class AbstractShipment extends \Magento\Backend\App\Action
     public function viewAction()
     {
         if ($shipmentId = $this->getRequest()->getParam('shipment_id')) {
-            $this->_forward('view', 'order_shipment', null, array('come_from'=>'shipment'));
+            $this->_forward('view', 'order_shipment', 'admin', array('come_from'=>'shipment'));
         } else {
             $this->_forward('noroute');
         }
@@ -105,7 +105,7 @@ class AbstractShipment extends \Magento\Backend\App\Action
             return $this->_fileFactory->create(
                 'packingslip' . $date . '.pdf',
                 $pdf->render(),
-                \Magento\Filesystem::VAR_DIR,
+                \Magento\App\Filesystem::VAR_DIR,
                 'application/pdf'
             );
         }
@@ -114,9 +114,8 @@ class AbstractShipment extends \Magento\Backend\App\Action
 
     public function printAction()
     {
-        /** @see \Magento\Sales\Controller\Adminhtml\Order\Invoice */
-        $shipmentId = $this->getRequest()->getParam('invoice_id');
-        if ($shipmentId) { // invoice_id o_0
+        $shipmentId = $this->getRequest()->getParam('shipment_id');
+        if ($shipmentId) {
             $shipment = $this->_objectManager->create('Magento\Sales\Model\Order\Shipment')->load($shipmentId);
             if ($shipment) {
                 $pdf = $this->_objectManager->create('Magento\Sales\Model\Order\Pdf\Shipment')
@@ -125,7 +124,7 @@ class AbstractShipment extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'packingslip' . $date . '.pdf',
                     $pdf->render(),
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             }
diff --git a/app/code/Magento/Sales/Controller/Download.php b/app/code/Magento/Sales/Controller/Download.php
index 14c38e37d5fc5facfa7b0729a6c3ac8271f45fd2..bd55866e0de2457443f74743012c226b6b12423f 100644
--- a/app/code/Magento/Sales/Controller/Download.php
+++ b/app/code/Magento/Sales/Controller/Download.php
@@ -43,19 +43,19 @@ class Download extends \Magento\App\Action\Action
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
     
     /**
      * @param \Magento\App\Action\Context $context
      * @param \Magento\App\Response\Http\FileFactory $fileResponseFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\App\Action\Context $context,
         \Magento\App\Response\Http\FileFactory $fileResponseFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_fileResponseFactory = $fileResponseFactory;
         $this->_filesystem = $filesystem;
@@ -76,8 +76,8 @@ class Download extends \Magento\App\Action\Action
             }
 
             /** @var \Magento\Filesystem\Directory\Read $directory */
-            $directory = $this->_objectManager->get('Magento\Filesystem')
-                ->getDirectoryWrite(\Magento\Filesystem::ROOT);
+            $directory = $this->_objectManager->get('Magento\App\Filesystem')
+                ->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
             $relativePath = $info['order_path'];
             $filePath = $directory->getAbsolutePath($relativePath);
@@ -99,7 +99,7 @@ class Download extends \Magento\App\Action\Action
                     'value' => $filePath,
                     'type'  => 'filename'
                 ),
-                \Magento\Filesystem::ROOT
+                \Magento\App\Filesystem::ROOT_DIR
             );
         } catch (\Exception $e) {
             $this->_forward('noroute');
@@ -128,8 +128,8 @@ class Download extends \Magento\App\Action\Action
         }
 
         /** @var \Magento\Filesystem\Directory\WriteInterface $directory */
-        $directory = $this->_objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directory = $this->_objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $stream = $directory->openFile($filePath, 'w+');
         $stream->lock();
         $stream->write($filePath, $file->getContent());
diff --git a/app/code/Magento/Sales/Model/AdminOrder/Create.php b/app/code/Magento/Sales/Model/AdminOrder/Create.php
index 431f2f3f4685d58faf2f6570b481a3240483ab1e..57913eee0c3c2c0e5f4b0eff03bda272e058fb16 100644
--- a/app/code/Magento/Sales/Model/AdminOrder/Create.php
+++ b/app/code/Magento/Sales/Model/AdminOrder/Create.php
@@ -831,7 +831,7 @@ class Create extends \Magento\Object implements \Magento\Checkout\Model\Cart\Car
             \Magento\Catalog\Model\Product\Type\AbstractType::PROCESS_MODE_FULL
         );
         if (is_string($item)) {
-            if ($product->getTypeId() != \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE) {
+            if ($product->getTypeId() != \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE) {
                 $item = $this->getQuote()->addProductAdvanced(
                     $product,
                     $config,
diff --git a/app/code/Magento/Sales/Model/CarrierFactory.php b/app/code/Magento/Sales/Model/CarrierFactory.php
deleted file mode 100644
index 0573598caf2c887960c2e6ff643562a110534b17..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/Model/CarrierFactory.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Sales
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Factory class for \Magento\Core\Model\AbstractModel
- */
-namespace Magento\Sales\Model;
-
-class CarrierFactory
-{
-    /**
-     * Object Manager instance
-     *
-     * @var \Magento\ObjectManager
-     */
-    protected $_objectManager = null;
-
-    /**
-     * @var \Magento\Core\Model\StoreManagerInterface
-     */
-    protected $_storeManager;
-
-    /**
-     * Factory constructor
-     *
-     * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     */
-    public function __construct(
-        \Magento\ObjectManager $objectManager,
-        \Magento\Core\Model\StoreManagerInterface $storeManager
-    ) {
-        $this->_storeManager = $storeManager;
-        $this->_objectManager = $objectManager;
-    }
-
-    /**
-     * Create class instance with specified parameters
-     *
-     * @param string $carrierCode
-     * @param array $data
-     * @return \Magento\Core\Model\AbstractModel|bool
-     */
-    public function create($carrierCode, array $data = array())
-    {
-        $className = $this->_storeManager->getStore()->getConfig('carriers/' . $carrierCode . '/model');
-        if ($className) {
-            return $this->_objectManager->create($className, $data);
-        }
-        return false;
-    }
-}
diff --git a/app/code/Magento/Sales/Model/Observer.php b/app/code/Magento/Sales/Model/Observer.php
index 52cd25f4310f77458de4d3c7e4b7f19c420bc77d..d02f977bf3e7de0bc075919e7b03436471dcecc3 100644
--- a/app/code/Magento/Sales/Model/Observer.php
+++ b/app/code/Magento/Sales/Model/Observer.php
@@ -82,9 +82,24 @@ class Observer
     protected $_coreLocale;
 
     /**
-     * @var \Magento\Sales\Model\ResourceFactory
+     * @var Resource\Report\OrderFactory
      */
-    protected $_resourceFactory;
+    protected $_orderFactory;
+
+    /**
+     * @var \Magento\Sales\Model\Resource\Report\InvoicedFactory
+     */
+    protected $_invoicedFactory;
+
+    /**
+     * @var \Magento\Sales\Model\Resource\Report\RefundedFactory
+     */
+    protected $_refundedFactory;
+
+    /**
+     * @var \Magento\Sales\Model\Resource\Report\BestsellersFactory
+     */
+    protected $_bestsellersFactory;
 
     /**
      * @param \Magento\Event\ManagerInterface $eventManager
@@ -94,7 +109,10 @@ class Observer
      * @param \Magento\Core\Model\Store\Config $storeConfig
      * @param \Magento\Sales\Model\Resource\Quote\CollectionFactory $quoteFactory
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
-     * @param \Magento\Sales\Model\ResourceFactory $resourceFactory
+     * @param Resource\Report\OrderFactory $orderFactory
+     * @param Resource\Report\InvoicedFactory $invoicedFactory
+     * @param Resource\Report\RefundedFactory $refundedFactory
+     * @param Resource\Report\BestsellersFactory $bestsellersFactory
      */
     public function __construct(
         \Magento\Event\ManagerInterface $eventManager,
@@ -104,7 +122,10 @@ class Observer
         \Magento\Core\Model\Store\Config $storeConfig,
         \Magento\Sales\Model\Resource\Quote\CollectionFactory $quoteFactory,
         \Magento\Core\Model\LocaleInterface $coreLocale,
-        \Magento\Sales\Model\ResourceFactory $resourceFactory
+        \Magento\Sales\Model\Resource\Report\OrderFactory $orderFactory,
+        \Magento\Sales\Model\Resource\Report\InvoicedFactory $invoicedFactory,
+        \Magento\Sales\Model\Resource\Report\RefundedFactory $refundedFactory,
+        \Magento\Sales\Model\Resource\Report\BestsellersFactory $bestsellersFactory
     ) {
         $this->_eventManager = $eventManager;
         $this->_customerData = $customerData;
@@ -113,7 +134,10 @@ class Observer
         $this->_storeConfig = $storeConfig;
         $this->_quoteCollectionFactory = $quoteFactory;
         $this->_coreLocale = $coreLocale;
-        $this->_resourceFactory = $resourceFactory;
+        $this->_orderFactory = $orderFactory;
+        $this->_invoicedFactory = $invoicedFactory;
+        $this->_refundedFactory = $refundedFactory;
+        $this->_bestsellersFactory = $bestsellersFactory;
     }
 
     /**
@@ -179,23 +203,7 @@ class Observer
         $this->_coreLocale->emulate(0);
         $currentDate = $this->_coreLocale->date();
         $date = $currentDate->subHour(25);
-        $this->_resourceFactory->create('Magento\Sales\Model\Resource\Report\Order')->aggregate($date);
-        $this->_coreLocale->revert();
-        return $this;
-    }
-
-    /**
-     * Refresh sales shipment report statistics for last day
-     *
-     * @param \Magento\Cron\Model\Schedule $schedule
-     * @return \Magento\Sales\Model\Observer
-     */
-    public function aggregateSalesReportShipmentData($schedule)
-    {
-        $this->_coreLocale->emulate(0);
-        $currentDate = $this->_coreLocale->date();
-        $date = $currentDate->subHour(25);
-        $this->_resourceFactory->create('Magento\Sales\Model\Resource\Report\Shipping')->aggregate($date);
+        $this->_orderFactory->create()->aggregate($date);
         $this->_coreLocale->revert();
         return $this;
     }
@@ -211,7 +219,7 @@ class Observer
         $this->_coreLocale->emulate(0);
         $currentDate = $this->_coreLocale->date();
         $date = $currentDate->subHour(25);
-        $this->_resourceFactory->create('Magento\Sales\Model\Resource\Report\Invoiced')->aggregate($date);
+        $this->_invoicedFactory->create()->aggregate($date);
         $this->_coreLocale->revert();
         return $this;
     }
@@ -227,7 +235,7 @@ class Observer
         $this->_coreLocale->emulate(0);
         $currentDate = $this->_coreLocale->date();
         $date = $currentDate->subHour(25);
-        $this->_resourceFactory->create('Magento\Sales\Model\Resource\Report\Refunded')->aggregate($date);
+        $this->_refundedFactory->create()->aggregate($date);
         $this->_coreLocale->revert();
         return $this;
     }
@@ -243,7 +251,7 @@ class Observer
         $this->_coreLocale->emulate(0);
         $currentDate = $this->_coreLocale->date();
         $date = $currentDate->subHour(25);
-        $this->_resourceFactory->create('Magento\Sales\Model\Resource\Report\Bestsellers')->aggregate($date);
+        $this->_bestsellersFactory->create()->aggregate($date);
         $this->_coreLocale->revert();
         return $this;
     }
diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php
index ab0267c725fa58138176792b738a68b69fe4c7a2..bf2d901e42611ff68dc3f8512597d1a9bbc949ab 100644
--- a/app/code/Magento/Sales/Model/Order.php
+++ b/app/code/Magento/Sales/Model/Order.php
@@ -428,11 +428,6 @@ class Order extends \Magento\Sales\Model\AbstractModel
      */
     protected $_storeManager;
 
-    /**
-     * @var \Magento\Sales\Model\ResourceFactory
-     */
-    protected $_resourceFactory;
-
     /**
      * @var \Magento\Sales\Model\Order\Config
      */
@@ -456,7 +451,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Item\CollectionFactory
      */
-    protected $_orderItemCollFactory;
+    protected $_orderItemCollectionFactory;
 
     /**
      * @var \Magento\Catalog\Model\Product\Visibility
@@ -491,12 +486,42 @@ class Order extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory
      */
-    protected $_orderTaxCollFactory;
+    protected $_orderTaxCollectionFactory;
+
+    /**
+     * @var Resource\Order\Address\CollectionFactory
+     */
+    protected $_addressCollectionFactory;
+
+    /**
+     * @var Resource\Order\Payment\CollectionFactory
+     */
+    protected $_paymentCollectionFactory;
+
+    /**
+     * @var Resource\Order\Status\History\CollectionFactory
+     */
+    protected $_historyCollectionFactory;
 
     /**
-     * @var \Magento\Sales\Model\CarrierFactory
+     * @var Resource\Order\Invoice\CollectionFactory
      */
-    protected $_carrierFactory;
+    protected $_invoiceCollectionFactory;
+
+    /**
+     * @var Resource\Order\Shipment\CollectionFactory
+     */
+    protected $_shipmentCollectionFactory;
+
+    /**
+     * @var Resource\Order\Creditmemo\CollectionFactory
+     */
+    protected $_memoCollectionFactory;
+
+    /**
+     * @var Resource\Order\Shipment\Track\CollectionFactory
+     */
+    protected $_trackCollectionFactory;
 
     /**
      * @param \Magento\Core\Model\Context $context
@@ -507,20 +532,25 @@ class Order extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Sales\Helper\Data $salesData
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Sales\Model\ResourceFactory $resourceFactory
-     * @param \Magento\Sales\Model\Order\Config $orderConfig
+     * @param Order\Config $orderConfig
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory
      * @param \Magento\Email\Model\InfoFactory $emailInfoFactory
-     * @param \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollFactory
+     * @param Resource\Order\Item\CollectionFactory $orderItemCollectionFactory
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
      * @param \Magento\Tax\Model\Calculation $taxCalculation
-     * @param \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory
+     * @param Service\OrderFactory $serviceOrderFactory
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Eav\Model\Config $eavConfig
-     * @param \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory
-     * @param \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollFactory
-     * @param \Magento\Sales\Model\CarrierFactory $carrierFactory
+     * @param Order\Status\HistoryFactory $orderHistoryFactory
+     * @param \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollectionFactory
+     * @param Resource\Order\Address\CollectionFactory $addressCollectionFactory
+     * @param Resource\Order\Payment\CollectionFactory $paymentCollectionFactory
+     * @param Resource\Order\Status\History\CollectionFactory $historyCollectionFactory
+     * @param Resource\Order\Invoice\CollectionFactory $invoiceCollectionFactory
+     * @param Resource\Order\Shipment\CollectionFactory $shipmentCollectionFactory
+     * @param Resource\Order\Creditmemo\CollectionFactory $memoCollectionFactory
+     * @param Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -534,20 +564,25 @@ class Order extends \Magento\Sales\Model\AbstractModel
         \Magento\Sales\Helper\Data $salesData,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Sales\Model\ResourceFactory $resourceFactory,
         \Magento\Sales\Model\Order\Config $orderConfig,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Email\Model\Template\MailerFactory $templateMailerFactory,
         \Magento\Email\Model\InfoFactory $emailInfoFactory,
-        \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollFactory,
+        \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollectionFactory,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
         \Magento\Tax\Model\Calculation $taxCalculation,
         \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Eav\Model\Config $eavConfig,
         \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory,
-        \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollFactory,
-        \Magento\Sales\Model\CarrierFactory $carrierFactory,
+        \Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory $orderTaxCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Address\CollectionFactory $addressCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Payment\CollectionFactory $paymentCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Status\History\CollectionFactory $historyCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Invoice\CollectionFactory $invoiceCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Shipment\CollectionFactory $shipmentCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Creditmemo\CollectionFactory $memoCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -556,20 +591,25 @@ class Order extends \Magento\Sales\Model\AbstractModel
         $this->_salesData = $salesData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_storeManager = $storeManager;
-        $this->_resourceFactory = $resourceFactory;
         $this->_orderConfig = $orderConfig;
         $this->_productFactory = $productFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
-        $this->_orderItemCollFactory = $orderItemCollFactory;
+        $this->_orderItemCollectionFactory = $orderItemCollectionFactory;
         $this->_productVisibility = $productVisibility;
         $this->_taxCalculation = $taxCalculation;
         $this->_serviceOrderFactory = $serviceOrderFactory;
         $this->_currencyFactory = $currencyFactory;
         $this->_eavConfig = $eavConfig;
         $this->_orderHistoryFactory = $orderHistoryFactory;
-        $this->_orderTaxCollFactory = $orderTaxCollFactory;
-        $this->_carrierFactory = $carrierFactory;
+        $this->_orderTaxCollectionFactory = $orderTaxCollectionFactory;
+        $this->_addressCollectionFactory = $addressCollectionFactory;
+        $this->_paymentCollectionFactory = $paymentCollectionFactory;
+        $this->_historyCollectionFactory = $historyCollectionFactory;
+        $this->_invoiceCollectionFactory = $invoiceCollectionFactory;
+        $this->_shipmentCollectionFactory = $shipmentCollectionFactory;
+        $this->_memoCollectionFactory = $memoCollectionFactory;
+        $this->_trackCollectionFactory = $trackCollectionFactory;
         parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
     }
 
@@ -1364,28 +1404,6 @@ class Order extends \Magento\Sales\Model\AbstractModel
         return array();
     }
 
-    /**
-     * Return model of shipping carrier
-     *
-     * @return bool|float|\Magento\Shipping\Model\Carrier\AbstractCarrier
-     */
-    public function getShippingCarrier()
-    {
-        $carrierModel = $this->getData('shipping_carrier');
-        if (is_null($carrierModel)) {
-            $carrierModel = false;
-            /**
-             * $method - carrier_method
-             */
-            $method = $this->getShippingMethod(true);
-            if ($method instanceof \Magento\Object) {
-                $carrierModel = $this->_carrierFactory->create($method->getCarrierCode());
-            }
-            $this->setData('shipping_carrier', $carrierModel);
-        }
-        return $carrierModel;
-    }
-
     /**
      * Retrieve shipping method
      *
@@ -1561,7 +1579,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     public function getAddressesCollection()
     {
         if (is_null($this->_addresses)) {
-            $this->_addresses = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Address\Collection')
+            $this->_addresses = $this->_addressCollectionFactory->create()
                 ->setOrderFilter($this);
 
             if ($this->getId()) {
@@ -1606,7 +1624,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     public function getItemsCollection($filterByTypes = array(), $nonChildrenOnly = false)
     {
         if (is_null($this->_items)) {
-            $this->_items = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Item\Collection')
+            $this->_items = $this->_orderItemCollectionFactory->create()
                 ->setOrderFilter($this);
 
             if ($filterByTypes) {
@@ -1656,7 +1674,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
      */
     protected function _getItemsRandomCollection($limit, $nonChildrenOnly = false)
     {
-        $collection = $this->_orderItemCollFactory->create()
+        $collection = $this->_orderItemCollectionFactory->create()
             ->setOrderFilter($this)
             ->setRandomOrder();
 
@@ -1766,7 +1784,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     public function getPaymentsCollection()
     {
         if (is_null($this->_payments)) {
-            $this->_payments = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Payment\Collection')
+            $this->_payments = $this->_paymentCollectionFactory->create()
                 ->setOrderFilter($this);
 
             if ($this->getId()) {
@@ -1833,7 +1851,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     public function getStatusHistoryCollection($reload = false)
     {
         if (is_null($this->_statusHistory) || $reload) {
-            $this->_statusHistory = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Status\History\Collection')
+            $this->_statusHistory = $this->_historyCollectionFactory->create()
                 ->setOrderFilter($this)
                 ->setOrder('created_at', 'desc')
                 ->setOrder('entity_id', 'desc');
@@ -2057,7 +2075,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     public function getInvoiceCollection()
     {
         if (is_null($this->_invoices)) {
-            $this->_invoices = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Invoice\Collection')
+            $this->_invoices = $this->_invoiceCollectionFactory->create()
                 ->setOrderFilter($this);
 
             if ($this->getId()) {
@@ -2078,8 +2096,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     {
         if (empty($this->_shipments)) {
             if ($this->getId()) {
-                $this->_shipments = $this->_resourceFactory
-                    ->create('Magento\Sales\Model\Resource\Order\Shipment\Collection')
+                $this->_shipments = $this->_shipmentCollectionFactory->create()
                     ->setOrderFilter($this)
                     ->load();
             } else {
@@ -2098,7 +2115,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     {
         if (empty($this->_creditmemos)) {
             if ($this->getId()) {
-                $this->_creditmemos = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Creditmemo\Collection')
+                $this->_creditmemos = $this->_memoCollectionFactory->create()
                     ->setOrderFilter($this)
                     ->load();
             } else {
@@ -2116,7 +2133,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
     public function getTracksCollection()
     {
         if (empty($this->_tracks)) {
-            $this->_tracks = $this->_resourceFactory->create('Magento\Sales\Model\Resource\Order\Shipment\Track\Collection')
+            $this->_tracks = $this->_trackCollectionFactory->create()
                 ->setOrderFilter($this);
 
             if ($this->getId()) {
@@ -2398,7 +2415,7 @@ class Order extends \Magento\Sales\Model\AbstractModel
 
     public function getFullTaxInfo()
     {
-        $rates = $this->_orderTaxCollFactory->create()->loadByOrder($this)->toArray();
+        $rates = $this->_orderTaxCollectionFactory->create()->loadByOrder($this)->toArray();
         return $this->_taxCalculation->reproduceProcess($rates['items']);
     }
 
diff --git a/app/code/Magento/Sales/Model/Order/Config.php b/app/code/Magento/Sales/Model/Order/Config.php
index 06b2138a9a0b2c5b0edf618b6393403e0af4e988..11618803ffb2512fefb71ef08f597931013ad832 100644
--- a/app/code/Magento/Sales/Model/Order/Config.php
+++ b/app/code/Magento/Sales/Model/Order/Config.php
@@ -56,20 +56,20 @@ class Config
     /**
      * @var \Magento\Sales\Model\Resource\Order\Status\CollectionFactory
      */
-    protected $_orderStatusCollFactory;
+    protected $_orderStatusCollectionFactory;
 
     /**
      * Constructor
      *
      * @param \Magento\Sales\Model\Order\StatusFactory $orderStatusFactory
-     * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollectionFactory
      */
     public function __construct(
         \Magento\Sales\Model\Order\StatusFactory $orderStatusFactory,
-        \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollFactory
+        \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $orderStatusCollectionFactory
     ) {
         $this->_orderStatusFactory = $orderStatusFactory;
-        $this->_orderStatusCollFactory = $orderStatusCollFactory;
+        $this->_orderStatusCollectionFactory = $orderStatusCollectionFactory;
     }
 
     /**
@@ -78,7 +78,7 @@ class Config
     protected function _getCollection()
     {
         if ($this->_collection == null) {
-            $this->_collection = $this->_orderStatusCollFactory->create()->joinStates();
+            $this->_collection = $this->_orderStatusCollectionFactory->create()->joinStates();
         }
         return $this->_collection;
     }
@@ -149,7 +149,7 @@ class Config
      */
     public function getStatuses()
     {
-        $statuses = $this->_orderStatusCollFactory->create()->toOptionHash();
+        $statuses = $this->_orderStatusCollectionFactory->create()->toOptionHash();
         return $statuses;
     }
 
@@ -191,7 +191,7 @@ class Config
         foreach ($state as $_state) {
             $stateNode = $this->_getState($_state);
             if ($stateNode) {
-                $collection = $this->_orderStatusCollFactory->create()
+                $collection = $this->_orderStatusCollectionFactory->create()
                     ->addStateFilter($_state)
                     ->orderByLabel();
                 foreach ($collection as $item) {
diff --git a/app/code/Magento/Sales/Model/Order/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Creditmemo.php
index f8f57b3ddcfaf1dc3215363b2c7871ac83251bb8..f36e6c94b5af40893e9dae416535d81ae24a3f3c 100644
--- a/app/code/Magento/Sales/Model/Order/Creditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Creditmemo.php
@@ -199,7 +199,7 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory
      */
-    protected $_cmItemCollFactory;
+    protected $_cmItemCollectionFactory;
 
     /**
      * @var \Magento\Core\Model\CalculatorFactory
@@ -219,7 +219,7 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory
      */
-    protected $_commentCollFactory;
+    protected $_commentCollectionFactory;
 
     /**
      * @var \Magento\Email\Model\Template\MailerFactory
@@ -241,11 +241,11 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Sales\Model\Order\Creditmemo\Config $creditmemoConfig
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
-     * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollectionFactory
      * @param \Magento\Core\Model\CalculatorFactory $calculatorFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Sales\Model\Order\Creditmemo\CommentFactory $commentFactory
-     * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollectionFactory
      * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory
      * @param \Magento\Email\Model\InfoFactory $emailInfoFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
@@ -262,11 +262,11 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Sales\Model\Order\Creditmemo\Config $creditmemoConfig,
         \Magento\Sales\Model\OrderFactory $orderFactory,
-        \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollFactory,
+        \Magento\Sales\Model\Resource\Order\Creditmemo\Item\CollectionFactory $cmItemCollectionFactory,
         \Magento\Core\Model\CalculatorFactory $calculatorFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Sales\Model\Order\Creditmemo\CommentFactory $commentFactory,
-        \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollFactory,
+        \Magento\Sales\Model\Resource\Order\Creditmemo\Comment\CollectionFactory $commentCollectionFactory,
         \Magento\Email\Model\Template\MailerFactory $templateMailerFactory,
         \Magento\Email\Model\InfoFactory $emailInfoFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
@@ -278,11 +278,11 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_creditmemoConfig = $creditmemoConfig;
         $this->_orderFactory = $orderFactory;
-        $this->_cmItemCollFactory = $cmItemCollFactory;
+        $this->_cmItemCollectionFactory = $cmItemCollectionFactory;
         $this->_calculatorFactory = $calculatorFactory;
         $this->_storeManager = $storeManager;
         $this->_commentFactory = $commentFactory;
-        $this->_commentCollFactory = $commentCollFactory;
+        $this->_commentCollectionFactory = $commentCollectionFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
         parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
@@ -366,7 +366,7 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
     public function getItemsCollection()
     {
         if (empty($this->_items)) {
-            $this->_items = $this->_cmItemCollFactory->create()->setCreditmemoFilter($this->getId());
+            $this->_items = $this->_cmItemCollectionFactory->create()->setCreditmemoFilter($this->getId());
 
             if ($this->getId()) {
                 foreach ($this->_items as $item) {
@@ -805,7 +805,7 @@ class Creditmemo extends \Magento\Sales\Model\AbstractModel
     public function getCommentsCollection($reload = false)
     {
         if (is_null($this->_comments) || $reload) {
-            $this->_comments = $this->_commentCollFactory->create()
+            $this->_comments = $this->_commentCollectionFactory->create()
                 ->setCreditmemoFilter($this->getId())
                 ->setCreatedAtOrder();
             /**
diff --git a/app/code/Magento/Sales/Model/Order/Invoice.php b/app/code/Magento/Sales/Model/Order/Invoice.php
index 9c002cb9f894fa779e25c78c19fcd6352b85c5f9..d16d3a411e8cfafc49a3f879af8f0dddfae597ca 100644
--- a/app/code/Magento/Sales/Model/Order/Invoice.php
+++ b/app/code/Magento/Sales/Model/Order/Invoice.php
@@ -215,7 +215,7 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory
      */
-    protected $_invoiceItemCollFactory;
+    protected $_invoiceItemCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Order\Invoice\CommentFactory
@@ -225,7 +225,7 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory
      */
-    protected $_commentCollFactory;
+    protected $_commentCollectionFactory;
 
     /**
      * @var \Magento\Email\Model\Template\MailerFactory
@@ -249,9 +249,9 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Sales\Model\Resource\OrderFactory $orderResourceFactory
      * @param \Magento\Core\Model\CalculatorFactory $calculatorFactory
-     * @param \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollectionFactory
      * @param \Magento\Sales\Model\Order\Invoice\CommentFactory $invoiceCommentFactory
-     * @param \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollectionFactory
      * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory
      * @param \Magento\Email\Model\InfoFactory $emailInfoFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
@@ -270,9 +270,9 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Sales\Model\Resource\OrderFactory $orderResourceFactory,
         \Magento\Core\Model\CalculatorFactory $calculatorFactory,
-        \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollFactory,
+        \Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory $invoiceItemCollectionFactory,
         \Magento\Sales\Model\Order\Invoice\CommentFactory $invoiceCommentFactory,
-        \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollFactory,
+        \Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory $commentCollectionFactory,
         \Magento\Email\Model\Template\MailerFactory $templateMailerFactory,
         \Magento\Email\Model\InfoFactory $emailInfoFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
@@ -286,9 +286,9 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
         $this->_orderFactory = $orderFactory;
         $this->_orderResourceFactory = $orderResourceFactory;
         $this->_calculatorFactory = $calculatorFactory;
-        $this->_invoiceItemCollFactory = $invoiceItemCollFactory;
+        $this->_invoiceItemCollectionFactory = $invoiceItemCollectionFactory;
         $this->_invoiceCommentFactory = $invoiceCommentFactory;
-        $this->_commentCollFactory = $commentCollFactory;
+        $this->_commentCollectionFactory = $commentCollectionFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
         parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
@@ -615,7 +615,7 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
     public function getItemsCollection()
     {
         if (empty($this->_items)) {
-            $this->_items = $this->_invoiceItemCollFactory->create()->setInvoiceFilter($this->getId());
+            $this->_items = $this->_invoiceItemCollectionFactory->create()->setInvoiceFilter($this->getId());
 
             if ($this->getId()) {
                 foreach ($this->_items as $item) {
@@ -832,7 +832,7 @@ class Invoice extends \Magento\Sales\Model\AbstractModel
     public function getCommentsCollection($reload=false)
     {
         if (is_null($this->_comments) || $reload) {
-            $this->_comments = $this->_commentCollFactory->create()
+            $this->_comments = $this->_commentCollectionFactory->create()
                 ->setInvoiceFilter($this->getId())
                 ->setCreatedAtOrder();
             /**
diff --git a/app/code/Magento/Sales/Model/Order/Payment.php b/app/code/Magento/Sales/Model/Order/Payment.php
index 2e081f36d517c599635a2a95401f2bb9ef4a268b..8bbddead84e65c4a9862e63265ff8fbeda10967f 100644
--- a/app/code/Magento/Sales/Model/Order/Payment.php
+++ b/app/code/Magento/Sales/Model/Order/Payment.php
@@ -197,7 +197,7 @@ class Payment extends \Magento\Payment\Model\Info
     /**
      * @var \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory
      */
-    protected $_transactionCollFactory;
+    protected $_transactionCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Billing\AgreementFactory
@@ -216,7 +216,7 @@ class Payment extends \Magento\Payment\Model\Info
      * @param \Magento\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory
      * @param \Magento\Sales\Model\Order\Payment\TransactionFactory $transactionFactory
-     * @param \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $transactionCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $transactionCollectionFactory
      * @param \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
@@ -230,7 +230,7 @@ class Payment extends \Magento\Payment\Model\Info
         \Magento\Encryption\EncryptorInterface $encryptor,
         \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory,
         \Magento\Sales\Model\Order\Payment\TransactionFactory $transactionFactory,
-        \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $transactionCollFactory,
+        \Magento\Sales\Model\Resource\Order\Payment\Transaction\CollectionFactory $transactionCollectionFactory,
         \Magento\Sales\Model\Billing\AgreementFactory $agreementFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
@@ -239,7 +239,7 @@ class Payment extends \Magento\Payment\Model\Info
     ) {
         $this->_serviceOrderFactory = $serviceOrderFactory;
         $this->_transactionFactory = $transactionFactory;
-        $this->_transactionCollFactory = $transactionCollFactory;
+        $this->_transactionCollectionFactory = $transactionCollectionFactory;
         $this->_agreementFactory = $agreementFactory;
         $this->_storeManager = $storeManager;
         parent::__construct($context, $registry, $paymentData, $encryptor, $resource, $resourceCollection, $data);
@@ -1418,7 +1418,7 @@ class Payment extends \Magento\Payment\Model\Info
     {
         if (!$txnId) {
             if ($txnType && $this->getId()) {
-                $collection = $this->_transactionCollFactory->create()
+                $collection = $this->_transactionCollectionFactory->create()
                     ->setOrderFilter($this->getOrder())
                     ->addPaymentIdFilter($this->getId())
                     ->addTxnTypeFilter($txnType)
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
index 35dd76853e99c64b5b0fbb2c914c3c523b27a5a1..99792b1db71ab42fbb273aeed1cab44e0f70ed1e 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
@@ -107,12 +107,6 @@ abstract class AbstractPdf extends \Magento\Object
      * @var \Magento\Filesystem\Directory\ReadInterface
      */
     protected $_rootDirectory;
-
-    /**
-     * @var \Magento\Shipping\Model\Config
-     */
-    protected $_shippingConfig;
-
     /**
      * @var \Magento\Sales\Model\Order\Pdf\Config
      */
@@ -133,8 +127,7 @@ abstract class AbstractPdf extends \Magento\Object
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Shipping\Model\Config $shippingConfig
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Sales\Model\Order\Pdf\Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -148,8 +141,7 @@ abstract class AbstractPdf extends \Magento\Object
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
-        \Magento\Filesystem $filesystem,
-        \Magento\Shipping\Model\Config $shippingConfig,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Sales\Model\Order\Pdf\Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
@@ -161,9 +153,8 @@ abstract class AbstractPdf extends \Magento\Object
         $this->string = $string;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_translate = $translate;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
-        $this->_rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
-        $this->_shippingConfig = $shippingConfig;
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
+        $this->_rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $this->_pdfConfig = $pdfConfig;
         $this->_pdfTotalFactory = $pdfTotalFactory;
         $this->_pdfItemsFactory = $pdfItemsFactory;
@@ -559,20 +550,9 @@ abstract class AbstractPdf extends \Magento\Object
                 $yShipments -= 20;
                 $this->_setFontRegular($page, 8);
                 foreach ($tracks as $track) {
-
-                    $carrierCode = $track->getCarrierCode();
-                    if ($carrierCode != 'custom') {
-                        $carrier = $this->_shippingConfig->getCarrierInstance($carrierCode);
-                        $carrierTitle = $carrier->getConfigData('title');
-                    } else {
-                        $carrierTitle = __('Custom Value');
-                    }
-
-                    //$truncatedCarrierTitle = substr($carrierTitle, 0, 35) . (strlen($carrierTitle) > 35 ? '...' : '');
                     $maxTitleLen = 45;
                     $endOfTitle = strlen($track->getTitle()) > $maxTitleLen ? '...' : '';
                     $truncatedTitle = substr($track->getTitle(), 0, $maxTitleLen) . $endOfTitle;
-                    //$page->drawText($truncatedCarrierTitle, 285, $yShipments, 'UTF-8');
                     $page->drawText($truncatedTitle, 292, $yShipments, 'UTF-8');
                     $page->drawText($track->getNumber(), 410, $yShipments, 'UTF-8');
                     $yShipments -= $topMargin - 5;
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
index 7fbfe1ca404d2b868877309f68dbf4d21d144f79..e1a26fb4a82fbc75f508706b728e0895c60520e3 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
@@ -41,8 +41,7 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Shipping\Model\Config $shippingConfig
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Sales\Model\Order\Pdf\Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -57,8 +56,7 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
-        \Magento\Filesystem $filesystem,
-        \Magento\Shipping\Model\Config $shippingConfig,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Sales\Model\Order\Pdf\Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
@@ -73,7 +71,6 @@ class Creditmemo extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
             $coreStoreConfig,
             $translate,
             $filesystem,
-            $shippingConfig,
             $pdfConfig,
             $pdfTotalFactory,
             $pdfItemsFactory,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
index 51e5c993279b0685b007c95925eff6ceb7b90a5b..63f57106ff5707ca6dd27e05c3efabad7416c367 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
@@ -41,8 +41,7 @@ class Invoice extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
-     * @param \Magento\Filesystem $filesystem,
-     * @param \Magento\Shipping\Model\Config $shippingConfig
+     * @param \Magento\App\Filesystem $filesystem,
      * @param \Magento\Sales\Model\Order\Pdf\Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -57,8 +56,7 @@ class Invoice extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
-        \Magento\Filesystem $filesystem,
-        \Magento\Shipping\Model\Config $shippingConfig,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Sales\Model\Order\Pdf\Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
@@ -73,7 +71,6 @@ class Invoice extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
             $coreStoreConfig,
             $translate,
             $filesystem,
-            $shippingConfig,
             $pdfConfig,
             $pdfTotalFactory,
             $pdfItemsFactory,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php
index c976c9b8f3f52e894bc8ffc43374e7bafa27ded0..747da4c7137e31a2a795177a1ce414e116b04055 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php
@@ -82,7 +82,7 @@ abstract class AbstractItems extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem,
+     * @param \Magento\App\Filesystem $filesystem,
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -91,13 +91,13 @@ abstract class AbstractItems extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_taxData = $taxData;
-        $this->_rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->_rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php
index c75cfc98692f0d650029367a216d64a6c5961996..644e446049ef087557afb42cc6370189824b6beb 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Creditmemo/DefaultCreditmemo.php
@@ -46,7 +46,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -56,7 +56,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php
index 6d5600fe2c3e430a9ac85e2caaf83d22e8743a7d..2fd98305705292794651dcd61c26fe4dffa3aceb 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php
@@ -42,7 +42,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -52,7 +52,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php
index b88bd30e33fafa6a856aca22e86aa5d665f8aa1d..3d5427b9e57b4d181e138cc4ca91d01ea1e9d05d 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/Shipment/DefaultShipment.php
@@ -42,7 +42,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      * @param \Magento\Core\Model\Context $context
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -52,7 +52,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         \Magento\Core\Model\Context $context,
         \Magento\Core\Model\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
index d734988d92f1d9f1da8f1f68da1fd4e3e2b0ea83..d005820fdabcb3364d369eb7cf955078584ccb1e 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
@@ -41,8 +41,7 @@ class Shipment extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Shipping\Model\Config $shippingConfig
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Sales\Model\Order\Pdf\Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -57,8 +56,7 @@ class Shipment extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
-        \Magento\Filesystem $filesystem,
-        \Magento\Shipping\Model\Config $shippingConfig,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Sales\Model\Order\Pdf\Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
@@ -73,7 +71,6 @@ class Shipment extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
             $coreStoreConfig,
             $translate,
             $filesystem,
-            $shippingConfig,
             $pdfConfig,
             $pdfTotalFactory,
             $pdfItemsFactory,
diff --git a/app/code/Magento/Sales/Model/Order/Shipment.php b/app/code/Magento/Sales/Model/Order/Shipment.php
index 9cabb2b5469b641274664450b547fd64453e1efc..13b39a63e2d491a92aecd8cd0b5ffb473239cb95 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment.php
@@ -82,6 +82,16 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
      */
     const HISTORY_ENTITY_NAME = 'shipment';
 
+    /**
+     * Store address
+     */
+    const XML_PATH_STORE_ADDRESS1 = 'shipping/origin/street_line1';
+    const XML_PATH_STORE_ADDRESS2 = 'shipping/origin/street_line2';
+    const XML_PATH_STORE_CITY = 'shipping/origin/city';
+    const XML_PATH_STORE_REGION_ID = 'shipping/origin/region_id';
+    const XML_PATH_STORE_ZIP = 'shipping/origin/postcode';
+    const XML_PATH_STORE_COUNTRY_ID = 'shipping/origin/country_id';
+
     protected $_items;
     protected $_tracks;
     protected $_order;
@@ -119,12 +129,12 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory
      */
-    protected $_shipmentItemCollFactory;
+    protected $_shipmentItemCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory
      */
-    protected $_trackCollFactory;
+    protected $_trackCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Order\Shipment\CommentFactory
@@ -134,7 +144,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory
      */
-    protected $_commentCollFactory;
+    protected $_commentCollectionFactory;
 
     /**
      * @var \Magento\Email\Model\Template\MailerFactory
@@ -155,10 +165,10 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Sales\Helper\Data $salesData
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
-     * @param \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollFactory
-     * @param \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory
+     * @param \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory
      * @param \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory
-     * @param \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory
      * @param \Magento\Email\Model\Template\MailerFactory $templateMailerFactory
      * @param \Magento\Email\Model\InfoFactory $emailInfoFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
@@ -174,10 +184,10 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
         \Magento\Sales\Helper\Data $salesData,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Sales\Model\OrderFactory $orderFactory,
-        \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollFactory,
-        \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollFactory,
+        \Magento\Sales\Model\Resource\Order\Shipment\Item\CollectionFactory $shipmentItemCollectionFactory,
+        \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory $trackCollectionFactory,
         \Magento\Sales\Model\Order\Shipment\CommentFactory $commentFactory,
-        \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollFactory,
+        \Magento\Sales\Model\Resource\Order\Shipment\Comment\CollectionFactory $commentCollectionFactory,
         \Magento\Email\Model\Template\MailerFactory $templateMailerFactory,
         \Magento\Email\Model\InfoFactory $emailInfoFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
@@ -188,10 +198,10 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
         $this->_salesData = $salesData;
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_orderFactory = $orderFactory;
-        $this->_shipmentItemCollFactory = $shipmentItemCollFactory;
-        $this->_trackCollFactory = $trackCollFactory;
+        $this->_shipmentItemCollectionFactory = $shipmentItemCollectionFactory;
+        $this->_trackCollectionFactory = $trackCollectionFactory;
         $this->_commentFactory = $commentFactory;
-        $this->_commentCollFactory = $commentCollFactory;
+        $this->_commentCollectionFactory = $commentCollectionFactory;
         $this->_templateMailerFactory = $templateMailerFactory;
         $this->_emailInfoFactory = $emailInfoFactory;
         parent::__construct($context, $registry, $coreLocale, $dateTime, $resource, $resourceCollection, $data);
@@ -316,7 +326,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
     public function getItemsCollection()
     {
         if (empty($this->_items)) {
-            $this->_items = $this->_shipmentItemCollFactory->create()->setShipmentFilter($this->getId());
+            $this->_items = $this->_shipmentItemCollectionFactory->create()->setShipmentFilter($this->getId());
 
             if ($this->getId()) {
                 foreach ($this->_items as $item) {
@@ -379,7 +389,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
     public function getTracksCollection()
     {
         if (empty($this->_tracks)) {
-            $this->_tracks = $this->_trackCollFactory->create()->setShipmentFilter($this->getId());
+            $this->_tracks = $this->_trackCollectionFactory->create()->setShipmentFilter($this->getId());
 
             if ($this->getId()) {
                 foreach ($this->_tracks as $track) {
@@ -477,7 +487,7 @@ class Shipment extends \Magento\Sales\Model\AbstractModel
     public function getCommentsCollection($reload=false)
     {
         if (is_null($this->_comments) || $reload) {
-            $this->_comments = $this->_commentCollFactory->create()
+            $this->_comments = $this->_commentCollectionFactory->create()
                 ->setShipmentFilter($this->getId())
                 ->setCreatedAtOrder();
 
diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Track.php b/app/code/Magento/Sales/Model/Order/Shipment/Track.php
index 1809893589e5a44652f5f9ab9829e64adacc2153..9a16ef629bcc2dcbfb29ac6a52f84c75e29f5762 100644
--- a/app/code/Magento/Sales/Model/Order/Shipment/Track.php
+++ b/app/code/Magento/Sales/Model/Order/Shipment/Track.php
@@ -69,11 +69,6 @@ class Track extends \Magento\Sales\Model\AbstractModel
      */
     protected $_storeManager;
 
-    /**
-     * @var \Magento\Shipping\Model\Config
-     */
-    protected $_shippingConfig;
-
     /**
      * @var \Magento\Sales\Model\Order\ShipmentFactory
      */
@@ -85,7 +80,6 @@ class Track extends \Magento\Sales\Model\AbstractModel
      * @param \Magento\Core\Model\LocaleInterface $coreLocale
      * @param \Magento\Stdlib\DateTime $dateTime
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Shipping\Model\Config $shippingConfig
      * @param \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
@@ -97,7 +91,6 @@ class Track extends \Magento\Sales\Model\AbstractModel
         \Magento\Core\Model\LocaleInterface $coreLocale,
         \Magento\Stdlib\DateTime $dateTime,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
@@ -113,7 +106,6 @@ class Track extends \Magento\Sales\Model\AbstractModel
             $data
         );
         $this->_storeManager = $storeManager;
-        $this->_shippingConfig = $shippingConfig;
         $this->_shipmentFactory = $shipmentFactory;
     }
 
@@ -192,31 +184,6 @@ class Track extends \Magento\Sales\Model\AbstractModel
         return (string)$this->getShipment()->getProtectCode();
     }
 
-    /**
-     * Retrieve detail for shipment track
-     *
-     * @return string
-     */
-    public function getNumberDetail()
-    {
-        $carrierInstance = $this->_shippingConfig->getCarrierInstance($this->getCarrierCode());
-        if (!$carrierInstance) {
-            $custom = array();
-            $custom['title'] = $this->getTitle();
-            $custom['number'] = $this->getTrackNumber();
-            return $custom;
-        } else {
-            $carrierInstance->setStore($this->getStore());
-        }
-
-        $trackingInfo = $carrierInstance->getTrackingInfo($this->getNumber());
-        if (!$trackingInfo) {
-            return __('No detail for number "%1"', $this->getNumber());
-        }
-
-        return $trackingInfo;
-    }
-
     /**
      * Get store object
      *
diff --git a/app/code/Magento/Sales/Model/Quote.php b/app/code/Magento/Sales/Model/Quote.php
index aca9268335cb32fde2c9dc10a5a2832134737aee..61594e2c68f5b5eb702c62436b706af70de90003 100644
--- a/app/code/Magento/Sales/Model/Quote.php
+++ b/app/code/Magento/Sales/Model/Quote.php
@@ -242,7 +242,7 @@ class Quote extends \Magento\Core\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory
      */
-    protected $_quoteItemCollFactory;
+    protected $_quoteItemCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Quote\ItemFactory
@@ -272,7 +272,7 @@ class Quote extends \Magento\Core\Model\AbstractModel
     /**
      * @var \Magento\Sales\Model\Resource\Quote\Payment\CollectionFactory
      */
-    protected $_quotePaymentCollFactory;
+    protected $_quotePaymentCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Recurring\ProfileFactory
@@ -295,13 +295,13 @@ class Quote extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param \Magento\Customer\Model\GroupFactory $customerGroupFactory
-     * @param \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollFactory
+     * @param \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollectionFactory
      * @param \Magento\Sales\Model\Quote\ItemFactory $quoteItemFactory
      * @param \Magento\Message\Factory $messageFactory
      * @param \Magento\Sales\Model\Status\ListFactory $statusListFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Sales\Model\Quote\PaymentFactory $quotePaymentFactory
-     * @param \Magento\Sales\Model\Resource\Quote\Payment\CollectionFactory $quotePaymentCollFactory
+     * @param \Magento\Sales\Model\Resource\Quote\Payment\CollectionFactory $quotePaymentCollectionFactory
      * @param \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfileFactory
      * @param \Magento\Object\Copy $objectCopyService
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
@@ -319,13 +319,13 @@ class Quote extends \Magento\Core\Model\AbstractModel
         \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
         \Magento\Customer\Model\GroupFactory $customerGroupFactory,
-        \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollFactory,
+        \Magento\Sales\Model\Resource\Quote\Item\CollectionFactory $quoteItemCollectionFactory,
         \Magento\Sales\Model\Quote\ItemFactory $quoteItemFactory,
         \Magento\Message\Factory $messageFactory,
         \Magento\Sales\Model\Status\ListFactory $statusListFactory,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Sales\Model\Quote\PaymentFactory $quotePaymentFactory,
-        \Magento\Sales\Model\Resource\Quote\Payment\CollectionFactory $quotePaymentCollFactory,
+        \Magento\Sales\Model\Resource\Quote\Payment\CollectionFactory $quotePaymentCollectionFactory,
         \Magento\Sales\Model\Recurring\ProfileFactory $recurringProfileFactory,
         \Magento\Object\Copy $objectCopyService,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
@@ -340,13 +340,13 @@ class Quote extends \Magento\Core\Model\AbstractModel
         $this->_quoteAddressFactory = $quoteAddressFactory;
         $this->_customerFactory = $customerFactory;
         $this->_customerGroupFactory = $customerGroupFactory;
-        $this->_quoteItemCollFactory = $quoteItemCollFactory;
+        $this->_quoteItemCollectionFactory = $quoteItemCollectionFactory;
         $this->_quoteItemFactory = $quoteItemFactory;
         $this->messageFactory = $messageFactory;
         $this->_statusListFactory = $statusListFactory;
         $this->_productFactory = $productFactory;
         $this->_quotePaymentFactory = $quotePaymentFactory;
-        $this->_quotePaymentCollFactory = $quotePaymentCollFactory;
+        $this->_quotePaymentCollectionFactory = $quotePaymentCollectionFactory;
         $this->_recurringProfileFactory = $recurringProfileFactory;
         $this->_objectCopyService = $objectCopyService;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
@@ -911,7 +911,7 @@ class Quote extends \Magento\Core\Model\AbstractModel
             return $this->getData('items_collection');
         }
         if (null === $this->_items) {
-            $this->_items = $this->_quoteItemCollFactory->create();
+            $this->_items = $this->_quoteItemCollectionFactory->create();
             $this->_items->setQuote($this);
         }
         return $this->_items;
@@ -1417,7 +1417,7 @@ class Quote extends \Magento\Core\Model\AbstractModel
     public function getPaymentsCollection()
     {
         if (null === $this->_payments) {
-            $this->_payments = $this->_quotePaymentCollFactory->create()
+            $this->_payments = $this->_quotePaymentCollectionFactory->create()
                 ->setQuoteFilter($this->getId());
 
             if ($this->getId()) {
diff --git a/app/code/Magento/Sales/Model/Quote/Address.php b/app/code/Magento/Sales/Model/Quote/Address.php
index 74adb8b3644f60b4da02e141cdbb205638af0c3f..96346165848206de2645e5fcea5c2f91eadb1ade 100644
--- a/app/code/Magento/Sales/Model/Quote/Address.php
+++ b/app/code/Magento/Sales/Model/Quote/Address.php
@@ -227,17 +227,17 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
     /**
      * @var \Magento\Sales\Model\Resource\Quote\Address\Item\CollectionFactory
      */
-    protected $_itemCollFactory;
+    protected $_itemCollectionFactory;
 
     /**
-     * @var \Magento\Shipping\Model\ShippingFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateCollectorInterface
      */
-    protected $_shippingFactory;
+    protected $_rateCollector;
 
     /**
      * @var \Magento\Sales\Model\Resource\Quote\Address\Rate\CollectionFactory
      */
-    protected $_rateCollFactory;
+    protected $_rateCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Quote\Address\Total\CollectorFactory
@@ -260,14 +260,15 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Customer\Model\AddressFactory $addressFactory
      * @param \Magento\Sales\Model\Quote\Address\ItemFactory $addressItemFactory
-     * @param \Magento\Sales\Model\Resource\Quote\Address\Item\CollectionFactory $itemCollFactory
+     * @param \Magento\Sales\Model\Resource\Quote\Address\Item\CollectionFactory $itemCollectionFactory
      * @param \Magento\Sales\Model\Quote\Address\RateFactory $addressRateFactory
-     * @param \Magento\Shipping\Model\ShippingFactory $shippingFactory
-     * @param \Magento\Sales\Model\Resource\Quote\Address\Rate\CollectionFactory $rateCollFactory
-     * @param \Magento\Shipping\Model\Rate\RequestFactory $rateRequestFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateCollectorInterface $rateCollector
+     * @param \Magento\Sales\Model\Resource\Quote\Address\Rate\CollectionFactory $rateCollectionFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateRequestFactory $rateRequestFactory
      * @param \Magento\Sales\Model\Quote\Address\Total\CollectorFactory $totalCollectorFactory
      * @param \Magento\Sales\Model\Quote\Address\TotalFactory $addressTotalFactory
      * @param \Magento\Object\Copy $objectCopyService
+     * @param \Magento\Sales\Model\Quote\Address\CarrierFactoryInterface $carrierFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -283,14 +284,15 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Customer\Model\AddressFactory $addressFactory,
         \Magento\Sales\Model\Quote\Address\ItemFactory $addressItemFactory,
-        \Magento\Sales\Model\Resource\Quote\Address\Item\CollectionFactory $itemCollFactory,
+        \Magento\Sales\Model\Resource\Quote\Address\Item\CollectionFactory $itemCollectionFactory,
         \Magento\Sales\Model\Quote\Address\RateFactory $addressRateFactory,
-        \Magento\Shipping\Model\ShippingFactory $shippingFactory,
-        \Magento\Sales\Model\Resource\Quote\Address\Rate\CollectionFactory $rateCollFactory,
-        \Magento\Shipping\Model\Rate\RequestFactory $rateRequestFactory,
+        \Magento\Sales\Model\Quote\Address\RateCollectorInterface $rateCollector,
+        \Magento\Sales\Model\Resource\Quote\Address\Rate\CollectionFactory $rateCollectionFactory,
+        \Magento\Sales\Model\Quote\Address\RateRequestFactory $rateRequestFactory,
         \Magento\Sales\Model\Quote\Address\Total\CollectorFactory $totalCollectorFactory,
         \Magento\Sales\Model\Quote\Address\TotalFactory $addressTotalFactory,
         \Magento\Object\Copy $objectCopyService,
+        \Magento\Sales\Model\Quote\Address\CarrierFactoryInterface $carrierFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -298,14 +300,15 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
         $this->_coreStoreConfig = $coreStoreConfig;
         $this->_addressFactory = $addressFactory;
         $this->_addressItemFactory = $addressItemFactory;
-        $this->_itemCollFactory = $itemCollFactory;
+        $this->_itemCollectionFactory = $itemCollectionFactory;
         $this->_addressRateFactory = $addressRateFactory;
-        $this->_shippingFactory = $shippingFactory;
-        $this->_rateCollFactory = $rateCollFactory;
+        $this->_rateCollector = $rateCollector;
+        $this->_rateCollectionFactory = $rateCollectionFactory;
         $this->_rateRequestFactory = $rateRequestFactory;
         $this->_totalCollectorFactory = $totalCollectorFactory;
         $this->_addressTotalFactory = $addressTotalFactory;
         $this->_objectCopyService = $objectCopyService;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct(
             $context,
             $registry,
@@ -520,7 +523,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
     public function getItemsCollection()
     {
         if (null === $this->_items) {
-            $this->_items = $this->_itemCollFactory->create()->setAddressFilter($this->getId());
+            $this->_items = $this->_itemCollectionFactory->create()->setAddressFilter($this->getId());
             if ($this->getId()) {
                 foreach ($this->_items as $item) {
                     $item->setAddress($this);
@@ -816,7 +819,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
     public function getShippingRatesCollection()
     {
         if (null === $this->_rates) {
-            $this->_rates = $this->_rateCollFactory->create()->setAddressFilter($this->getId());
+            $this->_rates = $this->_rateCollectionFactory->create()->setAddressFilter($this->getId());
             if ($this->getQuote()->hasNominalItems(false)) {
                 $this->_rates->setFixedOnlyFilter(true);
             }
@@ -854,13 +857,14 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
     {
         $rates = array();
         foreach ($this->getShippingRatesCollection() as $rate) {
-            if (!$rate->isDeleted() && $rate->getCarrierInstance()) {
+            if (!$rate->isDeleted() && $this->_carrierFactory->get($rate->getCarrier())) {
                 if (!isset($rates[$rate->getCarrier()])) {
                     $rates[$rate->getCarrier()] = array();
                 }
 
                 $rates[$rate->getCarrier()][] = $rate;
-                $rates[$rate->getCarrier()][0]->carrier_sort_order = $rate->getCarrierInstance()->getSortOrder();
+                $rates[$rate->getCarrier()][0]->carrier_sort_order
+                    = $this->_carrierFactory->get($rate->getCarrier())->getSortOrder();
             }
         }
         uasort($rates, array($this, '_sortRates'));
@@ -982,7 +986,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
      */
     public function requestShippingRates(\Magento\Sales\Model\Quote\Item\AbstractItem $item = null)
     {
-        /** @var $request \Magento\Shipping\Model\Rate\Request */
+        /** @var $request \Magento\Sales\Model\Quote\Address\RateRequest */
         $request = $this->_rateRequestFactory->create();
         $request->setAllItems($item ? array($item) : $this->getAllItems());
         $request->setDestCountryId($this->getCountryId());
@@ -1027,7 +1031,7 @@ class Address extends \Magento\Customer\Model\Address\AbstractAddress
 
         $request->setBaseSubtotalInclTax($this->getBaseSubtotalInclTax());
 
-        $result = $this->_shippingFactory->create()->collectRates($request)->getResult();
+        $result = $this->_rateCollector->collectRates($request)->getResult();
 
         $found = false;
         if ($result) {
diff --git a/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php b/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..501de1bf31e150420d7d81a2f8821c392326ff2a
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Quote/Address/AbstractCarrierInterface.php
@@ -0,0 +1,211 @@
+<?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\Sales\Model\Quote\Address;
+
+interface AbstractCarrierInterface
+{
+    /**
+     * Retrieve information from carrier configuration
+     *
+     * @param   string $field
+     * @return  mixed
+     */
+    public function getConfigData($field);
+
+    /**
+     * Collect and get rates
+     *
+     * @abstract
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return \Magento\Object|bool|null
+     */
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request);
+
+    /**
+     * Do request to shipment
+     * Implementation must be in overridden method
+     *
+     * @param \Magento\Object $request
+     * @return \Magento\Object
+     */
+    public function requestToShipment($request);
+
+    /**
+     * Do return of shipment
+     * Implementation must be in overridden method
+     *
+     * @param $request
+     * @return \Magento\Object
+     */
+    public function returnOfShipment($request);
+
+    /**
+     * Return container types of carrier
+     *
+     * @param \Magento\Object|null $params
+     * @return array
+     */
+    public function getContainerTypes(\Magento\Object $params = null);
+
+    /**
+     * Get Container Types, that could be customized
+     *
+     * @return array
+     */
+    public function getCustomizableContainerTypes();
+
+    /**
+     * Return delivery confirmation types of carrier
+     *
+     * @param \Magento\Object|null $params
+     * @return array
+     */
+    public function getDeliveryConfirmationTypes(\Magento\Object $params = null);
+
+    /**
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return $this|bool|false|\Magento\Core\Model\AbstractModel
+     */
+    public function checkAvailableShipCountries(\Magento\Sales\Model\Quote\Address\RateRequest $request);
+
+    /**
+     * Processing additional validation to check is carrier applicable.
+     *
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return $this|\Magento\Sales\Model\Quote\Address\RateResult\Error|boolean
+     */
+    public function proccessAdditionalValidation(\Magento\Sales\Model\Quote\Address\RateRequest $request);
+
+    /**
+     * Determine whether current carrier enabled for activity
+     *
+     * @return bool
+     */
+    public function isActive();
+
+    /**
+     * Whether this carrier has fixed rates calculation
+     *
+     * @return bool
+     */
+    public function isFixed();
+
+    /**
+     * Check if carrier has shipping tracking option available
+     *
+     * @return bool
+     */
+    public function isTrackingAvailable();
+
+    /**
+     * Check if carrier has shipping label option available
+     *
+     * @return bool
+     */
+    public function isShippingLabelsAvailable();
+
+    /**
+     *  Retrieve sort order of current carrier
+     *
+     * @return mixed
+     */
+    public function getSortOrder();
+
+    /**
+     * Calculate price considering free shipping and handling fee
+     *
+     * @param string $cost
+     * @param string $method
+     * @return float|string
+     */
+    public function getMethodPrice($cost, $method = '');
+
+    /**
+     * Get the handling fee for the shipping + cost
+     *
+     * @param float $cost
+     * @return float final price for shipping method
+     */
+    public function getFinalPriceWithHandlingFee($cost);
+
+    /**
+     * Return weight in pounds
+     *
+     * @param integer Weight in someone measure
+     * @return float Weight in pounds
+     */
+    public function convertWeightToLbs($weight);
+
+    /**
+     * Set the number of boxes for shipping
+     *
+     * @param int|float $weight
+     * @return int|float weight
+     */
+    public function getTotalNumOfBoxes($weight);
+
+    /**
+     * Is state province required
+     *
+     * @return bool
+     */
+    public function isStateProvinceRequired();
+
+    /**
+     * Check if city option required
+     *
+     * @return bool
+     */
+    public function isCityRequired();
+
+    /**
+     * Determine whether zip-code is required for the country of destination
+     *
+     * @param string|null $countryId
+     * @return bool
+     */
+    public function isZipCodeRequired($countryId = null);
+
+    /**
+     * Used to call debug method from not Payment Method context
+     *
+     * @param mixed $debugData
+     */
+    public function debugData($debugData);
+
+    /**
+     * Getter for carrier code
+     *
+     * @return string
+     */
+    public function getCarrierCode();
+
+    /**
+     * Return content types of package
+     *
+     * @param \Magento\Object $params
+     * @return array
+     */
+    public function getContentTypes(\Magento\Object $params);
+}
diff --git a/app/code/Magento/Sales/Model/Quote/Address/CarrierFactoryInterface.php b/app/code/Magento/Sales/Model/Quote/Address/CarrierFactoryInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..88700e13b02ed8b92120a030e9f5ee493c5d03fb
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Quote/Address/CarrierFactoryInterface.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\Sales\Model\Quote\Address;
+
+interface CarrierFactoryInterface
+{
+    /**
+     * Get carrier instance
+     *
+     * @param string $carrierCode
+     * @return bool|AbstractCarrierInterface
+     */
+    public function get($carrierCode);
+
+    /**
+     * Create carrier instance
+     *
+     * @param string $carrierCode
+     * @param int|null $storeId
+     * @return bool|AbstractCarrierInterface
+     */
+    public function create($carrierCode, $storeId = null);
+
+    /**
+     * Get carrier by its code if it is active
+     *
+     * @param string $carrierCode
+     * @return bool|AbstractCarrierInterface
+     */
+    public function getIfActive($carrierCode);
+
+    /**
+     * Create carrier by its code if it is active
+     *
+     * @param $carrierCode
+     * @param null|int $storeId
+     * @return bool|AbstractCarrierInterface
+     */
+    public function createIfActive($carrierCode, $storeId = null);
+}
diff --git a/app/code/Magento/Sales/Model/Quote/Address/Rate.php b/app/code/Magento/Sales/Model/Quote/Address/Rate.php
index 5b8b27355d32e81ed301f16e9cd6f089cba9b515..884182ad6eca661c3c07f6691b5e13fa5442ad90 100644
--- a/app/code/Magento/Sales/Model/Quote/Address/Rate.php
+++ b/app/code/Magento/Sales/Model/Quote/Address/Rate.php
@@ -57,7 +57,9 @@
  */
 namespace Magento\Sales\Model\Quote\Address;
 
-class Rate extends \Magento\Shipping\Model\Rate\AbstractRate
+use \Magento\Core\Model\AbstractModel;
+
+class Rate extends AbstractModel
 {
     /**
      * @var \Magento\Sales\Model\Quote\Address
@@ -100,17 +102,17 @@ class Rate extends \Magento\Shipping\Model\Rate\AbstractRate
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Result\AbstractResult $rate
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\AbstractResult $rate
      * @return $this
      */
-    public function importShippingRate(\Magento\Shipping\Model\Rate\Result\AbstractResult $rate)
+    public function importShippingRate(\Magento\Sales\Model\Quote\Address\RateResult\AbstractResult $rate)
     {
-        if ($rate instanceof \Magento\Shipping\Model\Rate\Result\Error) {
+        if ($rate instanceof \Magento\Sales\Model\Quote\Address\RateResult\Error) {
             $this->setCode($rate->getCarrier() . '_error')
                 ->setCarrier($rate->getCarrier())
                 ->setCarrierTitle($rate->getCarrierTitle())
                 ->setErrorMessage($rate->getErrorMessage());
-        } elseif ($rate instanceof \Magento\Shipping\Model\Rate\Result\Method) {
+        } elseif ($rate instanceof \Magento\Sales\Model\Quote\Address\RateResult\Method) {
             $this->setCode($rate->getCarrier() . '_' . $rate->getMethod())
                 ->setCarrier($rate->getCarrier())
                 ->setCarrierTitle($rate->getCarrierTitle())
diff --git a/app/code/Magento/Sales/Model/Quote/Address/RateCollectorInterface.php b/app/code/Magento/Sales/Model/Quote/Address/RateCollectorInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..d867bb49b34fd11f135c5dffe9654c7c10c96179
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Quote/Address/RateCollectorInterface.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright Copyright (c) 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\Sales\Model\Quote\Address;
+
+interface RateCollectorInterface
+{
+    /**
+     * @param RateRequest $request
+     * @return $this
+     */
+    public function collectRates(RateRequest $request);
+}
diff --git a/app/code/Magento/Sales/Model/Quote/Address/RateRequest.php b/app/code/Magento/Sales/Model/Quote/Address/RateRequest.php
new file mode 100644
index 0000000000000000000000000000000000000000..b00b16de2b367c697bb8e591426a452af3a3b902
--- /dev/null
+++ b/app/code/Magento/Sales/Model/Quote/Address/RateRequest.php
@@ -0,0 +1,134 @@
+<?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\Sales\Model\Quote\Address;
+
+/**
+ * Fields:
+ * - orig:
+ *   - country_id: UK
+ *   - region_id: 1
+ *   - postcode: 90034
+ * - dest:
+ *   - country_id: UK
+ *   - region_id: 2
+ *   - postcode: 01005
+ * - package:
+ *   - value: $100
+ *   - weight: 1.5 lb
+ *   - height: 10"
+ *   - width: 10"
+ *   - depth: 10"
+ * - order:
+ *   - total_qty: 10
+ *   - subtotal: $100
+ * - option
+ *   - insurance: true
+ *   - handling: $1
+ * - table (shiptable)
+ *   - condition_name: package_weight
+ * - limit
+ *   - carrier: ups
+ *   - method: 3dp
+ * - ups
+ *   - pickup: CC
+ *   - container: CP
+ *   - address: RES
+ *
+ * @method int getStoreId()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setStoreId(int $value)
+ * @method int getWebsiteId()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setWebsiteId(int $value)
+ * @method string getBaseCurrency()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setBaseCurrency(string $value)
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setAllItems(array $items)
+ * @method array getAllItems()
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOrigCountryId(string $value)
+ * @method string getOrigCountryId()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOrigRegionId(int $value)
+ * @method int getOrigRegionId()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOrigPostcode(string $value)
+ * @method string getOrigPostcode()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOrigCity(string $value)
+ * @method string getOrigCity()
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setDestCountryId(string $value)
+ * @method string getDestCountryId()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setDestRegionId(int $value)
+ * @method int getDestRegionId()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setDestRegionCode(string $value)
+ * @method string getDestRegionCode()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setDestPostcode(string $value)
+ * @method string getDestPostcode()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setDestCity(string $value)
+ * @method string getDestCity()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setDestStreet(string $value)
+ * @method string getDestStreet()
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageValue(float $value)
+ * @method float getPackageValue()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageValueWithDiscount(float $value)
+ * @method float getPackageValueWithDiscount()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackagePhysicalValue(float $value)
+ * @method float getPackagePhysicalValue()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageQty(float $value)
+ * @method float getPackageQty()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageWeight(float $value)
+ * @method float getPackageWeight()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageHeight(int $value)
+ * @method int getPackageHeight()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageWidth(int $value)
+ * @method int getPackageWidth()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageDepth(int $value)
+ * @method int getPackageDepth()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setPackageCurrency(string $value)
+ * @method string getPackageCurrency()
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOrderTotalQty(float $value)
+ * @method float getOrderTotalQty()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOrderSubtotal(float $value)
+ * @method float getOrderSubtotal()
+ *
+ * @method boolean getFreeShipping()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setFreeShipping(boolean $flag)
+ * @method float getFreeMethodWeight()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setFreeMethodWeight(float $value)
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOptionInsurance(boolean $value)
+ * @method boolean getOptionInsurance()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setOptionHandling(float $flag)
+ * @method float getOptionHandling()
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setConditionName(array|string $value)
+ * @method array|string getConditionName()
+ *
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setLimitCarrier(string $value)
+ * @method string getLimitCarrier()
+ * @method \Magento\Sales\Model\Quote\Address\RateRequest setLimitMethod(string $value)
+ * @method string getLimitMethod()
+ */
+class RateRequest extends \Magento\Object
+{
+}
diff --git a/app/code/Magento/Shipping/Model/Rate/Result/AbstractResult.php b/app/code/Magento/Sales/Model/Quote/Address/RateResult/AbstractResult.php
similarity index 90%
rename from app/code/Magento/Shipping/Model/Rate/Result/AbstractResult.php
rename to app/code/Magento/Sales/Model/Quote/Address/RateResult/AbstractResult.php
index 6792c8c9bbfe87060180fe971c4486f559c67de4..8867eb764004581c0111ce4f6124bf99ffbd38cd 100644
--- a/app/code/Magento/Shipping/Model/Rate/Result/AbstractResult.php
+++ b/app/code/Magento/Sales/Model/Quote/Address/RateResult/AbstractResult.php
@@ -18,16 +18,11 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Shipping
  * @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\Shipping\Model\Rate\Result;
+namespace Magento\Sales\Model\Quote\Address\RateResult;
 
 class AbstractResult extends \Magento\Object
 {
-
 }
diff --git a/app/code/Magento/Shipping/Model/Rate/Result/Error.php b/app/code/Magento/Sales/Model/Quote/Address/RateResult/Error.php
similarity index 87%
rename from app/code/Magento/Shipping/Model/Rate/Result/Error.php
rename to app/code/Magento/Sales/Model/Quote/Address/RateResult/Error.php
index 4c7c3fa0cda02d0d658f1260f2a67f514df019b2..ea28a43c2ef2352573771c41ed2e1557cc237d28 100644
--- a/app/code/Magento/Shipping/Model/Rate/Result/Error.php
+++ b/app/code/Magento/Sales/Model/Quote/Address/RateResult/Error.php
@@ -18,18 +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_Shipping
  * @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\Sales\Model\Quote\Address\RateResult;
 
-
-namespace Magento\Shipping\Model\Rate\Result;
-
-class Error extends \Magento\Shipping\Model\Rate\Result\AbstractResult
+class Error extends AbstractResult
 {
-
     public function getErrorMessage()
     {
         if (!$this->getData('error_message')) {
diff --git a/app/code/Magento/Shipping/Model/Rate/Result/Method.php b/app/code/Magento/Sales/Model/Quote/Address/RateResult/Method.php
similarity index 88%
rename from app/code/Magento/Shipping/Model/Rate/Result/Method.php
rename to app/code/Magento/Sales/Model/Quote/Address/RateResult/Method.php
index d005a31dc7f5a632011bbc049369ce2f028ef66c..9013941b8ab7f1dc1845aa704ff08a215e9cf5ea 100644
--- a/app/code/Magento/Shipping/Model/Rate/Result/Method.php
+++ b/app/code/Magento/Sales/Model/Quote/Address/RateResult/Method.php
@@ -18,12 +18,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_Shipping
  * @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\Sales\Model\Quote\Address\RateResult;
 
 /**
  * Fields:
@@ -34,9 +32,7 @@
  * - price: $9.40 (cost+handling)
  * - cost: $8.00
  */
-namespace Magento\Shipping\Model\Rate\Result;
-
-class Method extends \Magento\Shipping\Model\Rate\Result\AbstractResult
+class Method extends AbstractResult
 {
     /**
      * @var \Magento\Core\Model\StoreManagerInterface
@@ -59,7 +55,7 @@ class Method extends \Magento\Shipping\Model\Rate\Result\AbstractResult
      * Round shipping carrier's method price
      *
      * @param string|float|int $price
-     * @return \Magento\Shipping\Model\Rate\Result\Method
+     * @return \Magento\Sales\Model\Quote\Address\RateResult\Method
      */
     public function setPrice($price)
     {
diff --git a/app/code/Magento/Sales/Model/Resource/Order/Grid/StatusesArray.php b/app/code/Magento/Sales/Model/Resource/Order/Grid/StatusesArray.php
index 67246c9a95fa5e715f3d04ace19c552837d52c60..1fab8d5cb91fc409399ee1af731a092a3ef7ca5e 100644
--- a/app/code/Magento/Sales/Model/Resource/Order/Grid/StatusesArray.php
+++ b/app/code/Magento/Sales/Model/Resource/Order/Grid/StatusesArray.php
@@ -34,14 +34,14 @@ class StatusesArray implements \Magento\Core\Model\Option\ArrayInterface
     /**
      * @var \Magento\Sales\Model\Resource\Order\Status\CollectionFactory
      */
-    protected $_statusCollFactory;
+    protected $_statusCollectionFactory;
 
     /**
-     * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $statusCollFactory
+     * @param \Magento\Sales\Model\Resource\Order\Status\CollectionFactory $statusCollectionFactory
      */
-    public function __construct(\Magento\Sales\Model\Resource\Order\Status\CollectionFactory $statusCollFactory)
+    public function __construct(\Magento\Sales\Model\Resource\Order\Status\CollectionFactory $statusCollectionFactory)
     {
-        $this->_statusCollFactory = $statusCollFactory;
+        $this->_statusCollectionFactory = $statusCollectionFactory;
     }
 
     /**
@@ -51,7 +51,7 @@ class StatusesArray implements \Magento\Core\Model\Option\ArrayInterface
      */
     public function toOptionArray()
     {
-        $statuses = $this->_statusCollFactory->create()->toOptionHash();
+        $statuses = $this->_statusCollectionFactory->create()->toOptionHash();
         return $statuses;
     }
 }
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Address/Rate/Collection.php b/app/code/Magento/Sales/Model/Resource/Quote/Address/Rate/Collection.php
index e47918a498791cfbbb982f96c83f8a97a1cfeffd..450cf78348eea7b4ddbd772704c9bc5afb989431 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote/Address/Rate/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote/Address/Rate/Collection.php
@@ -43,6 +43,29 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     protected $_allowFixedOnly   = 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\Sales\Model\Quote\Address\CarrierFactoryInterface $carrierFactory
+     * @param mixed $connection
+     * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
+     */
+    public function __construct(
+        \Magento\Core\Model\EntityFactory $entityFactory,
+        \Magento\Logger $logger,
+        \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
+        \Magento\Event\ManagerInterface $eventManager,
+        \Magento\Sales\Model\Quote\Address\CarrierFactoryInterface $carrierFactory,
+        $connection = null,
+        \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
+    ) {
+        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
+        $this->_carrierFactory = $carrierFactory;
+    }
+
+
     /**
      * Resource initialization
      *
@@ -89,7 +112,8 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      */
     public function addItem(\Magento\Object $rate)
     {
-        if ($this->_allowFixedOnly && (!$rate->getCarrierInstance() || !$rate->getCarrierInstance()->isFixed())) {
+        $carrier = $this->_carrierFactory->get($rate->getCarrier());
+        if ($this->_allowFixedOnly && (!$carrier || !$carrier->isFixed())) {
             return $this;
         }
         return parent::addItem($rate);
diff --git a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php
index ee0b148f13a5199ddd00faa72d5912aafc89e199..40cec6c4bd2e82842cbd4c1c28cbd19e33532602 100644
--- a/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Quote/Item/Collection.php
@@ -48,12 +48,12 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     /**
      * @var \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory
      */
-    protected $_itemOptionCollFactory;
+    protected $_itemOptionCollectionFactory;
 
     /**
      * @var \Magento\Catalog\Model\Resource\Product\CollectionFactory
      */
-    protected $_productCollFactory;
+    protected $_productCollectionFactory;
 
     /**
      * @var \Magento\Sales\Model\Quote\Config
@@ -65,8 +65,8 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * @param \Magento\Logger $logger
      * @param \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
      * @param \Magento\Event\ManagerInterface $eventManager
-     * @param \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollFactory
-     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
+     * @param \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollectionFactory
+     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param \Magento\Sales\Model\Quote\Config $quoteConfig
      * @param mixed $connection
      * @param \Magento\Core\Model\Resource\Db\AbstractDb $resource
@@ -76,15 +76,15 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         \Magento\Logger $logger,
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Event\ManagerInterface $eventManager,
-        \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollFactory,
-        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
+        \Magento\Sales\Model\Resource\Quote\Item\Option\CollectionFactory $itemOptionCollectionFactory,
+        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         \Magento\Sales\Model\Quote\Config $quoteConfig,
         $connection = null,
         \Magento\Core\Model\Resource\Db\AbstractDb $resource = null
     ) {
         parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
-        $this->_itemOptionCollFactory = $itemOptionCollFactory;
-        $this->_productCollFactory = $productCollFactory;
+        $this->_itemOptionCollectionFactory = $itemOptionCollectionFactory;
+        $this->_productCollectionFactory = $productCollectionFactory;
         $this->_quoteConfig = $quoteConfig;
     }
 
@@ -189,7 +189,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     protected function _assignOptions()
     {
         $itemIds          = array_keys($this->_items);
-        $optionCollection = $this->_itemOptionCollFactory->create()->addItemFilter($itemIds);
+        $optionCollection = $this->_itemOptionCollectionFactory->create()->addItemFilter($itemIds);
         foreach ($this as $item) {
             $item->setOptions($optionCollection->getOptionsByItem($item));
         }
@@ -213,7 +213,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         }
         $this->_productIds = array_merge($this->_productIds, $productIds);
 
-        $productCollection = $this->_productCollFactory->create()
+        $productCollection = $this->_productCollectionFactory->create()
             ->setStoreId($this->getStoreId())
             ->addIdFilter($this->_productIds)
             ->addAttributeToSelect($this->_quoteConfig->getProductAttributes())
diff --git a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php
index 440693c5764532b0f2266218fa8def83ce90ba0b..750cb6734018099dbb6e90a1dcc15bd644dc7a8c 100644
--- a/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php
+++ b/app/code/Magento/Sales/Model/Resource/Report/Bestsellers.php
@@ -155,7 +155,7 @@ class Bestsellers extends \Magento\Sales\Model\Resource\Report\AbstractReport
                 ->where('source_table.state != ?', \Magento\Sales\Model\Order::STATE_CANCELED);
 
             $productTypes = array(
-                \Magento\Catalog\Model\Product\Type::TYPE_GROUPED,
+                \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE,
                 \Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE,
                 \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE,
             );
diff --git a/app/code/Magento/Sales/Model/Resource/Sale/Collection.php b/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
index 4c2456838f026dcbcf85ee9b35c20e78265276b4..90a44fbb5dc4bb48bd5c1bb461e06272e78582fd 100644
--- a/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
+++ b/app/code/Magento/Sales/Model/Resource/Sale/Collection.php
@@ -79,7 +79,7 @@ class Collection extends \Magento\Data\Collection\Db
     /**
      * @var \Magento\Core\Model\Resource\Store\CollectionFactory
      */
-    protected $_storeCollFactory;
+    protected $_storeCollectionFactory;
 
     /**
      * @var \Magento\Core\Model\StoreManagerInterface
@@ -93,12 +93,12 @@ class Collection extends \Magento\Data\Collection\Db
         \Magento\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\Sales\Model\Resource\Order $resource,
-        \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollFactory,
+        \Magento\Core\Model\Resource\Store\CollectionFactory $storeCollectionFactory,
         \Magento\Core\Model\StoreManagerInterface $storeManager
     ) {
         $this->_eventManager = $eventManager;
         $this->_orderResource = $resource;
-        $this->_storeCollFactory = $storeCollFactory;
+        $this->_storeCollectionFactory = $storeCollectionFactory;
         $this->_storeManager = $storeManager;
         parent::__construct($entityFactory, $logger, $fetchStrategy, $this->_orderResource->getReadConnection());
     }
@@ -206,7 +206,7 @@ class Collection extends \Magento\Data\Collection\Db
         $data = $this->getData();
         $this->resetData();
 
-        $stores = $this->_storeCollFactory->create()
+        $stores = $this->_storeCollectionFactory->create()
             ->setWithoutDefaultFilter()
             ->load()
             ->toOptionHash();
diff --git a/app/code/Magento/Sales/Model/Resource/Setup.php b/app/code/Magento/Sales/Model/Resource/Setup.php
index 5dc63a1e761c841e5a41429fe6208c65cb922c0d..4d0e07fc222336152d20e01cd5d35c90f1b46a6b 100644
--- a/app/code/Magento/Sales/Model/Resource/Setup.php
+++ b/app/code/Magento/Sales/Model/Resource/Setup.php
@@ -45,7 +45,7 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param \Magento\Core\Model\Config $config
      * @param string $moduleName
      * @param string $connectionName
@@ -54,14 +54,14 @@ class Setup extends \Magento\Eav\Model\Entity\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         \Magento\Core\Model\Config $config,
         $moduleName = 'Magento_Sales',
         $connectionName = ''
     ) {
         $this->_config = $config;
         $this->_encryptor = $context->getEncryptor();
-        parent::__construct($context, $resourceName, $cache, $attrGrCollFactory, $moduleName, $connectionName);
+        parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $moduleName, $connectionName);
     }
 
     /**
diff --git a/app/code/Magento/Sales/etc/module.xml b/app/code/Magento/Sales/etc/module.xml
index 20bb01613486ff65da32c1b90c8c31c2a378fed9..ca7f4f1ff6d8c4820dff45822dca37a821f0ccf9 100755
--- a/app/code/Magento/Sales/etc/module.xml
+++ b/app/code/Magento/Sales/etc/module.xml
@@ -28,11 +28,13 @@
         <sequence>
             <module name="Magento_Rule"/>
             <module name="Magento_Catalog"/>
+            <module name="Magento_GroupedProduct" />
             <module name="Magento_Customer"/>
             <module name="Magento_Payment"/>
         </sequence>
         <depends>
             <module name="Magento_Catalog"/>
+            <module name="Magento_GroupedProduct" />
             <module name="Magento_Customer"/>
             <module name="Magento_Payment"/>
             <module name="Magento_Core"/>
@@ -45,11 +47,12 @@
             <module name="Magento_Eav"/>
             <module name="Magento_Tax"/>
             <module name="Magento_GiftMessage"/>
-            <module name="Magento_Shipping"/>
-            <module name="Magento_Usa"/>
             <module name="Magento_Reports"/>
             <module name="Magento_Weee"/>
             <module name="Magento_Rss"/>
+            <module name="Magento_CatalogInventory"/>
+            <module name="Magento_Wishlist"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_grid_block.xml b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_grid_block.xml
index 10e78848d540a0b74a982c917a230e254bd3340b..81e89315e901cb48225a4918db02c9e4464c4f37 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_grid_block.xml
+++ b/app/code/Magento/Sales/view/adminhtml/layout/sales_order_grid_block.xml
@@ -80,7 +80,7 @@
                         </item>
                         <item name="print_shipping_label" xsi:type="array">
                             <item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
-                            <item name="url" xsi:type="string">sales/order_shipment/massPrintShippingLabel</item>
+                            <item name="url" xsi:type="string">adminhtml/order_shipment/massPrintShippingLabel</item>
                         </item>
                     </argument>
                 </arguments>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/create/sidebar/items.phtml b/app/code/Magento/Sales/view/adminhtml/order/create/sidebar/items.phtml
index 487820018cf352855baa50977ec3c3b87ecd2a2f..702e9d3e2f75ef9bca6d9384c18facb0d94c2167 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/create/sidebar/items.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/order/create/sidebar/items.phtml
@@ -70,7 +70,7 @@
                     <td><?php echo $this->escapeHtml($_item->getName()) ?></td>
                     <?php if ($this->canDisplayItemQty()): ?>
                     <td class="a-center">
-                        <?php if ($_item->getProduct()->getTypeId() != \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE): ?>
+                        <?php if ($_item->getProduct()->getTypeId() != \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE): ?>
                             <?php echo $_item->getQty()*1 ? $_item->getQty()*1 : 1 ?>
                         <?php endif; ?>
                     </td>
@@ -82,9 +82,9 @@
                     <td class="a-center"><input type="checkbox" name="sidebar[remove][<?php echo $this->getItemId($_item) ?>]" value="<?php echo $this->getDataId() ?>" title="<?php echo __('Remove') ?>"/></td>
                     <?php endif; ?>
                     <td class="a-center">
-                        <?php if ($_item->getTypeId() == \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE && $this->getDataId() == 'wishlist'): ?>
+                        <?php if ($_item->getTypeId() == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE && $this->getDataId() == 'wishlist'): ?>
                             <a href="#" onclick="order.sidebarConfigureProduct('<?php echo 'sidebar_wishlist' ?>', <?php echo $this->getProductId($_item) ?>, <?php echo $this->getItemId($_item) ?>); return false;"><img src="<?php echo $this->getViewFileUrl('images/grouped_to_order_icon.png') ?>" class="v-middle" alt="<?php echo __('Configure and Add to Order') ?>" title="<?php echo __('Configure and Add to Order') ?>" width="16" height="16"/></a>
-                        <?php elseif ($_item->getTypeId() == \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE): ?>
+                        <?php elseif ($_item->getTypeId() == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE): ?>
                             <a href="#" onclick="order.sidebarConfigureProduct('<?php echo 'sidebar' ?>', <?php echo $this->getProductId($_item) ?>); return false;"><img src="<?php echo $this->getViewFileUrl('images/grouped_to_order_icon.png') ?>" class="v-middle" alt="<?php echo __('Configure and Add to Order') ?>" title="<?php echo __('Configure and Add to Order') ?>" width="16" height="16"/></a>
                         <?php else: ?>
                             <input type="checkbox" name="sidebar[<?php echo $this->getSidebarStorageAction() ?>][<?php echo $this->getIdentifierId($_item) ?>]" value="<?php echo $this->canDisplayItemQty() ? $_item->getQty()*1 : 1 ?>" title="<?php echo __('Add To Order') ?>"/>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/invoice/create/tracking.phtml b/app/code/Magento/Sales/view/adminhtml/order/invoice/create/tracking.phtml
deleted file mode 100644
index 0d5b6dca8bc86edea9fdc526ebcf92a3ed4be88c..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/view/adminhtml/order/invoice/create/tracking.phtml
+++ /dev/null
@@ -1,105 +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 /** @var $this \Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Tracking */ ?>
-<script type="text/javascript">
-//<![CDATA[
-var trackingControl;
-trackingControl = {
-    index : 0,
-    add : function () {
-        this.index++;
-        var data = {index:this.index};
-        Element.insert($('track_row_container'), {bottom: this.template.evaluate(data)});
-        $('trackingC' + this.index).disabled = false;
-        $('trackingT' + this.index).disabled = false;
-        $('trackingN' + this.index).disabled = false;
-        this.bindCurrierOnchange();
-    },
-    deleteRow : function(event) {
-        var row = Event.findElement(event, 'tr');
-        if (row) {
-            row.parentNode.removeChild(row)
-        }
-    },
-    bindCurrierOnchange : function() {
-        var elems = $('tracking_numbers_table').select('.select');
-        elems.each(function (elem) {
-            if (!elem.onchangeBound) {
-                elem.onchangeBound = true;
-                elem.valueInput = $(elem.parentNode.parentNode).select('.number-title')[0];
-                elem.observe('change', this.currierOnchange);
-            }
-        }.bind(this));
-    },
-    currierOnchange : function(event) {
-        var elem = Event.element(event);
-        var option = elem.options[elem.selectedIndex];
-        if (option.value && option.value != 'custom') {
-            elem.valueInput.value = option.text;
-        }
-        else {
-            elem.valueInput.value = '';
-        }
-    }
-}
-//]]>
-</script>
-
-<table cellspacing="0" class="data-table" id="tracking_numbers_table">
-    <thead>
-        <tr class="headings">
-            <th class="col-carrier"><?php echo __('Carrier') ?></th>
-            <th class="col-title"><?php echo __('Title') ?></th>
-            <th class="col-number"><?php echo __('Number') ?></th>
-            <th class="col-delete last"><?php echo __('Action') ?></th>
-        </tr>
-    </thead>
-    <tfoot>
-        <tr>
-            <td colspan="4" class="last"><?php echo $this->getChildHtml('add_button') ?></td>
-        </tr>
-    </tfoot>
-    <tbody id="track_row_container">
-        <tr id="track_row_template" class="template no-display">
-            <td class="col-carrier">
-                <select name="tracking[__index__][carrier_code]" id="trackingC__index__" class="select carrier" disabled="disabled">
-                    <?php foreach ($this->getCarriers() as $_code=>$_name): ?>
-                    <option value="<?php echo $_code ?>"><?php echo $this->escapeHtml($_name) ?></option>
-                    <?php endforeach; ?>
-                </select>
-            </td>
-            <td class="col-title"><input class="input-text number-title" type="text" name="tracking[__index__][title]" id="trackingT__index__" value="" disabled="disabled" /></td>
-            <td class="col-number"><input class="input-text" type="text" name="tracking[__index__][number]" id="trackingN__index__" value="" disabled="disabled" /></td>
-            <td class="col-delete last"><a class="action- delete" href="#" onclick="trackingControl.deleteRow(event);return false"><span><?php echo __('Delete') ?></a></span></td>
-        </tr>
-    </tbody>
-</table>
-<script type="text/javascript">
-//<![CDATA[
-trackingControl.template = new Template('<tr>' + $('track_row_template').innerHTML.replace(/__index__/g, '#{index}') + '<\/tr>');
-//]]>
-</script>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/create/tracking.phtml b/app/code/Magento/Sales/view/adminhtml/order/shipment/create/tracking.phtml
deleted file mode 100644
index be94032de65faae3dc184a6adbebdad606c280e4..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/view/adminhtml/order/shipment/create/tracking.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 /** @var $this \Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Tracking */ ?>
-<script type="text/javascript">
-//<![CDATA[
-var trackingControl;
-trackingControl = {
-    index : 0,
-    add : function () {
-        this.index++;
-        var data = {index:this.index};
-        Element.insert($('track_row_container'), {bottom: this.template.evaluate(data)});
-        $('trackingC' + this.index).disabled = false;
-        $('trackingT' + this.index).disabled = false;
-        $('trackingN' + this.index).disabled = false;
-        this.bindCurrierOnchange();
-    },
-    deleteRow : function(event) {
-        var row = Event.findElement(event, 'tr');
-        if (row) {
-            row.parentNode.removeChild(row)
-        }
-    },
-    bindCurrierOnchange : function() {
-        var elems = $('tracking_numbers_table').select('.select');
-        elems.each(function (elem) {
-            if (!elem.onchangeBound) {
-                elem.onchangeBound = true;
-                elem.valueInput = $(elem.parentNode.parentNode).select('.number-title')[0];
-                elem.observe('change', this.currierOnchange);
-            }
-        }.bind(this));
-    },
-    currierOnchange : function(event) {
-        var elem = Event.element(event);
-        var option = elem.options[elem.selectedIndex];
-        if (option.value && option.value != 'custom') {
-            elem.valueInput.value = option.text;
-        }
-        else {
-            elem.valueInput.value = '';
-        }
-    }
-}
-//]]>
-</script>
-<table cellspacing="0" class="data-table" id="tracking_numbers_table">
-    <thead>
-        <tr class="headings">
-            <th class="col-carrier"><?php echo __('Carrier') ?></th>
-            <th class="col-title"><?php echo __('Title') ?></th>
-            <th class="col-number"><?php echo __('Number') ?> <span class="required">*</span></th>
-            <th class="col-delete last"><?php echo __('Action') ?></th>
-        </tr>
-    </thead>
-    <tfoot>
-        <tr>
-            <td colspan="4" class="last"><?php echo $this->getChildHtml('add_button') ?></td>
-        </tr>
-    </tfoot>
-    <tbody id="track_row_container">
-        <tr id="track_row_template" class="template no-display">
-            <td class="col-carrier">
-                <select name="tracking[__index__][carrier_code]" id="trackingC__index__" class="select carrier" disabled="disabled">
-                    <?php foreach ($this->getCarriers() as $_code=>$_name): ?>
-                    <option value="<?php echo $_code ?>"><?php echo $this->escapeHtml($_name) ?></option>
-                    <?php endforeach; ?>
-                </select>
-            </td>
-            <td class="col-title"><input class="input-text number-title" type="text" name="tracking[__index__][title]" id="trackingT__index__" value="" disabled="disabled" /></td>
-            <td class="col-number"><input class="input-text required-entry" type="text" name="tracking[__index__][number]" id="trackingN__index__" value="" disabled="disabled" /></td>
-            <td class="col-delete last"><a href="#" class="action- delete" onclick="trackingControl.deleteRow(event);return false"><span><?php echo __('Delete') ?></span></a></td>
-        </tr>
-    </tbody>
-</table>
-<script type="text/javascript">
-//<![CDATA[
-trackingControl.template = new Template('<tr>' + $('track_row_template').innerHTML.replace(/__index__/g, '#{index}') + '<\/tr>');
-//]]>
-</script>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/tracking/info.phtml b/app/code/Magento/Sales/view/adminhtml/order/shipment/tracking/info.phtml
deleted file mode 100644
index 0dda09b8ea4ba390833647806dee91aea8fa3b64..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/view/adminhtml/order/shipment/tracking/info.phtml
+++ /dev/null
@@ -1,64 +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)
- */
-?>
-<span class="field-row grid" id="shipment_tracking_info">
-<?php if($this->getTrackingInfo()): ?>
-    <?php if ($this->getTrackingInfo()->getErrorMessage()): ?>
-        <?php echo $this->getTrackingInfo()->getErrorMessage() ?>
-    <?php else: ?>
-        <?php if ($this->getTrackingInfo()->getUrl()): ?>
-            Please, visit for more info: <a href="<?php echo $this->getTrackingInfo()->getUrl() ?>" target="_blank">
-                <?php echo $this->escapeHtml($this->getTrackingInfo()->getCarrierTitle()) ?>
-               </a><br/>
-        <?php endif; ?>
-
-        <?php if ($this->getTrackingInfo()->getStatus()): ?>
-            Status: <?php echo $this->getTrackingInfo()->getStatus() ?><br/>
-        <?php endif; ?>
-
-        <?php if ($this->getTrackingInfo()->getDeliverydate()): ?>
-            Delivery Date: <?php echo $this->getTrackingInfo()->getDeliverydate() ?><br/>
-        <?php endif; ?>
-
-        <?php if ($this->getTrackingInfo()->getDeliverytime()): ?>
-            Delivery Time: <?php echo $this->getTrackingInfo()->getDeliverytime() ?><br/>
-        <?php endif; ?>
-
-        <?php if ($this->getTrackingInfo()->getDeliverylocation()): ?>
-            Delivery Location: <?php echo $this->getTrackingInfo()->getDeliverylocation() ?><br/>
-        <?php endif; ?>
-
-        <?php if ($this->getTrackingInfo()->getSignedby()): ?>
-            Signed by: <?php echo $this->getTrackingInfo()->getSignedby() ?><br/>
-        <?php endif; ?>
-
-        <?php if ($this->getTrackingInfo()->getTrackSummary()): ?>
-            Tracking summary: <?php echo $this->getTrackingInfo()->getTrackSummary() ?><br/>
-        <?php endif; ?>
-
-    <?php endif; ?>
-<?php endif; ?>
-</span>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/info.phtml b/app/code/Magento/Sales/view/adminhtml/order/view/info.phtml
index 68cafe39a1500232199ec6b6e13d2c69530daefc..1ff35e383e553e1c787db69d08f947f62df0bafc 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/view/info.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/order/view/info.phtml
@@ -105,7 +105,7 @@ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium',
                 <?php if($_order->getBaseCurrencyCode() != $_order->getOrderCurrencyCode()): ?>
                 <tr>
                     <th><?php echo __('%1 / %2 rate:', $_order->getOrderCurrencyCode(), $_order->getBaseCurrencyCode()) ?></th>
-                    <th><?php echo $_order->getBaseToOrderRate() ?></td>
+                    <th><?php echo $_order->getBaseToOrderRate() ?></th>
                 </tr>
                 <?php endif; ?>
             </table>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/tab/info.phtml b/app/code/Magento/Sales/view/adminhtml/order/view/tab/info.phtml
index d602315e91b7c3308fc74c9b16872ef48bab9591..d4dd4208d06bfd3b01515bec2773a16c1fa346fa 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/view/tab/info.phtml
+++ b/app/code/Magento/Sales/view/adminhtml/order/view/tab/info.phtml
@@ -53,38 +53,7 @@
 </div><?php /* opening div is in app\code\Magento\Sales\view\adminhtml\order\view\info.phtml */ ?>
 <?php endif; ?>
 
-    <?php if (!$_order->getIsVirtual()): ?>
-    <div class="order-shipping-method">
-        <!--Shipping Method-->
-        <div class="fieldset-wrapper">
-            <div class="fieldset-wrapper-title">
-                <span class="title"><?php echo __('Shipping &amp; Handling Information') ?></span>
-            </div>
-            <div class="shipping-description-wrapper">
-                <?php  if ($_order->getTracksCollection()->count()) : ?>
-                <p><a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('Magento\Shipping\Helper\Data')->getTrackingPopupUrlBySalesModel($_order) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo __('Track Order') ?>"><?php echo __('Track Order') ?></a></p>
-                <?php endif; ?>
-                <?php if ($_order->getShippingDescription()): ?>
-                    <strong><?php echo $this->escapeHtml($_order->getShippingDescription()) ?></strong>
-
-                    <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()): ?>
-                        <?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
-                    <?php else: ?>
-                        <?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
-                    <?php endif; ?>
-                    <?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
-
-                    <?php echo $_excl; ?>
-                    <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
-                        (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>)
-                    <?php endif; ?>
-                <?php else: ?>
-                    <?php echo __('No shipping information available'); ?>
-                <?php endif; ?>
-            </div>
-        </div>
-    </div>
-    <?php endif; ?>
+<?php echo $this->getChildHtml('order_shipping_view') ?>
 
 <?php if (!$_order->getIsVirtual()): ?>
 </div>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/view/tracking.phtml b/app/code/Magento/Sales/view/adminhtml/order/view/tracking.phtml
deleted file mode 100644
index 2542d25cf35c734e247ff721678965440207de3e..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/view/adminhtml/order/view/tracking.phtml
+++ /dev/null
@@ -1,48 +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 $_shippingCarrier = $this->getOrder()->getShippingCarrier(); ?>
-<?php if ($_shippingCarrier && $_shippingCarrier->isTrackingAvailable()): ?>
-<span class="field-row" id="order_tracking_info">
-<table cellpadding="0" cellspacing="0" width="100%">
-    <tr>
-        <td><label for="tracking_number"><?php echo __('Tracking Number') ?></label></td>
-        <td width="100%">
-            <?php $_numbers = $this->getOrder()->getTrackingNumbers(); ?>
-            <?php if ($_numbers): ?>
-                <?php foreach ($_numbers as $_number): ?>
-                    <a href="#" onclick="<?php echo $this->getViewLinkHtml($_number) ?>"><?php echo $_number ?></a>
-                    <a href="#" onclick="<?php echo $this->getRemoveLinkHtml($_number) ?>"><?php echo __('Delete') ?></a><br/>
-                    <span id="order_tracking_info_response_<?php echo $_number ?>"></span>
-                <?php endforeach; ?>
-            <?php endif; ?>
-            <input class="input-text" type="text" id="tracking_number" name="tracking_number" value="" style="width:120px;"/>
-            <?php echo $this->getSaveButtonHtml() ?>
-        </td>
-    </tr>
-</table>
-</span>
-<?php endif; ?>
diff --git a/app/code/Magento/Sales/view/email/shipment_new.html b/app/code/Magento/Sales/view/email/shipment_new.html
index ecbe06b92a6f4e4def5dd0a194a6c4ad9dcb2f9f..2eaacd365aa07dcfd3a57be4f8d7f11c85b8302f 100644
--- a/app/code/Magento/Sales/view/email/shipment_new.html
+++ b/app/code/Magento/Sales/view/email/shipment_new.html
@@ -96,7 +96,7 @@ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;
                     </table>
                     <br/>
                     {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}
-                    {{block type='Magento\View\Element\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}
+                    {{block type='Magento\\View\\Element\\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}
                     <p style="font-size:12px; margin:0 10px 10px 0">{{var comment}}</p>
                 </td>
             </tr>
diff --git a/app/code/Magento/Sales/view/email/shipment_new_guest.html b/app/code/Magento/Sales/view/email/shipment_new_guest.html
index 7ac864228160974d744d5c79fe294a4b21ed3989..776950ea5122f81e0f8d45b3cb9bd7a66b4c9759 100644
--- a/app/code/Magento/Sales/view/email/shipment_new_guest.html
+++ b/app/code/Magento/Sales/view/email/shipment_new_guest.html
@@ -94,7 +94,7 @@ body,td { color:#2f2f2f; font:11px/1.35em Verdana, Arial, Helvetica, sans-serif;
                     </table>
                     <br/>
                     {{layout handle="sales_email_order_shipment_items" shipment=$shipment order=$order}}
-                    {{block type='Magento\View\Element\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}
+                    {{block type='Magento\\View\\Element\\Template' area='frontend' template='Magento_Sales::email/shipment/track.phtml' shipment=$shipment order=$order}}
                     <p style="font-size:12px; margin:0 10px 10px 0">{{var comment}}</p>
                 </td>
             </tr>
diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_guest_shipment.xml b/app/code/Magento/Sales/view/frontend/layout/sales_guest_shipment.xml
index 156365948105a04300822bf830255084fd8111f6..82caa305d0fd8781725eeed801b1fa9c3d08521b 100644
--- a/app/code/Magento/Sales/view/frontend/layout/sales_guest_shipment.xml
+++ b/app/code/Magento/Sales/view/frontend/layout/sales_guest_shipment.xml
@@ -33,12 +33,6 @@
         <block class="Magento\Sales\Block\Order\Info" as="info" name="sales.order.info">
             <block class="Magento\Sales\Block\Order\Info\Buttons" as="buttons" name="sales.order.info.buttons" cacheable="false"/>
         </block>
-        <block class="Magento\Sales\Block\Order\Shipment" name="sales.order.shipment" after="sales.order.info" cacheable="false">
-            <block class="Magento\Sales\Block\Order\Shipment\Items" name="shipment_items" template="order/shipment/items.phtml">
-                <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer" as="default" template="order/shipment/items/renderer/default.phtml"/>
-                <block class="Magento\Sales\Block\Order\Comments" name="shipment_comments" template="order/comments.phtml"/>
-            </block>
-        </block>
     </referenceContainer>
     <update handle="sales_order_guest_info_links"/>
 </layout>
diff --git a/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml b/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml
index 8669eb1d08da04465432c25e60f9884fb6edee6f..99ea6d8b5e92c2097997fc4cc1c9423bdb4734f0 100644
--- a/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml
+++ b/app/code/Magento/Sales/view/frontend/layout/sales_order_shipment.xml
@@ -29,12 +29,6 @@
         <block class="Magento\Sales\Block\Order\Info" as="info" name="sales.order.info">
             <block class="Magento\Sales\Block\Order\Info\Buttons" as="buttons" name="sales.order.info.buttons" cacheable="false"/>
         </block>
-        <block class="Magento\Sales\Block\Order\Shipment" name="sales.order.shipment" after="sales.order.info" cacheable="false">
-            <block class="Magento\Sales\Block\Order\Shipment\Items" name="shipment_items" template="order/shipment/items.phtml">
-                <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer" as="default" template="order/shipment/items/renderer/default.phtml"/>
-                <block class="Magento\Sales\Block\Order\Comments" name="shipment_comments" template="order/comments.phtml"/>
-            </block>
-        </block>
     </referenceContainer>
     <update handle="sales_order_info_links"/>
     <block class="Magento\View\Element\Template" name="additional.product.info" template="Magento_Core::template.phtml"/>
diff --git a/app/code/Magento/Sales/view/frontend/order/trackinginfo.phtml b/app/code/Magento/Sales/view/frontend/order/trackinginfo.phtml
deleted file mode 100644
index 496058dc42aa9350cfa41ba71c3297fc719252fe..0000000000000000000000000000000000000000
--- a/app/code/Magento/Sales/view/frontend/order/trackinginfo.phtml
+++ /dev/null
@@ -1,63 +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
- * @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)
- */
-?>
-<div class="field row grid" id="shipment_tracking_info">
-<?php if($this->getTrackingInfo()): ?>
-    <div class="title"><strong><?php echo $this->escapeHtml($this->getTrackingInfo()->getCarrierTitle()) ?></strong> - <?php echo $this->getTrackingInfo()->getTracking() ?></div>
-    <div class="info">
-        <?php if ($this->getTrackingInfo()->getErrorMessage()): ?>
-            <?php echo $this->escapeHtml($this->getTrackingInfo()->getErrorMessage()) ?>
-        <?php else: ?>
-            <?php if ($this->getTrackingInfo()->getUrl()): ?>
-                <?php echo __('Please, visit for more info') ?>: <a href="<?php echo $this->getTrackingInfo()->getUrl() ?>" target="_blank"><?php echo $this->escapeHtml($this->getTrackingInfo()->getCarrierTitle()) ?></a><br />
-            <?php endif; ?>
-
-            <?php if ($this->getTrackingInfo()->getStatus()): ?>
-                <?php echo __('Status') ?>: <?php echo $this->getTrackingInfo()->getStatus() ?><br />
-            <?php endif; ?>
-
-            <?php if ($this->getTrackingInfo()->getDeliverydate()): ?>
-                <?php echo __('Delivery Date') ?>: <?php echo $this->getTrackingInfo()->getDeliverydate() ?><br />
-            <?php endif; ?>
-
-            <?php if ($this->getTrackingInfo()->getDeliverytime()): ?>
-                <?php echo __('Delivery Time') ?>: <?php echo $this->getTrackingInfo()->getDeliverytime() ?><br />
-            <?php endif; ?>
-
-            <?php if ($this->getTrackingInfo()->getDeliverylocation()): ?>
-                <?php echo __('Delivery Location') ?>: <?php echo $this->getTrackingInfo()->getDeliverylocation() ?><br />
-            <?php endif; ?>
-
-            <?php if ($this->getTrackingInfo()->getSignedby()): ?>
-                <?php echo __('Signed by') ?>: <?php echo $this->getTrackingInfo()->getSignedby() ?><br />
-            <?php endif; ?>
-
-            <?php if ($this->getTrackingInfo()->getTrackSummary()): ?>
-                <?php echo __('Tracking summary') ?>: <?php echo $this->getTrackingInfo()->getTrackSummary() ?><br />
-            <?php endif; ?>
-        <?php endif; ?>
-    </div>
-<?php endif; ?>
-</div>
diff --git a/app/code/Magento/Sales/view/frontend/order/view.phtml b/app/code/Magento/Sales/view/frontend/order/view.phtml
index 29bc5523a3614afee801f2a9a2627c9bca3ff74e..af4e422a51316a0e68569c58376833380d4dabf0 100644
--- a/app/code/Magento/Sales/view/frontend/order/view.phtml
+++ b/app/code/Magento/Sales/view/frontend/order/view.phtml
@@ -23,18 +23,14 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
+<?php /** @var  $this \Magento\Sales\Block\Order\View*/?>
 <div class="order details items">
     <?php $_order = $this->getOrder() ?>
 
     <div class="order subtitle caption">
         <strong><?php echo __('Items Ordered') ?></strong>
         <?php if ($_order->getTracksCollection()->count()) : ?>
-            <a href="#"
-               data-mage-init="{popupWindow: {windowURL:'<?php echo $this->helper('Magento\Shipping\Helper\Data')->getTrackingPopupUrlBySalesModel($_order) ?>',windowName:'trackorder',top:0,left:0,width:800,height:600,resizable:1,scrollbars:1}}"
-               title="<?php echo __('Track your order') ?>"
-               class="action track">
-                <span><?php echo __('Track your order') ?></span>
-            </a>
+            <?php echo $this->getChildHtml('tracking-info-link') ?>
         <?php endif; ?>
     </div>
 
diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php
index 24228e7908896ab6defae4ad6b7ae16fc581a14e..f7c88fa3de78153588d49de41b6a309e7203edbd 100644
--- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php
+++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php
@@ -321,7 +321,7 @@ class Quote extends \Magento\Backend\App\Action
     /**
      * Export coupon codes as excel xml file
      *
-     * @return void
+     * @return \Magento\App\ResponseInterface|null
      */
     public function exportCouponsXmlAction()
     {
@@ -332,7 +332,7 @@ class Quote extends \Magento\Backend\App\Action
             $content = $this->_view->getLayout()
                 ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid')
                 ->getExcelFile($fileName);
-            return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+            return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
         } else {
             $this->_redirect('sales_rule/*/detail', array('_current' => true));
             return;
@@ -342,7 +342,7 @@ class Quote extends \Magento\Backend\App\Action
     /**
      * Export coupon codes as CSV file
      *
-     * @return void
+     * @return \Magento\App\ResponseInterface|null
      */
     public function exportCouponsCsvAction()
     {
@@ -353,7 +353,7 @@ class Quote extends \Magento\Backend\App\Action
             $content = $this->_view->getLayout()
                 ->createBlock('Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid')
                 ->getCsvFile();
-            return $this->_fileFactory->create($fileName, $content, \Magento\Filesystem::VAR_DIR);
+            return $this->_fileFactory->create($fileName, $content, \Magento\App\Filesystem::VAR_DIR);
         } else {
             $this->_redirect('sales_rule/*/detail', array('_current' => true));
             return;
diff --git a/app/code/Magento/SalesRule/etc/module.xml b/app/code/Magento/SalesRule/etc/module.xml
index 866685ab5da9a46b024561e90e86597948aed7d0..d3c447efbf9f4ad4278c2877d2090e78642c89eb 100755
--- a/app/code/Magento/SalesRule/etc/module.xml
+++ b/app/code/Magento/SalesRule/etc/module.xml
@@ -43,6 +43,8 @@
             <module name="Magento_Shipping"/>
             <module name="Magento_Payment"/>
             <module name="Magento_Reports"/>
+            <module name="Magento_CatalogRule"/>
+            <module name="Magento_Widget"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Sendfriend/Block/Send.php b/app/code/Magento/Sendfriend/Block/Send.php
index bb98538ff8b95618164f0600f5da49e568f1dfeb..6b65cc34b37f48bf560c07e4839b61f8040555d0 100644
--- a/app/code/Magento/Sendfriend/Block/Send.php
+++ b/app/code/Magento/Sendfriend/Block/Send.php
@@ -73,6 +73,7 @@ class Send extends \Magento\View\Element\Template
         $this->_coreRegistry = $registry;
         $this->_sendfriendData = $sendfriendData;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Sendfriend/etc/module.xml b/app/code/Magento/Sendfriend/etc/module.xml
index 6dc5657e2333646c5981d01374019d45e779b33d..d9f8318e8a84dff3848b6fec68c1163c36aba1c5 100755
--- a/app/code/Magento/Sendfriend/etc/module.xml
+++ b/app/code/Magento/Sendfriend/etc/module.xml
@@ -32,6 +32,8 @@
             <module name="Magento_Catalog"/>
             <module name="Magento_Core"/>
             <module name="Magento_Customer"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php b/app/code/Magento/Shipping/Block/Adminhtml/Create.php
similarity index 95%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Create.php
index 48b65b5e0c513644629c30f094287f59df7c3c59..c86625f04da1fe1660b8030a6021e72e04974c9f 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Create.php
@@ -28,7 +28,7 @@
  * Adminhtml shipment create
  */
 
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment;
+namespace Magento\Shipping\Block\Adminhtml;
 
 class Create extends \Magento\Backend\Block\Widget\Form\Container
 {
@@ -56,7 +56,6 @@ class Create extends \Magento\Backend\Block\Widget\Form\Container
     protected function _construct()
     {
         $this->_objectId = 'order_id';
-        $this->_controller = 'adminhtml_order_shipment';
         $this->_mode = 'create';
 
         parent::_construct();
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php
similarity index 84%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Form.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php
index 46ac3e0d8ff4a853871c8701e03df33d7599fc15..f30ca8c4c53cd2e68a33344d2230b5dd00b068e4 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Form.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Create/Form.php
@@ -28,7 +28,7 @@
  * Adminhtml shipment create form
  */
 
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\Create;
+namespace Magento\Shipping\Block\Adminhtml\Create;
 
 class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
 {
@@ -64,8 +64,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
 
     protected function _prepareLayout()
     {
-        $this->addChild('items', 'Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Items');
-        $this->addChild('tracking', 'Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Tracking');
+        $this->addChild('items', 'Magento\Shipping\Block\Adminhtml\Create\Items');
         return parent::_prepareLayout();
     }
 
@@ -81,6 +80,6 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
 
     public function getSaveUrl()
     {
-        return $this->getUrl('sales/*/save', array('order_id' => $this->getShipment()->getOrderId()));
+        return $this->getUrl('*/*/save', array('order_id' => $this->getShipment()->getOrderId()));
     }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php b/app/code/Magento/Shipping/Block/Adminhtml/Create/Items.php
similarity index 89%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Create/Items.php
index 4cbcf2ad4e11017daf06374b6d99d2ce183ac822..7eb898cd27f569b5e6082f1ceb9176b0974563d1 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Items.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Create/Items.php
@@ -27,7 +27,7 @@
 /**
  * Adminhtml shipment items grid
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\Create;
+namespace Magento\Shipping\Block\Adminhtml\Create;
 
 class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems
 {
@@ -38,11 +38,17 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems
      */
     protected $_salesData = null;
 
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Sales\Helper\Data $salesData
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
      */
     public function __construct(
@@ -50,9 +56,11 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Core\Model\Registry $registry,
         \Magento\Sales\Helper\Data $salesData,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         array $data = array()
     ) {
         $this->_salesData = $salesData;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct($context, $productFactory, $registry, $data);
     }
 
@@ -148,7 +156,9 @@ class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems
      */
     public function canCreateShippingLabel()
     {
-        $shippingCarrier = $this->getOrder()->getShippingCarrier();
+        $shippingCarrier = $this->_carrierFactory->create(
+            $this->getOrder()->getShippingMethod(true)->getCarrierCode()
+        );
         return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable();
     }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging.php
similarity index 85%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging.php
index cf7f65dd1f20f1210cc727973255bc32c552db1a..c11167aa9369ca1bfe0ed3ef742b137f31fa1107 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging.php
@@ -18,8 +18,6 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Sales
  * @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)
  */
@@ -28,7 +26,7 @@
  * Adminhtml shipment packaging
  */
 
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment;
+namespace Magento\Shipping\Block\Adminhtml\Order;
 
 class Packaging extends \Magento\Backend\Block\Template
 {
@@ -49,11 +47,17 @@ class Packaging extends \Magento\Backend\Block\Template
      */
     protected $_jsonEncoder;
 
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Json\EncoderInterface $jsonEncoder
      * @param \Magento\Usa\Model\Shipping\Carrier\Usps\Source\Size $sourceSizeModel
      * @param \Magento\Core\Model\Registry $coreRegistry
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
      */
     public function __construct(
@@ -61,11 +65,13 @@ class Packaging extends \Magento\Backend\Block\Template
         \Magento\Json\EncoderInterface $jsonEncoder,
         \Magento\Usa\Model\Shipping\Carrier\Usps\Source\Size $sourceSizeModel,
         \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         array $data = array()
     ) {
         $this->_jsonEncoder = $jsonEncoder;
         $this->_coreRegistry = $coreRegistry;
         $this->_sourceSizeModel = $sourceSizeModel;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct($context, $data);
     }
 
@@ -98,8 +104,8 @@ class Packaging extends \Magento\Backend\Block\Template
 
         if ($shipmentId) {
             $urlParams['shipment_id'] = $shipmentId;
-            $createLabelUrl = $this->getUrl('sales/order_shipment/createLabel', $urlParams);
-            $itemsGridUrl = $this->getUrl('sales/order_shipment/getShippingItemsGrid', $urlParams);
+            $createLabelUrl = $this->getUrl('adminhtml/order_shipment/createLabel', $urlParams);
+            $itemsGridUrl = $this->getUrl('adminhtml/order_shipment/getShippingItemsGrid', $urlParams);
             foreach ($this->getShipment()->getAllItems() as $item) {
                 $itemsQty[$item->getId()]           = $item->getQty();
                 $itemsPrice[$item->getId()]         = $item->getPrice();
@@ -110,8 +116,8 @@ class Packaging extends \Magento\Backend\Block\Template
             }
         } else if ($orderId) {
             $urlParams['order_id'] = $orderId;
-            $createLabelUrl = $this->getUrl('sales/order_shipment/save', $urlParams);
-            $itemsGridUrl = $this->getUrl('sales/order_shipment/getShippingItemsGrid', $urlParams);
+            $createLabelUrl = $this->getUrl('adminhtml/order_shipment/save', $urlParams);
+            $itemsGridUrl = $this->getUrl('adminhtml/order_shipment/getShippingItemsGrid', $urlParams);
 
             foreach ($this->getShipment()->getAllItems() as $item) {
                 $itemsQty[$item->getOrderItemId()]          = $item->getQty()*1;
@@ -149,8 +155,8 @@ class Packaging extends \Magento\Backend\Block\Template
         $order = $this->getShipment()->getOrder();
         $storeId = $this->getShipment()->getStoreId();
         $address = $order->getShippingAddress();
-        $carrier = $order->getShippingCarrier();
-        $countryShipper = $this->_storeConfig->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID, $storeId);
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
+        $countryShipper = $this->_storeConfig->getConfig(\Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID, $storeId);
         if ($carrier) {
             $params = new \Magento\Object(array(
                 'method' => $order->getShippingMethod(true)->getMethod(),
@@ -169,7 +175,8 @@ class Packaging extends \Magento\Backend\Block\Template
      */
     protected function _getCustomizableContainers()
     {
-        $carrier = $this->getShipment()->getOrder()->getShippingCarrier();
+        $order = $this->getShipment()->getOrder();
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
         if ($carrier) {
             return $carrier->getCustomizableContainerTypes();
         }
@@ -184,7 +191,8 @@ class Packaging extends \Magento\Backend\Block\Template
      */
     public function getContainerTypeByCode($code)
     {
-        $carrier = $this->getShipment()->getOrder()->getShippingCarrier();
+        $order = $this->getShipment()->getOrder();
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
         if ($carrier) {
             $containerTypes = $carrier->getContainerTypes();
             $containerType = !empty($containerTypes[$code]) ? $containerTypes[$code] : '';
@@ -202,7 +210,8 @@ class Packaging extends \Magento\Backend\Block\Template
     public function getDeliveryConfirmationTypeByCode($code)
     {
         $countryId = $this->getShipment()->getOrder()->getShippingAddress()->getCountryId();
-        $carrier = $this->getShipment()->getOrder()->getShippingCarrier();
+        $order = $this->getShipment()->getOrder();
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
         if ($carrier) {
             $params = new \Magento\Object(array('country_recipient' => $countryId));
             $confirmationTypes = $carrier->getDeliveryConfirmationTypes($params);
@@ -268,7 +277,7 @@ class Packaging extends \Magento\Backend\Block\Template
         $order = $this->getShipment()->getOrder();
         $address = $order->getShippingAddress();
         $shipperAddressCountryCode = $this->_storeConfig->getConfig(
-            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
             $storeId
         );
         $recipientAddressCountryCode = $address->getCountryId();
@@ -286,7 +295,8 @@ class Packaging extends \Magento\Backend\Block\Template
     public function getDeliveryConfirmationTypes()
     {
         $countryId = $this->getShipment()->getOrder()->getShippingAddress()->getCountryId();
-        $carrier = $this->getShipment()->getOrder()->getShippingCarrier();
+        $order = $this->getShipment()->getOrder();
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
         $params = new \Magento\Object(array('country_recipient' => $countryId));
         if ($carrier && is_array($carrier->getDeliveryConfirmationTypes($params))) {
             return $carrier->getDeliveryConfirmationTypes($params);
@@ -302,7 +312,7 @@ class Packaging extends \Magento\Backend\Block\Template
     public function getPrintButton()
     {
         $data['shipment_id'] = $this->getShipment()->getId();
-        $url = $this->getUrl('sales/order_shipment/printPackage', $data);
+        $url = $this->getUrl('adminhtml/order_shipment/printPackage', $data);
         return $this->getLayout()
             ->createBlock('Magento\Backend\Block\Widget\Button')
             ->setData(array(
@@ -314,16 +324,12 @@ class Packaging extends \Magento\Backend\Block\Template
 
     /**
      * Check whether girth is allowed for current carrier
-     *
-     * @return void
      */
     public function isGirthAllowed()
     {
-        return $this
-            ->getShipment()
-            ->getOrder()
-            ->getShippingCarrier()
-            ->isGirthAllowed($this->getShipment()->getOrder()->getShippingAddress()->getCountryId());
+        $order = $this->getShipment()->getOrder();
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
+        return $carrier->isGirthAllowed($this->getShipment()->getOrder()->getShippingAddress()->getCountryId());
     }
 
     /**
@@ -336,8 +342,8 @@ class Packaging extends \Magento\Backend\Block\Template
         $order = $this->getShipment()->getOrder();
         $storeId = $this->getShipment()->getStoreId();
         $address = $order->getShippingAddress();
-        $carrier = $order->getShippingCarrier();
-        $countryShipper = $this->_storeConfig->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID, $storeId);
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
+        $countryShipper = $this->_storeConfig->getConfig(\Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID, $storeId);
         if ($carrier) {
             $params = new \Magento\Object(array(
                 'method' => $order->getShippingMethod(true)->getMethod(),
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php
similarity index 88%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php
index 9ac5eed5d58fc1f8f9ad53c068f08b86dbcfa7cc..164b2308d8d0a18d9e18eed9e409053e05699a14 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Packaging/Grid.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php
@@ -18,25 +18,16 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Bundle
  * @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)
  */
 
-/**
- * Grid of packaging shipment
- *
- * @category    Magento
- * @package     Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging;
+namespace Magento\Shipping\Block\Adminhtml\Order\Packaging;
 
 class Grid extends \Magento\Backend\Block\Template
 {
 
-    protected $_template = 'order/shipment/packaging/grid.phtml';
+    protected $_template = 'order/packaging/grid.phtml';
 
     /**
      * Core registry
@@ -104,7 +95,7 @@ class Grid extends \Magento\Backend\Block\Template
         $order = $this->getShipment()->getOrder();
         $address = $order->getShippingAddress();
         $shipperAddressCountryCode = $this->_storeConfig->getConfig(
-            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
             $storeId
         );
         $recipientAddressCountryCode = $address->getCountryId();
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking.php
similarity index 89%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking.php
index 88cec6e5e786e34c9c211875dd4b353896226621..e67478fb5c55921ad5854a3ede1f4e1c04ab4f8c 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Create/Tracking.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking.php
@@ -18,8 +18,6 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Sales
  * @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)
  */
@@ -27,11 +25,8 @@
 /**
  * Shipment tracking control form
  *
- * @category   Magento
- * @package    Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\Create;
+namespace Magento\Shipping\Block\Adminhtml\Order;
 
 class Tracking extends \Magento\Backend\Block\Template
 {
@@ -76,7 +71,6 @@ class Tracking extends \Magento\Backend\Block\Template
             'class'   => '',
             'onclick' => 'trackingControl.add()'
         ));
-
     }
 
     /**
@@ -90,16 +84,14 @@ class Tracking extends \Magento\Backend\Block\Template
     }
 
     /**
-     * Retrieve
+     * Retrieve carriers
      *
-     * @return unknown
+     * @return array
      */
     public function getCarriers()
     {
         $carriers = array();
-        $carrierInstances = $this->_shippingConfig->getAllCarriers(
-            $this->getShipment()->getStoreId()
-        );
+        $carrierInstances = $this->_getCarriersInstances();
         $carriers['custom'] = __('Custom Value');
         foreach ($carrierInstances as $code => $carrier) {
             if ($carrier->isTrackingAvailable()) {
@@ -108,4 +100,11 @@ class Tracking extends \Magento\Backend\Block\Template
         }
         return $carriers;
     }
+
+    protected function _getCarriersInstances()
+    {
+        return $this->_shippingConfig->getAllCarriers(
+            $this->getShipment()->getStoreId()
+        );
+    }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Tracking/Info.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/Invoice.php
similarity index 62%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Tracking/Info.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/Invoice.php
index 8a5a9556ed8f53fd06fc82614c51217cd5855055..c35fc28fa3328c5a62949260f516eca6ba83eedd 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/Tracking/Info.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/Invoice.php
@@ -18,8 +18,6 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Sales
  * @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)
  */
@@ -27,14 +25,30 @@
 /**
  * Shipment tracking control form
  *
- * @category   Magento
- * @package    Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\Tracking;
+namespace Magento\Shipping\Block\Adminhtml\Order\Tracking;
 
-class Info extends \Magento\Backend\Block\Template
+class Invoice extends \Magento\Shipping\Block\Adminhtml\Order\Tracking
 {
+    /**
+     * Retrieve shipment model instance
+     *
+     * @return \Magento\Sales\Model\Order\Shipment
+     */
+    public function getInvoice()
+    {
+        return $this->_coreRegistry->registry('current_invoice');
+    }
 
-    protected $_template = 'order/shipment/tracking/info.phtml';
+    /**
+     * Retrieve
+     *
+     * @return unknown
+     */
+    protected function _getCarriersInstances()
+    {
+        return $this->_shippingConfig->getAllCarriers(
+            $this->getInvoice()->getStoreId()
+        );
+    }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php
similarity index 58%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php
rename to app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php
index 6d86636c13d60e1710deddd93532de96d3d5c257..35a3369d5265fc2f08e98edcfacf1b29a80f17d2 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Tracking.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/View.php
@@ -18,8 +18,6 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Sales
  * @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)
  */
@@ -27,41 +25,32 @@
 /**
  * Shipment tracking control form
  *
- * @category   Magento
- * @package    Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\View;
+namespace Magento\Shipping\Block\Adminhtml\Order\Tracking;
 
-class Tracking extends \Magento\Backend\Block\Template
+class View extends \Magento\Shipping\Block\Adminhtml\Order\Tracking
 {
     /**
-     * Core registry
-     *
-     * @var \Magento\Core\Model\Registry
-     */
-    protected $_coreRegistry = null;
-
-    /**
-     * @var \Magento\Shipping\Model\Config
+     * @var \Magento\Shipping\Model\CarrierFactory
      */
-    protected $_shippingConfig;
+    protected $_carrierFactory;
 
     /**
      * @param \Magento\Backend\Block\Template\Context $context
      * @param \Magento\Shipping\Model\Config $shippingConfig
      * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Template\Context $context,
         \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Core\Model\Registry $registry,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         array $data = array()
     ) {
-        $this->_shippingConfig = $shippingConfig;
-        $this->_coreRegistry = $registry;
-        parent::__construct($context, $data);
+        parent::__construct($context, $shippingConfig, $registry, $data);
+        $this->_carrierFactory = $carrierFactory;
     }
 
     /**
@@ -79,16 +68,6 @@ class Tracking extends \Magento\Backend\Block\Template
         ));
     }
 
-    /**
-     * Retrieve shipment model instance
-     *
-     * @return \Magento\Sales\Model\Order\Shipment
-     */
-    public function getShipment()
-    {
-        return $this->_coreRegistry->registry('current_shipment');
-    }
-
     /**
      * Retrieve save url
      *
@@ -96,7 +75,7 @@ class Tracking extends \Magento\Backend\Block\Template
      */
     public function getSubmitUrl()
     {
-        return $this->getUrl('sales/*/addTrack/', array('shipment_id'=>$this->getShipment()->getId()));
+        return $this->getUrl('adminhtml/*/addTrack/', array('shipment_id'=>$this->getShipment()->getId()));
     }
 
     /**
@@ -112,52 +91,20 @@ class Tracking extends \Magento\Backend\Block\Template
     /**
      * Retrieve remove url
      *
+     * @param $track
      * @return string
      */
     public function getRemoveUrl($track)
     {
-        return $this->getUrl('sales/*/removeTrack/', array(
-            'shipment_id' => $this->getShipment()->getId(),
-            'track_id' => $track->getId()
-        ));
-    }
-
-    /**
-     * Retrieve remove url
-     *
-     * @return string
-     */
-    public function getTrackInfoUrl($track)
-    {
-        return $this->getUrl('sales/*/viewTrack/', array(
+        return $this->getUrl('adminhtml/*/removeTrack/', array(
             'shipment_id' => $this->getShipment()->getId(),
             'track_id' => $track->getId()
         ));
     }
 
-    /**
-     * Retrieve
-     *
-     * @return unknown
-     */
-    public function getCarriers()
-    {
-        $carriers = array();
-        $carrierInstances = $this->_shippingConfig->getAllCarriers(
-            $this->getShipment()->getStoreId()
-        );
-        $carriers['custom'] = __('Custom Value');
-        foreach ($carrierInstances as $code => $carrier) {
-            if ($carrier->isTrackingAvailable()) {
-                $carriers[$code] = $carrier->getConfigData('title');
-            }
-        }
-        return $carriers;
-    }
-
     public function getCarrierTitle($code)
     {
-        $carrier = $this->_shippingConfig->getCarrierInstance($code);
+        $carrier = $this->_carrierFactory->create($code);
         if ($carrier) {
             return $carrier->getConfigData('title');
         } else {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php b/app/code/Magento/Shipping/Block/Adminhtml/View.php
similarity index 74%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php
rename to app/code/Magento/Shipping/Block/Adminhtml/View.php
index 488ec0870b7f79f72ae1011af0c2b74a02249068..3dddf344edfbdb3ec1d692f6e0692d494ff9553c 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/View.php
@@ -31,7 +31,7 @@
  * @package    Magento_Sales
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment;
+namespace Magento\Shipping\Block\Adminhtml;
 
 class View extends \Magento\Backend\Block\Widget\Form\Container
 {
@@ -58,9 +58,8 @@ class View extends \Magento\Backend\Block\Widget\Form\Container
 
     protected function _construct()
     {
-        $this->_objectId    = 'shipment_id';
-        $this->_controller  = 'adminhtml_order_shipment';
-        $this->_mode        = 'view';
+        $this->_objectId = 'shipment_id';
+        $this->_mode = 'view';
 
         parent::_construct();
 
@@ -72,18 +71,22 @@ class View extends \Magento\Backend\Block\Widget\Form\Container
 
         if ($this->_authorization->isAllowed('Magento_Sales::emails')) {
             $this->_updateButton('save', 'label', __('Send Tracking Information'));
-            $this->_updateButton('save',
-                'onclick', "deleteConfirm('"
+            $this->_updateButton(
+                'save',
+                'onclick',
+                "deleteConfirm('"
                 . __('Are you sure you want to send a Shipment email to customer?')
                 . "', '" . $this->getEmailUrl() . "')"
             );
         }
 
         if ($this->getShipment()->getId()) {
-            $this->_addButton('print', array(
-                'label'     => __('Print'),
-                'class'     => 'save',
-                'onclick'   => 'setLocation(\''.$this->getPrintUrl().'\')'
+            $this->_addButton(
+                'print',
+                array(
+                    'label' => __('Print'),
+                    'class' => 'save',
+                    'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')'
                 )
             );
         }
@@ -106,7 +109,12 @@ class View extends \Magento\Backend\Block\Widget\Form\Container
         } else {
             $emailSent = __('the shipment email is not sent');
         }
-        return __('Shipment #%1 | %3 (%2)', $this->getShipment()->getIncrementId(), $emailSent, $this->formatDate($this->getShipment()->getCreatedAtDate(), 'medium', true));
+        return __(
+            'Shipment #%1 | %3 (%2)',
+            $this->getShipment()->getIncrementId(),
+            $emailSent,
+            $this->formatDate($this->getShipment()->getCreatedAtDate(), 'medium', true)
+        );
     }
 
     public function getBackUrl()
@@ -116,26 +124,34 @@ class View extends \Magento\Backend\Block\Widget\Form\Container
             array(
                 'order_id' => $this->getShipment() ? $this->getShipment()->getOrderId() : null,
                 'active_tab' => 'order_shipments'
-        ));
+            )
+        );
     }
 
     public function getEmailUrl()
     {
-        return $this->getUrl('sales/order_shipment/email', array('shipment_id'  => $this->getShipment()->getId()));
+        return $this->getUrl('adminhtml/order_shipment/email', array('shipment_id' => $this->getShipment()->getId()));
     }
 
     public function getPrintUrl()
     {
-        return $this->getUrl('sales/*/print', array(
-            'invoice_id' => $this->getShipment()->getId()
-        ));
+        return $this->getUrl(
+            'sales/shipment/print',
+            array(
+                'shipment_id' => $this->getShipment()->getId()
+            )
+        );
     }
 
     public function updateBackButtonUrl($flag)
     {
         if ($flag) {
             if ($this->getShipment()->getBackUrl()) {
-                return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getShipment()->getBackUrl() . '\')');
+                return $this->_updateButton(
+                    'back',
+                    'onclick',
+                    'setLocation(\'' . $this->getShipment()->getBackUrl() . '\')'
+                );
             }
             return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('sales/shipment/') . '\')');
         }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Comments.php
similarity index 97%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php
rename to app/code/Magento/Shipping/Block/Adminhtml/View/Comments.php
index b317fb5dc7afb8ae2e3cab98407c6035991391d0..65bccdf34806cf4afd38ec6a07ad1e565bd4adbe 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Comments.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Comments.php
@@ -32,7 +32,7 @@
  * @package    Magento_Sales
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\View;
+namespace Magento\Shipping\Block\Adminhtml\View;
 
 class Comments extends \Magento\Backend\Block\Text\ListText
 {
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Form.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php
similarity index 75%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Form.php
rename to app/code/Magento/Shipping/Block/Adminhtml/View/Form.php
index f197732a87bc60cbcbbc0ad204918742d55b8e1d..b7a1ac3b5977a47bfcd65864ca36c857968c3a06 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Form.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Form.php
@@ -31,10 +31,33 @@
  * @package    Magento_Sales
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\View;
+namespace Magento\Shipping\Block\Adminhtml\View;
 
 class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
 {
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
+    /**
+     * @param \Magento\Backend\Block\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Sales\Helper\Admin $adminHelper
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Backend\Block\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Sales\Helper\Admin $adminHelper,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
+        array $data = array()
+    ) {
+        $this->_carrierFactory = $carrierFactory;
+        parent::__construct($context, $registry, $adminHelper, $data);
+    }
+
     /**
      * Retrieve shipment model instance
      *
@@ -73,7 +96,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
     public function getCreateLabelButton()
     {
         $data['shipment_id'] = $this->getShipment()->getId();
-        $url = $this->getUrl('sales/order_shipment/createLabel', $data);
+        $url = $this->getUrl('adminhtml/order_shipment/createLabel', $data);
         return $this->getLayout()
             ->createBlock('Magento\Backend\Block\Widget\Button')
             ->setData(array(
@@ -91,7 +114,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
     public function getPrintLabelButton()
     {
         $data['shipment_id'] = $this->getShipment()->getId();
-        $url = $this->getUrl('sales/order_shipment/printLabel', $data);
+        $url = $this->getUrl('adminhtml/order_shipment/printLabel', $data);
         return $this->getLayout()
             ->createBlock('Magento\Backend\Block\Widget\Button')
             ->setData(array(
@@ -124,7 +147,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\AbstractOrder
      */
     public function canCreateShippingLabel()
     {
-        $shippingCarrier = $this->getOrder()->getShippingCarrier();
+        $shippingCarrier = $this->_carrierFactory->create($this->getOrder()->getShippingMethod(true)->getCarrierCode());
         return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable();
     }
 }
diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Items.php b/app/code/Magento/Shipping/Block/Adminhtml/View/Items.php
similarity index 96%
rename from app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Items.php
rename to app/code/Magento/Shipping/Block/Adminhtml/View/Items.php
index 0f812c5371b773ab99b378d0b0dc984804dac2ff..38551debc2a5b7698deea2ff9052432126cfd57e 100644
--- a/app/code/Magento/Sales/Block/Adminhtml/Order/Shipment/View/Items.php
+++ b/app/code/Magento/Shipping/Block/Adminhtml/View/Items.php
@@ -32,7 +32,7 @@
  * @package    Magento_Sales
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Adminhtml\Order\Shipment\View;
+namespace Magento\Shipping\Block\Adminhtml\View;
 
 class Items extends \Magento\Sales\Block\Adminhtml\Items\AbstractItems
 {
diff --git a/app/code/Magento/Sales/Block/Order/Shipment/Items.php b/app/code/Magento/Shipping/Block/Items.php
similarity index 98%
rename from app/code/Magento/Sales/Block/Order/Shipment/Items.php
rename to app/code/Magento/Shipping/Block/Items.php
index b0a47858759ee2917ce0952043c8bd00b5b4a793..079c92af58f6568c5d52bc138195c17724c3d8f2 100644
--- a/app/code/Magento/Sales/Block/Order/Shipment/Items.php
+++ b/app/code/Magento/Shipping/Block/Items.php
@@ -31,7 +31,7 @@
  * @package    Magento_Sales
  * @author     Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Block\Order\Shipment;
+namespace Magento\Shipping\Block;
 
 class Items extends \Magento\Sales\Block\Items\AbstractItems
 {
diff --git a/app/code/Magento/Sales/Block/Order/Shipment.php b/app/code/Magento/Shipping/Block/Order/Shipment.php
similarity index 98%
rename from app/code/Magento/Sales/Block/Order/Shipment.php
rename to app/code/Magento/Shipping/Block/Order/Shipment.php
index 69b957a445c21c6e1207d93385e77c9a89216e87..ac9ae1692bd1cb82783c5e91defeed02399b472a 100644
--- a/app/code/Magento/Sales/Block/Order/Shipment.php
+++ b/app/code/Magento/Shipping/Block/Order/Shipment.php
@@ -27,7 +27,7 @@
 /**
  * Sales order view block
  */
-namespace Magento\Sales\Block\Order;
+namespace Magento\Shipping\Block\Order;
 
 class Shipment extends \Magento\View\Element\Template
 {
@@ -71,6 +71,7 @@ class Shipment extends \Magento\View\Element\Template
         $this->_coreRegistry = $registry;
         $this->_customerSession = $customerSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     protected function _prepareLayout()
diff --git a/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php b/app/code/Magento/Shipping/Block/Tracking/Link.php
similarity index 52%
rename from app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php
rename to app/code/Magento/Shipping/Block/Tracking/Link.php
index 114a2b310f5af8756cdc9417e05994705d8221d8..43849379fbf7e76674fc4dd4e9652e1a3ce0a2ad 100644
--- a/app/code/Magento/PageCache/Block/Adminhtml/Cache/Additional.php
+++ b/app/code/Magento/Shipping/Block/Tracking/Link.php
@@ -18,62 +18,64 @@
  * 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_PageCache
  * @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\Shipping\Block\Tracking;
+
 /**
- * System cache management additional block
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @author      Magento Core Team <core@magentocommerce.com>
+ * Tracking info link
  */
-namespace Magento\PageCache\Block\Adminhtml\Cache;
-
-class Additional extends \Magento\Backend\Block\Template
+class Link extends \Magento\View\Element\Html\Link
 {
     /**
-     * Page cache data
+     * Core registry
+     *
+     * @var \Magento\Core\Model\Registry
+     */
+    protected $_coreRegistry;
+
+    /**
+     * Shipping data
      *
-     * @var \Magento\PageCache\Helper\Data
+     * @var \Magento\Shipping\Helper\Data
      */
-    protected $_pageCacheData = null;
+    protected $_shippingData;
 
     /**
-     * @param \Magento\Backend\Block\Template\Context $context
-     * @param \Magento\PageCache\Helper\Data $pageCacheData
+     * @param \Magento\View\Element\Template\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Shipping\Helper\Data $shippingData
      * @param array $data
      */
     public function __construct(
-        \Magento\Backend\Block\Template\Context $context,
-        \Magento\PageCache\Helper\Data $pageCacheData,
+        \Magento\View\Element\Template\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Shipping\Helper\Data $shippingData,
         array $data = array()
     ) {
-        $this->_pageCacheData = $pageCacheData;
+        $this->_shippingData = $shippingData;
+        $this->_coreRegistry = $registry;
         parent::__construct($context, $data);
     }
 
     /**
-     * Get clean cache url
-     *
+     * @param \Magento\Sales\Model\AbstractModel $model
      * @return string
      */
-    public function getCleanExternalCacheUrl()
+    public function getWindowUrl($model)
     {
-        return $this->getUrl('adminhtml/pageCache/clean');
+        return $this->_shippingData->getTrackingPopupUrlBySalesModel($model);
     }
 
     /**
-     * Check if block can be displayed
+     * Retrieve current order model instance
      *
-     * @return bool
+     * @return \Magento\Sales\Model\Order
      */
-    public function canShowButton()
+    public function getOrder()
     {
-        return $this->_pageCacheData->isEnabled()
-            && $this->_authorization->isAllowed('Magento_PageCache::page_cache');
+        return $this->_coreRegistry->registry('current_order');
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment.php
similarity index 85%
rename from app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php
rename to app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment.php
index 051f034840df5e2e4dea29257cb9a76406706818..3ea830b4f8e44e561d809c3d5676959596cd6d18 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Shipment.php
+++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment.php
@@ -25,13 +25,13 @@
  */
 
 /**
- * Adminhtml sales order shipment controller
+ * Adminhtml order shipment controller
  *
  * @category   Magento
  * @package    Magento_Sales
  * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\Sales\Controller\Adminhtml\Order;
+namespace Magento\Shipping\Controller\Adminhtml\Order;
 
 class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShipment
 {
@@ -40,25 +40,33 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
      *
      * @var \Magento\Core\Model\Registry
      */
-    protected $_coreRegistry = null;
+    protected $_coreRegistry;
 
     /**
      * @var \Magento\App\Response\Http\FileFactory
      */
     protected $_fileFactory;
 
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
     /**
      * @param \Magento\Backend\App\Action\Context $context
      * @param \Magento\App\Response\Http\FileFactory $fileFactory
      * @param \Magento\Core\Model\Registry $coreRegistry
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      */
     public function __construct(
         \Magento\Backend\App\Action\Context $context,
         \Magento\App\Response\Http\FileFactory $fileFactory,
-        \Magento\Core\Model\Registry $coreRegistry
+        \Magento\Core\Model\Registry $coreRegistry,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory
     ) {
         $this->_coreRegistry = $coreRegistry;
         $this->_fileFactory = $fileFactory;
+        $this->_carrierFactory = $carrierFactory;
         parent::__construct($context, $fileFactory);
     }
 
@@ -79,6 +87,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
     /**
      * Initialize shipment model instance
      *
+     * @throws \Magento\Core\Exception
      * @return \Magento\Sales\Model\Order\Shipment|bool
      */
     protected function _initShipment()
@@ -91,7 +100,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         if ($shipmentId) {
             $shipment = $this->_objectManager->create('Magento\Sales\Model\Order\Shipment')->load($shipmentId);
         } elseif ($orderId) {
-            $order      = $this->_objectManager->create('Magento\Sales\Model\Order')->load($orderId);
+            $order = $this->_objectManager->create('Magento\Sales\Model\Order')->load($orderId);
 
             /**
              * Check order existing
@@ -139,7 +148,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
      * Save shipment and order in one transaction
      *
      * @param \Magento\Sales\Model\Order\Shipment $shipment
-     * @return \Magento\Sales\Controller\Adminhtml\Order\Shipment
+     * @return \Magento\Shipping\Controller\Adminhtml\Order\Shipment
      */
     protected function _saveShipment($shipment)
     {
@@ -178,7 +187,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         /**
          * Clear old values for shipment qty's
          */
-        $this->_redirect('sales/*/new', array('order_id'=>$this->getRequest()->getParam('order_id')));
+        $this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
     }
 
     /**
@@ -199,7 +208,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
             $this->_setActiveMenu('Magento_Sales::sales_order');
             $this->_view->renderLayout();
         } else {
-            $this->_redirect('sales/order/view', array('order_id' => $this->getRequest()->getParam('order_id')));
+            $this->_redirect('*/order/view', array('order_id' => $this->getRequest()->getParam('order_id')));
         }
     }
 
@@ -253,10 +262,13 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
             $shipment->sendEmail(!empty($data['send_email']), $comment);
 
             $shipmentCreatedMessage = __('The shipment has been created.');
-            $labelCreatedMessage    = __('You created the shipping label.');
+            $labelCreatedMessage = __('You created the shipping label.');
 
-            $this->messageManager->addSuccess($isNeedCreateLabel ? $shipmentCreatedMessage . ' ' . $labelCreatedMessage
-                : $shipmentCreatedMessage);
+            $this->messageManager->addSuccess(
+                $isNeedCreateLabel
+                    ? $shipmentCreatedMessage . ' ' . $labelCreatedMessage
+                    : $shipmentCreatedMessage
+            );
             $this->_objectManager->get('Magento\Backend\Model\Session')->getCommentText(true);
         } catch (\Magento\Core\Exception $e) {
             if ($isNeedCreateLabel) {
@@ -264,17 +276,16 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
                 $responseAjax->setMessage($e->getMessage());
             } else {
                 $this->messageManager->addError($e->getMessage());
-                $this->_redirect('sales/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
+                $this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
             }
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Logger')->logException($e);
             if ($isNeedCreateLabel) {
                 $responseAjax->setError(true);
-                $responseAjax->setMessage(
-                    __('An error occurred while creating shipping label.'));
+                $responseAjax->setMessage(__('An error occurred while creating shipping label.'));
             } else {
                 $this->messageManager->addError(__('Cannot save shipment.'));
-                $this->_redirect('sales/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
+                $this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
             }
 
         }
@@ -296,7 +307,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
                 $shipment->sendEmail(true)
                     ->setEmailSent(true)
                     ->save();
-                $historyItem = $this->_objectManager->create('Magento\Sales\Model\Resource\Order\Status\History\Collection')
+                $historyItem = $this->_objectManager
+                    ->create('Magento\Sales\Model\Resource\Order\Status\History\Collection')
                     ->getUnnotifiedForInstance($shipment, \Magento\Sales\Model\Order\Shipment::HISTORY_ENTITY_NAME);
                 if ($historyItem) {
                     $historyItem->setIsCustomerNotified(1);
@@ -309,9 +321,12 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         } catch (\Exception $e) {
             $this->messageManager->addError(__('Cannot send shipment information.'));
         }
-        $this->_redirect('sales/*/view', array(
-            'shipment_id' => $this->getRequest()->getParam('shipment_id')
-        ));
+        $this->_redirect(
+            '*/*/view',
+            array(
+                'shipment_id' => $this->getRequest()->getParam('shipment_id')
+            )
+        );
     }
 
     /**
@@ -321,8 +336,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
     {
         try {
             $carrier = $this->getRequest()->getPost('carrier');
-            $number  = $this->getRequest()->getPost('number');
-            $title  = $this->getRequest()->getPost('title');
+            $number = $this->getRequest()->getPost('number');
+            $title = $this->getRequest()->getPost('title');
             if (empty($carrier)) {
                 throw new \Magento\Core\Exception(__('Please specify a carrier.'));
             }
@@ -368,7 +383,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
      */
     public function removeTrackAction()
     {
-        $trackId    = $this->getRequest()->getParam('track_id');
+        $trackId = $this->getRequest()->getParam('track_id');
         $track = $this->_objectManager->create('Magento\Sales\Model\Order\Shipment\Track')->load($trackId);
         if ($track->getId()) {
             try {
@@ -401,44 +416,6 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         $this->getResponse()->setBody($response);
     }
 
-    /**
-     * View shipment tracking information
-     */
-    public function viewTrackAction()
-    {
-        $trackId    = $this->getRequest()->getParam('track_id');
-        $track = $this->_objectManager->create('Magento\Sales\Model\Order\Shipment\Track')->load($trackId);
-        if ($track->getId()) {
-            try {
-                $response = $track->getNumberDetail();
-            } catch (\Exception $e) {
-                $response = array(
-                    'error'     => true,
-                    'message'   => __('Cannot retrieve tracking number detail.'),
-                );
-            }
-        } else {
-            $response = array(
-                'error'     => true,
-                'message'   => __('Cannot load track with retrieving identifier.'),
-            );
-        }
-
-        if (is_object($response)) {
-            $block = $this->_objectManager->create('Magento\Backend\Block\Template');
-            $block->setTemplate('sales/order/shipment/tracking/info.phtml');
-            $block->setTrackingInfo($response);
-
-            $this->getResponse()->setBody($block->toHtml());
-        } else {
-            if (is_array($response)) {
-                $response = $this->_objectManager->get('Magento\Core\Helper\Data')->jsonEncode($response);
-            }
-
-            $this->getResponse()->setBody($response);
-        }
-    }
-
     /**
      * Add comment to shipment history
      */
@@ -484,6 +461,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
      * Create shipping label for specific shipment with validation.
      *
      * @param \Magento\Sales\Model\Order\Shipment $shipment
+     * @throws \Magento\Core\Exception
      * @return bool
      */
     protected function _createShippingLabel(\Magento\Sales\Model\Order\Shipment $shipment)
@@ -491,7 +469,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         if (!$shipment) {
             return false;
         }
-        $carrier = $shipment->getOrder()->getShippingCarrier();
+        $order = $shipment->getOrder();
+        $carrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
         if (!$carrier->isShippingLabelsAvailable()) {
             return false;
         }
@@ -517,13 +496,13 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         $shipment->setShippingLabel($outputPdf->render());
         $carrierCode = $carrier->getCarrierCode();
         $carrierTitle = $this->_objectManager->get('Magento\Core\Model\Store\Config')
-            ->getConfig('carriers/'.$carrierCode.'/title', $shipment->getStoreId());
+            ->getConfig('carriers/' . $carrierCode . '/title', $shipment->getStoreId());
         if ($trackingNumbers) {
             foreach ($trackingNumbers as $trackingNumber) {
                 $track = $this->_objectManager->create('Magento\Sales\Model\Order\Shipment\Track')
-                        ->setNumber($trackingNumber)
-                        ->setCarrierCode($carrierCode)
-                        ->setTitle($carrierTitle);
+                    ->setNumber($trackingNumber)
+                    ->setCarrierCode($carrierCode)
+                    ->setTitle($carrierTitle);
                 $shipment->addTrack($track);
             }
         }
@@ -532,7 +511,6 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
 
     /**
      * Create shipping label action for specific shipment
-     *
      */
     public function createLabelAction()
     {
@@ -558,7 +536,6 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
 
     /**
      * Print label for one specific shipment
-     *
      */
     public function printLabelAction()
     {
@@ -574,7 +551,10 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
                     $page = $this->_createPdfPageFromImageString($labelContent);
                     if (!$page) {
                         $this->messageManager->addError(
-                            __('We don\'t recognize or support the file extension in this shipment: %1.', $shipment->getIncrementId())
+                            __(
+                                'We don\'t recognize or support the file extension in this shipment: %1.',
+                                $shipment->getIncrementId()
+                            )
                         );
                     }
                     $pdf->pages[] = $page;
@@ -584,7 +564,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
                 return $this->_fileFactory->create(
                     'ShippingLabel(' . $shipment->getIncrementId() . ').pdf',
                     $pdfContent,
-                    \Magento\Filesystem::VAR_DIR,
+                    \Magento\App\Filesystem::VAR_DIR,
                     'application/pdf'
                 );
             }
@@ -593,27 +573,30 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Logger')->logException($e);
             $this->messageManager->addError(__('An error occurred while creating shipping label.'));
-       }
-       $this->_redirect('sales/order_shipment/view', array(
-           'shipment_id' => $this->getRequest()->getParam('shipment_id')
-       ));
+        }
+        $this->_redirect(
+            'adminhtml/order_shipment/view',
+            array(
+                'shipment_id' => $this->getRequest()->getParam('shipment_id')
+            )
+        );
     }
 
     /**
      * Create pdf document with information about packages
      *
-     * @return void
+     * @return \Magento\App\ResponseInterface
      */
     public function printPackageAction()
     {
         $shipment = $this->_initShipment();
 
         if ($shipment) {
-            $pdf = $this->_objectManager->create('Magento\Sales\Model\Order\Pdf\Shipment\Packaging')->getPdf($shipment);
+            $pdf = $this->_objectManager->create('Magento\Shipping\Model\Order\Pdf\Packaging')->getPdf($shipment);
             return $this->_fileFactory->create(
                 'packingslip' . $this->_objectManager->get('Magento\Core\Model\Date')->date('Y-m-d_H-i-s') . '.pdf',
                 $pdf->render(),
-                \Magento\Filesystem::VAR_DIR,
+                \Magento\App\Filesystem::VAR_DIR,
                 'application/pdf'
             );
         } else {
@@ -667,7 +650,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
             return $this->_fileFactory->create(
                 'ShippingLabels.pdf',
                 $outputPdf->render(),
-                \Magento\Filesystem::VAR_DIR,
+                \Magento\App\Filesystem::VAR_DIR,
                 'application/pdf'
             );
         }
@@ -677,7 +660,7 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
             $this->_redirect('sales/order/index');
         } else {
             $this->messageManager->addError(__('There are no shipping labels related to selected shipments.'));
-            $this->_redirect('sales/order_shipment/index');
+            $this->_redirect('adminhtml/order_shipment/index');
         }
     }
 
@@ -715,8 +698,8 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
     protected function _createPdfPageFromImageString($imageString)
     {
         /** @var \Magento\Filesystem\Directory\Write $directory */
-        $directory = $this->_objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::TMP);
+        $directory = $this->_objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::TMP_DIR);
         $image = imagecreatefromstring($imageString);
         if (!$image) {
             return false;
@@ -745,9 +728,9 @@ class Shipment extends \Magento\Sales\Controller\Adminhtml\Shipment\AbstractShip
         $this->_initShipment();
         return $this->getResponse()->setBody(
             $this->_view->getLayout()
-                ->createBlock('Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging\Grid')
+                ->createBlock('Magento\Shipping\Block\Adminhtml\Order\Packaging\Grid')
                 ->setIndex($this->getRequest()->getParam('index'))
                 ->toHtml()
-       );
+        );
     }
 }
diff --git a/app/code/Magento/Shipping/Controller/Tracking.php b/app/code/Magento/Shipping/Controller/Tracking.php
index de7633c02e87670b4002450d4e442ce49975513a..b12f7df47c89bf3d204940d3ed1ca2cbd7cfa3a4 100644
--- a/app/code/Magento/Shipping/Controller/Tracking.php
+++ b/app/code/Magento/Shipping/Controller/Tracking.php
@@ -18,24 +18,16 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Shipping
  * @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)
  */
-
-/**
- * Sales orders controller
- *
- * @category   Magento
- * @package    Magento_Sales
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-
 namespace Magento\Shipping\Controller;
 
 use Magento\App\Action\NotFoundException;
 
+/**
+ * Sales orders controller
+ */
 class Tracking extends \Magento\App\Action\Action
 {
     /**
@@ -58,49 +50,21 @@ class Tracking extends \Magento\App\Action\Action
     /**
      * @param \Magento\App\Action\Context $context
      * @param \Magento\Core\Model\Registry $coreRegistry
-     * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Shipping\Model\InfoFactory $shippingInfoFactory
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      */
     public function __construct(
         \Magento\App\Action\Context $context,
         \Magento\Core\Model\Registry $coreRegistry,
-        \Magento\Customer\Model\Session $customerSession,
         \Magento\Shipping\Model\InfoFactory $shippingInfoFactory,
         \Magento\Sales\Model\OrderFactory $orderFactory
     ) {
         $this->_coreRegistry = $coreRegistry;
-        $this->_customerSession = $customerSession;
         $this->_shippingInfoFactory = $shippingInfoFactory;
         $this->_orderFactory = $orderFactory;
         parent::__construct($context);
     }
 
-    /**
-     * Ajax action
-     *
-     */
-    public function ajaxAction()
-    {
-        $order = $this->_initOrder();
-        if ($order) {
-            $response = '';
-            $tracks = $order->getTracksCollection();
-
-            $block = $this->_objectManager->create('Magento\View\Element\Template');
-            $block->setType('Magento\View\Element\Template')
-                ->setTemplate('order/trackinginfo.phtml');
-
-            foreach ($tracks as $track) {
-                $trackingInfo = $track->getNumberDetail();
-                $block->setTrackingInfo($trackingInfo);
-                $response .= $block->toHtml()."\n<br />";
-            }
-
-            $this->getResponse()->setBody($response);
-        }
-    }
-
     /**
      * Popup action
      * Shows tracking info if it's present, otherwise redirects to 404
@@ -117,24 +81,4 @@ class Tracking extends \Magento\App\Action\Action
         $this->_view->loadLayout();
         $this->_view->renderLayout();
     }
-
-
-    /**
-     * Initialize order model instance
-     *
-     * @return \Magento\Sales\Model\Order || false
-     */
-    protected function _initOrder()
-    {
-        $id = $this->getRequest()->getParam('order_id');
-
-        $order = $this->_orderFactory->create()->load($id);
-        $customerId = $this->_customerSession->getCustomerId();
-
-        if (!$order->getId() || !$customerId || $order->getCustomerId() != $customerId) {
-            return false;
-        }
-        return $order;
-    }
-
 }
diff --git a/app/code/Magento/Shipping/Helper/Data.php b/app/code/Magento/Shipping/Helper/Data.php
index bb1d1de7f5c20298b5888455fe0e93971c31c585..58833fa5287507283d40c28cc1ac4c1786549bf3 100644
--- a/app/code/Magento/Shipping/Helper/Data.php
+++ b/app/code/Magento/Shipping/Helper/Data.php
@@ -124,29 +124,4 @@ class Data extends \Magento\App\Helper\AbstractHelper
         }
         return '';
     }
-
-    /**
-     * Retrieve tracking ajax url
-     *
-     * @return string
-     */
-    public function getTrackingAjaxUrl()
-    {
-        return $this->_getUrl('shipping/tracking/ajax');
-    }
-
-    /**
-     * @param string $method
-     * @param mixed $storeId
-     * @return bool
-     */
-    public function isFreeMethod($method, $storeId = null)
-    {
-        $arr = explode('_', $method, 2);
-        if (!isset($arr[1])) {
-            return false;
-        }
-        $freeMethod = $this->_coreStoreConfig->getConfig('carriers/' . $arr[0] . '/free_method', $storeId);
-        return $freeMethod == $arr[1];
-    }
 }
diff --git a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
index 1b8ee38f32d5b040176913f5995f591befe4f3d4..cc19e0b10d03dfea06b6145a16a719c6c48ee81f 100644
--- a/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
+++ b/app/code/Magento/Shipping/Model/Carrier/AbstractCarrier.php
@@ -18,16 +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_Shipping
  * @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\Shipping\Model\Carrier;
 
-abstract class AbstractCarrier extends \Magento\Object
+use Magento\Object;
+use Magento\Sales\Model\Quote\Address\AbstractCarrierInterface;
+
+abstract class AbstractCarrier extends Object implements AbstractCarrierInterface
 {
     /**
      * Carrier's code
@@ -96,24 +95,24 @@ abstract class AbstractCarrier extends \Magento\Object
     protected $_coreStoreConfig;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\ErrorFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory
      */
     protected $_rateErrorFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\ErrorFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory
      */
     protected $_logAdapterFactory;
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         array $data = array()
     ) {
@@ -157,21 +156,21 @@ abstract class AbstractCarrier extends \Magento\Object
      * Collect and get rates
      *
      * @abstract
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result|bool|null
      */
-    abstract public function collectRates(\Magento\Shipping\Model\Rate\Request $request);
+    abstract public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request);
 
     /**
      * Do request to shipment
      * Implementation must be in overridden method
      *
      * @param \Magento\Shipping\Model\Shipment\Request $request
-     * @return \Magento\Object
+     * @return Object
      */
-    public function requestToShipment(\Magento\Shipping\Model\Shipment\Request $request)
+    public function requestToShipment($request)
     {
-        return new \Magento\Object();
+        return new Object();
     }
 
     /**
@@ -179,20 +178,20 @@ abstract class AbstractCarrier extends \Magento\Object
      * Implementation must be in overridden method
      *
      * @param $request
-     * @return \Magento\Object
+     * @return Object
      */
     public function returnOfShipment($request)
     {
-        return new \Magento\Object();
+        return new Object();
     }
 
     /**
      * Return container types of carrier
      *
-     * @param \Magento\Object|null $params
+     * @param Object|null $params
      * @return array
      */
-    public function getContainerTypes(\Magento\Object $params = null)
+    public function getContainerTypes(Object $params = null)
     {
         return array();
     }
@@ -200,10 +199,10 @@ abstract class AbstractCarrier extends \Magento\Object
     /**
      * Get allowed containers of carrier
      *
-     * @param \Magento\Object|null $params
+     * @param Object|null $params
      * @return array|bool
      */
-    protected function _getAllowedContainers(\Magento\Object $params = null)
+    protected function _getAllowedContainers(Object $params = null)
     {
         $containersAll = $this->getContainerTypesAll();
         if (empty($containersAll)) {
@@ -263,19 +262,19 @@ abstract class AbstractCarrier extends \Magento\Object
     /**
      * Return delivery confirmation types of carrier
      *
-     * @param \Magento\Object|null $params
+     * @param Object|null $params
      * @return array
      */
-    public function getDeliveryConfirmationTypes(\Magento\Object $params = null)
+    public function getDeliveryConfirmationTypes(Object $params = null)
     {
         return array();
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return $this|bool|false|\Magento\Core\Model\AbstractModel
      */
-    public function checkAvailableShipCountries(\Magento\Shipping\Model\Rate\Request $request)
+    public function checkAvailableShipCountries(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $speCountriesAllow = $this->getConfigData('sallowspecific');
         /*
@@ -292,7 +291,7 @@ abstract class AbstractCarrier extends \Magento\Object
              } elseif ($showMethod && (!$availableCountries || ($availableCountries
                  && !in_array($request->getDestCountryId(), $availableCountries)))
              ){
-                   /** @var \Magento\Shipping\Model\Rate\Result\Error $error */
+                   /** @var \Magento\Sales\Model\Quote\Address\RateResult\Error $error */
                    $error = $this->_rateErrorFactory->create();
                    $error->setCarrier($this->_code);
                    $error->setCarrierTitle($this->getConfigData('title'));
@@ -313,10 +312,10 @@ abstract class AbstractCarrier extends \Magento\Object
     /**
      * Processing additional validation to check is carrier applicable.
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
-     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier|\Magento\Shipping\Model\Rate\Result\Error|boolean
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier|\Magento\Sales\Model\Quote\Address\RateResult\Error|boolean
      */
-    public function proccessAdditionalValidation(\Magento\Shipping\Model\Rate\Request $request)
+    public function proccessAdditionalValidation(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         return $this;
     }
@@ -373,7 +372,7 @@ abstract class AbstractCarrier extends \Magento\Object
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return null
      */
     protected function _updateFreeMethodQuote($request)
@@ -406,12 +405,12 @@ abstract class AbstractCarrier extends \Magento\Object
 
             $result = $this->_getQuotes();
             if ($result && ($rates = $result->getAllRates()) && count($rates)>0) {
-                if ((count($rates) == 1) && ($rates[0] instanceof \Magento\Shipping\Model\Rate\Result\Method)) {
+                if ((count($rates) == 1) && ($rates[0] instanceof \Magento\Sales\Model\Quote\Address\RateResult\Method)) {
                     $price = $rates[0]->getPrice();
                 }
                 if (count($rates) > 1) {
                     foreach ($rates as $rate) {
-                        if ($rate instanceof \Magento\Shipping\Model\Rate\Result\Method
+                        if ($rate instanceof \Magento\Sales\Model\Quote\Address\RateResult\Method
                             && $rate->getMethod() == $freeMethod
                         ) {
                             $price = $rate->getPrice();
@@ -617,10 +616,10 @@ abstract class AbstractCarrier extends \Magento\Object
     /**
      * Return content types of package
      *
-     * @param \Magento\Object $params
+     * @param Object $params
      * @return array
      */
-    public function getContentTypes(\Magento\Object $params)
+    public function getContentTypes(Object $params)
     {
         return array();
     }
diff --git a/app/code/Magento/Shipping/Model/Carrier/Flatrate.php b/app/code/Magento/Shipping/Model/Carrier/Flatrate.php
index 13443382716f2573a310f61a3dcb6ffa6364dae7..7f547ee65dfcb2e31eb69fb96e5bd399bd15c757 100644
--- a/app/code/Magento/Shipping/Model/Carrier/Flatrate.php
+++ b/app/code/Magento/Shipping/Model/Carrier/Flatrate.php
@@ -54,24 +54,24 @@ class Flatrate
     protected $_rateResultFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\MethodFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory
      */
     protected $_rateMethodFactory;
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         array $data = array()
     ) {
         $this->_rateResultFactory = $rateResultFactory;
@@ -80,10 +80,10 @@ class Flatrate
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag('active')) {
             return false;
@@ -123,7 +123,7 @@ class Flatrate
         $shippingPrice = $this->getFinalPriceWithHandlingFee($shippingPrice);
 
         if ($shippingPrice !== false) {
-            /** @var \Magento\Shipping\Model\Rate\Result\Method $method */
+            /** @var \Magento\Sales\Model\Quote\Address\RateResult\Method $method */
             $method = $this->_rateMethodFactory->create();
 
             $method->setCarrier('flatrate');
diff --git a/app/code/Magento/Shipping/Model/Carrier/Freeshipping.php b/app/code/Magento/Shipping/Model/Carrier/Freeshipping.php
index 7c922edd9357401686da6997b3a9553099dea0f3..f1efd09042d0ce1e1af05d09fa8a747b9dd56a09 100644
--- a/app/code/Magento/Shipping/Model/Carrier/Freeshipping.php
+++ b/app/code/Magento/Shipping/Model/Carrier/Freeshipping.php
@@ -55,24 +55,24 @@ class Freeshipping
     protected $_rateResultFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\MethodFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory
      */
     protected $_rateMethodFactory;
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         array $data = array()
     ) {
         $this->_rateResultFactory = $rateResultFactory;
@@ -83,10 +83,10 @@ class Freeshipping
     /**
      * FreeShipping Rates Collector
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag('active')) {
             return false;
@@ -100,7 +100,7 @@ class Freeshipping
         if (($request->getFreeShipping())
             || ($request->getBaseSubtotalInclTax() >= $this->getConfigData('free_shipping_subtotal'))
         ) {
-            /** @var \Magento\Shipping\Model\Rate\Result\Method $method */
+            /** @var \Magento\Sales\Model\Quote\Address\RateResult\Method $method */
             $method = $this->_rateMethodFactory->create();
 
             $method->setCarrier('freeshipping');
@@ -121,7 +121,7 @@ class Freeshipping
     /**
      * Allows free shipping when all product items have free shipping (promotions etc.)
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return void
      */
     protected function _updateFreeMethodQuote($request)
diff --git a/app/code/Magento/Shipping/Model/Carrier/Pickup.php b/app/code/Magento/Shipping/Model/Carrier/Pickup.php
index 3f8a9dee0b5fb580d4388efad835024eca779a7e..167b01edc50cf249835b9d37d4482b781e6397ff 100644
--- a/app/code/Magento/Shipping/Model/Carrier/Pickup.php
+++ b/app/code/Magento/Shipping/Model/Carrier/Pickup.php
@@ -48,24 +48,24 @@ class Pickup
     protected $_rateResultFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\MethodFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory
      */
     protected $_rateMethodFactory;
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         array $data = array()
     ) {
         $this->_rateResultFactory = $rateResultFactory;
@@ -74,10 +74,10 @@ class Pickup
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag('active')) {
             return false;
@@ -87,7 +87,7 @@ class Pickup
         $result = $this->_rateResultFactory->create();
 
         if (!empty($rate)) {
-            /** @var \Magento\Shipping\Model\Rate\Result\Method $method */
+            /** @var \Magento\Sales\Model\Quote\Address\RateResult\Method $method */
             $method = $this->_rateMethodFactory->create();
 
             $method->setCarrier('pickup');
diff --git a/app/code/Magento/Shipping/Model/Carrier/Tablerate.php b/app/code/Magento/Shipping/Model/Carrier/Tablerate.php
index f9661d0499909f2c0bbad88dccaf3b8254a23063..c9f9463d034866157fbc70c8ee3fead3e50712c4 100644
--- a/app/code/Magento/Shipping/Model/Carrier/Tablerate.php
+++ b/app/code/Magento/Shipping/Model/Carrier/Tablerate.php
@@ -58,7 +58,7 @@ class Tablerate
     protected $_rateResultFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\MethodFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory
      */
     protected $_resultMethodFactory;
 
@@ -70,18 +70,18 @@ class Tablerate
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $resultMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $resultMethodFactory
      * @param \Magento\Shipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $resultMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $resultMethodFactory,
         \Magento\Shipping\Model\Resource\Carrier\TablerateFactory $tablerateFactory,
         array $data = array()
     ) {
@@ -95,10 +95,10 @@ class Tablerate
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag('active')) {
             return false;
@@ -168,7 +168,7 @@ class Tablerate
         $request->setPackageQty($oldQty);
 
         if (!empty($rate) && $rate['price'] >= 0) {
-            /** @var \Magento\Shipping\Model\Rate\Result\Method $method */
+            /** @var \Magento\Sales\Model\Quote\Address\RateResult\Method $method */
             $method = $this->_resultMethodFactory->create();
 
             $method->setCarrier('tablerate');
@@ -188,7 +188,7 @@ class Tablerate
 
             $result->append($method);
         } else {
-            /** @var \Magento\Shipping\Model\Rate\Result\Error $error */
+            /** @var \Magento\Sales\Model\Quote\Address\RateResult\Error $error */
             $error = $this->_rateErrorFactory->create(array('data' => array(
                 'carrier'       => $this->_code,
                 'carrier_title' => $this->getConfigData('title'),
@@ -201,10 +201,10 @@ class Tablerate
     }
 
     /**
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return array|bool
      */
-    public function getRate(\Magento\Shipping\Model\Rate\Request $request)
+    public function getRate(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         return $this->_tablerateFactory->create()->getRate($request);
     }
diff --git a/app/code/Magento/Shipping/Model/Carrier/Factory.php b/app/code/Magento/Shipping/Model/CarrierFactory.php
similarity index 57%
rename from app/code/Magento/Shipping/Model/Carrier/Factory.php
rename to app/code/Magento/Shipping/Model/CarrierFactory.php
index 8a9dc52cfe94607f18c7f32648744e4b4db64324..255594d4e501dcd109de9031c75dfe81a0f466bb 100644
--- a/app/code/Magento/Shipping/Model/Carrier/Factory.php
+++ b/app/code/Magento/Shipping/Model/CarrierFactory.php
@@ -18,15 +18,14 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Shipping
  * @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\Shipping\Model;
 
-namespace Magento\Shipping\Model\Carrier;
+use Magento\Sales\Model\Quote\Address\CarrierFactoryInterface;
 
-class Factory
+class CarrierFactory implements CarrierFactoryInterface
 {
     /**
      * Core store config
@@ -35,11 +34,6 @@ class Factory
      */
     protected $_coreStoreConfig;
 
-    /**
-     * @var \Magento\Logger
-     */
-    protected $_logger;
-
     /**
      * @var \Magento\ObjectManager
      */
@@ -47,46 +41,78 @@ class Factory
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Logger $logger
      * @param \Magento\ObjectManager $objectManager
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Logger $logger,
         \Magento\ObjectManager $objectManager
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
-        $this->_logger = $logger;
         $this->_objectManager = $objectManager;
     }
 
     /**
+     * Get carrier instance
+     *
      * @param string $carrierCode
-     * @param int|null $storeId
-     * @return bool|\Magento\Shipping\Model\Carrier\AbstractCarrier
+     * @return bool|Carrier\AbstractCarrier
      */
-    public function create($carrierCode, $storeId = null)
+    public function get($carrierCode)
     {
-        $className = $this->_coreStoreConfig->getConfig('carriers/' . $carrierCode . '/model', $storeId);
+        $className = $this->_coreStoreConfig->getConfig('carriers/' . $carrierCode . '/model');
         if (!$className) {
             return false;
         }
+        $carrier = $this->_objectManager->get($className);
+        $carrier->setId($carrierCode);
+        return $carrier;
+    }
 
-        /**
-         * Added protection from not existing models usage.
-         * Related with module uninstall process
-         */
-        try {
-            $carrier = $this->_objectManager->create($className);
-        } catch (\Exception $e) {
-            $this->_logger->logException($e);
+    /**
+     * Create carrier instance
+     *
+     * @param string $carrierCode
+     * @param int|null $storeId
+     * @return bool|Carrier\AbstractCarrier
+     */
+    public function create($carrierCode, $storeId = null)
+    {
+        $className = $this->_coreStoreConfig->getConfig('carriers/' . $carrierCode . '/model', $storeId);
+        if (!$className) {
             return false;
         }
-
+        $carrier = $this->_objectManager->create($className);
         $carrier->setId($carrierCode);
         if ($storeId) {
             $carrier->setStore($storeId);
         }
         return $carrier;
     }
+
+    /**
+     * Get carrier by its code if it is active
+     *
+     * @param string $carrierCode
+     * @return bool|Carrier\AbstractCarrier
+     */
+    public function getIfActive($carrierCode)
+    {
+        return $this->_coreStoreConfig->getConfigFlag('carriers/' . $carrierCode . '/active')
+            ? $this->get($carrierCode)
+            : false;
+    }
+
+    /**
+     * Create carrier by its code if it is active
+     *
+     * @param $carrierCode
+     * @param null|int $storeId
+     * @return bool|Carrier\AbstractCarrier
+     */
+    public function createIfActive($carrierCode, $storeId = null)
+    {
+        return $this->_coreStoreConfig->getConfigFlag('carriers/' . $carrierCode . '/active')
+            ? $this->create($carrierCode, $storeId)
+            : false;
+    }
 }
diff --git a/app/code/Magento/Shipping/Model/Config.php b/app/code/Magento/Shipping/Model/Config.php
index 9023a6988bf1d96d6c996b0204b2118df845b011..007b7339e6be83d229969d5aaebfa89f4afebb83 100644
--- a/app/code/Magento/Shipping/Model/Config.php
+++ b/app/code/Magento/Shipping/Model/Config.php
@@ -37,8 +37,6 @@ class Config extends \Magento\Object
     const XML_PATH_ORIGIN_CITY       = 'shipping/origin/city';
     const XML_PATH_ORIGIN_POSTCODE   = 'shipping/origin/postcode';
 
-    protected static $_carriers;
-
     /**
      * Core store config
      *
@@ -47,7 +45,7 @@ class Config extends \Magento\Object
     protected $_coreStoreConfig;
 
     /**
-     * @var \Magento\Shipping\Model\Carrier\Factory
+     * @var \Magento\Shipping\Model\CarrierFactory
      */
     protected $_carrierFactory;
 
@@ -55,12 +53,12 @@ class Config extends \Magento\Object
      * Constructor
      *
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Carrier\Factory $carrierFactory
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Carrier\Factory $carrierFactory,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         array $data = array()
     ) {
         $this->_coreStoreConfig = $coreStoreConfig;
@@ -80,7 +78,7 @@ class Config extends \Magento\Object
         $config = $this->_coreStoreConfig->getConfig('carriers', $store);
         foreach (array_keys($config) as $carrierCode) {
             if ($this->_coreStoreConfig->getConfigFlag('carriers/' . $carrierCode . '/active', $store)) {
-                $carrierModel = $this->_getCarrier($carrierCode, $store);
+                $carrierModel = $this->_carrierFactory->create($carrierCode, $store);
                 if ($carrierModel) {
                     $carriers[$carrierCode] = $carrierModel;
                 }
@@ -100,37 +98,11 @@ class Config extends \Magento\Object
         $carriers = array();
         $config = $this->_coreStoreConfig->getConfig('carriers', $store);
         foreach (array_keys($config) as $carrierCode) {
-            $model = $this->_getCarrier($carrierCode, $store);
+            $model = $this->_carrierFactory->create($carrierCode, $store);
             if ($model) {
                 $carriers[$carrierCode] = $model;
             }
         }
         return $carriers;
     }
-
-    /**
-     * Retrieve carrier model instance by carrier code
-     *
-     * @param   string $carrierCode
-     * @param   mixed $store
-     * @return  \Magento\Usa\Model\Shipping\Carrier\AbstractCarrier
-     */
-    public function getCarrierInstance($carrierCode, $store = null)
-    {
-        return $this->_getCarrier($carrierCode, $store);
-    }
-
-    /**
-     * Get carrier model object
-     *
-     * @param $carrierCode
-     * @param mixed $store
-     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier
-     */
-    protected function _getCarrier($carrierCode, $store = null)
-    {
-        $carrier = $this->_carrierFactory->create($carrierCode, $store);
-        self::$_carriers[$carrierCode] = $carrier;
-        return self::$_carriers[$carrierCode];
-    }
 }
diff --git a/app/code/Magento/Shipping/Model/Info.php b/app/code/Magento/Shipping/Model/Info.php
index f54f13b62aa268fb1c00113be0ec5ddbc079b84f..4ddf213fc7744f21c554f1189445175b2d96a9b4 100644
--- a/app/code/Magento/Shipping/Model/Info.php
+++ b/app/code/Magento/Shipping/Model/Info.php
@@ -54,28 +54,36 @@ class Info extends \Magento\Object
     protected $_shipmentFactory;
 
     /**
-     * @var \Magento\Sales\Model\Order\Shipment\TrackFactory
+     * @var \Magento\Shipping\Model\Order\TrackFactory
      */
     protected $_trackFactory;
 
+    /**
+     * @var \Magento\Sales\Model\Resource\Order\Shipment\Track\CollectionFactory
+     */
+    protected $_trackCollectionFactory;
+
     /**
      * @param \Magento\Shipping\Helper\Data $shippingData
      * @param \Magento\Sales\Model\OrderFactory $orderFactory
      * @param \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory
-     * @param \Magento\Sales\Model\Order\Shipment\TrackFactory $trackFactory
+     * @param \Magento\Shipping\Model\Order\TrackFactory $trackFactory
+     * @param \Magento\Shipping\Model\Resource\Order\Track\CollectionFactory $trackCollectionFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Shipping\Helper\Data $shippingData,
         \Magento\Sales\Model\OrderFactory $orderFactory,
         \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory,
-        \Magento\Sales\Model\Order\Shipment\TrackFactory $trackFactory,
+        \Magento\Shipping\Model\Order\TrackFactory $trackFactory,
+        \Magento\Shipping\Model\Resource\Order\Track\CollectionFactory $trackCollectionFactory,
         array $data = array()
     ) {
         $this->_shippingData = $shippingData;
         $this->_orderFactory = $orderFactory;
         $this->_shipmentFactory = $shipmentFactory;
         $this->_trackFactory = $trackFactory;
+        $this->_trackCollectionFactory = $trackCollectionFactory;
         parent::__construct($data);
     }
 
@@ -162,7 +170,7 @@ class Info extends \Magento\Object
             $shipments = $order->getShipmentsCollection();
             foreach ($shipments as $shipment){
                 $increment_id = $shipment->getIncrementId();
-                $tracks = $shipment->getTracksCollection();
+                $tracks = $this->_getTracksCollection($shipment);
 
                 $trackingInfos=array();
                 foreach ($tracks as $track){
@@ -186,7 +194,7 @@ class Info extends \Magento\Object
         $shipment = $this->_initShipment();
         if ($shipment) {
             $increment_id = $shipment->getIncrementId();
-            $tracks = $shipment->getTracksCollection();
+            $tracks = $this->_getTracksCollection($shipment);
 
             $trackingInfos=array();
             foreach ($tracks as $track){
@@ -206,11 +214,27 @@ class Info extends \Magento\Object
      */
     public function getTrackingInfoByTrackId()
     {
-        /** @var \Magento\Sales\Model\Order\Shipment\Track $track */
+        /** @var \Magento\Shipping\Model\Order\Track $track */
         $track = $this->_trackFactory->create()->load($this->getTrackId());
         if ($track->getId() && $this->getProtectCode() == $track->getProtectCode()) {
             $this->_trackingInfo = array(array($track->getNumberDetail()));
         }
         return $this->_trackingInfo;
     }
+
+    /**
+     * @param $shipment \Magento\Sales\Model\Order\Shipment
+     * @return \Magento\Shipping\Model\Resource\Order\Track\Collection
+     */
+    protected function _getTracksCollection(\Magento\Sales\Model\Order\Shipment $shipment)
+    {
+        $tracks = $this->_trackCollectionFactory->create()->setShipmentFilter($shipment->getId());
+
+        if ($shipment->getId()) {
+            foreach ($tracks as $track) {
+                $track->setShipment($shipment);
+            }
+        }
+        return $tracks;
+    }
 }
diff --git a/app/code/Magento/Shipping/Model/Observer.php b/app/code/Magento/Shipping/Model/Observer.php
new file mode 100644
index 0000000000000000000000000000000000000000..2e17e7a0c9446b5ff2f17250dd0b290ce5860e2e
--- /dev/null
+++ b/app/code/Magento/Shipping/Model/Observer.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\Shipping\Model;
+
+class Observer
+{
+    /**
+     * @var \Magento\Core\Model\LocaleInterface
+     */
+    protected $_coreLocale;
+
+    /**
+     * @var \Magento\Sales\Model\Resource\Report\ShippingFactory
+     */
+    protected $_shippingFactory;
+
+    public function __construct(
+        \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Sales\Model\Resource\Report\ShippingFactory $shippingFactory
+    ) {
+        $this->_coreLocale = $coreLocale;
+        $this->_shippingFactory = $shippingFactory;
+    }
+
+    /**
+     * Refresh sales shipment report statistics for last day
+     *
+     * @return $this
+     */
+    public function aggregateSalesReportShipmentData()
+    {
+        $this->_coreLocale->emulate(0);
+        $currentDate = $this->_coreLocale->date();
+        $date = $currentDate->subHour(25);
+        $this->_shippingFactory->create()->aggregate($date);
+        $this->_coreLocale->revert();
+        return $this;
+    }
+}
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php
similarity index 90%
rename from app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php
rename to app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php
index a46e877bc2c5eaafd44a162f9a13d8b4463ef9f8..15ccc014ca0fcba9edf617ef4af8d5b826bf3c1a 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment/Packaging.php
+++ b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php
@@ -18,16 +18,11 @@
  * versions in the future. If you wish to customize Magento for your
  * needs please refer to http://www.magentocommerce.com for more information.
  *
- * @category    Magento
- * @package     Magento_Sales
  * @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)
  */
 
-/**
- * Sales Order Shipment PDF model
- */
-namespace Magento\Sales\Model\Order\Pdf\Shipment;
+namespace Magento\Shipping\Model\Order\Pdf;
 
 class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
 {
@@ -53,8 +48,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig
      * @param \Magento\Core\Model\Translate $translate
-     * @param \Magento\Filesystem $filesystem
-     * @param \Magento\Shipping\Model\Config $shippingConfig
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Sales\Model\Order\Pdf\Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -71,8 +65,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         \Magento\Stdlib\String $string,
         \Magento\Core\Model\Store\ConfigInterface $coreStoreConfig,
         \Magento\Core\Model\Translate $translate,
-        \Magento\Filesystem $filesystem,
-        \Magento\Shipping\Model\Config $shippingConfig,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Sales\Model\Order\Pdf\Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
@@ -92,7 +85,6 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
             $coreStoreConfig,
             $translate,
             $filesystem,
-            $shippingConfig,
             $pdfConfig,
             $pdfTotalFactory,
             $pdfItemsFactory,
@@ -139,9 +131,10 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * Draw header block
      *
      * @param  \Zend_Pdf_Page $page
-     * @return \Magento\Sales\Model\Order\Pdf\Shipment\Packaging
+     * @return \Magento\Shipping\Model\Order\Pdf\Packaging
      */
-    protected function _drawHeaderBlock(\Zend_Pdf_Page $page) {
+    protected function _drawHeaderBlock(\Zend_Pdf_Page $page)
+    {
         $page->setFillColor(new \Zend_Pdf_Color_GrayScale(0.5));
         $page->setLineColor(new \Zend_Pdf_Color_GrayScale(0.5));
         $page->setLineWidth(0.5);
@@ -157,14 +150,14 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * Draw packages block
      *
      * @param  \Zend_Pdf_Page $page
-     * @return \Magento\Sales\Model\Order\Pdf\Shipment\Packaging
+     * @return \Magento\Shipping\Model\Order\Pdf\Packaging
      */
     protected function _drawPackageBlock(\Zend_Pdf_Page $page)
     {
         if ($this->getPackageShippingBlock()) {
             $packaging = $this->getPackageShippingBlock();
         } else {
-            $packaging = $this->_layout->getBlockSingleton('Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging');
+            $packaging = $this->_layout->getBlockSingleton('Magento\Shipping\Block\Adminhtml\Order\Packaging');
         }
         $packages = $packaging->getPackages();
 
@@ -180,7 +173,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
 
             $page->setFillColor(new \Zend_Pdf_Color_GrayScale(0));
             $packageText = __('Package') . ' ' . $packageNum;
-            $page->drawText($packageText, 525, $this->y , 'UTF-8');
+            $page->drawText($packageText, 525, $this->y, 'UTF-8');
             $packageNum++;
 
             $package = new \Magento\Object($package);
@@ -189,7 +182,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
 
             $typeText = __('Type') . ' : '
                 . $packaging->getContainerTypeByCode($params->getContainer());
-            $page->drawText($typeText, 35, $this->y , 'UTF-8');
+            $page->drawText($typeText, 35, $this->y, 'UTF-8');
 
             if ($params->getLength() != null) {
                 $lengthText = $params->getLength() .' '. $dimensionUnits;
@@ -197,13 +190,13 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
                 $lengthText = '--';
             }
             $lengthText = __('Length') . ' : ' . $lengthText;
-            $page->drawText($lengthText, 200, $this->y , 'UTF-8');
+            $page->drawText($lengthText, 200, $this->y, 'UTF-8');
 
             if ($params->getDeliveryConfirmation() != null) {
                 $confirmationText = __('Signature Confirmation')
                     . ' : '
                     . $packaging->getDeliveryConfirmationTypeByCode($params->getDeliveryConfirmation());
-                $page->drawText($confirmationText, 355, $this->y , 'UTF-8');
+                $page->drawText($confirmationText, 355, $this->y, 'UTF-8');
             }
 
             $this->y = $this->y - 10;
@@ -212,7 +205,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
                 $customsValueText = __('Customs Value')
                     . ' : '
                     . $packaging->displayPrice($params->getCustomsValue());
-                $page->drawText($customsValueText, 35, $this->y , 'UTF-8');
+                $page->drawText($customsValueText, 35, $this->y, 'UTF-8');
             }
             if ($params->getWidth() != null) {
                 $widthText = $params->getWidth() .' '. $dimensionUnits;
@@ -220,7 +213,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
                 $widthText = '--';
             }
             $widthText = __('Width') . ' : ' . $widthText;
-            $page->drawText($widthText, 200, $this->y , 'UTF-8');
+            $page->drawText($widthText, 200, $this->y, 'UTF-8');
 
             if ($params->getContentType() != null) {
                 if ($params->getContentType() == 'OTHER') {
@@ -229,14 +222,14 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
                     $contentsValue = $packaging->getContentTypeByCode($params->getContentType());
                 }
                 $contentsText = __('Contents') . ' : ' . $contentsValue;
-                $page->drawText($contentsText, 355, $this->y , 'UTF-8');
+                $page->drawText($contentsText, 355, $this->y, 'UTF-8');
             }
 
             $this->y = $this->y - 10;
 
             $weightText = __('Total Weight') . ' : ' . $params->getWeight() .' '
                 . $this->_usaData->getMeasureWeightName($params->getWeightUnits());
-            $page->drawText($weightText, 35, $this->y , 'UTF-8');
+            $page->drawText($weightText, 35, $this->y, 'UTF-8');
 
             if ($params->getHeight() != null) {
                 $heightText = $params->getHeight() .' '. $dimensionUnits;
@@ -244,19 +237,19 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
                 $heightText = '--';
             }
             $heightText = __('Height') . ' : ' . $heightText;
-            $page->drawText($heightText, 200, $this->y , 'UTF-8');
+            $page->drawText($heightText, 200, $this->y, 'UTF-8');
 
             $this->y = $this->y - 10;
 
             if ($params->getSize()) {
                 $sizeText = __('Size') . ' : ' . ucfirst(strtolower($params->getSize()));
-                $page->drawText($sizeText, 35, $this->y , 'UTF-8');
+                $page->drawText($sizeText, 35, $this->y, 'UTF-8');
             }
             if ($params->getGirth() != null) {
                 $dimensionGirthUnits = $this->_usaData->getMeasureDimensionName($params->getGirthDimensionUnits());
                 $girthText = __('Girth')
                              . ' : ' . $params->getGirth() . ' ' . $dimensionGirthUnits;
-                $page->drawText($girthText, 200, $this->y , 'UTF-8');
+                $page->drawText($girthText, 200, $this->y, 'UTF-8');
             }
 
             $this->y = $this->y - 5;
diff --git a/app/code/Magento/Shipping/Model/Order/Track.php b/app/code/Magento/Shipping/Model/Order/Track.php
new file mode 100644
index 0000000000000000000000000000000000000000..414d8020286b32062ee04276e977ada4e05fd6e9
--- /dev/null
+++ b/app/code/Magento/Shipping/Model/Order/Track.php
@@ -0,0 +1,121 @@
+<?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)
+ */
+
+/**
+ * @method \Magento\Sales\Model\Resource\Order\Shipment\Track _getResource()
+ * @method \Magento\Sales\Model\Resource\Order\Shipment\Track getResource()
+ * @method int getParentId()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setParentId(int $value)
+ * @method float getWeight()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setWeight(float $value)
+ * @method float getQty()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setQty(float $value)
+ * @method int getOrderId()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setOrderId(int $value)
+ * @method string getDescription()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setDescription(string $value)
+ * @method string getTitle()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setTitle(string $value)
+ * @method string getCarrierCode()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setCarrierCode(string $value)
+ * @method string getCreatedAt()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setCreatedAt(string $value)
+ * @method string getUpdatedAt()
+ * @method \Magento\Sales\Model\Order\Shipment\Track setUpdatedAt(string $value)
+ *
+ */
+namespace Magento\Shipping\Model\Order;
+
+class Track extends \Magento\Sales\Model\Order\Shipment\Track
+{
+    /**
+     * @var \Magento\Shipping\Model\CarrierFactory
+     */
+    protected $_carrierFactory;
+
+    /**
+     * @param \Magento\Core\Model\Context $context
+     * @param \Magento\Core\Model\Registry $registry
+     * @param \Magento\Core\Model\LocaleInterface $coreLocale
+     * @param \Magento\Stdlib\DateTime $dateTime
+     * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
+     * @param \Magento\Core\Model\Resource\AbstractResource $resource
+     * @param \Magento\Data\Collection\Db $resourceCollection
+     * @param array $data
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function __construct(
+        \Magento\Core\Model\Context $context,
+        \Magento\Core\Model\Registry $registry,
+        \Magento\Core\Model\LocaleInterface $coreLocale,
+        \Magento\Stdlib\DateTime $dateTime,
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Sales\Model\Order\ShipmentFactory $shipmentFactory,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
+        \Magento\Core\Model\Resource\AbstractResource $resource = null,
+        \Magento\Data\Collection\Db $resourceCollection = null,
+        array $data = array()
+    ) {
+        parent::__construct(
+            $context,
+            $registry,
+            $coreLocale,
+            $dateTime,
+            $storeManager,
+            $shipmentFactory,
+            $resource,
+            $resourceCollection,
+            $data
+        );
+        $this->_carrierFactory = $carrierFactory;
+    }
+
+    /**
+     * Retrieve detail for shipment track
+     *
+     * @return string
+     */
+    public function getNumberDetail()
+    {
+        $carrierInstance = $this->_carrierFactory->create($this->getCarrierCode());
+        if (!$carrierInstance) {
+            $custom = array();
+            $custom['title'] = $this->getTitle();
+            $custom['number'] = $this->getTrackNumber();
+            return $custom;
+        } else {
+            $carrierInstance->setStore($this->getStore());
+        }
+
+        $trackingInfo = $carrierInstance->getTrackingInfo($this->getNumber());
+        if (!$trackingInfo) {
+            return __('No detail for number "%1"', $this->getNumber());
+        }
+
+        return $trackingInfo;
+    }
+}
diff --git a/app/code/Magento/Shipping/Model/Rate/AbstractRate.php b/app/code/Magento/Shipping/Model/Rate/AbstractRate.php
deleted file mode 100644
index 585175ff8ca8f212750d081f341ba4472b373f4d..0000000000000000000000000000000000000000
--- a/app/code/Magento/Shipping/Model/Rate/AbstractRate.php
+++ /dev/null
@@ -1,70 +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_Shipping
- * @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\Shipping\Model\Rate;
-
-abstract class AbstractRate extends \Magento\Core\Model\AbstractModel
-{
-    /**
-     * @var array
-     */
-    static protected $_instances;
-
-    /**
-     * @var \Magento\Shipping\Model\Config
-     */
-    protected $_shippingConfig;
-
-    /**
-     * @param \Magento\Core\Model\Context $context
-     * @param \Magento\Core\Model\Registry $registry
-     * @param \Magento\Shipping\Model\Config $shippingConfig
-     * @param \Magento\Core\Model\Resource\AbstractResource $resource
-     * @param \Magento\Data\Collection\Db $resourceCollection
-     * @param array $data
-     */
-    public function __construct(
-        \Magento\Core\Model\Context $context,
-        \Magento\Core\Model\Registry $registry,
-        \Magento\Shipping\Model\Config $shippingConfig,
-        \Magento\Core\Model\Resource\AbstractResource $resource = null,
-        \Magento\Data\Collection\Db $resourceCollection = null,
-        array $data = array()
-    ) {
-        $this->_shippingConfig = $shippingConfig;
-        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
-    }
-
-    public function getCarrierInstance()
-    {
-        $code = $this->getCarrier();
-        if (!isset(self::$_instances[$code])) {
-            self::$_instances[$code] = $this->_shippingConfig->getCarrierInstance($code);
-        }
-        return self::$_instances[$code];
-    }
-}
diff --git a/app/code/Magento/Shipping/Model/Rate/Request.php b/app/code/Magento/Shipping/Model/Rate/Request.php
deleted file mode 100644
index 8f74ba43c7f6a7db164767e3bc22a074bd29bf7c..0000000000000000000000000000000000000000
--- a/app/code/Magento/Shipping/Model/Rate/Request.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_Shipping
- * @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)
- */
-
-/**
- * Fields:
- * - orig:
- *   - country_id: UK
- *   - region_id: 1
- *   - postcode: 90034
- * - dest:
- *   - country_id: UK
- *   - region_id: 2
- *   - postcode: 01005
- * - package:
- *   - value: $100
- *   - weight: 1.5 lb
- *   - height: 10"
- *   - width: 10"
- *   - depth: 10"
- * - order:
- *   - total_qty: 10
- *   - subtotal: $100
- * - option
- *   - insurance: true
- *   - handling: $1
- * - table (shiptable)
- *   - condition_name: package_weight
- * - limit
- *   - carrier: ups
- *   - method: 3dp
- * - ups
- *   - pickup: CC
- *   - container: CP
- *   - address: RES
- *
- * @method int getStoreId()
- * @method \Magento\Shipping\Model\Rate\Request setStoreId(int $value)
- * @method int getWebsiteId()
- * @method \Magento\Shipping\Model\Rate\Request setWebsiteId(int $value)
- * @method string getBaseCurrency()
- * @method \Magento\Shipping\Model\Rate\Request setBaseCurrency(string $value)
- *
- * @method \Magento\Shipping\Model\Rate\Request setAllItems(array $items)
- * @method array getAllItems()
- *
- * @method \Magento\Shipping\Model\Rate\Request setOrigCountryId(string $value)
- * @method string getOrigCountryId()
- * @method \Magento\Shipping\Model\Rate\Request setOrigRegionId(int $value)
- * @method int getOrigRegionId()
- * @method \Magento\Shipping\Model\Rate\Request setOrigPostcode(string $value)
- * @method string getOrigPostcode()
- * @method \Magento\Shipping\Model\Rate\Request setOrigCity(string $value)
- * @method string getOrigCity()
- *
- * @method \Magento\Shipping\Model\Rate\Request setDestCountryId(string $value)
- * @method string getDestCountryId()
- * @method \Magento\Shipping\Model\Rate\Request setDestRegionId(int $value)
- * @method int getDestRegionId()
- * @method \Magento\Shipping\Model\Rate\Request setDestRegionCode(string $value)
- * @method string getDestRegionCode()
- * @method \Magento\Shipping\Model\Rate\Request setDestPostcode(string $value)
- * @method string getDestPostcode()
- * @method \Magento\Shipping\Model\Rate\Request setDestCity(string $value)
- * @method string getDestCity()
- * @method \Magento\Shipping\Model\Rate\Request setDestStreet(string $value)
- * @method string getDestStreet()
- *
- * @method \Magento\Shipping\Model\Rate\Request setPackageValue(float $value)
- * @method float getPackageValue()
- * @method \Magento\Shipping\Model\Rate\Request setPackageValueWithDiscount(float $value)
- * @method float getPackageValueWithDiscount()
- * @method \Magento\Shipping\Model\Rate\Request setPackagePhysicalValue(float $value)
- * @method float getPackagePhysicalValue()
- * @method \Magento\Shipping\Model\Rate\Request setPackageQty(float $value)
- * @method float getPackageQty()
- * @method \Magento\Shipping\Model\Rate\Request setPackageWeight(float $value)
- * @method float getPackageWeight()
- * @method \Magento\Shipping\Model\Rate\Request setPackageHeight(int $value)
- * @method int getPackageHeight()
- * @method \Magento\Shipping\Model\Rate\Request setPackageWidth(int $value)
- * @method int getPackageWidth()
- * @method \Magento\Shipping\Model\Rate\Request setPackageDepth(int $value)
- * @method int getPackageDepth()
- * @method \Magento\Shipping\Model\Rate\Request setPackageCurrency(string $value)
- * @method string getPackageCurrency()
- *
- * @method \Magento\Shipping\Model\Rate\Request setOrderTotalQty(float $value)
- * @method float getOrderTotalQty()
- * @method \Magento\Shipping\Model\Rate\Request setOrderSubtotal(float $value)
- * @method float getOrderSubtotal()
- *
- * @method boolean getFreeShipping()
- * @method \Magento\Shipping\Model\Rate\Request setFreeShipping(boolean $flag)
- * @method float getFreeMethodWeight()
- * @method \Magento\Shipping\Model\Rate\Request setFreeMethodWeight(float $value)
- *
- * @method \Magento\Shipping\Model\Rate\Request setOptionInsurance(boolean $value)
- * @method boolean getOptionInsurance()
- * @method \Magento\Shipping\Model\Rate\Request setOptionHandling(float $flag)
- * @method float getOptionHandling()
- *
- * @method \Magento\Shipping\Model\Rate\Request setConditionName(array $value)
- * @method \Magento\Shipping\Model\Rate\Request setConditionName(string $value)
- * @method string getConditionName()
- * @method array getConditionName()
- *
- * @method \Magento\Shipping\Model\Rate\Request setLimitCarrier(string $value)
- * @method string getLimitCarrier()
- * @method \Magento\Shipping\Model\Rate\Request setLimitMethod(string $value)
- * @method string getLimitMethod()
- *
- * @category    Magento
- * @package     Magento_Shipping
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-namespace Magento\Shipping\Model\Rate;
-
-class Request extends \Magento\Object
-{}
diff --git a/app/code/Magento/Shipping/Model/Rate/Result.php b/app/code/Magento/Shipping/Model/Rate/Result.php
index 12d8eabb7603c8a6007d3b4f8af6c7df7297537a..cb38af05f699c25e68ba9a8afcfed062b0df13c3 100644
--- a/app/code/Magento/Shipping/Model/Rate/Result.php
+++ b/app/code/Magento/Shipping/Model/Rate/Result.php
@@ -92,15 +92,15 @@ class Result
     /**
      * Add a rate to the result
      *
-     * @param \Magento\Shipping\Model\Rate\Result\AbstractResult|\Magento\Shipping\Model\Rate\Result $result
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\AbstractResult|\Magento\Shipping\Model\Rate\Result $result
      * @return \Magento\Shipping\Model\Rate\Result
      */
     public function append($result)
     {
-        if ($result instanceof \Magento\Shipping\Model\Rate\Result\Error) {
+        if ($result instanceof \Magento\Sales\Model\Quote\Address\RateResult\Error) {
             $this->setError(true);
         }
-        if ($result instanceof \Magento\Shipping\Model\Rate\Result\AbstractResult) {
+        if ($result instanceof \Magento\Sales\Model\Quote\Address\RateResult\AbstractResult) {
             $this->_rates[] = $result;
         }
         elseif ($result instanceof \Magento\Shipping\Model\Rate\Result) {
@@ -126,7 +126,7 @@ class Result
      * Return rate by id in array
      *
      * @param int $id
-     * @return \Magento\Shipping\Model\Rate\Result\Method|null
+     * @return \Magento\Sales\Model\Quote\Address\RateResult\Method|null
      */
     public function getRateById($id)
     {
@@ -174,7 +174,7 @@ class Result
     /**
      * Get cheapest rate
      *
-     * @return null|\Magento\Shipping\Model\Rate\Result\Method
+     * @return null|\Magento\Sales\Model\Quote\Address\RateResult\Method
      */
     public function getCheapestRate()
     {
@@ -199,7 +199,7 @@ class Result
         if (!is_array($this->_rates) || !count($this->_rates)) {
             return $this;
         }
-        /* @var $rate \Magento\Shipping\Model\Rate\Result\Method */
+        /* @var $rate \Magento\Sales\Model\Quote\Address\RateResult\Method */
         foreach ($this->_rates as $i => $rate) {
             $tmp[$i] = $rate->getPrice();
         }
diff --git a/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php
index bc55f631cee53b2614d3e5066e2f668be9540bc0..4d7365b57d38b44953adfd91a544eec1887814f5 100644
--- a/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php
+++ b/app/code/Magento/Shipping/Model/Resource/Carrier/Tablerate.php
@@ -122,17 +122,17 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * @var \Magento\Directory\Model\Resource\Country\CollectionFactory
      */
-    protected $_countryCollFactory;
+    protected $_countryCollectionFactory;
 
     /**
      * @var \Magento\Directory\Model\Resource\Region\CollectionFactory
      */
-    protected $_regionCollFactory;
+    protected $_regionCollectionFactory;
 
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -142,9 +142,9 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
      * @param \Magento\Core\Model\Config $coreConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Shipping\Model\Carrier\Tablerate $carrierTablerate
-     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory
-     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
+     * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\App\Resource $resource,
@@ -152,17 +152,17 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
         \Magento\Core\Model\Config $coreConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Shipping\Model\Carrier\Tablerate $carrierTablerate,
-        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollFactory,
-        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
+        \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
+        \Magento\App\Filesystem $filesystem
     ) {
         parent::__construct($resource);
         $this->_coreConfig = $coreConfig;
         $this->_logger = $logger;
         $this->_storeManager = $storeManager;
         $this->_carrierTablerate = $carrierTablerate;
-        $this->_countryCollFactory = $countryCollFactory;
-        $this->_regionCollFactory = $regionCollFactory;
+        $this->_countryCollectionFactory = $countryCollectionFactory;
+        $this->_regionCollectionFactory = $regionCollectionFactory;
         $this->_filesystem = $filesystem;
     }
 
@@ -179,10 +179,10 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
     /**
      * Return table rate array or false by rate request
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return array|bool
      */
-    public function getRate(\Magento\Shipping\Model\Rate\Request $request)
+    public function getRate(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $adapter = $this->_getReadAdapter();
         $bind = array(
@@ -269,7 +269,7 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
         $this->_importErrors        = array();
         $this->_importedRows        = 0;
 
-        $tmpDirectory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::SYS_TMP);
+        $tmpDirectory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::SYS_TMP_DIR);
         $path = $tmpDirectory->getRelativePath($csvFile);
         $stream = $tmpDirectory->openFile($path);
 
@@ -359,7 +359,7 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
         $this->_importIso3Countries = array();
 
         /** @var $collection \Magento\Directory\Model\Resource\Country\Collection */
-        $collection = $this->_countryCollFactory->create();
+        $collection = $this->_countryCollectionFactory->create();
         foreach ($collection->getData() as $row) {
             $this->_importIso2Countries[$row['iso2_code']] = $row['country_id'];
             $this->_importIso3Countries[$row['iso3_code']] = $row['country_id'];
@@ -382,7 +382,7 @@ class Tablerate extends \Magento\Core\Model\Resource\Db\AbstractDb
         $this->_importRegions = array();
 
         /** @var $collection \Magento\Directory\Model\Resource\Region\Collection */
-        $collection = $this->_regionCollFactory->create();
+        $collection = $this->_regionCollectionFactory->create();
         foreach ($collection->getData() as $row) {
             $this->_importRegions[$row['country_id']][$row['code']] = (int)$row['region_id'];
         }
diff --git a/app/code/Magento/PageCache/Model/Control/ControlInterface.php b/app/code/Magento/Shipping/Model/Resource/Order/Track/Collection.php
similarity index 71%
rename from app/code/Magento/PageCache/Model/Control/ControlInterface.php
rename to app/code/Magento/Shipping/Model/Resource/Order/Track/Collection.php
index f8cce94deed2c7578541096b080ff6ba652b67d8..4b8c8d8b31200a1bb527eb05bdab6d7843b064a5 100644
--- a/app/code/Magento/PageCache/Model/Control/ControlInterface.php
+++ b/app/code/Magento/Shipping/Model/Resource/Order/Track/Collection.php
@@ -18,27 +18,25 @@
  * 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_PageCache
  * @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)
  */
 
+
 /**
- * Page cache control interface
+ * Flat sales order shipment tracks collection
  *
- * @category    Magento
- * @package     Magento_PageCache
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-namespace Magento\PageCache\Model\Control;
+namespace Magento\Shipping\Model\Resource\Order\Track;
 
-interface ControlInterface
+class Collection extends \Magento\Sales\Model\Resource\Order\Shipment\Track\Collection
 {
     /**
-     * Clean external cache
+     * Model initialization
      *
-     * @return void
      */
-    public function clean();
+    protected function _construct()
+    {
+        $this->_init('Magento\Shipping\Model\Order\Track', 'Magento\Sales\Model\Resource\Order\Shipment\Track');
+    }
 }
diff --git a/app/code/Magento/Shipping/Model/Shipping.php b/app/code/Magento/Shipping/Model/Shipping.php
index 4e1c8f6c713d2b8f0500feb3951baa36d888ccd0..3de7b443bcb2732056824b79dd100bcb978a277a 100644
--- a/app/code/Magento/Shipping/Model/Shipping.php
+++ b/app/code/Magento/Shipping/Model/Shipping.php
@@ -27,18 +27,11 @@
 
 namespace Magento\Shipping\Model;
 
-class Shipping
-{
-    /**
-     * Store address
-     */
-    const XML_PATH_STORE_ADDRESS1     = 'shipping/origin/street_line1';
-    const XML_PATH_STORE_ADDRESS2     = 'shipping/origin/street_line2';
-    const XML_PATH_STORE_CITY         = 'shipping/origin/city';
-    const XML_PATH_STORE_REGION_ID    = 'shipping/origin/region_id';
-    const XML_PATH_STORE_ZIP          = 'shipping/origin/postcode';
-    const XML_PATH_STORE_COUNTRY_ID   = 'shipping/origin/country_id';
+use Magento\Sales\Model\Order\Shipment;
+use Magento\Sales\Model\Quote\Address\RateCollectorInterface;
 
+class Shipping implements RateCollectorInterface
+{
     /**
      * Default shipping orig for requests
      *
@@ -78,7 +71,7 @@ class Shipping
     protected $_shippingConfig;
 
     /**
-     * @var \Magento\Shipping\Model\Carrier\Factory
+     * @var \Magento\Shipping\Model\CarrierFactory
      */
     protected $_carrierFactory;
 
@@ -88,7 +81,7 @@ class Shipping
     protected $_rateResultFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\RequestFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateRequestFactory
      */
     protected $_shipmentRequestFactory;
 
@@ -106,7 +99,7 @@ class Shipping
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Shipping\Model\Config $shippingConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Shipping\Model\Carrier\Factory $carrierFactory
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
      * @param \Magento\Shipping\Model\Shipment\RequestFactory $shipmentRequestFactory
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
@@ -116,7 +109,7 @@ class Shipping
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Shipping\Model\Carrier\Factory $carrierFactory,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
         \Magento\Shipping\Model\Shipment\RequestFactory $shipmentRequestFactory,
         \Magento\Directory\Model\RegionFactory $regionFactory,
@@ -181,18 +174,26 @@ class Shipping
      * Retrieve all methods for supplied shipping data
      *
      * @todo make it ordered
-     * @param \Magento\Shipping\Model\Rate\Request $request
-     * @return \Magento\Shipping\Model\Shipping
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return $this
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $storeId = $request->getStoreId();
         if (!$request->getOrig()) {
             $request
-                ->setCountryId($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_COUNTRY_ID, $request->getStore()))
-                ->setRegionId($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_REGION_ID, $request->getStore()))
-                ->setCity($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_CITY, $request->getStore()))
-                ->setPostcode($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_ZIP, $request->getStore()));
+                ->setCountryId(
+                    $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_COUNTRY_ID, $request->getStore())
+                )
+                ->setRegionId(
+                    $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_REGION_ID, $request->getStore())
+                )
+                ->setCity(
+                    $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_CITY, $request->getStore())
+                )
+                ->setPostcode(
+                    $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_ZIP, $request->getStore())
+                );
         }
 
         $limitCarrier = $request->getLimitCarrier();
@@ -221,28 +222,28 @@ class Shipping
     /**
      * Collect rates of given carrier
      *
-     * @param string                           $carrierCode
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param string $carrierCode
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Shipping
      */
     public function collectCarrierRates($carrierCode, $request)
     {
         /* @var $carrier \Magento\Shipping\Model\Carrier\AbstractCarrier */
-        $carrier = $this->getCarrierByCode($carrierCode, $request->getStoreId());
+        $carrier = $this->_carrierFactory->createIfActive($carrierCode, $request->getStoreId());
         if (!$carrier) {
             return $this;
         }
         $carrier->setActiveFlag($this->_availabilityConfigField);
         $result = $carrier->checkAvailableShipCountries($request);
-        if (false !== $result && !($result instanceof \Magento\Shipping\Model\Rate\Result\Error)) {
+        if (false !== $result && !($result instanceof \Magento\Sales\Model\Quote\Address\RateResult\Error)) {
             $result = $carrier->proccessAdditionalValidation($request);
         }
         /*
         * Result will be false if the admin set not to show the shipping module
         * if the delivery country is not within specific countries
         */
-        if (false !== $result){
-            if (!$result instanceof \Magento\Shipping\Model\Rate\Result\Error) {
+        if (false !== $result) {
+            if (!$result instanceof \Magento\Sales\Model\Quote\Address\RateResult\Error) {
                 if ($carrier->getConfigData('shipment_requesttype')) {
                     $packages = $this->composePackagesForCarrier($carrier, $request);
                     if (!empty($packages)) {
@@ -301,7 +302,7 @@ class Shipping
      * Devides order into items and items into parts if it's necessary
      *
      * @param \Magento\Shipping\Model\Carrier\AbstractCarrier $carrier
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return array [int, float]
      */
     public function composePackagesForCarrier($carrier, $request)
@@ -440,7 +441,7 @@ class Shipping
      */
     public function collectRatesByAddress(\Magento\Object $address, $limitCarrier = null)
     {
-        /** @var $request \Magento\Shipping\Model\Rate\Request */
+        /** @var $request \Magento\Sales\Model\Quote\Address\RateRequest */
         $request = $this->_shipmentRequestFactory->create();
         $request->setAllItems($address->getAllItems());
         $request->setDestCountryId($address->getCountryId());
@@ -473,22 +474,4 @@ class Shipping
         $this->_availabilityConfigField = $code;
         return $this;
     }
-
-    /**
-     * Get carrier by its code
-     *
-     * @param string $carrierCode
-     * @param null|int $storeId
-     * @return bool|\Magento\Core\Model\AbstractModel
-     */
-    public function getCarrierByCode($carrierCode, $storeId = null)
-    {
-        $isActive = $this->_coreStoreConfig
-            ->getConfigFlag('carriers/' . $carrierCode . '/' . $this->_availabilityConfigField, $storeId);
-        if (!$isActive) {
-            return false;
-        }
-
-        return $this->_carrierFactory->create($carrierCode, $storeId);
-    }
 }
diff --git a/app/code/Magento/Shipping/Model/Shipping/Labels.php b/app/code/Magento/Shipping/Model/Shipping/Labels.php
index a195a2dd7de8164b35251b1f43c8189c8a92330b..980a6d63d070f8cb01e5445f66ec16fcf18f2baf 100644
--- a/app/code/Magento/Shipping/Model/Shipping/Labels.php
+++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php
@@ -27,6 +27,8 @@
 
 namespace Magento\Shipping\Model\Shipping;
 
+use \Magento\Sales\Model\Order\Shipment;
+
 /**
  * Shipping labels model
  */
@@ -46,18 +48,19 @@ class Labels extends \Magento\Shipping\Model\Shipping
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
      * @param \Magento\Shipping\Model\Config $shippingConfig
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
-     * @param \Magento\Shipping\Model\Carrier\Factory $carrierFactory
+     * @param \Magento\Shipping\Model\CarrierFactory $carrierFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory
      * @param \Magento\Shipping\Model\Shipment\RequestFactory $shipmentRequestFactory
      * @param \Magento\Directory\Model\RegionFactory $regionFactory
      * @param \Magento\Math\Division $mathDivision
      * @param \Magento\Backend\Model\Auth\Session $authSession
+     * @param \Magento\Shipping\Model\Shipment\Request $request
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Shipping\Model\Config $shippingConfig,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
-        \Magento\Shipping\Model\Carrier\Factory $carrierFactory,
+        \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateResultFactory,
         \Magento\Shipping\Model\Shipment\RequestFactory $shipmentRequestFactory,
         \Magento\Directory\Model\RegionFactory $regionFactory,
@@ -82,37 +85,40 @@ class Labels extends \Magento\Shipping\Model\Shipping
     /**
      * Prepare and do request to shipment
      *
-     * @param \Magento\Sales\Model\Order\Shipment $orderShipment
+     * @param Shipment $orderShipment
      * @return \Magento\Object
      * @throws \Magento\Core\Exception
      */
-    public function requestToShipment(\Magento\Sales\Model\Order\Shipment $orderShipment)
+    public function requestToShipment(Shipment $orderShipment)
     {
         $admin = $this->_authSession->getUser();
         $order = $orderShipment->getOrder();
         $address = $order->getShippingAddress();
         $shippingMethod = $order->getShippingMethod(true);
         $shipmentStoreId = $orderShipment->getStoreId();
-        $shipmentCarrier = $order->getShippingCarrier();
+        $shipmentCarrier = $this->_carrierFactory->create($order->getShippingMethod(true)->getCarrierCode());
         $baseCurrencyCode = $this->_storeManager->getStore($shipmentStoreId)->getBaseCurrencyCode();
         if (!$shipmentCarrier) {
             throw new \Magento\Core\Exception('Invalid carrier: ' . $shippingMethod->getCarrierCode());
         }
-        $shipperRegionCode = $this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_REGION_ID, $shipmentStoreId);
+        $shipperRegionCode = $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_REGION_ID, $shipmentStoreId);
         if (is_numeric($shipperRegionCode)) {
             $shipperRegionCode = $this->_regionFactory->create()->load($shipperRegionCode)->getCode();
         }
 
         $recipientRegionCode = $this->_regionFactory->create()->load($address->getRegionId())->getCode();
 
-        $originStreet1 = $this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_ADDRESS1, $shipmentStoreId);
-        $originStreet2 = $this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_ADDRESS2, $shipmentStoreId);
-        $storeInfo = new \Magento\Object((array)$this->_coreStoreConfig->getConfig('general/store_information', $shipmentStoreId));
+        $originStreet1 = $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_ADDRESS1, $shipmentStoreId);
+        $originStreet2 = $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_ADDRESS2, $shipmentStoreId);
+        $storeInfo = new \Magento\Object(
+            (array)$this->_coreStoreConfig->getConfig('general/store_information', $shipmentStoreId)
+        );
 
         if (!$admin->getFirstname() || !$admin->getLastname() || !$storeInfo->getName() || !$storeInfo->getPhone()
-            || !$originStreet1 || !$this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_CITY, $shipmentStoreId)
-            || !$shipperRegionCode || !$this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_ZIP, $shipmentStoreId)
-            || !$this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_COUNTRY_ID, $shipmentStoreId)
+            || !$originStreet1 || !$shipperRegionCode
+            || !$this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_CITY, $shipmentStoreId)
+            || !$this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_ZIP, $shipmentStoreId)
+            || !$this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_COUNTRY_ID, $shipmentStoreId)
         ) {
             throw new \Magento\Core\Exception(
                 __('We don\'t have enough information to create shipping labels. Please make sure your store information and settings are complete.')
@@ -131,10 +137,16 @@ class Labels extends \Magento\Shipping\Model\Shipping
         $request->setShipperAddressStreet(trim($originStreet1 . ' ' . $originStreet2));
         $request->setShipperAddressStreet1($originStreet1);
         $request->setShipperAddressStreet2($originStreet2);
-        $request->setShipperAddressCity($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_CITY, $shipmentStoreId));
+        $request->setShipperAddressCity(
+            $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_CITY, $shipmentStoreId)
+        );
         $request->setShipperAddressStateOrProvinceCode($shipperRegionCode);
-        $request->setShipperAddressPostalCode($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_ZIP, $shipmentStoreId));
-        $request->setShipperAddressCountryCode($this->_coreStoreConfig->getConfig(self::XML_PATH_STORE_COUNTRY_ID, $shipmentStoreId));
+        $request->setShipperAddressPostalCode(
+            $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_ZIP, $shipmentStoreId)
+        );
+        $request->setShipperAddressCountryCode(
+            $this->_coreStoreConfig->getConfig(Shipment::XML_PATH_STORE_COUNTRY_ID, $shipmentStoreId)
+        );
         $request->setRecipientContactPersonName(trim($address->getFirstname() . ' ' . $address->getLastname()));
         $request->setRecipientContactPersonFirstName($address->getFirstname());
         $request->setRecipientContactPersonLastName($address->getLastname());
diff --git a/app/code/Magento/Paygate/etc/adminhtml/routes.xml b/app/code/Magento/Shipping/etc/adminhtml/routes.xml
similarity index 93%
rename from app/code/Magento/Paygate/etc/adminhtml/routes.xml
rename to app/code/Magento/Shipping/etc/adminhtml/routes.xml
index 6878a6cb9747e9c9fa5c274058aecc2291fb2317..5fced11e7faf437a821dbb138a3430b140cd0db0 100644
--- a/app/code/Magento/Paygate/etc/adminhtml/routes.xml
+++ b/app/code/Magento/Shipping/etc/adminhtml/routes.xml
@@ -26,7 +26,7 @@
 <config>
     <router id="admin">
         <route id="adminhtml">
-            <module name="Magento_Paygate" before="Magento_Adminhtml" />
+            <module name="Magento_Shipping" before="Magento_Adminhtml" />
         </route>
     </router>
 </config>
diff --git a/app/code/Magento/PageCache/etc/frontend/events.xml b/app/code/Magento/Shipping/etc/crontab.xml
similarity index 83%
rename from app/code/Magento/PageCache/etc/frontend/events.xml
rename to app/code/Magento/Shipping/etc/crontab.xml
index 2c474560ee1b0303f54a68b57ffaff42b09df737..4bd12111cd07b80b9aa4f59cf2a298b7d6aee4d3 100644
--- a/app/code/Magento/PageCache/etc/frontend/events.xml
+++ b/app/code/Magento/Shipping/etc/crontab.xml
@@ -24,7 +24,7 @@
  */
 -->
 <config>
-    <event name="controller_action_predispatch">
-        <observer name="pagecache" instance="Magento\PageCache\Model\Observer" method="processPreDispatch" />
-    </event>
+    <job name="aggregate_sales_report_shipment_data" instance="Magento\Shipping\Model\Observer" method="aggregateSalesReportShipmentData">
+        <schedule>0 0 * * *</schedule>
+    </job>
 </config>
diff --git a/app/code/Magento/Shipping/etc/di.xml b/app/code/Magento/Shipping/etc/di.xml
new file mode 100644
index 0000000000000000000000000000000000000000..795ff8c46ed7fd14eb015f6b441c6562dc49155e
--- /dev/null
+++ b/app/code/Magento/Shipping/etc/di.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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>
+    <preference for="Magento\Sales\Model\Quote\Address\RateCollectorInterface" type="Magento\Shipping\Model\Shipping" />
+    <preference for="Magento\Sales\Model\Quote\Address\CarrierFactoryInterface" type="Magento\Shipping\Model\CarrierFactory" />
+</config>
diff --git a/app/code/Magento/Shipping/etc/module.xml b/app/code/Magento/Shipping/etc/module.xml
index 3543b311a9ab1484ca06b8bed6104495d9bb09ba..e323b9968e2df9547f08d3df0f1ccb238b2aa602 100755
--- a/app/code/Magento/Shipping/etc/module.xml
+++ b/app/code/Magento/Shipping/etc/module.xml
@@ -33,9 +33,14 @@
             <module name="Magento_Core"/>
             <module name="Magento_Catalog"/>
             <module name="Magento_Sales"/>
-            <module name="Magento_Customer"/>
             <module name="Magento_Backend"/>
-	    <module name="Magento_Directory"/>
+            <module name="Magento_Directory"/>
+            <module name="Magento_Contacts"/>
+            <module name="Magento_Usa"/>
+            <module name="Magento_Customer"/>
+            <module name="Magento_Payment"/>
+            <module name="Magento_Theme"/>
+            <module name="Magento_Tax"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/create/form.phtml b/app/code/Magento/Shipping/view/adminhtml/create/form.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/create/form.phtml
rename to app/code/Magento/Shipping/view/adminhtml/create/form.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/create/items.phtml b/app/code/Magento/Shipping/view/adminhtml/create/items.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/create/items.phtml
rename to app/code/Magento/Shipping/view/adminhtml/create/items.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/create/items/renderer/configurable.phtml b/app/code/Magento/Shipping/view/adminhtml/create/items/renderer/configurable.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/create/items/renderer/configurable.phtml
rename to app/code/Magento/Shipping/view/adminhtml/create/items/renderer/configurable.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/create/items/renderer/default.phtml b/app/code/Magento/Shipping/view/adminhtml/create/items/renderer/default.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/create/items/renderer/default.phtml
rename to app/code/Magento/Shipping/view/adminhtml/create/items/renderer/default.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_addcomment.xml b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_addcomment.xml
similarity index 91%
rename from app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_addcomment.xml
rename to app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_addcomment.xml
index e0a1b85d2b2c5ecb973204bf4009d22f35b83e31..8962ec0604b4f8741f82ea4095fd798a9f3461a4 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_addcomment.xml
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_addcomment.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View\Comments" name="shipment_comments">
+    <block class="Magento\Shipping\Block\Adminhtml\View\Comments" name="shipment_comments">
         <block class="Magento\Sales\Block\Adminhtml\Order\Comments\View" name="order_comments" template="order/comments/view.phtml"/>
     </block>
 </layout>
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_removetrack.xml b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_addtrack.xml
similarity index 87%
rename from app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_removetrack.xml
rename to app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_addtrack.xml
index 42ad5977ac86a5c2489fc61f5292a878d07a95f2..501c9a10603bec8d3b4d5d85c24eb28bf553bbb4 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_removetrack.xml
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_addtrack.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View\Tracking" name="shipment_tracking" template="order/shipment/view/tracking.phtml"/>
+    <block class="Magento\Shipping\Block\Adminhtml\Order\Tracking\View" name="shipment_tracking" template="order/tracking/view.phtml"/>
 </layout>
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_new.xml
similarity index 61%
rename from app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml
rename to app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_new.xml
index 64592d9a8a4441ec7b8c0347fcaae9fdda1d1431..444b85f604d518d0ae75c38ec6b70fa1a5c3de2b 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_new.xml
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_new.xml
@@ -25,25 +25,25 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceBlock name="head">
-        <block class="Magento\Theme\Block\Html\Head\Script" name="magento-adminhtml-sales-order-shipment-packaging-js">
+        <block class="Magento\Theme\Block\Html\Head\Script" name="magento-adminhtml-order-shipment-packaging-js">
             <arguments>
-                <argument name="file" xsi:type="string">Magento_Sales::order/shipment/packaging.js</argument>
+                <argument name="file" xsi:type="string">Magento_Shipping::order/packaging.js</argument>
             </arguments>
         </block>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Create" name="sales_shipment_create">
-            <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Form" name="form" template="order/shipment/create/form.phtml">
-                <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="order/view/info.phtml"/>
+        <block class="Magento\Shipping\Block\Adminhtml\Create" name="sales_shipment_create">
+            <block class="Magento\Shipping\Block\Adminhtml\Create\Form" name="form" template="create/form.phtml">
+                <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="Magento_Sales::order/view/info.phtml"/>
                 <block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Tracking" name="shipment_tracking" template="order/shipment/create/tracking.phtml"/>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Items" name="order_items" template="order/shipment/create/items.phtml">
-                    <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="order/shipment/create/items/renderer/default.phtml"/>
-                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/>
-                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/>
+                <block class="Magento\Shipping\Block\Adminhtml\Create\Items" name="order_items" template="create/items.phtml">
+                    <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="Magento_Shipping::create/items/renderer/default.phtml"/>
+                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="Magento_Sales::items/column/qty.phtml" group="column"/>
+                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="Magento_Sales::items/column/name.phtml" group="column"/>
                     <block class="Magento\View\Element\Text\ListText" name="order_item_extra_info"/>
                 </block>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging" name="shipment_packaging" template="order/shipment/packaging/popup.phtml"/>
+                <block class="Magento\Shipping\Block\Adminhtml\Order\Tracking" name="shipment_tracking" template="order/tracking.phtml"/>
+                <block class="Magento\Shipping\Block\Adminhtml\Order\Packaging" name="shipment_packaging" template="Magento_Shipping::order/packaging/popup.phtml"/>
             </block>
         </block>
     </referenceContainer>
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_addtrack.xml b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_removetrack.xml
similarity index 87%
rename from app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_addtrack.xml
rename to app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_removetrack.xml
index 42ad5977ac86a5c2489fc61f5292a878d07a95f2..501c9a10603bec8d3b4d5d85c24eb28bf553bbb4 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_addtrack.xml
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_removetrack.xml
@@ -24,5 +24,5 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View\Tracking" name="shipment_tracking" template="order/shipment/view/tracking.phtml"/>
+    <block class="Magento\Shipping\Block\Adminhtml\Order\Tracking\View" name="shipment_tracking" template="order/tracking/view.phtml"/>
 </layout>
diff --git a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_view.xml
similarity index 53%
rename from app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml
rename to app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_view.xml
index efe5ee5139ade2295eb6313ed7ffb082e1c0767c..b7fc259c26fae70567b9e6f073097ac0e0114d75 100644
--- a/app/code/Magento/Sales/view/adminhtml/layout/sales_order_shipment_view.xml
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order_shipment_view.xml
@@ -25,32 +25,27 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceBlock name="head">
-        <block class="Magento\Theme\Block\Html\Head\Script" name="magento-adminhtml-sales-order-shipment-packaging-js">
+        <block class="Magento\Theme\Block\Html\Head\Script" name="magento-adminhtml-order-shipment-packaging-js">
             <arguments>
-                <argument name="file" xsi:type="string">Magento_Sales::order/shipment/packaging.js</argument>
+                <argument name="file" xsi:type="string">Magento_Shipping::order/packaging.js</argument>
             </arguments>
         </block>
     </referenceBlock>
     <referenceContainer name="content">
-        <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View" name="sales_shipment_view">
-            <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View\Form" name="form" template="order/shipment/view/form.phtml">
-                <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="order/view/info.phtml"/>
+        <block class="Magento\Shipping\Block\Adminhtml\View" name="sales_shipment_view">
+            <block class="Magento\Shipping\Block\Adminhtml\View\Form" name="form" template="view/form.phtml">
+                <block class="Magento\Sales\Block\Adminhtml\Order\View\Info" name="order_info" template="Magento_Sales::order/view/info.phtml"/>
                 <block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View\Tracking" name="shipment_tracking" template="order/shipment/view/tracking.phtml"/>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\View\Items" name="shipment_items" template="order/shipment/view/items.phtml">
-                    <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="order/shipment/view/items/renderer/default.phtml"/>
-                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/>
-                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/>
+                <block class="Magento\Shipping\Block\Adminhtml\View\Items" name="shipment_items" template="view/items.phtml">
+                    <block class="Magento\Sales\Block\Adminhtml\Items\Renderer\DefaultRenderer" as="default" template="Magento_Shipping::view/items/renderer/default.phtml"/>
+                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="Magento_Sales::items/column/qty.phtml" group="column"/>
+                    <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="Magento_Sales::items/column/name.phtml" group="column"/>
                     <block class="Magento\View\Element\Text\ListText" name="order_item_extra_info"/>
                 </block>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Tracking" name="invoice_tracking" template="order/shipment/create/tracking.phtml"/>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Comments\View" name="order_comments" template="order/comments/view.phtml">
-                    <action method="setParentType">
-                        <argument name="type" xsi:type="string">shipment</argument>
-                    </action>
-                </block>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging" name="shipment_packaging" template="order/shipment/packaging/popup.phtml"/>
-                <block class="Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging" name="shipment_packed" template="order/shipment/packaging/packed.phtml"/>
+                <block class="Magento\Sales\Block\Adminhtml\Order\Comments\View" name="order_comments" template="order/comments/view.phtml"/>
+                <block class="Magento\Shipping\Block\Adminhtml\Order\Tracking\View" name="shipment_tracking" template="order/tracking/view.phtml"/>
+                <block class="Magento\Shipping\Block\Adminhtml\Order\Packaging" name="shipment_packaging" template="order/packaging/popup.phtml"/>
+                <block class="Magento\Shipping\Block\Adminhtml\Order\Packaging" name="shipment_packed" template="order/packaging/packed.phtml"/>
             </block>
         </block>
     </referenceContainer>
diff --git a/app/code/Magento/PageCache/view/adminhtml/layout/adminhtml_cache_index.xml b/app/code/Magento/Shipping/view/adminhtml/layout/sales_order_invoice_new.xml
similarity index 84%
rename from app/code/Magento/PageCache/view/adminhtml/layout/adminhtml_cache_index.xml
rename to app/code/Magento/Shipping/view/adminhtml/layout/sales_order_invoice_new.xml
index f9ac286713bbac359e6d6295e2ac179c71a47a78..8fcc195d0130fcde97c7a74587295575287df074 100644
--- a/app/code/Magento/PageCache/view/adminhtml/layout/adminhtml_cache_index.xml
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/sales_order_invoice_new.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <referenceBlock name="cache.additional">
-        <block class="Magento\PageCache\Block\Adminhtml\Cache\Additional" name="page.cache.additional" template="cache/additional.phtml"/>
+    <referenceBlock name="form">
+        <block class="Magento\Shipping\Block\Adminhtml\Order\Tracking\Invoice" name="tracking" template="order/tracking.phtml"/>
     </referenceBlock>
 </layout>
diff --git a/app/code/Magento/Shipping/view/adminhtml/layout/sales_order_view.xml b/app/code/Magento/Shipping/view/adminhtml/layout/sales_order_view.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1ed3678bcc2237e037819f821c92e205d905f8d2
--- /dev/null
+++ b/app/code/Magento/Shipping/view/adminhtml/layout/sales_order_view.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="order_tab_info">
+        <block class="Magento\Sales\Block\Adminhtml\Order\AbstractOrder" name="order_shipping_view" template="Magento_Shipping::order/view/info.phtml"/>
+    </referenceBlock>
+</layout>
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/tracking.phtml b/app/code/Magento/Shipping/view/adminhtml/order/Tracking/view.phtml
similarity index 97%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/view/tracking.phtml
rename to app/code/Magento/Shipping/view/adminhtml/order/Tracking/view.phtml
index 5b6ef9d6351daa04e6c72341d294c101b7a2bbf6..bb97129a95f88ee7f2a8407d2db0e7dc647d0ec7 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/tracking.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/order/Tracking/view.phtml
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-<?php /** @var $this \Magento\Sales\Block\Adminhtml\Order\Shipment\View\Tracking */ ?>
+<?php /** @var $this Magento\Shipping\Block\Adminhtml\Order\Tracking\View */ ?>
 <table cellspacing="0" class="data-table" id="shipment_tracking_info">
     <thead>
         <tr class="headings">
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/packaging.js b/app/code/Magento/Shipping/view/adminhtml/order/packaging.js
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/packaging.js
rename to app/code/Magento/Shipping/view/adminhtml/order/packaging.js
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/grid.phtml b/app/code/Magento/Shipping/view/adminhtml/order/packaging/grid.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/grid.phtml
rename to app/code/Magento/Shipping/view/adminhtml/order/packaging/grid.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/packed.phtml b/app/code/Magento/Shipping/view/adminhtml/order/packaging/packed.phtml
similarity index 99%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/packed.phtml
rename to app/code/Magento/Shipping/view/adminhtml/order/packaging/packed.phtml
index 645a715b47aab7beaf1ce30e1e2a2da21e33eabd..61e7241565761122acb0d843c8e088899d58b71d 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/packed.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/order/packaging/packed.phtml
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-
+<div id="popup-window-mask" style="display:none;"></div>
 <div id="packed_window" style="display:none;" class="packed-window">
     <div class="popup-window-wrapper">
         <div class="popup-window-title">
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/popup.phtml b/app/code/Magento/Shipping/view/adminhtml/order/packaging/popup.phtml
similarity index 99%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/popup.phtml
rename to app/code/Magento/Shipping/view/adminhtml/order/packaging/popup.phtml
index 759e3f9c25879d5ecdd9c6863ae3dbf3dfb8c249..0dab463f89580994cf9deea4d4c1be300bb925ba 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/shipment/packaging/popup.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/order/packaging/popup.phtml
@@ -24,7 +24,7 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
-<?php /** @var $this \Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging */ ?>
+<?php /** @var $this \Magento\Shipping\Block\Adminhtml\Order\Packaging */ ?>
 <?php
 $shippingMethod = $this->getShipment()->getOrder()->getShippingMethod();
 $sizeSource = $this->getSourceSizeModel()->toOptionArray();
diff --git a/app/code/Magento/Shipping/view/adminhtml/order/tracking.phtml b/app/code/Magento/Shipping/view/adminhtml/order/tracking.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..907fd1ade049eb7eb1b910ea60c0f3860efe4bb2
--- /dev/null
+++ b/app/code/Magento/Shipping/view/adminhtml/order/tracking.phtml
@@ -0,0 +1,102 @@
+<?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.
+ *
+ * @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 /** @var $this Magento\Shipping\Block\Adminhtml\Order\Tracking */?>
+<script type="text/javascript">
+    //<![CDATA[
+    var trackingControl;
+    trackingControl = {
+        index : 0,
+        add : function () {
+            this.index++;
+            var data = {index:this.index};
+            Element.insert($('track_row_container'), {bottom: this.template.evaluate(data)});
+            $('trackingC' + this.index).disabled = false;
+            $('trackingT' + this.index).disabled = false;
+            $('trackingN' + this.index).disabled = false;
+            this.bindCurrierOnchange();
+        },
+        deleteRow : function(event) {
+            var row = Event.findElement(event, 'tr');
+            if (row) {
+                row.parentNode.removeChild(row)
+            }
+        },
+        bindCurrierOnchange : function() {
+            var elems = $('tracking_numbers_table').select('.select');
+            elems.each(function (elem) {
+                if (!elem.onchangeBound) {
+                    elem.onchangeBound = true;
+                    elem.valueInput = $(elem.parentNode.parentNode).select('.number-title')[0];
+                    elem.observe('change', this.currierOnchange);
+                }
+            }.bind(this));
+        },
+        currierOnchange : function(event) {
+            var elem = Event.element(event);
+            var option = elem.options[elem.selectedIndex];
+            if (option.value && option.value != 'custom') {
+                elem.valueInput.value = option.text;
+            }
+            else {
+                elem.valueInput.value = '';
+            }
+        }
+    }
+    //]]>
+</script>
+<table cellspacing="0" class="data-table" id="tracking_numbers_table">
+    <thead>
+    <tr class="headings">
+        <th class="col-carrier"><?php echo __('Carrier') ?></th>
+        <th class="col-title"><?php echo __('Title') ?></th>
+        <th class="col-number"><?php echo __('Number') ?></th>
+        <th class="col-delete last"><?php echo __('Action') ?></th>
+    </tr>
+    </thead>
+    <tfoot>
+    <tr>
+        <td colspan="4" class="last"><?php echo $this->getChildHtml('add_button') ?></td>
+    </tr>
+    </tfoot>
+    <tbody id="track_row_container">
+    <tr id="track_row_template" class="template no-display">
+        <td class="col-carrier">
+            <select name="tracking[__index__][carrier_code]" id="trackingC__index__" class="select carrier" disabled="disabled">
+                <?php foreach ($this->getCarriers() as $_code=>$_name): ?>
+                    <option value="<?php echo $_code ?>"><?php echo $this->escapeHtml($_name) ?></option>
+                <?php endforeach; ?>
+            </select>
+        </td>
+        <td class="col-title"><input class="input-text number-title" type="text" name="tracking[__index__][title]" id="trackingT__index__" value="" disabled="disabled" /></td>
+        <td class="col-number"><input class="input-text required-entry" type="text" name="tracking[__index__][number]" id="trackingN__index__" value="" disabled="disabled" /></td>
+        <td class="col-delete last"><a href="#" class="action- delete" onclick="trackingControl.deleteRow(event);return false"><span><?php echo __('Delete') ?></span></a></td>
+    </tr>
+    </tbody>
+</table>
+<script type="text/javascript">
+    //<![CDATA[
+    trackingControl.template = new Template('<tr>' + $('track_row_template').innerHTML.replace(/__index__/g, '#{index}') + '<\/tr>');
+    //]]>
+</script>
diff --git a/app/code/Magento/Shipping/view/adminhtml/order/view/info.phtml b/app/code/Magento/Shipping/view/adminhtml/order/view/info.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..d5acef0479a37f7a265778c090fae8b8d79fe8d0
--- /dev/null
+++ b/app/code/Magento/Shipping/view/adminhtml/order/view/info.phtml
@@ -0,0 +1,59 @@
+<?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 /** @var $this \Magento\Shipping\Block\Adminhtml\View */ ?>
+<?php $order = $this->getOrder() ?>
+<?php if ($order->getIsVirtual()) : return '';endif; ?>
+<div class="order-shipping-method">
+    <!--Shipping Method-->
+    <div class="fieldset-wrapper">
+        <div class="fieldset-wrapper-title">
+            <span class="title"><?php echo __('Shipping &amp; Handling Information') ?></span>
+        </div>
+        <div class="shipping-description-wrapper">
+            <?php  if ($order->getTracksCollection()->count()) : ?>
+                <p><a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('Magento\Shipping\Helper\Data')->getTrackingPopupUrlBySalesModel($order) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo __('Track Order') ?>"><?php echo __('Track Order') ?></a></p>
+            <?php endif; ?>
+            <?php if ($order->getShippingDescription()): ?>
+                <strong><?php echo $this->escapeHtml($order->getShippingDescription()) ?></strong>
+
+                <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingPriceIncludingTax()): ?>
+                    <?php $_excl = $this->displayShippingPriceInclTax($order); ?>
+                <?php else: ?>
+                    <?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
+                <?php endif; ?>
+                <?php $_incl = $this->displayShippingPriceInclTax($order); ?>
+
+                <?php echo $_excl; ?>
+                <?php if ($this->helper('Magento\Tax\Helper\Data')->displayShippingBothPrices() && $_incl != $_excl): ?>
+                    (<?php echo __('Incl. Tax'); ?> <?php echo $_incl; ?>)
+                <?php endif; ?>
+            <?php else: ?>
+                <?php echo __('No shipping information available'); ?>
+            <?php endif; ?>
+        </div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/form.phtml b/app/code/Magento/Shipping/view/adminhtml/view/form.phtml
similarity index 98%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/view/form.phtml
rename to app/code/Magento/Shipping/view/adminhtml/view/form.phtml
index a7a8ae9297202f3becaf4851b79aa14c29089818..f2e3f03a26b7c609fe5b1d2b5fdd1ab2ed546046 100644
--- a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/form.phtml
+++ b/app/code/Magento/Shipping/view/adminhtml/view/form.phtml
@@ -86,7 +86,7 @@
                     });
                     packaging.setLabelCreatedCallback(function(response){
                         setLocation("<?php echo $this->getUrl(
-                            'sales/order_shipment/view',
+                            'adminhtml/order_shipment/view',
                             array('shipment_id' => $this->getShipment()->getId())
                         ); ?>");
                     });
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/items.phtml b/app/code/Magento/Shipping/view/adminhtml/view/items.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/view/items.phtml
rename to app/code/Magento/Shipping/view/adminhtml/view/items.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/items/renderer/configurable.phtml b/app/code/Magento/Shipping/view/adminhtml/view/items/renderer/configurable.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/view/items/renderer/configurable.phtml
rename to app/code/Magento/Shipping/view/adminhtml/view/items/renderer/configurable.phtml
diff --git a/app/code/Magento/Sales/view/adminhtml/order/shipment/view/items/renderer/default.phtml b/app/code/Magento/Shipping/view/adminhtml/view/items/renderer/default.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/adminhtml/order/shipment/view/items/renderer/default.phtml
rename to app/code/Magento/Shipping/view/adminhtml/view/items/renderer/default.phtml
diff --git a/app/code/Magento/Sales/view/frontend/order/shipment/items.phtml b/app/code/Magento/Shipping/view/frontend/items.phtml
similarity index 90%
rename from app/code/Magento/Sales/view/frontend/order/shipment/items.phtml
rename to app/code/Magento/Shipping/view/frontend/items.phtml
index 24cddce4b5d86e753e3e8ab240e245dea0051b9f..5ae077024d8a08bfa85f4fd2729bfac280af02c7 100644
--- a/app/code/Magento/Sales/view/frontend/order/shipment/items.phtml
+++ b/app/code/Magento/Shipping/view/frontend/items.phtml
@@ -23,15 +23,12 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 ?>
+<?php /** @var  $this \Magento\Shipping\Block\Items */ ?>
 <?php  $_order = $this->getOrder() ?>
 <div class="order toolbar">
     <div class="actions">
         <?php  if ($_order->getTracksCollection()->count()) : ?>
-            <a href="#"
-               data-mage-init="{popupWindow: {windowURL:'<?php echo $this->helper('Magento\Shipping\Helper\Data')->getTrackingPopupUrlBySalesModel($_order) ?>',windowName:'trackorder',width:800,height:600,top:0,left:0,resizable:1,scrollbars:1}}" title="<?php echo __('Track all shipment(s)') ?>"
-               class="action track">
-                <span><?php echo __('Track all shipments') ?></span>
-            </a>
+            <?php echo $this->getChildHtml('track-all-link') ?>
         <?php endif; ?>
         <a href="<?php echo $this->getPrintAllShipmentsUrl($_order) ?>"
            onclick="this.target='_blank'"
diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_guest_reorder.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_reorder.xml
new file mode 100644
index 0000000000000000000000000000000000000000..36dd2282f99be6698effada70d6aadc1f8768b8c
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_reorder.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="sales.order.view">
+        <block class="Magento\Shipping\Block\Tracking\Link" name="tracking-info-link" template="tracking/link.phtml">
+            <arguments>
+                <argument name="label" xsi:type="string">Track your order</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml
new file mode 100644
index 0000000000000000000000000000000000000000..514bfcc9d82e28f3044faa9858613f273be01ab2
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_shipment.xml
@@ -0,0 +1,40 @@
+<?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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceContainer name="content">
+        <block class="Magento\Shipping\Block\Order\Shipment" name="sales.order.shipment" after="sales.order.info" cacheable="false">
+            <block class="Magento\Shipping\Block\Items" name="shipment_items" template="items.phtml">
+                <block class="Magento\Shipping\Block\Tracking\Link" name="track-all-link" template="tracking/link.phtml">
+                    <arguments>
+                        <argument name="label" xsi:type="string">Track All Shipments</argument>
+                    </arguments>
+                </block>
+                <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer" as="default" template="Magento_Sales::order/shipment/items/renderer/default.phtml"/>
+                <block class="Magento\Sales\Block\Order\Comments" name="shipment_comments" template="order/comments.phtml"/>
+            </block>
+        </block>
+    </referenceContainer>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_guest_view.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_view.xml
new file mode 100644
index 0000000000000000000000000000000000000000..36dd2282f99be6698effada70d6aadc1f8768b8c
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/layout/sales_guest_view.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="sales.order.view">
+        <block class="Magento\Shipping\Block\Tracking\Link" name="tracking-info-link" template="tracking/link.phtml">
+            <arguments>
+                <argument name="label" xsi:type="string">Track your order</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_order_reorder.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_order_reorder.xml
new file mode 100644
index 0000000000000000000000000000000000000000..36dd2282f99be6698effada70d6aadc1f8768b8c
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/layout/sales_order_reorder.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="sales.order.view">
+        <block class="Magento\Shipping\Block\Tracking\Link" name="tracking-info-link" template="tracking/link.phtml">
+            <arguments>
+                <argument name="label" xsi:type="string">Track your order</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml
new file mode 100644
index 0000000000000000000000000000000000000000..514bfcc9d82e28f3044faa9858613f273be01ab2
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/layout/sales_order_shipment.xml
@@ -0,0 +1,40 @@
+<?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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceContainer name="content">
+        <block class="Magento\Shipping\Block\Order\Shipment" name="sales.order.shipment" after="sales.order.info" cacheable="false">
+            <block class="Magento\Shipping\Block\Items" name="shipment_items" template="items.phtml">
+                <block class="Magento\Shipping\Block\Tracking\Link" name="track-all-link" template="tracking/link.phtml">
+                    <arguments>
+                        <argument name="label" xsi:type="string">Track All Shipments</argument>
+                    </arguments>
+                </block>
+                <block class="Magento\Sales\Block\Order\Item\Renderer\DefaultRenderer" as="default" template="Magento_Sales::order/shipment/items/renderer/default.phtml"/>
+                <block class="Magento\Sales\Block\Order\Comments" name="shipment_comments" template="order/comments.phtml"/>
+            </block>
+        </block>
+    </referenceContainer>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Shipping/view/frontend/layout/sales_order_view.xml b/app/code/Magento/Shipping/view/frontend/layout/sales_order_view.xml
new file mode 100644
index 0000000000000000000000000000000000000000..36dd2282f99be6698effada70d6aadc1f8768b8c
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/layout/sales_order_view.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <referenceBlock name="sales.order.view">
+        <block class="Magento\Shipping\Block\Tracking\Link" name="tracking-info-link" template="tracking/link.phtml">
+            <arguments>
+                <argument name="label" xsi:type="string">Track your order</argument>
+            </arguments>
+        </block>
+    </referenceBlock>
+</layout>
\ No newline at end of file
diff --git a/app/code/Magento/Sales/view/frontend/order/shipment.phtml b/app/code/Magento/Shipping/view/frontend/order/shipment.phtml
similarity index 100%
rename from app/code/Magento/Sales/view/frontend/order/shipment.phtml
rename to app/code/Magento/Shipping/view/frontend/order/shipment.phtml
diff --git a/app/code/Magento/Shipping/view/frontend/tracking/link.phtml b/app/code/Magento/Shipping/view/frontend/tracking/link.phtml
new file mode 100644
index 0000000000000000000000000000000000000000..2eb73dab6b67388dc6b5a1a85bd43d3fd0084085
--- /dev/null
+++ b/app/code/Magento/Shipping/view/frontend/tracking/link.phtml
@@ -0,0 +1,30 @@
+<?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.
+ *
+ * @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 /** @var $this \Magento\Shipping\Block\Tracking\Link */ ?>
+<?php $order = $this->getOrder() ?>
+<a href="#" class="action track" title="<?php echo $this->getLabel() ?>"
+   data-mage-init="{popupWindow: {windowURL:'<?php echo $this->getWindowUrl($order) ?>',windowName:'trackorder',width:800,height:600,left:0,top:0,resizable:1,scrollbars:1}}">
+    <span><?php echo $this->getLabel()?></span>
+</a>
\ No newline at end of file
diff --git a/app/code/Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php b/app/code/Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php
index 26ed1174907e95479bc9fa2bd6658c8601b5dc64..2c5faf4ebb85c5abf3b2313dd28980ac7aba5d4a 100644
--- a/app/code/Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php
+++ b/app/code/Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php
@@ -35,7 +35,7 @@ namespace Magento\Sitemap\Block\Adminhtml\Grid\Renderer;
 class Link extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
     /**
-     * @var \Magento\Filesystem $filesystem
+     * @var \Magento\App\Filesystem $filesystem
      */
     protected $_filesystem;
 
@@ -47,13 +47,13 @@ class Link extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRe
     /**
      * @param \Magento\Backend\Block\Context $context
      * @param \Magento\Sitemap\Model\SitemapFactory $sitemapFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Sitemap\Model\SitemapFactory $sitemapFactory,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         array $data = array()
     ) {
         $this->_sitemapFactory = $sitemapFactory;
@@ -74,7 +74,7 @@ class Link extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRe
         $url = $this->escapeHtml($sitemap->getSitemapUrl($row->getSitemapPath(), $row->getSitemapFilename()));
 
         $fileName = preg_replace('/^\//', '', $row->getSitemapPath() . $row->getSitemapFilename());
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $directory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         if ($directory->isFile($fileName)) {
             return sprintf('<a href="%1$s">%1$s</a>', $url);
         }
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php
index 8fe99b33a601f294f6178ce4c541c821d222a7d2..33d212ce0348362f2be8af3fc7232c2fcefa0907 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap.php
@@ -169,8 +169,8 @@ class Sitemap extends  \Magento\Backend\App\Action
             }
 
             /** @var \Magento\Filesystem\Directory\Write $directory */
-            $directory = $this->_objectManager->get('Magento\Filesystem')
-                ->getDirectoryWrite(\Magento\Filesystem::ROOT);
+            $directory = $this->_objectManager->get('Magento\App\Filesystem')
+                ->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
             if ($this->getRequest()->getParam('sitemap_id')) {
                 $model->load($this->getRequest()->getParam('sitemap_id'));
@@ -228,8 +228,8 @@ class Sitemap extends  \Magento\Backend\App\Action
     public function deleteAction()
     {
         /** @var \Magento\Filesystem\Directory\Write $directory */
-        $directory = $this->_objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directory = $this->_objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
         // check if we know what should be deleted
         $id = $this->getRequest()->getParam('sitemap_id');
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index f360b5e6d4e986ec86a430e30c0176371f2269a7..83ac6d0b323c354fc567468d08f3c408546ecaf9 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -161,7 +161,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Escaper $escaper
      * @param \Magento\Sitemap\Helper\Data $sitemapData
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Sitemap\Model\Resource\Catalog\CategoryFactory $categoryFactory
      * @param \Magento\Sitemap\Model\Resource\Catalog\ProductFactory $productFactory
      * @param \Magento\Sitemap\Model\Resource\Cms\PageFactory $cmsFactory
@@ -178,7 +178,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\Registry $registry,
         \Magento\Escaper $escaper,
         \Magento\Sitemap\Helper\Data $sitemapData,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Sitemap\Model\Resource\Catalog\CategoryFactory $categoryFactory,
         \Magento\Sitemap\Model\Resource\Catalog\ProductFactory $productFactory,
         \Magento\Sitemap\Model\Resource\Cms\PageFactory $cmsFactory,
@@ -192,7 +192,7 @@ class Sitemap extends \Magento\Core\Model\AbstractModel
     ) {
         $this->_escaper = $escaper;
         $this->_sitemapData = $sitemapData;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $this->_categoryFactory = $categoryFactory;
         $this->_productFactory = $productFactory;
         $this->_cmsFactory = $cmsFactory;
diff --git a/app/code/Magento/Sitemap/etc/module.xml b/app/code/Magento/Sitemap/etc/module.xml
index 729467a211525e43f8936bc64220c7c6c72259fd..689b8c319fa1f64fd113237c3960455f7ea0f396 100755
--- a/app/code/Magento/Sitemap/etc/module.xml
+++ b/app/code/Magento/Sitemap/etc/module.xml
@@ -34,6 +34,7 @@
             <module name="Magento_Eav"/>
             <module name="Magento_Cms"/>
             <module name="Magento_Backend"/>
+            <module name="Magento_Email"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Tax/Block/Checkout/Discount.php b/app/code/Magento/Tax/Block/Checkout/Discount.php
index 589c06e3ca1cdfbf37c351c173f4a2bd9a8a9533..acba8d8eedc80c285668b43879438fcf28958bad 100644
--- a/app/code/Magento/Tax/Block/Checkout/Discount.php
+++ b/app/code/Magento/Tax/Block/Checkout/Discount.php
@@ -56,6 +56,7 @@ class Discount extends \Magento\Checkout\Block\Total\DefaultTotal
     ) {
         $this->_taxConfig = $taxConfig;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php
index 4efa0f943b3f149072f07df28dfbacaa259b19e5..d24335734431129d25b80e5453c68522421c321d 100644
--- a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php
+++ b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php
@@ -63,6 +63,7 @@ class Grandtotal extends \Magento\Checkout\Block\Total\DefaultTotal
     ) {
         $this->_taxConfig = $taxConfig;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Tax/Block/Checkout/Shipping.php b/app/code/Magento/Tax/Block/Checkout/Shipping.php
index 497abc917b320a0b1d85e60c24987ac3d48f099a..b46ac8987a0907bd6d5226c1cd222504b3234af5 100644
--- a/app/code/Magento/Tax/Block/Checkout/Shipping.php
+++ b/app/code/Magento/Tax/Block/Checkout/Shipping.php
@@ -63,6 +63,7 @@ class Shipping extends \Magento\Checkout\Block\Total\DefaultTotal
     ) {
         $this->_taxConfig = $taxConfig;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Tax/Block/Checkout/Subtotal.php b/app/code/Magento/Tax/Block/Checkout/Subtotal.php
index 4de7b2042355922def900994c11ca401329de841..88b025cf1b20838be8ab84671ee5d97d94c8818b 100644
--- a/app/code/Magento/Tax/Block/Checkout/Subtotal.php
+++ b/app/code/Magento/Tax/Block/Checkout/Subtotal.php
@@ -63,6 +63,7 @@ class Subtotal extends \Magento\Checkout\Block\Total\DefaultTotal
     ) {
         $this->_taxConfig = $taxConfig;
         parent::__construct($context, $catalogData, $customerSession, $checkoutSession, $salesConfig, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Tax/Controller/Adminhtml/Rate.php b/app/code/Magento/Tax/Controller/Adminhtml/Rate.php
index 74976baf8936d773ba6e92d35fd70bbfb6c7ffef..923c7ab15d36edf4d47af2da8e07a98d7c21fe62 100644
--- a/app/code/Magento/Tax/Controller/Adminhtml/Rate.php
+++ b/app/code/Magento/Tax/Controller/Adminhtml/Rate.php
@@ -300,7 +300,7 @@ class Rate extends \Magento\Backend\App\Action
     {
         $this->_view->loadLayout(false);
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.tax.rate.grid', 'grid.export');
-        return $this->_fileFactory->create('rates.csv', $content->getCsvFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('rates.csv', $content->getCsvFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -310,7 +310,7 @@ class Rate extends \Magento\Backend\App\Action
     {
         $this->_view->loadLayout(false);
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.tax.rate.grid', 'grid.export');
-        return $this->_fileFactory->create('rates.xml', $content->getExcelFile(), \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('rates.xml', $content->getExcelFile(), \Magento\App\Filesystem::VAR_DIR);
     }
 
     /**
@@ -431,7 +431,7 @@ class Rate extends \Magento\Backend\App\Action
             $content .= $rate->toString($template) . "\n";
         }
         $this->_view->loadLayout();
-        return $this->_fileFactory->create('tax_rates.csv', $content, \Magento\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('tax_rates.csv', $content, \Magento\App\Filesystem::VAR_DIR);
     }
 
     protected function _isAllowed()
diff --git a/app/code/Magento/Tax/Model/Resource/Setup.php b/app/code/Magento/Tax/Model/Resource/Setup.php
index 08abca336397f43f152a3efc01bcaa3eb68201af..03a4c4177976f44ac147296b553387d9f7fc29d0 100644
--- a/app/code/Magento/Tax/Model/Resource/Setup.php
+++ b/app/code/Magento/Tax/Model/Resource/Setup.php
@@ -40,7 +40,7 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
      * @param \Magento\Core\Model\Resource\Setup\Context $context
      * @param string $resourceName
      * @param \Magento\App\CacheInterface $cache
-     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory
+     * @param \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory
      * @param \Magento\Core\Model\Config $config
      * @param \Magento\Catalog\Model\Resource\SetupFactory $setupFactory
      * @param string $moduleName
@@ -50,14 +50,14 @@ class Setup extends \Magento\Sales\Model\Resource\Setup
         \Magento\Core\Model\Resource\Setup\Context $context,
         $resourceName,
         \Magento\App\CacheInterface $cache,
-        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGrCollFactory,
+        \Magento\Eav\Model\Resource\Entity\Attribute\Group\CollectionFactory $attrGroupCollectionFactory,
         \Magento\Core\Model\Config $config,
         \Magento\Catalog\Model\Resource\SetupFactory $setupFactory,
         $moduleName = 'Magento_Tax',
         $connectionName = ''
     ) {
         $this->_setupFactory = $setupFactory;
-        parent::__construct($context, $resourceName, $cache, $attrGrCollFactory, $config, $moduleName, $connectionName);
+        parent::__construct($context, $resourceName, $cache, $attrGroupCollectionFactory, $config, $moduleName, $connectionName);
     }
 
     /**
diff --git a/app/code/Magento/Tax/etc/module.xml b/app/code/Magento/Tax/etc/module.xml
index 39aa92d3edc1a7799df2784d2e22d624e50b7a7b..cb40c19e62c90182d612d08cdf1712c6fb8d618d 100755
--- a/app/code/Magento/Tax/etc/module.xml
+++ b/app/code/Magento/Tax/etc/module.xml
@@ -41,6 +41,7 @@
             <module name="Magento_Eav"/>
             <module name="Magento_Sales"/>
             <module name="Magento_Reports"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
index 0df09c9d81267a9bf7db8f9ec9262abc72762ce3..7dde52893f805a74e8830eebe7cc8af64ffc8613 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
@@ -297,7 +297,7 @@ class Theme extends \Magento\Backend\App\Action
                         'type'  => 'filename',
                         'value' => $customCssFile->getFullPath()
                     ),
-                    \Magento\Filesystem::ROOT
+                    \Magento\App\Filesystem::ROOT_DIR
                 );
             }
         } catch (\Exception $e) {
@@ -338,7 +338,7 @@ class Theme extends \Magento\Backend\App\Action
                     'type'  => 'filename',
                     'value' => $themeCss[$fileName]['path']
                 ),
-                \Magento\Filesystem::ROOT
+                \Magento\App\Filesystem::ROOT_DIR
             );
         } catch (\Exception $e) {
             $this->messageManager->addException($e, __('We cannot find file "%1".', $fileName));
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php
index c8999ca2272d59d018d629042ad6425360b5c116..a2dfef884c6da39a3de50bff7e0507c5302f3780 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files.php
@@ -153,7 +153,7 @@ class Files extends \Magento\Backend\App\Action
                     'type'  => 'filename',
                     'value' => $helper->getThumbnailPath($file)
                 ),
-                \Magento\Filesystem::MEDIA
+                \Magento\App\Filesystem::MEDIA_DIR
             );
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Logger')->logException($e);
diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php
index c1da5305e61e026813e246379f7a32b1be0d6ebd..bdfed246db64026c9f77d125b62bc3095c519729 100644
--- a/app/code/Magento/Theme/Helper/Storage.php
+++ b/app/code/Magento/Theme/Helper/Storage.php
@@ -83,7 +83,7 @@ class Storage extends \Magento\App\Helper\AbstractHelper
     /**
      * Magento filesystem
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -104,13 +104,13 @@ class Storage extends \Magento\App\Helper\AbstractHelper
 
     /**
      * @param \Magento\App\Helper\Context $context
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Backend\Model\Session $session
      * @param \Magento\View\Design\Theme\FlyweightFactory $themeFactory
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Backend\Model\Session $session,
         \Magento\View\Design\Theme\FlyweightFactory $themeFactory
     ) {
@@ -118,7 +118,7 @@ class Storage extends \Magento\App\Helper\AbstractHelper
         $this->filesystem = $filesystem;
         $this->_session = $session;
         $this->_themeFactory = $themeFactory;
-        $this->mediaDirectoryWrite = $this->filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->mediaDirectoryWrite = $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->mediaDirectoryWrite->create($this->getStorageRoot());
     }
 
diff --git a/app/code/Magento/Theme/Model/CopyService.php b/app/code/Magento/Theme/Model/CopyService.php
index 766f6b78ef3f4e7363ad6daae0153a8b734afcf3..be261bfb0adc55000d90122a4320fd5f2ee3779f 100644
--- a/app/code/Magento/Theme/Model/CopyService.php
+++ b/app/code/Magento/Theme/Model/CopyService.php
@@ -62,7 +62,7 @@ class CopyService
     protected $_customizationPath;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Design\Theme\FileFactory $fileFactory
      * @param \Magento\Core\Model\Layout\Link $link
      * @param \Magento\Core\Model\Layout\UpdateFactory $updateFactory
@@ -70,14 +70,14 @@ class CopyService
      * @param \Magento\View\Design\Theme\Customization\Path $customization
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Design\Theme\FileFactory $fileFactory,
         \Magento\Core\Model\Layout\Link $link,
         \Magento\Core\Model\Layout\UpdateFactory $updateFactory,
         \Magento\Event\ManagerInterface $eventManager,
         \Magento\View\Design\Theme\Customization\Path $customization
     ) {
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_fileFactory = $fileFactory;
         $this->_link = $link;
         $this->_updateFactory = $updateFactory;
diff --git a/app/code/Magento/Theme/Model/Uploader/Service.php b/app/code/Magento/Theme/Model/Uploader/Service.php
index 01669bac70bf1fc46731f21846429d0489d6d971..74c649c84d9b268a1b78a40a1ee6898b4e073df0 100644
--- a/app/code/Magento/Theme/Model/Uploader/Service.php
+++ b/app/code/Magento/Theme/Model/Uploader/Service.php
@@ -74,18 +74,18 @@ class Service
     /**
      * Constructor
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\File\Size $fileSize
      * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
      * @param array $uploadLimits keys are 'css' and 'js' for file type, values defines maximum file size, example: 2M
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\File\Size $fileSize,
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
         array $uploadLimits = array()
     ) {
-        $this->_tmpDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::SYS_TMP);
+        $this->_tmpDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::SYS_TMP_DIR);
         $this->_fileSize = $fileSize;
         $this->_uploaderFactory = $uploaderFactory;
         if (isset($uploadLimits['css'])) {
diff --git a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
index 68a9faea7b40d83db32cb1ee4e8dfb9255d3dd29..a031c74136b02eac8f542f961bb32d640b5a9e54 100644
--- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
+++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
@@ -86,18 +86,18 @@ class Storage
     /**
      * Initialize dependencies
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Theme\Helper\Storage $helper
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\Image\AdapterFactory $imageFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Theme\Helper\Storage $helper,
         \Magento\ObjectManager $objectManager,
         \Magento\Image\AdapterFactory $imageFactory
     ) {
-        $this->mediaWriteDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->mediaWriteDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_helper = $helper;
         $this->_objectManager = $objectManager;
         $this->_imageFactory = $imageFactory;
diff --git a/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml b/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml
index 5f553e70450bb1d5661fb551902442daf6b164ad..ba181c8ea9931fd9f4e95ede01c11ad83bb6d269 100644
--- a/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml
+++ b/app/code/Magento/Theme/view/frontend/layout/default_head_blocks.xml
@@ -108,6 +108,11 @@
                 <argument name="file" xsi:type="string">mage/loader.js</argument>
             </arguments>
         </block>
+        <block class="Magento\Theme\Block\Html\Head\Script" name="magento-dataPost-js">
+            <arguments>
+                <argument name="file" xsi:type="string">mage/dataPost.js</argument>
+            </arguments>
+        </block>
         <!-- Preload resources for widgets -->
         <block class="Magento\View\Element\Js\Components" name="head.components" as="components" template="Magento_Theme::js/components.phtml"/>
     </referenceBlock>
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/AbstractCarrier.php b/app/code/Magento/Usa/Model/Shipping/Carrier/AbstractCarrier.php
index d8ebc043c440bb73373a0c8241cea328a326612e..a7fd426cec721bd38f93bfebafc1ffb68b6ade4f 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/AbstractCarrier.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/AbstractCarrier.php
@@ -64,7 +64,7 @@ abstract class AbstractCarrier extends \Magento\Shipping\Model\Carrier\AbstractC
     protected $_rateFactory;
 
     /**
-     * @var \Magento\Shipping\Model\Rate\Result\MethodFactory
+     * @var \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory
      */
     protected $_rateMethodFactory;
 
@@ -101,11 +101,11 @@ abstract class AbstractCarrier extends \Magento\Shipping\Model\Carrier\AbstractC
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory
      * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory
      * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory
@@ -119,11 +119,11 @@ abstract class AbstractCarrier extends \Magento\Shipping\Model\Carrier\AbstractC
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
         \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
         \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
@@ -234,10 +234,10 @@ abstract class AbstractCarrier extends \Magento\Shipping\Model\Carrier\AbstractC
      * bundle itself, otherwise we may not get a rate at all (e.g. when total weight of a bundle exceeds max weight
      * despite each item by itself is not)
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return array
      */
-    public function getAllItems(\Magento\Shipping\Model\Rate\Request $request)
+    public function getAllItems(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $items = array();
         if ($request->getAllItems()) {
@@ -266,10 +266,10 @@ abstract class AbstractCarrier extends \Magento\Shipping\Model\Carrier\AbstractC
     /**
      * Processing additional validation to check if carrier applicable.
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
-     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier|\Magento\Shipping\Model\Rate\Result\Error|boolean
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier|\Magento\Sales\Model\Quote\Address\RateResult\Error|boolean
      */
-    public function proccessAdditionalValidation(\Magento\Shipping\Model\Rate\Request $request)
+    public function proccessAdditionalValidation(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         //Skip by item validation if there is no items in request
         if(!count($this->getAllItems($request))) {
@@ -406,7 +406,7 @@ abstract class AbstractCarrier extends \Magento\Shipping\Model\Carrier\AbstractC
      * @param \Magento\Shipping\Model\Shipment\Request $request
      * @return array
      */
-    public function requestToShipment(\Magento\Shipping\Model\Shipment\Request $request)
+    public function requestToShipment($request)
     {
         $packages = $request->getPackages();
         if (!is_array($packages) || !$packages) {
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
index c5602f3bda0f2994727c3c099fb4cc261261c6c9..dde3b5f1f9081d1d47355f4ccf5a7c9752099b9a 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl.php
@@ -51,7 +51,7 @@ class Dhl
     /**
      * Rate request data
      *
-     * @var \Magento\Shipping\Model\Rate\Request|null
+     * @var \Magento\Sales\Model\Quote\Address\RateRequest|null
      */
     protected $_request = null;
 
@@ -188,11 +188,11 @@ class Dhl
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory
      * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory
      * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory
@@ -209,11 +209,11 @@ class Dhl
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
         \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
         \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
@@ -250,10 +250,10 @@ class Dhl
     /**
      * Collect and get rates
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return bool|\Magento\Shipping\Model\Rate\Result|null
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag($this->_activeFlag)) {
             return false;
@@ -271,21 +271,21 @@ class Dhl
         $origCountryId = $requestDhl->getOrigCountryId();
         if (!$origCountryId) {
             $origCountryId = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                 $requestDhl->getStoreId()
             );
         }
         $origState = $requestDhl->getOrigState();
         if (!$origState) {
             $origState = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_REGION_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_REGION_ID,
                 $requestDhl->getStoreId()
             );
         }
         $origCity = $requestDhl->getOrigCity();
         if (!$origCity) {
             $origCity = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_CITY,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_CITY,
                 $requestDhl->getStoreId()
             );
         }
@@ -293,7 +293,7 @@ class Dhl
         $origPostcode = $requestDhl->getOrigPostcode();
         if (!$origPostcode) {
             $origPostcode = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_ZIP,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ZIP,
                 $requestDhl->getStoreId()
             );
         }
@@ -405,7 +405,7 @@ class Dhl
             $origCountry = $request->getOrigCountry();
         } else {
             $origCountry = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                 $r->getStoreId()
             );
         }
@@ -415,7 +415,7 @@ class Dhl
             $origCountryId = $request->getOrigCountryId();
         } else {
             $origCountryId = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                 $r->getStoreId()
             );
         }
@@ -474,9 +474,9 @@ class Dhl
         $r->setOrigCity($request->getOrigCity());
         $r->setOrigPostal($request->getOrigPostal());
         $originStreet1 = $this->_coreStoreConfig
-            ->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS1, $r->getStoreId());
+            ->getConfig(\Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ADDRESS1, $r->getStoreId());
         $originStreet2 = $this->_coreStoreConfig
-            ->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS2, $r->getStoreId());
+            ->getConfig(\Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ADDRESS2, $r->getStoreId());
         $r->setOrigStreet($request->getOrigStreet() ? $request->getOrigStreet() : $originStreet2);
         $r->setOrigStreetLine2($request->getOrigStreetLine2());
         $r->setDestPhoneNumber($request->getDestPhoneNumber());
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
index f6ecedb7a131f0cf2ef3d4d44345ad559ae01e2c..a900f13e50cf75dfb924fa8b07c4c43009f15c56 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Dhl/International.php
@@ -60,7 +60,7 @@ class International
     /**
      * Rate request data
      *
-     * @var \Magento\Shipping\Model\Rate\Request|null
+     * @var \Magento\Sales\Model\Quote\Address\RateRequest|null
      */
     protected $_request = null;
 
@@ -204,11 +204,11 @@ class International
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory
      * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory
      * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory
@@ -229,11 +229,11 @@ class International
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
         \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
         \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
@@ -247,12 +247,12 @@ class International
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Stdlib\String $string,
         \Magento\Math\Division $mathDivision,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\DateTime $dateTime,
         \Zend_Http_ClientFactory $httpClientFactory,
         array $data = array()
     ) {
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $this->_usaData = $usaData;
         $this->_coreDate = $coreDate;
         $this->_storeManager = $storeManager;
@@ -304,10 +304,10 @@ class International
     /**
      * Collect and get rates
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return bool|\Magento\Shipping\Model\Rate\Result|null
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag($this->_activeFlag)) {
             return false;
@@ -322,19 +322,19 @@ class International
         );
         $origCountryId = $this->_getDefaultValue(
             $requestDhl->getOrigCountryId(),
-            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID
+            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID
         );
         $origState = $this->_getDefaultValue(
             $requestDhl->getOrigState(),
-            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_REGION_ID
+            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_REGION_ID
         );
         $origCity = $this->_getDefaultValue(
             $requestDhl->getOrigCity(),
-            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_CITY
+            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_CITY
         );
         $origPostcode = $this->_getDefaultValue(
             $requestDhl->getOrigPostcode(),
-            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_ZIP
+            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ZIP
         );
 
         $requestDhl->setOrigCompanyName($origCompanyName)
@@ -426,11 +426,11 @@ class International
 
         $requestObject->setOrigCountry(
                 $this->_getDefaultValue(
-                    $request->getOrigCountry(), \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID)
+                    $request->getOrigCountry(), \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID)
             )
             ->setOrigCountryId(
                 $this->_getDefaultValue(
-                    $request->getOrigCountryId(), \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID)
+                    $request->getOrigCountryId(), \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID)
             );
 
         $shippingWeight = $request->getPackageWeight();
@@ -454,7 +454,7 @@ class International
             ->setDestCompanyName($request->getDestCompanyName());
 
         $originStreet2 = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_ADDRESS2, $requestObject->getStoreId());
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ADDRESS2, $requestObject->getStoreId());
 
         $requestObject->setOrigStreet($request->getOrigStreet() ? $request->getOrigStreet() : $originStreet2);
 
@@ -1041,7 +1041,7 @@ class International
      * Parse response from DHL web service
      *
      * @param string $response
-     * @return bool|\Magento\Object|\Magento\Shipping\Model\Rate\Result|\Magento\Shipping\Model\Rate\Result\Error
+     * @return bool|\Magento\Object|\Magento\Shipping\Model\Rate\Result|\Magento\Sales\Model\Quote\Address\RateResult\Error
      * @throws \Magento\Core\Exception
      */
     protected function _parseResponse($response)
@@ -1102,7 +1102,7 @@ class International
             foreach ($this->_rates as $rate) {
                 $method = $rate['service'];
                 $data = $rate['data'];
-                /* @var $rate \Magento\Shipping\Model\Rate\Result\Method */
+                /* @var $rate \Magento\Sales\Model\Quote\Address\RateResult\Method */
                 $rate = $this->_rateMethodFactory->create();
                 $rate->setCarrier(self::CODE);
                 $rate->setCarrierTitle($this->getConfigData('title'));
@@ -1265,10 +1265,10 @@ class International
     /**
      * Processing additional validation to check is carrier applicable.
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
-     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier|\Magento\Shipping\Model\Rate\Result\Error|boolean
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
+     * @return \Magento\Shipping\Model\Carrier\AbstractCarrier|\Magento\Sales\Model\Quote\Address\RateResult\Error|boolean
      */
-    public function proccessAdditionalValidation(\Magento\Shipping\Model\Rate\Request $request)
+    public function proccessAdditionalValidation(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         //Skip by item validation if there is no items in request
         if (!count($this->getAllItems($request))) {
@@ -1276,7 +1276,7 @@ class International
         }
 
         $countryParams = $this->getCountryParams(
-            $this->_coreStoreConfig->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID, $request->getStoreId())
+            $this->_coreStoreConfig->getConfig(\Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID, $request->getStoreId())
         );
         if (!$countryParams->getData()) {
             $this->_errors[] = __('Please, specify origin country');
@@ -1292,14 +1292,14 @@ class International
     /**
      * Show default error
      *
-     * @return bool|\Magento\Shipping\Model\Rate\Result\Error
+     * @return bool|\Magento\Sales\Model\Quote\Address\RateResult\Error
      */
     protected function _showError()
     {
         $showMethod = $this->getConfigData('showmethod');
 
         if ($showMethod) {
-            /* @var $error \Magento\Shipping\Model\Rate\Result\Error */
+            /* @var $error \Magento\Sales\Model\Quote\Address\RateResult\Error */
             $error = $this->_rateErrorFactory->create();
             $error->setCarrier(self::CODE);
             $error->setCarrierTitle($this->getConfigData('title'));
@@ -1392,7 +1392,7 @@ class International
         $rawRequest = $this->_request;
 
         $originRegion = $this->getCountryParams(
-            $this->_coreStoreConfig->getConfig(\Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID, $this->getStore())
+            $this->_coreStoreConfig->getConfig(\Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID, $this->getStore())
         )->getRegion();
 
         if (!$originRegion) {
@@ -1560,7 +1560,7 @@ class International
      * Generation Shipment Details Node according to origin region
      *
      * @param \Magento\Usa\Model\Simplexml\Element $xml
-     * @param \Magento\Shipping\Model\Rate\Request $rawRequest
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $rawRequest
      * @param string $originRegion
      * @return void
      */
@@ -1863,7 +1863,7 @@ class International
      * @return array|\Magento\Object
      * @throws \Magento\Core\Exception
      */
-    public function requestToShipment(\Magento\Shipping\Model\Shipment\Request $request)
+    public function requestToShipment($request)
     {
         $packages = $request->getPackages();
         if (!is_array($packages) || !$packages) {
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
index 9209bb6d86fa4a5426ccaba6bf57d4d2db9ec134..19c977eab9cc3030ea5aed0fb36926225870a3af 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Fedex.php
@@ -69,7 +69,7 @@ class Fedex
     /**
      * Rate request data
      *
-     * @var \Magento\Shipping\Model\Rate\Request|null
+     * @var \Magento\Sales\Model\Quote\Address\RateRequest|null
      */
     protected $_request = null;
 
@@ -128,15 +128,15 @@ class Fedex
     /**
      * @var \Magento\Catalog\Model\Resource\Product\CollectionFactory
      */
-    protected $_productCollFactory;
+    protected $_productCollectionFactory;
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory
      * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory
      * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory
@@ -147,18 +147,18 @@ class Fedex
      * @param \Magento\Logger $logger
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Module\Dir\Reader $configReader
-     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
+     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param array $data
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
         \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
         \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
@@ -169,11 +169,11 @@ class Fedex
         \Magento\Logger $logger,
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Module\Dir\Reader $configReader,
-        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
+        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         array $data = array()
     ) {
         $this->_storeManager = $storeManager;
-        $this->_productCollFactory = $productCollFactory;
+        $this->_productCollectionFactory = $productCollectionFactory;
         parent::__construct(
             $coreStoreConfig,
             $rateErrorFactory,
@@ -248,10 +248,10 @@ class Fedex
     /**
      * Collect and get rates
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result|bool|null
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag($this->_activeFlag)) {
             return false;
@@ -268,10 +268,10 @@ class Fedex
     /**
      * Prepare and set request to this instance
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Usa\Model\Shipping\Carrier\Fedex
      */
-    public function setRequest(\Magento\Shipping\Model\Rate\Request $request)
+    public function setRequest(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $this->_request = $request;
 
@@ -306,7 +306,7 @@ class Fedex
             $origCountry = $request->getOrigCountry();
         } else {
             $origCountry = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                 $request->getStoreId()
             );
         }
@@ -316,7 +316,7 @@ class Fedex
             $r->setOrigPostal($request->getOrigPostcode());
         } else {
             $r->setOrigPostal($this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_ZIP,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ZIP,
                 $request->getStoreId()
             ));
         }
@@ -1310,7 +1310,7 @@ class Fedex
         }
 
         // get countries of manufacture
-        $productCollection = $this->_productCollFactory
+        $productCollection = $this->_productCollectionFactory
             ->create()
             ->addStoreFilter($request->getStoreId())
             ->addFieldToFilter('entity_id', array('in' => $productIds))
@@ -1360,7 +1360,7 @@ class Fedex
                     'Payor' => array(
                         'AccountNumber' => $this->getConfigData('account'),
                         'CountryCode'   => $this->_coreStoreConfig->getConfig(
-                            \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                            \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                             $request->getStoreId()
                         )
                     )
@@ -1404,7 +1404,7 @@ class Fedex
                         'Payor' => array(
                             'AccountNumber' => $this->getConfigData('account'),
                             'CountryCode'   => $this->_coreStoreConfig->getConfig(
-                                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                                 $request->getStoreId()
                             )
                         )
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
index 799198f4de7d9e0995ef479658b66c4567c45ff6..89a7b91c77e2741ca5648308868adaf7a1b6e2c5 100644
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Ups.php
@@ -58,7 +58,7 @@ class Ups
     /**
      * Rate request data
      *
-     * @var \Magento\Shipping\Model\Rate\Request
+     * @var \Magento\Sales\Model\Quote\Address\RateRequest
      */
     protected $_request;
 
@@ -136,11 +136,11 @@ class Ups
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory
      * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory
      * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory
@@ -156,11 +156,11 @@ class Ups
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
         \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
         \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
@@ -196,11 +196,11 @@ class Ups
     /**
      * Collect and get rates
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result|bool|null
      */
 
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag($this->_activeFlag)) {
             return false;
@@ -217,10 +217,10 @@ class Ups
     /**
      * Prepare and set request to this instance
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Usa\Model\Shipping\Carrier\Ups
      */
-    public function setRequest(\Magento\Shipping\Model\Rate\Request $request)
+    public function setRequest(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $this->_request = $request;
 
@@ -259,7 +259,7 @@ class Ups
             $origCountry = $request->getOrigCountry();
         } else {
             $origCountry = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                 $request->getStoreId()
             );
         }
@@ -270,7 +270,7 @@ class Ups
             $origRegionCode = $request->getOrigRegionCode();
         } else {
             $origRegionCode = $this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_REGION_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_REGION_ID,
                 $request->getStoreId()
             );
         }
@@ -283,7 +283,7 @@ class Ups
             $rowRequest->setOrigPostal($request->getOrigPostcode());
         } else {
             $rowRequest->setOrigPostal($this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_ZIP,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ZIP,
                 $request->getStoreId()
             ));
         }
@@ -292,7 +292,7 @@ class Ups
             $rowRequest->setOrigCity($request->getOrigCity());
         } else {
             $rowRequest->setOrigCity($this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_CITY,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_CITY,
                 $request->getStoreId()
             ));
         }
diff --git a/app/code/Magento/Usa/Model/Shipping/Carrier/Usps.php b/app/code/Magento/Usa/Model/Shipping/Carrier/Usps.php
index 480184cfdd89e633dcb3d496f1d68592d3da6231..93b8b269fa36946ef2e11da478fcbf549cddae99 100755
--- a/app/code/Magento/Usa/Model/Shipping/Carrier/Usps.php
+++ b/app/code/Magento/Usa/Model/Shipping/Carrier/Usps.php
@@ -91,7 +91,7 @@ class Usps
     /**
      * Rate request data
      *
-     * @var \Magento\Shipping\Model\Rate\Request|null
+     * @var \Magento\Sales\Model\Quote\Address\RateRequest|null
      */
     protected $_request = null;
 
@@ -133,7 +133,7 @@ class Usps
     /**
      * @var \Magento\Catalog\Model\Resource\Product\CollectionFactory
      */
-    protected $_productCollFactory;
+    protected $_productCollectionFactory;
 
     /**
      * @var \Zend_Http_ClientFactory
@@ -142,11 +142,11 @@ class Usps
 
     /**
      * @param \Magento\Core\Model\Store\Config $coreStoreConfig
-     * @param \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory
      * @param \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory
      * @param \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory
      * @param \Magento\Shipping\Model\Rate\ResultFactory $rateFactory
-     * @param \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory
+     * @param \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory
      * @param \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory
      * @param \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory
      * @param \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory
@@ -155,7 +155,7 @@ class Usps
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Directory\Helper\Data $directoryData
      * @param \Magento\Usa\Helper\Data $usaData
-     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
+     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param \Zend_Http_ClientFactory $httpClientFactory
      * @param array $data
      * 
@@ -163,11 +163,11 @@ class Usps
      */
     public function __construct(
         \Magento\Core\Model\Store\Config $coreStoreConfig,
-        \Magento\Shipping\Model\Rate\Result\ErrorFactory $rateErrorFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
         \Magento\Core\Model\Log\AdapterFactory $logAdapterFactory,
         \Magento\Usa\Model\Simplexml\ElementFactory $xmlElFactory,
         \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
-        \Magento\Shipping\Model\Rate\Result\MethodFactory $rateMethodFactory,
+        \Magento\Sales\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
         \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
         \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
         \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
@@ -176,12 +176,12 @@ class Usps
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Directory\Helper\Data $directoryData,
         \Magento\Usa\Helper\Data $usaData,
-        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
+        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         \Zend_Http_ClientFactory $httpClientFactory,
         array $data = array()
     ) {
         $this->_usaData = $usaData;
-        $this->_productCollFactory = $productCollFactory;
+        $this->_productCollectionFactory = $productCollectionFactory;
         $this->_httpClientFactory = $httpClientFactory;
         parent::__construct(
             $coreStoreConfig,
@@ -204,10 +204,10 @@ class Usps
     /**
      * Collect and get rates
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Shipping\Model\Rate\Result|bool|null
      */
-    public function collectRates(\Magento\Shipping\Model\Rate\Request $request)
+    public function collectRates(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         if (!$this->getConfigFlag($this->_activeFlag)) {
             return false;
@@ -225,10 +225,10 @@ class Usps
     /**
      * Prepare and set request to this instance
      *
-     * @param \Magento\Shipping\Model\Rate\Request $request
+     * @param \Magento\Sales\Model\Quote\Address\RateRequest $request
      * @return \Magento\Usa\Model\Shipping\Carrier\Usps
      */
-    public function setRequest(\Magento\Shipping\Model\Rate\Request $request)
+    public function setRequest(\Magento\Sales\Model\Quote\Address\RateRequest $request)
     {
         $this->_request = $request;
 
@@ -300,7 +300,7 @@ class Usps
             $r->setOrigPostal($request->getOrigPostcode());
         } else {
             $r->setOrigPostal($this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_ZIP,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ZIP,
                 $request->getStoreId()
             ));
         }
@@ -309,7 +309,7 @@ class Usps
             $r->setOrigCountryId($request->getOrigCountryId());
         } else {
             $r->setOrigCountryId($this->_coreStoreConfig->getConfig(
-                \Magento\Shipping\Model\Shipping::XML_PATH_STORE_COUNTRY_ID,
+                \Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID,
                 $request->getStoreId()
             ));
         }
@@ -1738,7 +1738,7 @@ class Usps
 
                 $productIds[]= $item->getProductId();
         }
-        $productCollection = $this->_productCollFactory
+        $productCollection = $this->_productCollectionFactory
             ->create()
             ->addStoreFilter($request->getStoreId())
             ->addFieldToFilter('entity_id', array('in' => $productIds))
diff --git a/app/code/Magento/Usa/etc/module.xml b/app/code/Magento/Usa/etc/module.xml
index c93192c3006ce1f99b288fed725e2a4ec216dfb8..23a9af0b53cce04641bc316943f2a5beb24f8d87 100755
--- a/app/code/Magento/Usa/etc/module.xml
+++ b/app/code/Magento/Usa/etc/module.xml
@@ -36,6 +36,7 @@
             <module name="Magento_Core"/>
             <module name="Magento_Catalog"/>
             <module name="Magento_Paypal"/>
+            <module name="Magento_Sales"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php
index 2ede053f75e22d413617e39ab5748ffd85d1f52b..8f506ed93b2a740ef398332a02eabd8c57d8f6fc 100644
--- a/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php
+++ b/app/code/Magento/User/data/user_setup/data-upgrade-1.6.1.1-1.6.1.2.php
@@ -117,7 +117,6 @@ $map = array(
     'admin/newsletter/subscriber' => 'Magento_Newsletter::subscriber',
     'admin/newsletter/template' => 'Magento_Newsletter::template',
     'admin/system/config/oauth' => 'Magento_Oauth::oauth',
-    'admin/page_cache' => 'Magento_PageCache::page_cache',
     'admin/system/config/payment' => 'Magento_Payment::payment',
     'admin/system/config/payment_services' => 'Magento_Payment::payment_services',
     'admin/report/salesroot/paypal_settlement_reports/fetch' => 'Magento_Paypal::fetch',
diff --git a/app/code/Magento/User/etc/module.xml b/app/code/Magento/User/etc/module.xml
index cafd12253c2471c5842078ae2ab0056631b78eab..6a867c9e3bafb69587e3529d7ff10052445d5359 100755
--- a/app/code/Magento/User/etc/module.xml
+++ b/app/code/Magento/User/etc/module.xml
@@ -51,7 +51,6 @@
             <module name="Magento_ImportExport"/>
             <module name="Magento_Index"/>
             <module name="Magento_Integration"/>
-            <module name="Magento_PageCache"/>
             <module name="Magento_Payment"/>
             <module name="Magento_Paypal"/>
             <module name="Magento_Persistent"/>
@@ -65,6 +64,8 @@
             <module name="Magento_Tax"/>
             <module name="Magento_Widget"/>
             <module name="Magento_Wishlist"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Theme"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
index a751a19d9cbd3ad7ba3aef3b2fa884099f97644f..a750b81667f56c19c1ee2a0ac893e71c61843522 100644
--- a/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
+++ b/app/code/Magento/Webapi/Block/Adminhtml/Integration/Edit/Tab/Webapi.php
@@ -46,7 +46,7 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic
      *
      * @var \Magento\User\Model\Resource\Rules\CollectionFactory
      */
-    protected $_rulesCollFactory;
+    protected $_rulesCollectionFactory;
 
     /**
      * Acl resource provider
@@ -71,7 +71,7 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic
      * @param \Magento\Core\Model\Registry $registry
      * @param \Magento\Data\FormFactory $formFactory
      * @param \Magento\Core\Model\Acl\RootResource $rootResource
-     * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollFactory
+     * @param \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory
      * @param \Magento\Acl\Resource\ProviderInterface $aclResourceProvider
      * @param \Magento\Webapi\Helper\Data $webapiData
      * @param \Magento\Integration\Helper\Data $integrationData
@@ -82,14 +82,14 @@ class Webapi extends \Magento\Backend\Block\Widget\Form\Generic
         \Magento\Core\Model\Registry $registry,
         \Magento\Data\FormFactory $formFactory,
         \Magento\Core\Model\Acl\RootResource $rootResource,
-        \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollFactory,
+        \Magento\User\Model\Resource\Rules\CollectionFactory $rulesCollectionFactory,
         \Magento\Acl\Resource\ProviderInterface $aclResourceProvider,
         \Magento\Webapi\Helper\Data $webapiData,
         \Magento\Integration\Helper\Data $integrationData,
         array $data = array()
     ) {
         $this->_rootResource = $rootResource;
-        $this->_rulesCollFactory = $rulesCollFactory;
+        $this->_rulesCollectionFactory = $rulesCollectionFactory;
         $this->_aclResourceProvider = $aclResourceProvider;
         $this->_webapiData = $webapiData;
         $this->_integrationData = $integrationData;
diff --git a/app/code/Magento/Webapi/Controller/ErrorProcessor.php b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
index 19eff57391a54ce8a74d5f89b5345cbfec914814..352221dec660f09f12feb5579526b9ebda40ff87 100644
--- a/app/code/Magento/Webapi/Controller/ErrorProcessor.php
+++ b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
@@ -51,7 +51,7 @@ class ErrorProcessor
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -66,19 +66,19 @@ class ErrorProcessor
      * @param \Magento\Core\Helper\Data $helper
      * @param \Magento\Core\Model\App $app
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Helper\Data $helper,
         \Magento\Core\Model\App $app,
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_coreHelper = $helper;
         $this->_app = $app;
         $this->_logger = $logger;
         $this->_filesystem = $filesystem;
-        $this->directoryWrite = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $this->directoryWrite = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->registerShutdownFunction();
     }
 
diff --git a/app/code/Magento/Webapi/Model/Soap/Config.php b/app/code/Magento/Webapi/Model/Soap/Config.php
index 241eb65c1626333deee5edbc100f7ffff4d55a6f..2cc8a36e6dacae110ea67c063a487fa12609a00d 100644
--- a/app/code/Magento/Webapi/Model/Soap/Config.php
+++ b/app/code/Magento/Webapi/Model/Soap/Config.php
@@ -67,16 +67,16 @@ class Config
 
     /**
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Webapi\Model\Config $config
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Webapi\Model\Config $config
     ) {
         // TODO: Check if Service specific XSD is already cached
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $this->_config = $config;
         $this->_objectManager = $objectManager;
     }
diff --git a/app/code/Magento/Webapi/etc/module.xml b/app/code/Magento/Webapi/etc/module.xml
index 3f7484e2e23c921fc6240254d12273ba95c5d899..3b79d755c30f39a36a23e733428a4539c642b59a 100755
--- a/app/code/Magento/Webapi/etc/module.xml
+++ b/app/code/Magento/Webapi/etc/module.xml
@@ -37,6 +37,7 @@
             <module name="Magento_Service"/>
             <module name="Magento_Backend"/>
             <module name="Magento_User"/>
+            <module name="Magento_Authz"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Weee/Model/Observer.php b/app/code/Magento/Weee/Model/Observer.php
index 9b74c9952f648bc8ac09278bc60fa8311dc3089b..7ddee5c048ecf0a89d3355d9bbdbeb4173e07549 100644
--- a/app/code/Magento/Weee/Model/Observer.php
+++ b/app/code/Magento/Weee/Model/Observer.php
@@ -159,7 +159,7 @@ class Observer extends \Magento\Core\Model\AbstractModel
                 '_front_fieldset',
             ),
             'disabled_types' => array(
-                \Magento\Catalog\Model\Product\Type::TYPE_GROUPED,
+                \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE,
             )
         );
 
@@ -184,7 +184,7 @@ class Observer extends \Magento\Core\Model\AbstractModel
             if (!$object->getApplyTo()) {
                 $applyTo = array();
                 foreach ($this->_productType->getOptions() as $option) {
-                    if ($option['value'] == \Magento\Catalog\Model\Product\Type::TYPE_GROUPED) {
+                    if ($option['value'] == \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE) {
                         continue;
                     }
                     $applyTo[] = $option['value'];
diff --git a/app/code/Magento/Weee/etc/module.xml b/app/code/Magento/Weee/etc/module.xml
index 0f4adb9404d23310be193766bdfbc9ce400e6a86..6d8f60b135c531b389e15de6c4728e29a36d9805 100644
--- a/app/code/Magento/Weee/etc/module.xml
+++ b/app/code/Magento/Weee/etc/module.xml
@@ -41,6 +41,7 @@
             <module name="Magento_Customer"/>
             <module name="Magento_Bundle"/>
             <module name="Magento_Theme"/>
+            <module name="Magento_GroupedProduct"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Widget/Model/Config/FileResolver.php b/app/code/Magento/Widget/Model/Config/FileResolver.php
index cea2f2f515b0a06ad9724b29f4145a2f4ab61d07..d161adbc5936766841580d668c1edc94547ce6c2 100644
--- a/app/code/Magento/Widget/Model/Config/FileResolver.php
+++ b/app/code/Magento/Widget/Model/Config/FileResolver.php
@@ -50,17 +50,17 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     protected $modulesDirectory;
 
     /**
-     * @param \Magento\Filesystem                   $filesystem
+     * @param \Magento\App\Filesystem                   $filesystem
      * @param \Magento\Module\Dir\Reader            $moduleReader
      * @param \Magento\Config\FileIteratorFactory   $iteratorFactory
      */
     public function __construct(
-        \Magento\Filesystem                 $filesystem,
+        \Magento\App\Filesystem                 $filesystem,
         \Magento\Module\Dir\Reader          $moduleReader,
         \Magento\Config\FileIteratorFactory $iteratorFactory
     ) {
-        $this->themesDirectory  = $filesystem->getDirectoryRead(\Magento\Filesystem::THEMES);
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $this->themesDirectory  = $filesystem->getDirectoryRead(\Magento\App\Filesystem::THEMES_DIR);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $this->iteratorFactory  = $iteratorFactory;
         $this->_moduleReader    = $moduleReader;
     }
diff --git a/app/code/Magento/Widget/Model/Widget/Instance.php b/app/code/Magento/Widget/Model/Widget/Instance.php
index 50d5cfb4fac1870d647c55735f74d378f6ea0eea..35083273dab81f4e41e0a86c788ed38a44f26e2a 100644
--- a/app/code/Magento/Widget/Model/Widget/Instance.php
+++ b/app/code/Magento/Widget/Model/Widget/Instance.php
@@ -123,7 +123,7 @@ class Instance extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Widget\Model\Widget $widgetModel
      * @param \Magento\Widget\Model\NamespaceResolver $namespaceResolver
      * @param \Magento\Math\Random $mathRandom
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $relatedCacheTypes
@@ -140,7 +140,7 @@ class Instance extends \Magento\Core\Model\AbstractModel
         \Magento\Widget\Model\Widget $widgetModel,
         \Magento\Widget\Model\NamespaceResolver $namespaceResolver,
         \Magento\Math\Random $mathRandom,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $relatedCacheTypes = array(),
@@ -154,7 +154,7 @@ class Instance extends \Magento\Core\Model\AbstractModel
         $this->_reader = $reader;
         $this->_widgetModel = $widgetModel;
         $this->mathRandom = $mathRandom;
-        $this->_directory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->_directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $this->_namespaceResolver = $namespaceResolver;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
diff --git a/app/code/Magento/Wishlist/Block/AbstractBlock.php b/app/code/Magento/Wishlist/Block/AbstractBlock.php
index 8bfe5c72d617f005d5af3717dba573b8189465d0..8cc3a75b58ccd9a458886ec8ffdf3b3f1f905d24 100644
--- a/app/code/Magento/Wishlist/Block/AbstractBlock.php
+++ b/app/code/Magento/Wishlist/Block/AbstractBlock.php
@@ -75,6 +75,7 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -92,7 +93,8 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd
         \Magento\Catalog\Helper\Image $imageHelper,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\ProductFactory $productFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_customerSession = $customerSession;
         $this->_productFactory = $productFactory;
@@ -108,8 +110,10 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd
             $compareProduct,
             $layoutHelper,
             $imageHelper,
-            $data
+            $data,
+            $priceBlockTypes
         );
+        $this->_isScopePrivate = true;
     }
 
     /**
@@ -189,15 +193,15 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd
     }
 
     /**
-     * Retrieve URL for Removing item from wishlist
+     * Retrieve params for Removing item from wishlist
      *
      * @param \Magento\Catalog\Model\Product|\Magento\Wishlist\Model\Item $item
      *
      * @return string
      */
-    public function getItemRemoveUrl($item)
+    public function getItemRemoveParams($item)
     {
-        return $this->_getHelper()->getRemoveUrl($item);
+        return $this->_getHelper()->getRemoveParams($item);
     }
 
     /**
@@ -223,14 +227,14 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd
     }
 
     /**
-     * Retrieve URL for adding Product to wishlist
+     * Retrieve params for adding Product to wishlist
      *
      * @param \Magento\Catalog\Model\Product $product
      * @return string
      */
-    public function getAddToWishlistUrl($product)
+    public function getAddToWishlistParams($product)
     {
-        return $this->_getHelper()->getAddUrl($product);
+        return $this->_getHelper()->getAddParams($product);
     }
 
      /**
@@ -242,17 +246,9 @@ abstract class AbstractBlock extends \Magento\Catalog\Block\Product\AbstractProd
       */
     public function getItemConfigureUrl($product)
     {
-        if ($product instanceof \Magento\Catalog\Model\Product) {
-            $id = $product->getWishlistItemId();
-        } else {
-            $id = $product->getId();
-        }
-        $params = array('id' => $id);
-
-        return $this->getUrl('wishlist/index/configure/', $params);
+        return $this->_getHelper()->getConfigureUrl($product);
     }
 
-
     /**
      * Retrieve Escaped Description for Wishlist Item
      *
diff --git a/app/code/Magento/Wishlist/Block/Customer/Sharing.php b/app/code/Magento/Wishlist/Block/Customer/Sharing.php
index 25153a7b78e969badbafb614b74de3107d5f8222..f7c6aa1ecc98c8c28da19642ba27a77841b07179 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Sharing.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Sharing.php
@@ -70,6 +70,7 @@ class Sharing extends \Magento\View\Element\Template
         $this->_wishlistConfig = $wishlistConfig;
         $this->_wishlistSession = $wishlistSession;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php
index a45e56fa7cdd1334312facd183167cdc213a7c45..89a3ee50018e5d155496532a184714483275fce2 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist.php
@@ -36,6 +36,11 @@ namespace Magento\Wishlist\Block\Customer;
 
 class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
 {
+    /*
+     * List of product options rendering configurations by product type
+     */
+    protected $_optionsCfg = array();
+
     /**
      * @var \Magento\Catalog\Helper\Product\ConfigurationPool
      */
@@ -63,6 +68,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
      * @param \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool
      * @param \Magento\Data\Form\FormKey $formKey
      * @param array $data
+     * @param array $priceBlockTypes
      *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -82,7 +88,8 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool,
         \Magento\Data\Form\FormKey $formKey,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_formKey = $formKey;
         $this->_helperPool = $helperPool;
@@ -100,7 +107,8 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
             $imageHelper,
             $customerSession,
             $productFactory,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
@@ -226,9 +234,9 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
             $template = $cfgDefault['template'];
         }
 
-        return $block->setTemplate($template)
-            ->setOptionList($this->_helperPool($cfg['helper'])->getOptions($item))
-            ->toHtml();
+        $block->setTemplate($template);
+        $block->setOptionList($this->_helperPool->get($cfg['helper'])->getOptions($item));
+        return $block->toHtml();
     }
 
     /**
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php
index 5684fa093aec20fc1fbb4b37403e7d64fb9b5926..e1727df8a30fe2863c792fbb9c867beac444dfe9 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Button.php
@@ -64,6 +64,7 @@ class Button extends \Magento\View\Element\Template
         $this->_wishlistData = $wishlistData;
         $this->_wishlistConfig = $wishlistConfig;
         parent::__construct($context, $data);
+        $this->_isScopePrivate = true;
     }
 
     /**
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php
index fc4b5c5d0b37895c38d530a8f3185b4cb1c2804b..1e1b7998712ef2dcd33900948a561b7f8041424c 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Item/Options.php
@@ -40,6 +40,16 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock
      */
     protected $_helperPool;
 
+    /**
+     * List of product options rendering configurations by product type
+     *
+     * @var array
+     */
+    protected $_optionsCfg = array('default' => array(
+        'helper' => 'Magento\Catalog\Helper\Product\Configuration',
+        'template' => 'Magento_Wishlist::options_list.phtml'
+    ));
+
     /**
      * @param \Magento\View\Element\Template\Context $context
      * @param \Magento\Catalog\Model\Config $catalogConfig
@@ -56,6 +66,7 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -74,7 +85,8 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Catalog\Helper\Product\ConfigurationPool $helperPool,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_helperPool = $helperPool;
         parent::__construct(
@@ -91,20 +103,11 @@ class Options extends \Magento\Wishlist\Block\AbstractBlock
             $imageHelper,
             $customerSession,
             $productFactory,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
-    /**
-     * List of product options rendering configurations by product type
-     *
-     * @var array
-     */
-    protected $_optionsCfg = array('default' => array(
-        'helper' => 'Magento\Catalog\Helper\Product\Configuration',
-        'template' => 'Magento_Wishlist::options_list.phtml'
-    ));
-
     /**
      * Initialize block
      */
diff --git a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php
index 240f969fb6080cc67a2ce6492f66584833c98734..c8c09dc9f54eced27e9975e7b11f4a575a2654be 100644
--- a/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php
+++ b/app/code/Magento/Wishlist/Block/Customer/Wishlist/Items.php
@@ -35,6 +35,18 @@ namespace Magento\Wishlist\Block\Customer\Wishlist;
 
 class Items extends \Magento\View\Element\Template
 {
+
+    /**
+     * @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;
+    }
     /**
      * Retrieve table column object list
      *
diff --git a/app/code/Magento/Wishlist/Block/Item/Configure.php b/app/code/Magento/Wishlist/Block/Item/Configure.php
index 9488bf4a0f4808fd864f64b1e1e91428add3e43e..3caca11ad0d71df591abb8675d3ff0d8e7ca3ce8 100644
--- a/app/code/Magento/Wishlist/Block/Item/Configure.php
+++ b/app/code/Magento/Wishlist/Block/Item/Configure.php
@@ -77,6 +77,16 @@ class Configure extends \Magento\View\Element\Template
         return $this->_coreRegistry->registry('product');
     }
 
+    /**
+     * Get update params for http post
+     *
+     * @return bool|string
+     */
+    public function getUpdateParams()
+    {
+        return $this->_wishlistData->getUpdateParams($this->getWishlistItem());
+    }
+
     /**
      * Returns wishlist item being configured
      *
diff --git a/app/code/Magento/Wishlist/Block/Share/Wishlist.php b/app/code/Magento/Wishlist/Block/Share/Wishlist.php
index 9611badb15269bb0f45926b744941ede09510326..c8a56f5337bcc85e3124b0f828e7ce80a8172c90 100644
--- a/app/code/Magento/Wishlist/Block/Share/Wishlist.php
+++ b/app/code/Magento/Wishlist/Block/Share/Wishlist.php
@@ -64,6 +64,7 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Customer\Model\CustomerFactory $customerFactory
      * @param array $data
+     * @param array $priceBlockTypes
      * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
@@ -82,7 +83,8 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Customer\Model\CustomerFactory $customerFactory,
-        array $data = array()
+        array $data = array(),
+        array $priceBlockTypes = array()
     ) {
         $this->_customerFactory = $customerFactory;
         parent::__construct(
@@ -99,7 +101,8 @@ class Wishlist extends \Magento\Wishlist\Block\AbstractBlock
             $imageHelper,
             $customerSession,
             $productFactory,
-            $data
+            $data,
+            $priceBlockTypes
         );
     }
 
diff --git a/app/code/Magento/Wishlist/Controller/Index.php b/app/code/Magento/Wishlist/Controller/Index.php
index 29465301b4e7b17714c4943a79d88c28ec037992..d281688e482e20512b1da7b6edcaeb89003df666 100644
--- a/app/code/Magento/Wishlist/Controller/Index.php
+++ b/app/code/Magento/Wishlist/Controller/Index.php
@@ -204,7 +204,15 @@ class Index
 
         $session = $this->_objectManager->get('Magento\Customer\Model\Session');
 
-        $productId = (int) $this->getRequest()->getParam('product');
+        $requestParams = $this->getRequest()->getParams();
+
+        if ($session->getBeforeWishlistRequest()) {
+            $requestParams = $session->getBeforeWishlistRequest();
+            $session->unsBeforeWishlistRequest();
+        }
+
+        $productId = isset($requestParams['product']) ? (int) $requestParams['product'] : null;
+
         if (!$productId) {
             $this->_redirect('*/');
             return;
@@ -218,11 +226,6 @@ class Index
         }
 
         try {
-            $requestParams = $this->getRequest()->getParams();
-            if ($session->getBeforeWishlistRequest()) {
-                $requestParams = $session->getBeforeWishlistRequest();
-                $session->unsBeforeWishlistRequest();
-            }
             $buyRequest = new \Magento\Object($requestParams);
 
             $result = $wishlist->addNewItem($product, $buyRequest);
@@ -798,7 +801,7 @@ class Index
 
         try {
             $info      = unserialize($option->getValue());
-            $filePath  = $this->_objectManager->get('Magento\Filesystem')->getPath(\Magento\Filesystem::ROOT)
+            $filePath  = $this->_objectManager->get('Magento\App\Filesystem')->getPath(\Magento\App\Filesystem::ROOT_DIR)
                 . $info['quote_path'];
             $secretKey = $this->getRequest()->getParam('key');
 
@@ -809,7 +812,7 @@ class Index
                         'value' => $filePath,
                         'type'  => 'filename'
                     ),
-                    \Magento\Filesystem::ROOT
+                    \Magento\App\Filesystem::ROOT_DIR
                 );
             }
 
diff --git a/app/code/Magento/Wishlist/Helper/Data.php b/app/code/Magento/Wishlist/Helper/Data.php
index 95820f212a7ea9a96a7f90307b42336ec1d26fc3..e3db7e1738ce479bdb1d755997b7e9edc4f7cffd 100644
--- a/app/code/Magento/Wishlist/Helper/Data.php
+++ b/app/code/Magento/Wishlist/Helper/Data.php
@@ -110,6 +110,11 @@ class Data extends \Magento\App\Helper\AbstractHelper
      */
     protected $_storeManager;
 
+    /**
+     * @var \Magento\Core\Helper\PostData
+     */
+    protected $_postDataHelper;
+
     /**
      * @param \Magento\App\Helper\Context $context
      * @param \Magento\Core\Helper\Data $coreData
@@ -118,6 +123,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Wishlist\Model\WishlistFactory $wishlistFactory
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
+     * @param \Magento\Core\Helper\PostData $postDataHelper
      */
     public function __construct(
         \Magento\App\Helper\Context $context,
@@ -126,7 +132,8 @@ class Data extends \Magento\App\Helper\AbstractHelper
         \Magento\Core\Model\Store\Config $coreStoreConfig,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Wishlist\Model\WishlistFactory $wishlistFactory,
-        \Magento\Core\Model\StoreManagerInterface $storeManager
+        \Magento\Core\Model\StoreManagerInterface $storeManager,
+        \Magento\Core\Helper\PostData $postDataHelper
     ) {
         $this->_coreRegistry = $coreRegistry;
         $this->_coreData = $coreData;
@@ -134,6 +141,7 @@ class Data extends \Magento\App\Helper\AbstractHelper
         $this->_customerSession = $customerSession;
         $this->_wishlistFactory = $wishlistFactory;
         $this->_storeManager = $storeManager;
+        $this->_postDataHelper = $postDataHelper;
         parent::__construct($context);
     }
 
@@ -274,20 +282,20 @@ class Data extends \Magento\App\Helper\AbstractHelper
     }
 
     /**
-     * Retrieve URL for removing item from wishlist
+     * Retrieve params for removing item from wishlist
      *
      * @param \Magento\Catalog\Model\Product|\Magento\Wishlist\Model\Item $item
      * @return string
      */
-    public function getRemoveUrl($item)
+    public function getRemoveParams($item)
     {
-        return $this->_getUrl('wishlist/index/remove',
-            array('item' => $item->getWishlistItemId())
-        );
+        $url = $this->_getUrl('wishlist/index/remove');
+        $params = array('item' => $item->getWishlistItemId());
+        return $this->_postDataHelper->getPostData($url, $params);
     }
 
     /**
-     * Retrieve URL for removing item from wishlist
+     * Retrieve URL for configuring item from wishlist
      *
      * @param \Magento\Catalog\Model\Product|\Magento\Wishlist\Model\Item $item
      * @return string
@@ -295,79 +303,75 @@ class Data extends \Magento\App\Helper\AbstractHelper
     public function getConfigureUrl($item)
     {
         return $this->_getUrl('wishlist/index/configure', array(
-            'item' => $item->getWishlistItemId()
+            'id' => $item->getWishlistItemId()
         ));
     }
 
     /**
-     * Retrieve url for adding product to wishlist
+     * Retrieve params for adding product to wishlist
      *
      * @param \Magento\Catalog\Model\Product|\Magento\Wishlist\Model\Item $item
-     *
-     * @return  string|bool
+     * @param array $params
+     * @return array
      */
-    public function getAddUrl($item)
+    public function getAddParams($item, array $params = array())
     {
-        return $this->getAddUrlWithParams($item);
+        $productId = null;
+        if ($item instanceof \Magento\Catalog\Model\Product) {
+            $productId = $item->getEntityId();
+        }
+        if ($item instanceof \Magento\Wishlist\Model\Item) {
+            $productId = $item->getProductId();
+        }
+
+        $url = $this->_getUrlStore($item)->getUrl('wishlist/index/add');
+        if ($productId) {
+            $params['product'] = $productId;
+        }
+
+        return $this->_postDataHelper->getPostData($url, $params);
     }
 
     /**
-     * Retrieve url for adding product to wishlist
+     * Retrieve params for adding product to wishlist
      *
      * @param int $itemId
      *
-     * @return  string
+     * @return string
      */
-    public function getMoveFromCartUrl($itemId)
+    public function getMoveFromCartParams($itemId)
     {
-        return $this->_getUrl('wishlist/index/fromcart', array('item' => $itemId));
+        $url = $this->_getUrl('wishlist/index/fromcart');
+        $params = array('item' => $itemId);
+        return $this->_postDataHelper->getPostData($url, $params);
     }
 
     /**
-     * Retrieve url for updating product in wishlist
+     * Retrieve params for updating product in wishlist
      *
      * @param \Magento\Catalog\Model\Product|\Magento\Wishlist\Model\Item $item
      *
      * @return  string|bool
      */
-    public function getUpdateUrl($item)
+    public function getUpdateParams($item)
     {
         $itemId = null;
         if ($item instanceof \Magento\Catalog\Model\Product) {
             $itemId = $item->getWishlistItemId();
+            $productId = $item->getId();
         }
         if ($item instanceof \Magento\Wishlist\Model\Item) {
             $itemId = $item->getId();
+            $productId = $item->getProduct()->getId();
         }
 
+        $url = $this->_getUrl('wishlist/index/updateItemOptions');
         if ($itemId) {
-            return $this->_getUrl('wishlist/index/updateItemOptions', array('id' => $itemId));
-        }
-
-        return false;
-    }
-
-    /**
-     * Retrieve url for adding product to wishlist with params
-     *
-     * @param \Magento\Catalog\Model\Product|\Magento\Wishlist\Model\Item $item
-     * @param array $params
-     *
-     * @return  string|bool
-     */
-    public function getAddUrlWithParams($item, array $params = array())
-    {
-        $productId = null;
-        if ($item instanceof \Magento\Catalog\Model\Product) {
-            $productId = $item->getEntityId();
-        }
-        if ($item instanceof \Magento\Wishlist\Model\Item) {
-            $productId = $item->getProductId();
-        }
-
-        if ($productId) {
-            $params['product'] = $productId;
-            return $this->_getUrlStore($item)->getUrl('wishlist/index/add', $params);
+            $params = array(
+                'id' => $itemId,
+                'product' => $productId
+            );
+            return $this->_postDataHelper->getPostData($url, $params);
         }
 
         return false;
diff --git a/app/code/Magento/Wishlist/Model/Item.php b/app/code/Magento/Wishlist/Model/Item.php
index ac837f37c69dfd30958d6a367bccb76e88310e52..9725b930f0e95008231a38015e610542cd74d936 100644
--- a/app/code/Magento/Wishlist/Model/Item.php
+++ b/app/code/Magento/Wishlist/Model/Item.php
@@ -129,7 +129,7 @@ class Item extends \Magento\Core\Model\AbstractModel
     /**
      * @var \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory
      */
-    protected $_wishlOptCollFactory;
+    protected $_wishlOptionCollectionFactory;
 
     /**
      * @param \Magento\Core\Model\Context $context
@@ -139,7 +139,7 @@ class Item extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Catalog\Model\Resource\Url $catalogUrl
      * @param \Magento\Wishlist\Model\Item\OptionFactory $wishlistOptFactory
-     * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $wishlOptCollFactory
+     * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $wishlOptionCollectionFactory
      * @param \Magento\Core\Model\Resource\AbstractResource $resource
      * @param \Magento\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -152,7 +152,7 @@ class Item extends \Magento\Core\Model\AbstractModel
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Catalog\Model\Resource\Url $catalogUrl,
         \Magento\Wishlist\Model\Item\OptionFactory $wishlistOptFactory,
-        \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $wishlOptCollFactory,
+        \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $wishlOptionCollectionFactory,
         \Magento\Core\Model\Resource\AbstractResource $resource = null,
         \Magento\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -162,7 +162,7 @@ class Item extends \Magento\Core\Model\AbstractModel
         $this->_productFactory = $productFactory;
         $this->_catalogUrl = $catalogUrl;
         $this->_wishlistOptFactory = $wishlistOptFactory;
-        $this->_wishlOptCollFactory = $wishlOptCollFactory;
+        $this->_wishlOptionCollectionFactory = $wishlOptionCollectionFactory;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
 
@@ -724,7 +724,7 @@ class Item extends \Magento\Core\Model\AbstractModel
     public function canHaveQty()
     {
         $product = $this->getProduct();
-        return $product->getTypeId() != \Magento\Catalog\Model\Product\Type\Grouped::TYPE_CODE;
+        return $product->getTypeId() != \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE;
     }
 
     /**
@@ -775,7 +775,7 @@ class Item extends \Magento\Core\Model\AbstractModel
             return $this;
         }
 
-        $options = $this->_wishlOptCollFactory->create()->addItemFilter($this);
+        $options = $this->_wishlOptionCollectionFactory->create()->addItemFilter($this);
         if ($optionsFilter) {
             $options->addFieldToFilter('code', $optionsFilter);
         }
diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php
index f4d7ba1a7b8fa9d61ad92de7ea60e16c879edde8..218f7d8f5161906019c3c11387d4d6eb21255ac4 100644
--- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php
+++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection.php
@@ -134,12 +134,12 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     /**
      * @var \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory
      */
-    protected $_optionCollFactory;
+    protected $_optionCollectionFactory;
 
     /**
      * @var \Magento\Catalog\Model\Resource\Product\CollectionFactory
      */
-    protected $_productCollFactory;
+    protected $_productCollectionFactory;
 
     /**
      * @var \Magento\Catalog\Model\Resource\ConfigFactory
@@ -168,8 +168,8 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
      * @param \Magento\Wishlist\Model\Config $wishlistConfig
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
      * @param \Magento\App\Resource $coreResource
-     * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory
-     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
+     * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollectionFactory
+     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory
      * @param \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory
      * @param \Magento\Wishlist\Model\Resource\Item $resource
@@ -190,8 +190,8 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         \Magento\Wishlist\Model\Config $wishlistConfig,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
         \Magento\App\Resource $coreResource,
-        \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory,
-        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
+        \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollectionFactory,
+        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory,
         \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory,
         \Magento\Wishlist\Model\Resource\Item $resource,
@@ -205,8 +205,8 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         $this->_wishlistConfig = $wishlistConfig;
         $this->_productVisibility = $productVisibility;
         $this->_coreResource = $coreResource;
-        $this->_optionCollFactory = $optionCollFactory;
-        $this->_productCollFactory = $productCollFactory;
+        $this->_optionCollectionFactory = $optionCollectionFactory;
+        $this->_productCollectionFactory = $productCollectionFactory;
         $this->_catalogConfFactory = $catalogConfFactory;
         $this->_catalogAttrFactory = $catalogAttrFactory;
         $this->_appState = $appState;
@@ -254,7 +254,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
     {
         $itemIds = array_keys($this->_items);
         /* @var $optionCollection \Magento\Wishlist\Model\Resource\Item\Option\Collection */
-        $optionCollection = $this->_optionCollFactory->create();
+        $optionCollection = $this->_optionCollectionFactory->create();
         $optionCollection->addItemFilter($itemIds);
 
         /* @var $item \Magento\Wishlist\Model\Item */
@@ -293,7 +293,7 @@ class Collection extends \Magento\Core\Model\Resource\Db\Collection\AbstractColl
         $this->_productIds = array_merge($this->_productIds, array_keys($productIds));
         $attributes = $this->_wishlistConfig->getProductAttributes();
         /** @var \Magento\Catalog\Model\Resource\Product\Collection $productCollection */
-        $productCollection = $this->_productCollFactory->create();
+        $productCollection = $this->_productCollectionFactory->create();
         foreach ($storeIds as $id) {
             $productCollection->addStoreFilter($id);
         }
diff --git a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php
index dc50e6a2c52033d9c187ad589f340700214a3c32..6452dba2f732042b050c9a65e9b3b7fae245f150 100644
--- a/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php
+++ b/app/code/Magento/Wishlist/Model/Resource/Item/Collection/Grid.php
@@ -48,8 +48,8 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection
      * @param \Magento\Wishlist\Model\Config $wishlistConfig
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
      * @param \Magento\App\Resource $coreResource
-     * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory
-     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory
+     * @param \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollectionFactory
+     * @param \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory
      * @param \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory
      * @param \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory
      * @param \Magento\Wishlist\Model\Resource\Item $resource
@@ -71,8 +71,8 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection
         \Magento\Wishlist\Model\Config $wishlistConfig,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
         \Magento\App\Resource $coreResource,
-        \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollFactory,
-        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollFactory,
+        \Magento\Wishlist\Model\Resource\Item\Option\CollectionFactory $optionCollectionFactory,
+        \Magento\Catalog\Model\Resource\Product\CollectionFactory $productCollectionFactory,
         \Magento\Catalog\Model\Resource\ConfigFactory $catalogConfFactory,
         \Magento\Catalog\Model\Entity\AttributeFactory $catalogAttrFactory,
         \Magento\Wishlist\Model\Resource\Item $resource,
@@ -93,8 +93,8 @@ class Grid extends \Magento\Wishlist\Model\Resource\Item\Collection
             $wishlistConfig,
             $productVisibility,
             $coreResource,
-            $optionCollFactory,
-            $productCollFactory,
+            $optionCollectionFactory,
+            $productCollectionFactory,
             $catalogConfFactory,
             $catalogAttrFactory,
             $resource,
diff --git a/app/code/Magento/Wishlist/Model/Wishlist.php b/app/code/Magento/Wishlist/Model/Wishlist.php
index dacbdfab1f7359adbf92e389441c61c76221d618..56ae6b995f0699916a844e7a8dc4cb3fd3ec975f 100644
--- a/app/code/Magento/Wishlist/Model/Wishlist.php
+++ b/app/code/Magento/Wishlist/Model/Wishlist.php
@@ -99,7 +99,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
     /**
      * @var \Magento\Wishlist\Model\Resource\Item\CollectionFactory
      */
-    protected $_wishlistCollFactory;
+    protected $_wishlistCollectionFactory;
 
     /**
      * @var \Magento\Catalog\Model\ProductFactory
@@ -131,7 +131,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param \Magento\Core\Model\Date $date
      * @param ItemFactory $wishlistItemFactory
-     * @param Resource\Item\CollectionFactory $wishlistCollFactory
+     * @param Resource\Item\CollectionFactory $wishlistCollectionFactory
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param \Magento\Math\Random $mathRandom
      * @param \Magento\Stdlib\DateTime $dateTime
@@ -148,7 +148,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
         \Magento\Core\Model\StoreManagerInterface $storeManager,
         \Magento\Core\Model\Date $date,
         \Magento\Wishlist\Model\ItemFactory $wishlistItemFactory,
-        \Magento\Wishlist\Model\Resource\Item\CollectionFactory $wishlistCollFactory,
+        \Magento\Wishlist\Model\Resource\Item\CollectionFactory $wishlistCollectionFactory,
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Math\Random $mathRandom,
         \Magento\Stdlib\DateTime $dateTime,
@@ -161,7 +161,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
         $this->_storeManager = $storeManager;
         $this->_date = $date;
         $this->_wishlistItemFactory = $wishlistItemFactory;
-        $this->_wishlistCollFactory = $wishlistCollFactory;
+        $this->_wishlistCollectionFactory = $wishlistCollectionFactory;
         $this->_productFactory = $productFactory;
         $this->mathRandom = $mathRandom;
         $this->dateTime = $dateTime;
@@ -323,7 +323,7 @@ class Wishlist extends \Magento\Core\Model\AbstractModel
     public function getItemCollection()
     {
         if (is_null($this->_itemCollection)) {
-            $this->_itemCollection = $this->_wishlistCollFactory->create()
+            $this->_itemCollection = $this->_wishlistCollectionFactory->create()
                 ->addWishlistFilter($this)
                 ->addStoreFilter($this->getSharedStoreIds())
                 ->setVisibilityFilter();
diff --git a/app/code/Magento/Wishlist/etc/module.xml b/app/code/Magento/Wishlist/etc/module.xml
index b1e8a3f5dda8ec0703584c9b9a7dab293baad215..8857673b4a1aa99218eed352698b9a1f6870d69c 100755
--- a/app/code/Magento/Wishlist/etc/module.xml
+++ b/app/code/Magento/Wishlist/etc/module.xml
@@ -39,6 +39,9 @@
             <module name="Magento_Tax"/>
             <module name="Magento_Backend"/>
             <module name="Magento_Bundle" type="soft"/>
+            <module name="Magento_Email"/>
+            <module name="Magento_Sales"/>
+            <module name="Magento_GroupedProduct"/>
         </depends>
     </module>
 </config>
diff --git a/app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml b/app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml
index 8849c01780e7c4c1dc236b48195e3abefca92d0d..a5b50a116723439865870ed89ceb044758430931 100644
--- a/app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/item/column/remove.phtml
@@ -24,6 +24,6 @@
  */
 ?>
 
-<a href="<?php echo $this->getItemRemoveUrl($this->getItem()); ?>" title="<?php echo __('Remove Item') ?>" class="action delete">
+<a href="#" data-post-remove='<?php echo $this->getItemRemoveParams($this->getItem()); ?>' title="<?php echo __('Remove Item') ?>" class="btn-remove action delete">
     <span><?php echo __('Remove item');?></span>
 </a>
diff --git a/app/code/Magento/Wishlist/view/frontend/item/configure/addto.phtml b/app/code/Magento/Wishlist/view/frontend/item/configure/addto.phtml
index 4c3e1f6668f9f0d6a6678bff784132aa476951c5..7f0d79b0a735bd8b8c6227fe9f26e07011f84a81 100644
--- a/app/code/Magento/Wishlist/view/frontend/item/configure/addto.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/item/configure/addto.phtml
@@ -24,11 +24,9 @@
  */
 ?>
 
-<?php $_wishlistItem = $this->getWishlistItem(); ?>
-<?php $_wishlistSubmitUrl = $this->helper('Magento\Wishlist\Helper\Data')->getUpdateUrl($_wishlistItem); ?>
 <div class="product addto links" data-role="add-to-links">
     <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
-        <a href="<?php echo $_wishlistSubmitUrl ?>" class="action towishlist updated">
+        <a href="#" data-post='<?php echo $this->getUpdateParams(); ?>' class="action towishlist updated" data-action="add-to-wishlist">
             <span><?php echo __('Update Wish List') ?></span>
         </a>
     <?php endif; ?>
@@ -40,3 +38,10 @@
         </a>
     <?php endif; ?>
 </div>
+<script type="text/javascript">
+    head.js("<?php echo $this->getViewFileUrl('Magento_Wishlist::js/add-to-wishlist.js') ?>", function () {
+        jQuery('.product.info.main').addToWishlist(
+            <?php echo $this->helper('Magento\Core\Helper\Data')->jsonEncode(array('productType' => $_product->getTypeId()))?>
+        );
+    });
+</script>
\ No newline at end of file
diff --git a/app/code/Magento/Wishlist/view/frontend/js/add-to-wishlist.js b/app/code/Magento/Wishlist/view/frontend/js/add-to-wishlist.js
index 39aecb25cd2b0d1c69e24e1d0c82f5b461cd69c0..17518edf38fe0b0ff862690e3a52d65998484d7d 100644
--- a/app/code/Magento/Wishlist/view/frontend/js/add-to-wishlist.js
+++ b/app/code/Magento/Wishlist/view/frontend/js/add-to-wishlist.js
@@ -31,20 +31,24 @@
             customOptionsInfo: '.product-custom-option'
         },
         _create: function () {
-            this.addToWishlist();
+            this._bind();
         },
-        addToWishlist: function () {
-            this._on({
-                'click [data-action="add-to-wishlist"]': function (event) {
-                    var url = $(event.target).closest('a').attr('href'),
-                        productInfo = this.options[this.options.productType + 'Info'],
-                        additionalData = $(this.options.customOptionsInfo).serialize();
-                    if (productInfo !== undefined) {
-                        additionalData += $(productInfo).serialize();
-                    }
-                    $(event.target).closest('a').attr('href', url + (url.indexOf('?') == -1 ? '?' : '&') + additionalData);
-                }
+        _bind: function() {
+            var changeCustomOption = 'change ' + this.options.customOptionsInfo,
+                changeProductInfo = 'change ' + this.options[this.options.productType + 'Info'],
+                events = {};
+            events[changeCustomOption] = '_updateWishlistData';
+            events[changeProductInfo] = '_updateWishlistData';
+            this._on(events);
+        },
+        _updateWishlistData: function(event) {
+            var dataToAdd = {};
+            dataToAdd[$(event.currentTarget).attr('name')] = $(event.currentTarget).val();
+            $('[data-action="add-to-wishlist"]').each(function(index, element) {
+                var params = $(element).data('post');
+                params.data = $.extend({}, params.data, dataToAdd);
+                $(element).data('post', params);
             });
         }
     });
-})(jQuery);
+})(jQuery);
\ No newline at end of file
diff --git a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_grouped.xml b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_grouped.xml
index adf68a426922b4317f4e24018031e3f2975f5db8..1b3d0eb71b27788b8e0cb5e0a180db68aa9d8cdc 100644
--- a/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_grouped.xml
+++ b/app/code/Magento/Wishlist/view/frontend/layout/wishlist_index_configure_type_grouped.xml
@@ -25,7 +25,7 @@
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <referenceContainer name="product.info.form.content">
-        <block class="Magento\Catalog\Block\Product\View\Type\Grouped" name="product.info.grouped" before="product.info.addtocart" template="product/view/type/grouped.phtml"/>
+        <block class="Magento\GroupedProduct\Block\Product\View\Type\Grouped" name="product.info.grouped" before="product.info.addtocart" template="product/view/type/grouped.phtml"/>
         <container name="product.info.grouped.extra" after="product.info.grouped" before="product.info.grouped" as="product_type_data_extra" label="Product Extra Info"/>
     </referenceContainer>
 </layout>
diff --git a/app/code/Magento/Wishlist/view/frontend/shared.phtml b/app/code/Magento/Wishlist/view/frontend/shared.phtml
index 99f5b6dc5e2341cc55f5ffa317cfdbe9420f23a7..1b541c3171f814bab9b394a190b5a28847781fc5 100644
--- a/app/code/Magento/Wishlist/view/frontend/shared.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/shared.phtml
@@ -57,7 +57,7 @@ $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im
                             <?php echo $this->getDetailsHtml($item) ?>
                         </td>
                         <td class="col comment"><?php echo $this->getEscapedDescription($item) ?></td>
-                        <td class="col actions">
+                        <td class="col actions" data-role="add-to-links">
                             <?php if ($product->isSaleable()): ?>
                                 <?php if ($isVisibleProduct): ?>
                                     <button type="button" title="<?php echo __('Add to Cart') ?>" onclick="setLocation('<?php echo $this->getSharedItemAddToCartUrl($item) ?>')" class="action tocart">
@@ -65,7 +65,7 @@ $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Im
                                     </button>
                                 <?php endif ?>
                             <?php endif; ?>
-                            <a href="<?php echo $this->getAddToWishlistUrl($item) ?>" onclick="setLocation(this.href); return false;" class="action towishlist" data-action="add-to-wishlist">
+                            <a href="#" data-post='<?php echo $this->getAddToWishlistParams($item); ?>'  onclick="setLocation(this.href); return false;" class="action towishlist" data-action="add-to-wishlist">
                                 <span><?php echo __('Add to Wishlist') ?></span>
                             </a>
                         </td>
diff --git a/app/code/Magento/Wishlist/view/frontend/sidebar.phtml b/app/code/Magento/Wishlist/view/frontend/sidebar.phtml
index 2365b82842e0ad2bb6d1ce1f1dd36de51e4c22c0..fec7ad14219fb3b59f64c7cbcf97ab6a933de6b5 100644
--- a/app/code/Magento/Wishlist/view/frontend/sidebar.phtml
+++ b/app/code/Magento/Wishlist/view/frontend/sidebar.phtml
@@ -26,8 +26,9 @@
 ?>
 <?php
 $count = $this->getItemCount();
+$wishlistHelper = $this->helper('Magento\Wishlist\Helper\Data');
 ?>
-<?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()) : ?>
+<?php if ($wishlistHelper->isAllow()) : ?>
     <?php $imageBlock =  $this->getLayout()->createBlock('Magento\Catalog\Block\Product\Image');?>
     <div class="block wishlist">
         <div class="title">
@@ -54,10 +55,18 @@ $count = $this->getItemCount();
                                 <?php echo $this->getPriceHtml($product, false, '-wishlist') ?>
                                 <div class="product actions">
                                     <?php if ($product->isSaleable() && $product->isVisibleInSiteVisibility()): ?>
-                                        <div class="primary"><a href="<?php echo $this->getItemAddToCartUrl($_item) ?>" class="action tocart"><span><?php echo __('Add to Cart') ?></span></a></div>
+                                        <?php if ($product->getTypeInstance()->hasRequiredOptions($product)): ?>
+                                            <div class="primary"><a href="<?php echo $this->getItemAddToCartUrl($product) ?>" class="action tocart"><span><?php echo __('Add to Cart') ?></span></a></div>
+                                        <?php else: ?>
+                                            <?php
+                                                $postDataHelper = $this->helper('Magento\Core\Helper\PostData');
+                                                $postData = $postDataHelper->getPostData($this->getItemAddToCartUrl($product), ['product' => $product->getEntityId()])
+                                            ?>
+                                            <div class="primary"><button type="button" class="action tocart" data-post='<?php echo $postData; ?>'><span><?php echo __('Add to Cart') ?></span></button></div>
+                                        <?php endif; ?>
                                     <?php endif; ?>
                                     <div class="secondary">
-                                        <a href="<?php echo $this->getItemRemoveUrl($_item) ?>" title="<?php echo __('Remove This Item') ?>" onclick="return confirm('<?php echo __('Are you sure you would like to remove this item from the wishlist?') ?>');" class="action delete">
+                                        <a href="#" data-post='<?php echo $this->getItemRemoveParams($_item) ?>' title="<?php echo __('Remove This Item') ?>" class="btn-remove action delete">
                                             <span><?php echo __('Remove This Item') ?></span>
                                         </a>
                                     </div>
diff --git a/app/code/Magento/Wishlist/view/frontend/wishlist.js b/app/code/Magento/Wishlist/view/frontend/wishlist.js
index f5973f8c55de47793b44a0fb8feedc52f6ccc336..933537f6d0fdef893d7bef25c98fb44debf7bc2d 100644
--- a/app/code/Magento/Wishlist/view/frontend/wishlist.js
+++ b/app/code/Magento/Wishlist/view/frontend/wishlist.js
@@ -36,7 +36,8 @@
             addToCartSelector: '.btn-cart',
             addAllToCartSelector: '.btn-add',
             commentInputType: 'textarea',
-            infoList: false
+            infoList: false,
+            confirmRemoveMessage: 'Are you sure you want to remove this product from your wishlist?'
         },
 
         /**
@@ -52,7 +53,11 @@
                     .on('addToCart', function(event, context) {
                         $.proxy(_this._addItemsToCart($(context).parents('.cart-cell').find(_this.options.addToCartSelector)), _this);
                     })
-                    .on('click', this.options.btnRemoveSelector, $.proxy(this._confirmRemoveWishlistItem, this))
+                    .on('click', this.options.btnRemoveSelector, $.proxy(function(event) {
+                        if (this._confirmRemoveWishlistItem()) {
+                            $.mage.dataPost().postData($(event.currentTarget).data('post-remove'));
+                        }
+                    }, this))
                     .on('click', this.options.addAllToCartSelector, $.proxy(this._addAllWItemsToCart, this))
                     .on('focusin focusout', this.options.commentInputType, $.proxy(this._focusComment, this));
             }
@@ -182,7 +187,7 @@
             });
         }
     });
-    
+
     // Extension for mage.wishlist - Add Wishlist item to Gift Registry
     $.widget('mage.wishlist', $.mage.wishlist, {
         options: {
diff --git a/app/design/adminhtml/magento_backend/css/pages.css b/app/design/adminhtml/magento_backend/css/pages.css
index ba9d1a2a10c5e6af0ece6aaefbd766dd0afd956f..65783c2bace34645f4fe4d61fbe1018017ae1414 100644
--- a/app/design/adminhtml/magento_backend/css/pages.css
+++ b/app/design/adminhtml/magento_backend/css/pages.css
@@ -1109,11 +1109,11 @@
 }
 .order-billing-address,
 .order-billing-method,
-[class^=" sales-order-"] .order-history,
-[class^=" sales-order-"] .order-comments-history,
-[class^=" sales-order-"] .order-information,
-[class^=" sales-order-"] .order-billing-address,
-[class^=" sales-order-"] .order-payment-method,
+[class*="-order-"] .order-history,
+[class*="-order-"] .order-comments-history,
+[class*="-order-"] .order-information,
+[class*="-order-"] .order-billing-address,
+[class*="-order-"] .order-payment-method,
 [class^=" adminhtml-rma-"] .order-comments-history,
 [class^=" adminhtml-rma-"] .order-shipping-address,
 [class^=" adminhtml-rma-"] .rma-request-details {
@@ -1122,11 +1122,11 @@
 }
 .order-shipping-address,
 .order-shipping-method,
-[class^=" sales-order-"] .order-totals,
-[class^=" sales-order-"] .order-account-information,
-[class^=" sales-order-"] .order-shipping-address,
-[class^=" sales-order-"] .order-payment-method-virtual,
-[class^=" sales-order-"] .order-shipping-method,
+[class*="-order-"] .order-totals,
+[class*="-order-"] .order-account-information,
+[class*="-order-"] .order-shipping-address,
+[class*="-order-"] .order-payment-method-virtual,
+[class*="-order-"] .order-shipping-method,
 [class^=" adminhtml-rma-"] .rma-confirmation,
 [class^=" adminhtml-rma-"] .order-shipping-method,
 [class^=" adminhtml-rma-"] .order-return-address {
@@ -1239,12 +1239,12 @@
   float: none;
   width: 100%;
 }
-[class^=" sales-order-"] .order-billing-address .actions,
-[class^=" sales-order-"] .order-shipping-address .actions {
+[class*="-order-"] .order-billing-address .actions,
+[class*="-order-"] .order-shipping-address .actions {
   margin: 17px 0;
 }
-[class^=" sales-order-"] .order-billing-address .control + label,
-[class^=" sales-order-"] .order-shipping-address .control + label {
+[class*="-order-"] .order-billing-address .control + label,
+[class*="-order-"] .order-shipping-address .control + label {
   margin: 17px 0 0;
 }
 .sales-order-create-index .page-actions-inner .cancel,
@@ -1509,15 +1509,15 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 /*
     Order view
 -------------------------------------- */
-[class^=" sales-order-"] .fieldset-wrapper-title .actions {
+[class*="-order-"] .fieldset-wrapper-title .actions {
   float: right;
   font-size: 12px;
   margin: 8px 20px 0 0;
 }
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:link,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:visited,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:hover,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:active {
+[class*="-order-"] .fieldset-wrapper-title .actions a:link,
+[class*="-order-"] .fieldset-wrapper-title .actions a:visited,
+[class*="-order-"] .fieldset-wrapper-title .actions a:hover,
+[class*="-order-"] .fieldset-wrapper-title .actions a:active {
   color: #a29c94;
 }
 .order-comments-history fieldset {
@@ -1541,7 +1541,7 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 .order-comments-history .actions {
   float: right;
 }
-[class^=" sales-order-"] .fieldset-wrapper address {
+[class*="-order-"] .fieldset-wrapper address {
   overflow: auto;
 }
 /*
@@ -1593,19 +1593,19 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 [class^=" sales-transactions-"] .col-id {
   width: 35px;
 }
-[class^=" sales-order-shipment-"] .col-ship,
+[class^=" adminhtml-order-shipment-"] .col-ship,
 [class^=" sales-"] .col-return-to-stock,
 .adminhtml-rma-new .col-select {
   text-align: center;
   width: 35px;
 }
-[class^=" sales-order-"] .col-price-original,
-[class^=" sales-order-"] .col-tax-amount,
-[class^=" sales-order-"] .col-tax-percent,
-[class^=" sales-order-"] .col-discont,
-[class^=" sales-order-"] .col-total,
-[class^=" sales-order-"] .col-discount,
-[class^=" sales-order-"] .col-tax,
+[class*="-order-"] .col-price-original,
+[class*="-order-"] .col-tax-amount,
+[class*="-order-"] .col-tax-percent,
+[class*="-order-"] .col-discont,
+[class*="-order-"] .col-total,
+[class*="-order-"] .col-discount,
+[class*="-order-"] .col-tax,
 [class^=" sales-"] .col-refunded,
 [class^=" adminhtml-rma-"] .col-order,
 [class^=" adminhtml-rma-"] .col-required,
@@ -1617,8 +1617,8 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
   white-space: nowrap;
   width: 50px;
 }
-[class^=" sales-order-"] .col-subtotal,
-[class^=" sales-order-"] .col-price,
+[class*="-order-"] .col-subtotal,
+[class*="-order-"] .col-price,
 [class^=" adminhtml-rma-"] .col-price {
   text-align: right;
   width: 50px;
@@ -1637,8 +1637,8 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
   width: 60px;
 }
 [class^=" sales-"] .col-qty,
-[class^=" sales-order-"] .col-qty-invoice,
-[class^=" sales-order-"] .col-ordered-qty,
+[class*="-order-"] .col-qty-invoice,
+[class*="-order-"] .col-ordered-qty,
 [class^=" adminhtml-rma-"] .col-qty,
 [class^=" adminhtml-rma-"] .col-condition {
   width: 70px;
@@ -1687,14 +1687,14 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 [class^=" sales-"] tr.headings .col-transaction-type > span,
 [class^=" sales-"] tr.headings .col-gtbase > span,
 [class^=" sales-"] tr.headings .col-gtpurchased > span,
-[class^=" sales-order-"] tr.headings .col-discont > span {
+[class*="-order-"] tr.headings .col-discont > span {
   white-space: normal;
 }
 [class^=" sales-"] .col-period,
 [class^=" adminhtml-rma-"] .col-period {
   width: 150px;
 }
-[class^=" sales-order-shipment-"] .col-carrier {
+[class^=" adminhtml-order-shipment-"] .col-carrier {
   width: 190px;
 }
 .checkout-agreement-index .col-store-view {
@@ -1718,48 +1718,48 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
   padding-bottom: 4px;
   width: 100%;
 }
-[class^=" sales-order-"] .order-totals .actions,
+[class*="-order-"] .order-totals .actions,
 [class^=" adminhtml-rma-"] .col-qty,
 [class^=" adminhtml-rma-"] .col-qty_ordered,
 .sales-order-view .col-refunded {
   text-align: right;
 }
-[class^=" sales-order-"] .col-price .label,
-[class^=" sales-order-"] .col-subtotal .label {
+[class*="-order-"] .col-price .label,
+[class*="-order-"] .col-subtotal .label {
   display: inline-block;
   min-width: 60px;
   white-space: nowrap;
 }
-[class^=" sales-order-"] .col-price .price-excl-tax .price,
-[class^=" sales-order-"] .col-price .price-incl-tax .price,
-[class^=" sales-order-"] .col-subtotal .price-excl-tax .price,
-[class^=" sales-order-"] .col-subtotal .price-incl-tax .price {
+[class*="-order-"] .col-price .price-excl-tax .price,
+[class*="-order-"] .col-price .price-incl-tax .price,
+[class*="-order-"] .col-subtotal .price-excl-tax .price,
+[class*="-order-"] .col-subtotal .price-incl-tax .price {
   font-weight: bold;
 }
-[class^=" sales-order-"] .grid .col-qty table,
-[class^=" sales-order-"] .grid .col-qty tbody,
-[class^=" sales-order-"] .grid .col-qty tr,
-[class^=" sales-order-"] .grid .col-qty td,
-[class^=" sales-order-"] .grid .col-ordered-qty table,
-[class^=" sales-order-"] .grid .col-ordered-qty tbody,
-[class^=" sales-order-"] .grid .col-ordered-qty tr,
-[class^=" sales-order-"] .grid .col-ordered-qty td {
+[class*="-order-"] .grid .col-qty table,
+[class*="-order-"] .grid .col-qty tbody,
+[class*="-order-"] .grid .col-qty tr,
+[class*="-order-"] .grid .col-qty td,
+[class*="-order-"] .grid .col-ordered-qty table,
+[class*="-order-"] .grid .col-ordered-qty tbody,
+[class*="-order-"] .grid .col-ordered-qty tr,
+[class*="-order-"] .grid .col-ordered-qty td {
   background: none;
   border: 0;
 }
-[class^=" sales-order-"] .col-ordered-qty td {
+[class*="-order-"] .col-ordered-qty td {
   padding: 0 5px 3px;
 }
-[class^=" sales-order-"] .grid .product-title {
+[class*="-order-"] .grid .product-title {
   font-weight: bold;
 }
-[class^=" sales-order-"] .item-options {
+[class*="-order-"] .item-options {
   margin: 5px 0 5px 10px;
 }
-[class^=" sales-order-"] .item-options dt {
+[class*="-order-"] .item-options dt {
   font-weight: bold;
 }
-[class^=" sales-order-"] .item-options dd {
+[class*="-order-"] .item-options dd {
   margin: 0 0 0 10px;
 }
 .adminhtml-rma-item-attribute-edit .col-position input {
@@ -1779,7 +1779,7 @@ table.items-to-invoice tbody tr:hover td {
   border: 0;
   text-align: center;
 }
-[class^=" sales-order-creditmemo-"] .no-items {
+[class~=" -order-creditmemo-"] .no-items {
   padding-top: 13px;
   text-align: center;
 }
@@ -1787,17 +1787,17 @@ table.items-to-invoice tbody tr:hover td {
   color: #19a3d1;
   font-weight: bold;
 }
-.sales-order-shipment-new .order-totals .fieldset-wrapper {
+.adminhtml-order-shipment-new .order-totals .fieldset-wrapper {
   padding-top: 18px;
 }
-.sales-order-shipment-new .actions {
+.adminhtml-order-shipment-new .actions {
   float: right;
 }
 .creditmemo-totals .data-table input[type="text"] {
   text-align: right;
   width: 60px;
 }
-[class^=" sales-order-"] .order-subtotal .label {
+[class*="-order-"] .order-subtotal .label {
   width: 80%;
 }
 .adminhtml-rma-new .rma-confirmation .actions {
@@ -1819,7 +1819,7 @@ table.items-to-invoice tbody tr:hover td {
 .adminhtml-rma-edit .data-table .col-number {
   width: 25%;
 }
-[class^=" sales-order-"] .order-shipping-address .price,
+[class*="-order-"] .order-shipping-address .price,
 .order-shipping-address .shipping-description-title {
   font-weight: bold;
 }
@@ -2147,8 +2147,8 @@ table.items-to-invoice tbody tr:hover td {
   list-style: none;
   padding: 0;
 }
-[class^=" sales-order-"] .order-billing-address .packaging-window .actions,
-[class^=" sales-order-"] .order-shipping-address .packaging-window .actions {
+[class*="-order-"] .order-billing-address .packaging-window .actions,
+[class*="-order-"] .order-shipping-address .packaging-window .actions {
   margin: 0;
 }
 /*
diff --git a/app/design/adminhtml/magento_backend/css/styles.css b/app/design/adminhtml/magento_backend/css/styles.css
index 3387b22a778b4450be0ff515708463636a5ffb44..8499e03e611f8745f14c6470639fc82916669d61 100644
--- a/app/design/adminhtml/magento_backend/css/styles.css
+++ b/app/design/adminhtml/magento_backend/css/styles.css
@@ -8901,11 +8901,11 @@ table .col-draggable .draggable-handle {
 }
 .order-billing-address,
 .order-billing-method,
-[class^=" sales-order-"] .order-history,
-[class^=" sales-order-"] .order-comments-history,
-[class^=" sales-order-"] .order-information,
-[class^=" sales-order-"] .order-billing-address,
-[class^=" sales-order-"] .order-payment-method,
+[class*="-order-"] .order-history,
+[class*="-order-"] .order-comments-history,
+[class*="-order-"] .order-information,
+[class*="-order-"] .order-billing-address,
+[class*="-order-"] .order-payment-method,
 [class^=" adminhtml-rma-"] .order-comments-history,
 [class^=" adminhtml-rma-"] .order-shipping-address,
 [class^=" adminhtml-rma-"] .rma-request-details {
@@ -8914,11 +8914,11 @@ table .col-draggable .draggable-handle {
 }
 .order-shipping-address,
 .order-shipping-method,
-[class^=" sales-order-"] .order-totals,
-[class^=" sales-order-"] .order-account-information,
-[class^=" sales-order-"] .order-shipping-address,
-[class^=" sales-order-"] .order-payment-method-virtual,
-[class^=" sales-order-"] .order-shipping-method,
+[class*="-order-"] .order-totals,
+[class*="-order-"] .order-account-information,
+[class*="-order-"] .order-shipping-address,
+[class*="-order-"] .order-payment-method-virtual,
+[class*="-order-"] .order-shipping-method,
 [class^=" adminhtml-rma-"] .rma-confirmation,
 [class^=" adminhtml-rma-"] .order-shipping-method,
 [class^=" adminhtml-rma-"] .order-return-address {
@@ -9031,12 +9031,12 @@ table .col-draggable .draggable-handle {
   float: none;
   width: 100%;
 }
-[class^=" sales-order-"] .order-billing-address .actions,
-[class^=" sales-order-"] .order-shipping-address .actions {
+[class*="-order-"] .order-billing-address .actions,
+[class*="-order-"] .order-shipping-address .actions {
   margin: 17px 0;
 }
-[class^=" sales-order-"] .order-billing-address .control + label,
-[class^=" sales-order-"] .order-shipping-address .control + label {
+[class*="-order-"] .order-billing-address .control + label,
+[class*="-order-"] .order-shipping-address .control + label {
   margin: 17px 0 0;
 }
 .sales-order-create-index .page-actions-inner .cancel,
@@ -9294,15 +9294,15 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 /*
     Order view
 -------------------------------------- */
-[class^=" sales-order-"] .fieldset-wrapper-title .actions {
+[class*="-order-"] .fieldset-wrapper-title .actions {
   float: right;
   font-size: 12px;
   margin: 8px 20px 0 0;
 }
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:link,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:visited,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:hover,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:active {
+[class*="-order-"] .fieldset-wrapper-title .actions a:link,
+[class*="-order-"] .fieldset-wrapper-title .actions a:visited,
+[class*="-order-"] .fieldset-wrapper-title .actions a:hover,
+[class*="-order-"] .fieldset-wrapper-title .actions a:active {
   color: #a29c94;
 }
 .order-comments-history fieldset {
@@ -9326,7 +9326,7 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 .order-comments-history .actions {
   float: right;
 }
-[class^=" sales-order-"] .fieldset-wrapper address {
+[class*="-order-"] .fieldset-wrapper address {
   overflow: auto;
 }
 /*
@@ -9378,19 +9378,19 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 [class^=" sales-transactions-"] .col-id {
   width: 35px;
 }
-[class^=" sales-order-shipment-"] .col-ship,
+[class^=" adminhtml-order-shipment-"] .col-ship,
 [class^=" sales-"] .col-return-to-stock,
 .adminhtml-rma-new .col-select {
   text-align: center;
   width: 35px;
 }
-[class^=" sales-order-"] .col-price-original,
-[class^=" sales-order-"] .col-tax-amount,
-[class^=" sales-order-"] .col-tax-percent,
-[class^=" sales-order-"] .col-discont,
-[class^=" sales-order-"] .col-total,
-[class^=" sales-order-"] .col-discount,
-[class^=" sales-order-"] .col-tax,
+[class*="-order-"] .col-price-original,
+[class*="-order-"] .col-tax-amount,
+[class*="-order-"] .col-tax-percent,
+[class*="-order-"] .col-discont,
+[class*="-order-"] .col-total,
+[class*="-order-"] .col-discount,
+[class*="-order-"] .col-tax,
 [class^=" sales-"] .col-refunded,
 [class^=" adminhtml-rma-"] .col-order,
 [class^=" adminhtml-rma-"] .col-required,
@@ -9402,8 +9402,8 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
   white-space: nowrap;
   width: 50px;
 }
-[class^=" sales-order-"] .col-subtotal,
-[class^=" sales-order-"] .col-price,
+[class*="-order-"] .col-subtotal,
+[class*="-order-"] .col-price,
 [class^=" adminhtml-rma-"] .col-price {
   text-align: right;
   width: 50px;
@@ -9422,8 +9422,8 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
   width: 60px;
 }
 [class^=" sales-"] .col-qty,
-[class^=" sales-order-"] .col-qty-invoice,
-[class^=" sales-order-"] .col-ordered-qty,
+[class*="-order-"] .col-qty-invoice,
+[class*="-order-"] .col-ordered-qty,
 [class^=" adminhtml-rma-"] .col-qty,
 [class^=" adminhtml-rma-"] .col-condition {
   width: 70px;
@@ -9472,14 +9472,14 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 [class^=" sales-"] tr.headings .col-transaction-type > span,
 [class^=" sales-"] tr.headings .col-gtbase > span,
 [class^=" sales-"] tr.headings .col-gtpurchased > span,
-[class^=" sales-order-"] tr.headings .col-discont > span {
+[class*="-order-"] tr.headings .col-discont > span {
   white-space: normal;
 }
 [class^=" sales-"] .col-period,
 [class^=" adminhtml-rma-"] .col-period {
   width: 150px;
 }
-[class^=" sales-order-shipment-"] .col-carrier {
+[class^=" adminhtml-order-shipment-"] .col-carrier {
   width: 190px;
 }
 .checkout-agreement-index .col-store-view {
@@ -9507,48 +9507,48 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
   padding-bottom: 4px;
   width: 100%;
 }
-[class^=" sales-order-"] .order-totals .actions,
+[class*="-order-"] .order-totals .actions,
 [class^=" adminhtml-rma-"] .col-qty,
 [class^=" adminhtml-rma-"] .col-qty_ordered,
 .sales-order-view .col-refunded {
   text-align: right;
 }
-[class^=" sales-order-"] .col-price .label,
-[class^=" sales-order-"] .col-subtotal .label {
+[class*="-order-"] .col-price .label,
+[class*="-order-"] .col-subtotal .label {
   display: inline-block;
   min-width: 60px;
   white-space: nowrap;
 }
-[class^=" sales-order-"] .col-price .price-excl-tax .price,
-[class^=" sales-order-"] .col-price .price-incl-tax .price,
-[class^=" sales-order-"] .col-subtotal .price-excl-tax .price,
-[class^=" sales-order-"] .col-subtotal .price-incl-tax .price {
+[class*="-order-"] .col-price .price-excl-tax .price,
+[class*="-order-"] .col-price .price-incl-tax .price,
+[class*="-order-"] .col-subtotal .price-excl-tax .price,
+[class*="-order-"] .col-subtotal .price-incl-tax .price {
   font-weight: bold;
 }
-[class^=" sales-order-"] .grid .col-qty table,
-[class^=" sales-order-"] .grid .col-qty tbody,
-[class^=" sales-order-"] .grid .col-qty tr,
-[class^=" sales-order-"] .grid .col-qty td,
-[class^=" sales-order-"] .grid .col-ordered-qty table,
-[class^=" sales-order-"] .grid .col-ordered-qty tbody,
-[class^=" sales-order-"] .grid .col-ordered-qty tr,
-[class^=" sales-order-"] .grid .col-ordered-qty td {
+[class*="-order-"] .grid .col-qty table,
+[class*="-order-"] .grid .col-qty tbody,
+[class*="-order-"] .grid .col-qty tr,
+[class*="-order-"] .grid .col-qty td,
+[class*="-order-"] .grid .col-ordered-qty table,
+[class*="-order-"] .grid .col-ordered-qty tbody,
+[class*="-order-"] .grid .col-ordered-qty tr,
+[class*="-order-"] .grid .col-ordered-qty td {
   background: none;
   border: 0;
 }
-[class^=" sales-order-"] .col-ordered-qty td {
+[class*="-order-"] .col-ordered-qty td {
   padding: 0 5px 3px;
 }
-[class^=" sales-order-"] .grid .product-title {
+[class*="-order-"] .grid .product-title {
   font-weight: bold;
 }
-[class^=" sales-order-"] .item-options {
+[class*="-order-"] .item-options {
   margin: 5px 0 5px 10px;
 }
-[class^=" sales-order-"] .item-options dt {
+[class*="-order-"] .item-options dt {
   font-weight: bold;
 }
-[class^=" sales-order-"] .item-options dd {
+[class*="-order-"] .item-options dd {
   margin: 0 0 0 10px;
 }
 .adminhtml-rma-item-attribute-edit .col-position input {
@@ -9568,7 +9568,7 @@ table.items-to-invoice tbody tr:hover td {
   border: 0;
   text-align: center;
 }
-[class^=" sales-order-creditmemo-"] .no-items {
+[class~=" -order-creditmemo-"] .no-items {
   padding-top: 13px;
   text-align: center;
 }
@@ -9576,17 +9576,17 @@ table.items-to-invoice tbody tr:hover td {
   color: #19a3d1;
   font-weight: bold;
 }
-.sales-order-shipment-new .order-totals .fieldset-wrapper {
+.adminhtml-order-shipment-new .order-totals .fieldset-wrapper {
   padding-top: 18px;
 }
-.sales-order-shipment-new .actions {
+.adminhtml-order-shipment-new .actions {
   float: right;
 }
 .creditmemo-totals .data-table input[type="text"] {
   text-align: right;
   width: 60px;
 }
-[class^=" sales-order-"] .order-subtotal .label {
+[class*="-order-"] .order-subtotal .label {
   width: 80%;
 }
 .adminhtml-rma-new .rma-confirmation .actions {
@@ -9608,7 +9608,7 @@ table.items-to-invoice tbody tr:hover td {
 .adminhtml-rma-edit .data-table .col-number {
   width: 25%;
 }
-[class^=" sales-order-"] .order-shipping-address .price,
+[class*="-order-"] .order-shipping-address .price,
 .order-shipping-address .shipping-description-title {
   font-weight: bold;
 }
@@ -9936,8 +9936,8 @@ table.items-to-invoice tbody tr:hover td {
   list-style: none;
   padding: 0;
 }
-[class^=" sales-order-"] .order-billing-address .packaging-window .actions,
-[class^=" sales-order-"] .order-shipping-address .packaging-window .actions {
+[class*="-order-"] .order-billing-address .packaging-window .actions,
+[class*="-order-"] .order-shipping-address .packaging-window .actions {
   margin: 0;
 }
 /*
diff --git a/app/design/adminhtml/magento_backend/less/styles/pages.less b/app/design/adminhtml/magento_backend/less/styles/pages.less
index 06197eccfadf5f0ba4efe63a7522fea78bd74291..33123cccf535c9da6232a37c97d26836986fb72a 100644
--- a/app/design/adminhtml/magento_backend/less/styles/pages.less
+++ b/app/design/adminhtml/magento_backend/less/styles/pages.less
@@ -1323,11 +1323,11 @@
 
 .order-billing-address,
 .order-billing-method,
-[class^=" sales-order-"] .order-history,
-[class^=" sales-order-"] .order-comments-history,
-[class^=" sales-order-"] .order-information,
-[class^=" sales-order-"] .order-billing-address,
-[class^=" sales-order-"] .order-payment-method,
+[class*="-order-"] .order-history,
+[class*="-order-"] .order-comments-history,
+[class*="-order-"] .order-information,
+[class*="-order-"] .order-billing-address,
+[class*="-order-"] .order-payment-method,
 [class^=" adminhtml-rma-"] .order-comments-history,
 [class^=" adminhtml-rma-"] .order-shipping-address,
 [class^=" adminhtml-rma-"] .rma-request-details {
@@ -1337,11 +1337,11 @@
 
 .order-shipping-address,
 .order-shipping-method,
-[class^=" sales-order-"] .order-totals,
-[class^=" sales-order-"] .order-account-information,
-[class^=" sales-order-"] .order-shipping-address,
-[class^=" sales-order-"] .order-payment-method-virtual,
-[class^=" sales-order-"] .order-shipping-method,
+[class*="-order-"] .order-totals,
+[class*="-order-"] .order-account-information,
+[class*="-order-"] .order-shipping-address,
+[class*="-order-"] .order-payment-method-virtual,
+[class*="-order-"] .order-shipping-method,
 [class^=" adminhtml-rma-"] .rma-confirmation,
 [class^=" adminhtml-rma-"] .order-shipping-method,
 [class^=" adminhtml-rma-"] .order-return-address {
@@ -1484,13 +1484,13 @@
     width: 100%;
 }
 
-[class^=" sales-order-"] .order-billing-address .actions,
-[class^=" sales-order-"] .order-shipping-address .actions {
+[class*="-order-"] .order-billing-address .actions,
+[class*="-order-"] .order-shipping-address .actions {
     margin: 17px 0;
 }
 
-[class^=" sales-order-"] .order-billing-address .control + label,
-[class^=" sales-order-"] .order-shipping-address .control + label {
+[class*="-order-"] .order-billing-address .control + label,
+[class*="-order-"] .order-shipping-address .control + label {
     margin: 17px 0 0;
 }
 
@@ -1798,16 +1798,16 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 /*
     Order view
 -------------------------------------- */
-[class^=" sales-order-"] .fieldset-wrapper-title .actions {
+[class*="-order-"] .fieldset-wrapper-title .actions {
     float: right;
     font-size: 12px;
     margin: 8px 20px 0 0;
 }
 
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:link,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:visited,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:hover,
-[class^=" sales-order-"] .fieldset-wrapper-title .actions a:active {
+[class*="-order-"] .fieldset-wrapper-title .actions a:link,
+[class*="-order-"] .fieldset-wrapper-title .actions a:visited,
+[class*="-order-"] .fieldset-wrapper-title .actions a:hover,
+[class*="-order-"] .fieldset-wrapper-title .actions a:active {
     color: #a29c94;
 }
 
@@ -1837,7 +1837,7 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
     float: right;
 }
 
-[class^=" sales-order-"] .fieldset-wrapper address {
+[class*="-order-"] .fieldset-wrapper address {
     overflow: auto;
 }
 
@@ -1903,20 +1903,20 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
     width: 35px;
 }
 
-[class^=" sales-order-shipment-"] .col-ship,
+[class^=" adminhtml-order-shipment-"] .col-ship,
 [class^=" sales-"] .col-return-to-stock,
 .adminhtml-rma-new .col-select {
     text-align: center;
     width: 35px;
 }
 
-[class^=" sales-order-"] .col-price-original,
-[class^=" sales-order-"] .col-tax-amount,
-[class^=" sales-order-"] .col-tax-percent,
-[class^=" sales-order-"] .col-discont,
-[class^=" sales-order-"] .col-total,
-[class^=" sales-order-"] .col-discount,
-[class^=" sales-order-"] .col-tax,
+[class*="-order-"] .col-price-original,
+[class*="-order-"] .col-tax-amount,
+[class*="-order-"] .col-tax-percent,
+[class*="-order-"] .col-discont,
+[class*="-order-"] .col-total,
+[class*="-order-"] .col-discount,
+[class*="-order-"] .col-tax,
 [class^=" sales-"] .col-refunded,
 [class^=" adminhtml-rma-"] .col-order,
 [class^=" adminhtml-rma-"] .col-required,
@@ -1929,8 +1929,8 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
     width: 50px;
 }
 
-[class^=" sales-order-"] .col-subtotal,
-[class^=" sales-order-"] .col-price,
+[class*="-order-"] .col-subtotal,
+[class*="-order-"] .col-price,
 [class^=" adminhtml-rma-"] .col-price {
     text-align: right;
     width: 50px;
@@ -1953,8 +1953,8 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 }
 
 [class^=" sales-"] .col-qty,
-[class^=" sales-order-"] .col-qty-invoice,
-[class^=" sales-order-"] .col-ordered-qty,
+[class*="-order-"] .col-qty-invoice,
+[class*="-order-"] .col-ordered-qty,
 [class^=" adminhtml-rma-"] .col-qty,
 [class^=" adminhtml-rma-"] .col-condition {
     width: 70px;
@@ -2009,7 +2009,7 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
 [class^=" sales-"] tr.headings .col-transaction-type > span,
 [class^=" sales-"] tr.headings .col-gtbase > span,
 [class^=" sales-"] tr.headings .col-gtpurchased > span,
-[class^=" sales-order-"] tr.headings .col-discont > span {
+[class*="-order-"] tr.headings .col-discont > span {
     white-space: normal;
 }
 
@@ -2018,7 +2018,7 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
     width: 150px;
 }
 
-[class^=" sales-order-shipment-"] .col-carrier {
+[class^=" adminhtml-order-shipment-"] .col-carrier {
     width: 190px;
 }
 
@@ -2048,56 +2048,56 @@ tr.row-totals:nth-child(odd) + tr.summary-details ~ tr.summary-total:not(.show-d
     width: 100%;
 }
 
-[class^=" sales-order-"] .order-totals .actions,
+[class*="-order-"] .order-totals .actions,
 [class^=" adminhtml-rma-"] .col-qty,
 [class^=" adminhtml-rma-"] .col-qty_ordered,
 .sales-order-view .col-refunded {
     text-align: right;
 }
 
-[class^=" sales-order-"] .col-price .label,
-[class^=" sales-order-"] .col-subtotal .label {
+[class*="-order-"] .col-price .label,
+[class*="-order-"] .col-subtotal .label {
     display: inline-block;
     min-width: 60px;
     white-space: nowrap;
 }
 
-[class^=" sales-order-"] .col-price .price-excl-tax .price,
-[class^=" sales-order-"] .col-price .price-incl-tax .price,
-[class^=" sales-order-"] .col-subtotal .price-excl-tax .price,
-[class^=" sales-order-"] .col-subtotal .price-incl-tax .price {
+[class*="-order-"] .col-price .price-excl-tax .price,
+[class*="-order-"] .col-price .price-incl-tax .price,
+[class*="-order-"] .col-subtotal .price-excl-tax .price,
+[class*="-order-"] .col-subtotal .price-incl-tax .price {
     font-weight: bold;
 }
 
-[class^=" sales-order-"] .grid .col-qty table,
-[class^=" sales-order-"] .grid .col-qty tbody,
-[class^=" sales-order-"] .grid .col-qty tr,
-[class^=" sales-order-"] .grid .col-qty td,
-[class^=" sales-order-"] .grid .col-ordered-qty table,
-[class^=" sales-order-"] .grid .col-ordered-qty tbody,
-[class^=" sales-order-"] .grid .col-ordered-qty tr,
-[class^=" sales-order-"] .grid .col-ordered-qty td {
+[class*="-order-"] .grid .col-qty table,
+[class*="-order-"] .grid .col-qty tbody,
+[class*="-order-"] .grid .col-qty tr,
+[class*="-order-"] .grid .col-qty td,
+[class*="-order-"] .grid .col-ordered-qty table,
+[class*="-order-"] .grid .col-ordered-qty tbody,
+[class*="-order-"] .grid .col-ordered-qty tr,
+[class*="-order-"] .grid .col-ordered-qty td {
     background: none;
     border: 0;
 }
 
-[class^=" sales-order-"] .col-ordered-qty td {
+[class*="-order-"] .col-ordered-qty td {
     padding: 0 5px 3px;
 }
 
-[class^=" sales-order-"] .grid .product-title {
+[class*="-order-"] .grid .product-title {
     font-weight: bold;
 }
 
-[class^=" sales-order-"] .item-options {
+[class*="-order-"] .item-options {
     margin: 5px 0 5px 10px;
 }
 
-[class^=" sales-order-"] .item-options dt {
+[class*="-order-"] .item-options dt {
     font-weight: bold;
 }
 
-[class^=" sales-order-"] .item-options dd {
+[class*="-order-"] .item-options dd {
     margin: 0 0 0 10px;
 }
 
@@ -2122,7 +2122,7 @@ table.items-to-invoice tbody tr:hover td {
     text-align: center;
 }
 
-[class^=" sales-order-creditmemo-"] .no-items {
+[class~=" -order-creditmemo-"] .no-items {
     padding-top: 13px;
     text-align: center;
 }
@@ -2132,11 +2132,11 @@ table.items-to-invoice tbody tr:hover td {
     font-weight: bold;
 }
 
-.sales-order-shipment-new .order-totals .fieldset-wrapper {
+.adminhtml-order-shipment-new .order-totals .fieldset-wrapper {
     padding-top: 18px;
 }
 
-.sales-order-shipment-new .actions {
+.adminhtml-order-shipment-new .actions {
     float: right;
 }
 
@@ -2145,7 +2145,7 @@ table.items-to-invoice tbody tr:hover td {
     width: 60px;
 }
 
-[class^=" sales-order-"] .order-subtotal .label {
+[class*="-order-"] .order-subtotal .label {
     width: 80%;
 }
 
@@ -2173,7 +2173,7 @@ table.items-to-invoice tbody tr:hover td {
     width: 25%;
 }
 
-[class^=" sales-order-"] .order-shipping-address .price,
+[class*="-order-"] .order-shipping-address .price,
 .order-shipping-address .shipping-description-title {
     font-weight: bold;
 }
@@ -2578,8 +2578,8 @@ table.items-to-invoice tbody tr:hover td {
     padding: 0;
 }
 
-[class^=" sales-order-"] .order-billing-address .packaging-window .actions,
-[class^=" sales-order-"] .order-shipping-address .packaging-window .actions {
+[class*="-order-"] .order-billing-address .packaging-window .actions,
+[class*="-order-"] .order-shipping-address .packaging-window .actions {
     margin: 0;
 }
 
diff --git a/app/design/frontend/magento_plushe/css/styles.css b/app/design/frontend/magento_plushe/css/styles.css
index e52f0d24738021642eeb69e2121d28bca92bcd76..9c9e203db1f1462e6a790d646baa4091cdbf7ec7 100644
--- a/app/design/frontend/magento_plushe/css/styles.css
+++ b/app/design/frontend/magento_plushe/css/styles.css
@@ -11992,7 +11992,7 @@ img[align="right"] {
   .review-customer-index .wrapper.table,
   .sales-order-view .wrapper.table,
   .sales-order-invoice .wrapper.table,
-  .sales-order-shipment .wrapper.table,
+  .adminhtml-order-shipment .wrapper.table,
   .sales-order-creditmemo .wrapper.table,
   .checkout-onepage-index .order-review .wrapper.table,
   .downloadable-customer-products .wrapper.table,
diff --git a/app/design/frontend/magento_plushe/less/responsive/responsive.less b/app/design/frontend/magento_plushe/less/responsive/responsive.less
index 2728ac92fd41d5718d8e81ea4d8e18ab3d8eb8ed..db32ac7dcc86a67e5f884dfac1e219cd6f41879b 100644
--- a/app/design/frontend/magento_plushe/less/responsive/responsive.less
+++ b/app/design/frontend/magento_plushe/less/responsive/responsive.less
@@ -1486,7 +1486,7 @@ and (max-width : @breakPoint1) {
     .review-customer-index,
     .sales-order-view,
     .sales-order-invoice,
-    .sales-order-shipment,
+    .adminhtml-order-shipment,
     .sales-order-creditmemo,
     .checkout-onepage-index .order-review,
     .downloadable-customer-products,
diff --git a/app/etc/di.xml b/app/etc/di.xml
index 7b3b8d57280907645061942b8ab30a50012f73a7..741d3dfa0e95a0d1d560c690bca2bc91a2908567 100644
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -173,14 +173,6 @@
         </param>
     </type>
     <type name="Magento\Data\Structure" shared="false" />
-    <type name="Magento\Core\Model\DataService\Path\Composite">
-        <param name="items">
-            <value>
-                <data>Magento\Core\Model\DataService\Repository</data>
-                <request>Magento\Core\Model\DataService\Path\Request</request>
-            </value>
-        </param>
-    </type>
     <type name="Magento\Core\Model\View\Design">
         <param name="storeManager">
             <instance type="Magento\Core\Model\StoreManager\Proxy" />
@@ -270,19 +262,19 @@
             <value>
                 <urlLib>
                     <key type="const">Magento\Core\Model\Store::URL_TYPE_LIB</key>
-                    <value type="const">Magento\Filesystem::PUB_LIB</value>
+                    <value type="const">Magento\App\Filesystem::PUB_LIB_DIR</value>
                 </urlLib>
                 <urlMedia>
                     <key type="const">Magento\Core\Model\Store::URL_TYPE_MEDIA</key>
-                    <value type="const">Magento\Filesystem::MEDIA</value>
+                    <value type="const">Magento\App\Filesystem::MEDIA_DIR</value>
                 </urlMedia>
                 <urlStatic>
                     <key type="const">Magento\Core\Model\Store::URL_TYPE_STATIC</key>
-                    <value type="const">Magento\Filesystem::STATIC_VIEW</value>
+                    <value type="const">Magento\App\Filesystem::STATIC_VIEW_DIR</value>
                 </urlStatic>
                 <urlCache>
                     <key type="const">Magento\Core\Model\Store::URL_TYPE_CACHE</key>
-                    <value type="const">Magento\Filesystem::PUB_VIEW_CACHE</value>
+                    <value type="const">Magento\App\Filesystem::PUB_VIEW_CACHE_DIR</value>
                 </urlCache>
             </value>
         </param>
@@ -292,7 +284,7 @@
             <value/>
         </param>
     </type>
-    <type name="Magento\Filesystem">
+    <type name="Magento\App\Filesystem">
         <param name="fileReadFactory">
             <instance type="Magento\Filesystem\File\ReadFactory" />
         </param>
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/Service/TestProduct.php b/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php
similarity index 61%
rename from dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/Service/TestProduct.php
rename to dev/tests/integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php
index b78d2a282b00352bc6d548faa5d87cc25c592176..630c2c74e1a79345516a0b251b0b7b157e5dce7a 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/Service/TestProduct.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Set of tests of layout directives handling behavior
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,20 +21,25 @@
  * @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\TestFramework\App\Filesystem;
 
-namespace Magento\Core\Model\DataService\LayoutTest\Magento\Catalog\Service;
-
-class TestProduct
+class DirectoryList extends \Magento\App\Filesystem\DirectoryList
 {
     /**
-     * Provide test product data fixture
+     * Add directory configuration
+     *
+     * @param string $code
+     * @param array $directoryConfig
      */
-    public function getTestProduct($someArgName)
+    public function addDirectory($code, array $directoryConfig)
     {
-        return array(
-            'testProduct' => array(
-                'id' => $someArgName
-            )
-        );
+        if (!isset($directoryConfig['path'])) {
+            $directoryConfig['path'] = null;
+        }
+        if (!$this->isAbsolute($directoryConfig['path'])) {
+            $directoryConfig['path'] = $this->makeAbsolute($directoryConfig['path']);
+        }
+
+        $this->directories[$code] = $directoryConfig;
     }
 }
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php
index 49151a7d1e99058ff7a2bafc2f8eb1b9be4c228c..a8ac17b9701cf788932e728794b8228fc3f2dd2d 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php
@@ -27,7 +27,8 @@
 
 namespace Magento\TestFramework;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem,
+    Magento\App\Filesystem\DirectoryList;
 
 /**
  * Encapsulates application installation, initialization and uninstall
@@ -142,12 +143,12 @@ class Application
         $generationDir = "$installDir/generation";
         $this->_initParams = array(
             Filesystem::PARAM_APP_DIRS => array(
-                Filesystem::CONFIG      => array('path' => $this->_installEtcDir),
+                Filesystem::CONFIG_DIR      => array('path' => $this->_installEtcDir),
                 Filesystem::VAR_DIR     => array('path' => $installDir),
-                Filesystem::MEDIA       => array('path' => "$installDir/media"),
-                Filesystem::STATIC_VIEW => array('path' => "$installDir/pub_static"),
-                Filesystem::PUB_VIEW_CACHE => array('path' => "$installDir/pub_cache"),
-                Filesystem::GENERATION => array('path' => $generationDir)
+                Filesystem::MEDIA_DIR       => array('path' => "$installDir/media"),
+                Filesystem::STATIC_VIEW_DIR => array('path' => "$installDir/pub_static"),
+                Filesystem::PUB_VIEW_CACHE_DIR => array('path' => "$installDir/pub_cache"),
+                Filesystem::GENERATION_DIR => array('path' => $generationDir)
             ),
             \Magento\App\State::PARAM_MODE => $appMode
         );
@@ -211,6 +212,16 @@ class Application
             $objectManager = $this->_factory->restore($objectManager, BP, $overriddenParams);
         }
 
+        $directories = isset($overriddenParams[Filesystem::PARAM_APP_DIRS])
+            ? $overriddenParams[Filesystem::PARAM_APP_DIRS]
+            : array();
+        $directoryList = new \Magento\TestFramework\App\Filesystem\DirectoryList(BP, $directories);
+
+        $objectManager->addSharedInstance($directoryList, 'Magento\App\Filesystem\DirectoryList');
+        $objectManager->addSharedInstance($directoryList, 'Magento\Filesystem\DirectoryList');
+        $objectManager->removeSharedInstance('Magento\App\Filesystem');
+        $objectManager->removeSharedInstance('Magento\App\Filesystem\DirectoryList\Verification');
+
         Helper\Bootstrap::setObjectManager($objectManager);
 
         $objectManager->configure(array(
@@ -238,16 +249,16 @@ class Application
         $this->loadArea(\Magento\TestFramework\Application::DEFAULT_APP_AREA);
         \Magento\Phrase::setRenderer($objectManager->get('Magento\Phrase\Renderer\Placeholder'));
 
-        /** @var \Magento\Filesystem\DirectoryList\Verification $verification */
-        $verification = $objectManager->get('Magento\Filesystem\DirectoryList\Verification');
+        /** @var \Magento\App\Filesystem\DirectoryList\Verification $verification */
+        $verification = $objectManager->get('Magento\App\Filesystem\DirectoryList\Verification');
         $verification->createAndVerifyDirectories();
 
-        $directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
-        $directoryListConfig = $objectManager->get('Magento\Filesystem\DirectoryList\Configuration');
+        $directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
+        $directoryListConfig = $objectManager->get('Magento\App\Filesystem\DirectoryList\Configuration');
         $directoryListConfig->configure($directoryList);
 
-        $directories = isset($overriddenParams[\Magento\Filesystem::PARAM_APP_DIRS])
-            ? $overriddenParams[\Magento\Filesystem::PARAM_APP_DIRS]
+        $directories = isset($overriddenParams[\Magento\App\Filesystem::PARAM_APP_DIRS])
+            ? $overriddenParams[\Magento\App\Filesystem::PARAM_APP_DIRS]
             : array();
         foreach ($directories as $code => $configOverrides) {
             $config = array_merge($directoryList->getConfig($code), $configOverrides);
@@ -274,7 +285,8 @@ class Application
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         /** @var \Magento\App\Http $app */
         $app = $objectManager->get('Magento\App\Http');
-        $app->execute();
+        $response = $app->execute();
+        $response->sendResponse();
     }
 
     /**
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
index 9baa19a3a6ea07b80328aec57c706296d0d06b90..0b3b92cd05f0be22de0b5a8fae6498a43a7a36b0 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
@@ -66,16 +66,17 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
      */
     public function restore(ObjectManager $objectManager, $rootDir, array $arguments)
     {
-        $directories = isset($arguments[\Magento\Filesystem::PARAM_APP_DIRS])
-            ? $arguments[\Magento\Filesystem::PARAM_APP_DIRS]
+        $directories = isset($arguments[\Magento\App\Filesystem::PARAM_APP_DIRS])
+            ? $arguments[\Magento\App\Filesystem::PARAM_APP_DIRS]
             : array();
-        $directoryList = new \Magento\Filesystem\DirectoryList($rootDir, $directories);
+        $directoryList = new \Magento\TestFramework\App\Filesystem\DirectoryList($rootDir, $directories);
 
         \Magento\TestFramework\ObjectManager::setInstance($objectManager);
 
         $this->_pluginList->reset();
 
         $objectManager->configure($this->_primaryConfigData);
+        $objectManager->addSharedInstance($directoryList, 'Magento\App\Filesystem\DirectoryList');
         $objectManager->addSharedInstance($directoryList, 'Magento\Filesystem\DirectoryList');
         $objectManager->configure(array(
             'Magento\View\Design\FileResolution\Strategy\Fallback\CachingProxy' => array(
@@ -87,7 +88,9 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
             'preferences' => array(
                 'Magento\Stdlib\Cookie' => 'Magento\TestFramework\Cookie',
                 'Magento\App\RequestInterface' => 'Magento\TestFramework\Request',
+                'Magento\App\Request\Http' => 'Magento\TestFramework\Request',
                 'Magento\App\ResponseInterface' => 'Magento\TestFramework\Response',
+                'Magento\App\Response\Http' => 'Magento\TestFramework\Response',
             ),
         ));
 
@@ -147,4 +150,12 @@ class ObjectManagerFactory extends \Magento\App\ObjectManagerFactory
         return $this->_pluginList;
     }
 
+    /**
+     * Override method in while running integration tests to prevent getting Exception
+     *
+     * @param \Magento\ObjectManager $objectManager
+     */
+    protected function configureDirectories(\Magento\ObjectManager $objectManager)
+    {
+    }
 }
diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
index d3fd010c35cf011e6f14535e956227d49a995080..6bc49bb751558f7b8f68d2b0290be1d1537acf0e 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
@@ -72,8 +72,8 @@ abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
                 )
             );
 
-            $filesystem = $this->_objectManager->get('Magento\Filesystem');
-            $modulesDir = $filesystem->getPath(\Magento\Filesystem::MODULES);
+            $filesystem = $this->_objectManager->get('Magento\App\Filesystem');
+            $modulesDir = $filesystem->getPath(\Magento\App\Filesystem::MODULES_DIR);
             $this->_schemaFile = $modulesDir . $this->_getXsdPath();
         }
     }
@@ -144,7 +144,8 @@ abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
     public function getXmlConfigFiles()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $directory = $objectManager->get('Magento\Filesystem')->getDirectoryRead(\Magento\Filesystem::MODULES);
+        $directory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         return $objectManager->get('\Magento\Config\FileIteratorFactory')->create(
             $directory,
             $directory->search($this->_getConfigFilePathGlob())
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php
index b361346bc89cbc61b67b0185f3c8e0adef01c43d..c309db5784979a724d7ff4b620c022117889e2bb 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ApplicationTest.php
@@ -41,8 +41,8 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $dbInstance = $this->getMockForAbstractClass('Magento\TestFramework\Db\AbstractDb', array(), '', false);
         $installDir = '/install/dir';
         $appMode = \Magento\App\State::MODE_DEVELOPER;
-        $directoryList = new \Magento\Filesystem\DirectoryList(BP);
-        $filesystem = new \Magento\Filesystem(
+        $directoryList = new \Magento\App\Filesystem\DirectoryList(BP);
+        $filesystem = new \Magento\App\Filesystem(
             $directoryList,
             new \Magento\Filesystem\Directory\ReadFactory(),
             new \Magento\Filesystem\Directory\WriteFactory(),
@@ -69,7 +69,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
 
         $initParams = $object->getInitParams();
         $this->assertInternalType('array', $initParams, 'Wrong initialization parameters type');
-        $this->assertArrayHasKey(\Magento\Filesystem::PARAM_APP_DIRS, $initParams,
+        $this->assertArrayHasKey(\Magento\App\Filesystem::PARAM_APP_DIRS, $initParams,
             'Directories are not configured');
         $this->assertArrayHasKey(State::PARAM_MODE, $initParams,
             'Application mode is not configured');
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php
index c1044bb9b39df996fa205cdd80ae5a130201838d..0a39d1a67771abeed1bae06578597ff4e7df8787 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Helper/BootstrapTest.php
@@ -53,9 +53,9 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
      * @var array
      */
     protected $_fixtureInitParams = array(
-        \Magento\Filesystem::PARAM_APP_DIRS => array(
-            \Magento\Filesystem::CONFIG     => array('path' => __DIR__),
-            \Magento\Filesystem::VAR_DIR    => array('path' => __DIR__)
+        \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+            \Magento\App\Filesystem::CONFIG_DIR     => array('path' => __DIR__),
+            \Magento\App\Filesystem::VAR_DIR    => array('path' => __DIR__)
         )
     );
 
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
index f13dd8bc8e7e2b05f7bdd7711b7c6910a380823b..cf2f33f7940b76b36a3f4d08e6179ace2f4731d8 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/ObjectManagerTest.php
@@ -46,7 +46,9 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
     {
         $resource = new \stdClass;
         $instanceConfig = new \Magento\TestFramework\ObjectManager\Config();
-        $verification = $this->getMock('Magento\Filesystem\DirectoryList\Verification', array(), array(), '', false);
+        $verification = $this->getMock(
+            'Magento\App\Filesystem\DirectoryList\Verification', array(), array(), '', false
+        );
         $cache = $this->getMock('Magento\App\CacheInterface');
         $configLoader = $this->getMock('Magento\App\ObjectManager\ConfigLoader', array(), array(), '', false);
         $configCache = $this->getMock('Magento\App\ObjectManager\ConfigCache', array(), array(), '', false);
@@ -57,7 +59,7 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
         $model = new \Magento\TestFramework\ObjectManager(
             null, $instanceConfig,
             array(
-                'Magento\Filesystem\DirectoryList\Verification' => $verification,
+                'Magento\App\Filesystem\DirectoryList\Verification' => $verification,
                 'Magento\App\Cache\Type\Config' => $cache,
                 'Magento\App\ObjectManager\ConfigLoader' => $configLoader,
                 'Magento\App\ObjectManager\ConfigCache' => $configCache,
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php
index 088b444d198dcd2fbc2866f211f2e95fff2e1f20..47184c017d252c21798428742c3422d8932bcdb5 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/System/Config/FormTest.php
@@ -223,9 +223,9 @@ class FormTest extends \PHPUnit_Framework_TestCase
         $fileResolverMock = $this->getMockBuilder('Magento\Core\Model\Config\FileResolver')
                                 ->disableOriginalConstructor()
                                 ->getMock();
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
         /** @var $directory  \Magento\Filesystem\Directory\Read */
-        $directory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $directory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $fileIteratorFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Config\FileIteratorFactory');
         $fileIterator = $fileIteratorFactory->create($directory, array(
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php
index de4709f3339ba8ef02bbce00a89f9bf0610a29ac..c0850d3d29161d0d365d0b5be60b6debfc623d92 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/Grid/MassactionTest.php
@@ -69,8 +69,8 @@ class MassactionTest extends \PHPUnit_Framework_TestCase
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
             \Magento\Core\Model\App::PARAM_RUN_CODE => 'admin',
             \Magento\Core\Model\App::PARAM_RUN_TYPE => 'store',
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => __DIR__ . '/../../_files/design')
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/../../_files/design')
             ),
         ));
     }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php
index 964676d3c78dfed4dd946014a2eb7aa3bdf50e26..7f2fbcd907031b9d0a32e88d86b37e7c02d70967 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php
@@ -87,10 +87,13 @@ class GridTest extends \PHPUnit_Framework_TestCase
     protected function _getColumnSetMock()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $directoryList = $objectManager->create('\Magento\Filesystem\DirectoryList', array('root' => __DIR__));
+        $directoryList = $objectManager->create('\Magento\App\Filesystem\DirectoryList', array('root' => __DIR__));
         return $this->getMock('Magento\Backend\Block\Widget\Grid\ColumnSet', array(), array(
             $objectManager->create('\Magento\View\Element\Template\Context', array(
-                'filesystem' => $objectManager->create('\Magento\Filesystem', array('directoryList' => $directoryList))
+                'filesystem' => $objectManager->create(
+                        '\Magento\App\Filesystem',
+                        array('directoryList' => $directoryList)
+                    )
             )),
             $objectManager->create('Magento\Backend\Model\Widget\Grid\Row\UrlGeneratorFactory'),
             $objectManager->create('Magento\Backend\Model\Widget\Grid\SubTotals'),
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php
index e01b3973fc3b746a916195177443128da74b01e9..1dc0b3ea7d07270490a6910eac13c307dd2ba039 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/Config/Backend/Admin/RobotsTest.php
@@ -53,7 +53,8 @@ class RobotsTest extends \PHPUnit_Framework_TestCase
         $this->model = $objectManager->create('Magento\Backend\Model\Config\Backend\Admin\Robots');
         $this->model->setPath('design/search_engine_robots/custom_instructions');
         $this->model->afterLoad();
-        $this->rootDirectory = $objectManager->get('Magento\Filesystem')->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->rootDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php
index 228a48bdf0ee3abf045186c2f40575d60d80b08b..23b79a71a2da6440e4ec8d63b3ed9a0748d57247 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/no_robots_txt.php
@@ -27,7 +27,7 @@
 
 /** @var \Magento\Filesystem\Directory\Write $rootDirectory */
 $rootDirectory =  \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-    ->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::ROOT);
+    ->get('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 if ($rootDirectory->isExist('robots.txt')) {
     $rootDirectory->delete('robots.txt');
 }
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php
index 7a450108a39c2735cfd2056cc393a3bfa9775aee..c3d45c67dd77deacc5c2aa7c21f2fd5ddc50228e 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Model/_files/robots_txt.php
@@ -26,5 +26,5 @@
  */
 /** @var \Magento\Filesystem\Directory\Write $rootDirectory */
 $rootDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-    ->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::ROOT);
+    ->get('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 $rootDirectory->copyFile($rootDirectory->getRelativePath(__DIR__ . '/robots.txt'), 'robots.txt');
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php
index 64c5282e168ac4febcac29495191ebb70b4db6d6..c540bf28be16aefe71c8229844b9d299d626e4c7 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/AbstractTest.php
@@ -97,19 +97,24 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $this->assertStringEndsWith('catalog/product/view/', $this->_block->getSubmitUrl($this->_product));
     }
 
-    public function testGetAddToWishlistUrl()
+    public function testGetAddToWishlistParams()
     {
+        $json = $this->_block->getAddToWishlistParams($this->_product);
+        $params = (array) json_decode($json);
+        $data = (array) $params['data'];
+        $this->assertEquals('1', $data['product']);
+        $this->assertArrayHasKey('uenc', $data);
+        $this->assertArrayHasKey('form_key', $data);
         $this->assertStringEndsWith(
-            'wishlist/index/add/product/1/',
-            $this->_block->getAddToWishlistUrl($this->_product)
+            'wishlist/index/add/',
+            $params['action']
         );
     }
 
     public function testGetAddToCompareUrl()
     {
-        $this->assertStringMatchesFormat(
-            '%scatalog/product_compare/add/product/1/%s',
-            $this->_block->getAddToCompareUrl($this->_product)
+        $this->assertStringMatchesFormat('%scatalog/product_compare/add/',
+            $this->_block->getAddToCompareUrl()
         );
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php
index 7a86291a6ba2653f596a3e7206b40dd40d18a5f2..e9d09e78205868596f4640026accdc343d8c314c 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/CrosssellTest.php
@@ -56,7 +56,7 @@ class CrosssellTest extends \PHPUnit_Framework_TestCase
         $html = $block->toHtml();
         $this->assertNotEmpty($html);
         $this->assertContains('Simple Cross Sell', $html); /* name */
-        $this->assertContains('product/1/', $html);  /* part of url */
+        $this->assertContains('product\/1\/', $html);  /* part of url */
         $this->assertInstanceOf('Magento\Catalog\Model\Resource\Product\Link\Product\Collection', $block->getItems());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php
index 17c736d5bbb44a4ee866b708729fe2c8506c4e5f..7bbb9d532876c766e05856e6f9f753534b0e66a6 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Product/ProductList/RelatedTest.php
@@ -55,7 +55,7 @@ class RelatedTest extends \PHPUnit_Framework_TestCase
         $html = $block->toHtml();
         $this->assertNotEmpty($html);
         $this->assertContains('Simple Related Product', $html); /* name */
-        $this->assertContains('product/1/', $html);  /* part of url */
+        $this->assertContains('"product":"1"', $html);  /* part of url */
         $this->assertInstanceOf('Magento\Catalog\Model\Resource\Product\Link\Product\Collection', $block->getItems());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php
index fda4144ece157bf6fa090d635ab876fd59a86ba1..27bebfbac04ac914e89d7c11d3a95a8aed6f4bbc 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php
@@ -49,7 +49,8 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
         /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         // image fixtures
         $fixtureMediaDir = $mediaDirectory->getAbsolutePath($config->getBaseMediaPath());
@@ -94,7 +95,8 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
         /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         $mediaDirectory->delete($config->getBaseMediaPath());
         $mediaDirectory->delete($config->getBaseTmpMediaPath());
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompareTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompareTest.php
index 4164c4007ee9210b0509a4f71050c9eccf5165ef..21300b65342df520af0811c954db761eecf06dcd 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompareTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/Product/CompareTest.php
@@ -59,9 +59,21 @@ class CompareTest extends \PHPUnit_Framework_TestCase
         $this->_testGetProductUrl('getAddUrl', '/catalog/product_compare/add/');
     }
 
-    public function testGetAddToWishlistUrl()
+    public function testGetAddToWishlistParams()
     {
-        $this->_testGetProductUrl('getAddToWishlistUrl', '/wishlist/index/add/');
+        $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->create('Magento\Catalog\Model\Product');
+        $product->setId(10);
+        $json = $this->_helper->getAddToWishlistParams($product);
+        $params = (array) json_decode($json);
+        $data = (array) $params['data'];
+        $this->assertEquals('10', $data['product']);
+        $this->assertArrayHasKey('uenc', $data);
+        $this->assertArrayHasKey('form_key', $data);
+        $this->assertStringEndsWith(
+            'wishlist/index/add/',
+            $params['action']
+        );
     }
 
     public function testGetAddToCartUrl()
@@ -71,7 +83,8 @@ class CompareTest extends \PHPUnit_Framework_TestCase
 
     public function testGetRemoveUrl()
     {
-        $this->_testGetProductUrl('getRemoveUrl', '/catalog/product_compare/remove/');
+        $url = $this->_helper->getRemoveUrl();
+        $this->assertContains('/catalog/product_compare/remove/', $url);
     }
 
     public function testGetClearListUrl()
@@ -130,8 +143,6 @@ class CompareTest extends \PHPUnit_Framework_TestCase
         $product->setId(10);
         $url = $this->_helper->$method($product);
         $this->assertContains($expectedFullAction, $url);
-        $this->assertContains('/product/10/', $url);
-        $this->assertContains('/uenc/', $url);
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php
index 9c8f824d7874e1e80ce5a2ed0a46e019f98a5d5c..69d1a642a74f21a9017013a6858b857011f5442f 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php
@@ -53,7 +53,8 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         self::$_mediaTmpDir = $mediaDirectory->getAbsolutePath($config->getBaseTmpMediaPath());
         self::$_mediaDir = $mediaDirectory->getAbsolutePath($config->getBaseMediaPath());
@@ -74,8 +75,8 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
 
         /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         if ($mediaDirectory->isExist($config->getBaseMediaPath())) {
             $mediaDirectory->delete($config->getBaseMediaPath());
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/SkuTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/SkuTest.php
index c761cf879c1d3e3fafe7d35c1b99889fc9781e71..d1f4384bad2ed6252b7c370cfedeb9c7450355e1 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/SkuTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/SkuTest.php
@@ -68,7 +68,10 @@ class SkuTest extends \PHPUnit_Framework_TestCase
      */
     public function testGenerateUniqueLongSku($product)
     {
-        $product->duplicate();
+        /** @var \Magento\Catalog\Model\Product\Copier $copier */
+        $copier = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->get('Magento\Catalog\Model\Product\Copier');
+        $copier->copy($product);
         $this->assertEquals('0123456789012345678901234567890123456789012345678901234567890123', $product->getSku());
         $product->getResource()->getAttribute('sku')->getBackend()->beforeSave($product);
         $this->assertEquals('01234567890123456789012345678901234567890123456789012345678901-1', $product->getSku());
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php
index ad7c7998cde1712db4c3ed858195106f832cc0e4..14f7cb622e8fe40025cc27149d4019454aef927b 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Type/AbstractTest.php
@@ -44,7 +44,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Event\ManagerInterface', array('dispatch'), array(), '', false);
         $coreData = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $fileStorageDb = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $registry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->_model = $this->getMockForAbstractClass('Magento\Catalog\Model\Product\Type\AbstractType',
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php
index 3d38acdb45ffeb5ebc9369c7e127460d24ee7c2f..d49ba62dbf1d314bf8cd6ce0965bb30b6af40343 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php
@@ -64,7 +64,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
             array(null, 'Magento\Catalog\Model\Product\Type\Simple'),
             array(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE, 'Magento\Catalog\Model\Product\Type\Simple'),
             array(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL, 'Magento\Catalog\Model\Product\Type\Virtual'),
-            array(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED, 'Magento\Catalog\Model\Product\Type\Grouped'),
             array(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE,
                 'Magento\Catalog\Model\Product\Type\Configurable'
             ),
@@ -100,7 +99,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
             array(null),
             array(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE),
             array(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL),
-            array(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED),
             array(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE),
             array(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE),
             array(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE)
@@ -124,7 +122,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
             array(null, 'Magento\Catalog\Model\Product\Type\Price'),
             array(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE, 'Magento\Catalog\Model\Product\Type\Price'),
             array(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL, 'Magento\Catalog\Model\Product\Type\Price'),
-            array(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED, 'Magento\Catalog\Model\Product\Type\Price'),
             array(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE,
                 'Magento\Catalog\Model\Product\Type\Configurable\Price'
             ),
@@ -140,7 +137,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
         $options = $this->_productType->getOptionArray();
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE, $options);
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL, $options);
-        $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED, $options);
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE, $options);
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $options);
         $this->assertArrayHasKey(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE, $options);
@@ -181,7 +177,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
         return array(
             array(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE),
             array(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL),
-            array(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED),
             array(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE),
             array(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE),
             array(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE),
@@ -193,7 +188,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
         $types = $this->_productType->getTypes();
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE, $types);
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL, $types);
-        $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED, $types);
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE, $types);
         $this->assertArrayHasKey(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $types);
         $this->assertArrayHasKey(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE, $types);
@@ -209,7 +203,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
     {
         $types = $this->_productType->getCompositeTypes();
         $this->assertInternalType('array', $types);
-        $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED, $types);
         $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE, $types);
         $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $types);
     }
@@ -254,7 +247,6 @@ class TypeTest extends \PHPUnit_Framework_TestCase
         }
         $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE, $types);
         $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_VIRTUAL, $types);
-        $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED, $types);
         $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE, $types);
         $this->assertContains(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE, $types);
         $this->assertContains(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE, $types);
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php
index 6200144e0748c4f6030607ff7a985c4261b70883..e7e1d1b5f3dd4f46c925999664f6066e7becc53d 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php
@@ -226,13 +226,6 @@ class ProductExternalTest extends \PHPUnit_Framework_TestCase
         $this->assertSame($this->_model, $linkCollection->getProduct());
     }
 
-    public function testGetGroupedLinkCollection()
-    {
-        $linkCollection = $this->_model->getGroupedLinkCollection();
-        $this->assertInstanceOf('Magento\Catalog\Model\Resource\Product\Link\Collection', $linkCollection);
-        $this->assertSame($this->_model, $linkCollection->getProduct());
-    }
-
     /**
      * @covers \Magento\Catalog\Model\Product::getProductUrl
      * @covers \Magento\Catalog\Model\Product::getUrlInStore
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php
index ff04b3b58a758caaae84f8b4822ca11dc43b8b28..dc6aa30cde0168d8a7c571eb295b1838ed9c4bd4 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php
@@ -283,8 +283,8 @@ class ProductGettersTest extends \PHPUnit_Framework_TestCase
     public static function tearDownAfterClass()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
         $mediaDirectory->delete($config->getBaseMediaPath());
     }
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php
index 30eb9cb1418db7593d0bc406103fbfefddf043be..9b558ec9a13dddbf20ee63a0765b2b5a39782c23 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php
@@ -55,8 +55,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
 
         /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         if ($mediaDirectory->isExist($config->getBaseMediaPath())) {
             $mediaDirectory->delete($config->getBaseMediaPath());
@@ -130,8 +130,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
 
         /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-        $mediaDirectory = $objectManager->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $mediaDirectory = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
         $mediaDirectory->create($config->getBaseTmpMediaPath());
         $targetFile = $config->getTmpMediaPath(basename($sourceFile));
@@ -147,7 +147,10 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     public function testDuplicate()
     {
         $this->_model->load(1); // fixture
-        $duplicate = $this->_model->duplicate();
+        /** @var \Magento\Catalog\Model\Product\Copier $copier */
+        $copier = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->get('Magento\Catalog\Model\Product\Copier');
+        $duplicate = $copier->copy($this->_model);
         try {
             $this->assertNotEmpty($duplicate->getId());
             $this->assertNotEquals($duplicate->getId(), $this->_model->getId());
@@ -168,8 +171,11 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         $this->_model->load(1);
         $this->assertEquals('simple', $this->_model->getSku());
-        $duplicated = $this->_model->duplicate();
-        $this->assertEquals('simple-1', $duplicated->getSku());
+        /** @var \Magento\Catalog\Model\Product\Copier $copier */
+        $copier = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->get('Magento\Catalog\Model\Product\Copier');
+        $duplicate = $copier->copy($this->_model);
+        $this->assertEquals('simple-1', $duplicate->getSku());
     }
 
     /**
@@ -184,36 +190,14 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $duplicate->delete();
     }
 
-    /**
-     * @covers \Magento\Catalog\Model\Product::isGrouped
-     * @covers \Magento\Catalog\Model\Product::isSuperGroup
-     * @covers \Magento\Catalog\Model\Product::isSuper
-     */
-    public function testIsGrouped()
-    {
-        $this->assertFalse($this->_model->isGrouped());
-        $this->assertFalse($this->_model->isSuperGroup());
-        $this->assertFalse($this->_model->isSuper());
-        $this->_model->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED);
-        $this->assertTrue($this->_model->isGrouped());
-        $this->assertTrue($this->_model->isSuperGroup());
-        $this->assertTrue($this->_model->isSuper());
-    }
-
     /**
      * @covers \Magento\Catalog\Model\Product::isConfigurable
-     * @covers \Magento\Catalog\Model\Product::isSuperConfig
-     * @covers \Magento\Catalog\Model\Product::isSuper
      */
     public function testIsConfigurable()
     {
         $this->assertFalse($this->_model->isConfigurable());
-        $this->assertFalse($this->_model->isSuperConfig());
-        $this->assertFalse($this->_model->isSuper());
         $this->_model->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_CONFIGURABLE);
         $this->assertTrue($this->_model->isConfigurable());
-        $this->assertTrue($this->_model->isSuperConfig());
-        $this->assertTrue($this->_model->isSuper());
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image.php
index 676618f0db30a4b53ba8e5c66d92de663010d556..227a3dcafb26129f094140b879acab8067e4ddbd 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image.php
@@ -26,7 +26,7 @@
  */
 
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-$mediaPath = $objectManager->get('Magento\Filesystem')->getPath(\Magento\Filesystem::MEDIA);
+$mediaPath = $objectManager->get('Magento\App\Filesystem')->getPath(\Magento\App\Filesystem::MEDIA_DIR);
 $additionalPath = $objectManager->get('Magento\Catalog\Model\Product\Media\Config')->getBaseMediaPath();
 $dir = $mediaPath . '/' . $additionalPath . '/m/a';
 if (!is_dir($dir)) {
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php
index 71d56870f91771f5b73333e7f23fe67e8a345fd2..6577f0a629a66e8675a720ccd6a21fd9067c23b6 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image_rollback.php
@@ -31,8 +31,8 @@ $config = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
 
 /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
 $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-    ->get('Magento\Filesystem')
-    ->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+    ->get('Magento\App\Filesystem')
+    ->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
 $mediaDirectory->delete($config->getBaseMediaPath());
 $mediaDirectory->delete($config->getBaseTmpMediaPath());
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php b/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php
index eb26cb35818421c5274932d12b6cffb754757eaa..d13f3f74d548ade78ee3c98d83caa8eaaa912732 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php
@@ -31,7 +31,7 @@ $obectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 /** @var \Magento\Catalog\Model\Product\Media\Config $config */
 $config = $obectManager->get('Magento\Catalog\Model\Product\Media\Config');
 /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-$mediaDirectory = $obectManager->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+$mediaDirectory = $obectManager->get('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
 $baseTmpMediaPath = $config->getBaseTmpMediaPath();
 $mediaDirectory->create($baseTmpMediaPath);
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php b/dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php
index f3ea59f2fd4239d56f4e7a6e174502e58fc1ae4e..e6e62f4daa2bc800a30df272b76abc6c45932b0b 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php
@@ -27,8 +27,8 @@ class ImagesTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetStorageRoot()
     {
-        $path = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')->getPath(
-            \Magento\Filesystem::MEDIA
+        $path = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')->getPath(
+            \Magento\App\Filesystem::MEDIA_DIR
         );
         $helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Cms\Helper\Wysiwyg\Images');
diff --git a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
index ce27d0da5a044b36ad3fe27f2be5b8ef8a959af1..3f79c091d33a316d6162644d66336ed56ada222a 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
@@ -83,7 +83,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
     public function testGetThumbsPath()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $filesystem = $objectManager->get('Magento\Filesystem');
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
         $session = $objectManager->get('Magento\Backend\Model\Session');
         $backendUrl = $objectManager->get('Magento\Backend\Model\Url');
         $imageFactory = $objectManager->get('Magento\Image\AdapterFactory');
@@ -111,7 +111,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
             $uploaderFactory
         );
         $this->assertStringStartsWith(
-            str_replace('\\', '/', $filesystem->getPath(\Magento\Filesystem::MEDIA)),
+            str_replace('\\', '/', $filesystem->getPath(\Magento\App\Filesystem::MEDIA_DIR)),
             $model->getThumbsPath()
         );
     }
diff --git a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php
index 66df4e223e534d55149cfb0c0f517ee10bf1cb5a..2aa7b0aaf32d23814cc6e947d9b6935539008af2 100644
--- a/dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Code/GeneratorTest.php
@@ -64,7 +64,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase
         $this->_includePath = get_include_path();
 
         $this->varDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+            ->get('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $generationDirectory = $this->varDirectory->getAbsolutePath('generation');
 
         \Magento\Autoload\IncludePath::addIncludePath($generationDirectory);
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php
deleted file mode 100644
index c5b522fd0aca409cce907bc9c6e7a06f098522b1..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/ConfigTest.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-/**
- * Include verification of overriding service call alias with different classes.
- *
- * 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\Core\Model\DataService;
-
-class ConfigTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\DataService\Config
-     */
-    protected $_config;
-
-    /**
-     * @var \Magento\Filesystem
-     */
-    protected $filesystem;
-
-    /**
-     * @var \Magento\ObjectManager
-     */
-    protected $objectManager;
-
-    /**
-     * Setup test
-     */
-    protected function setUp()
-    {
-        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $rootPath = $this->objectManager->get('Magento\Filesystem')
-            ->getDirectoryRead(\Magento\Filesystem::ROOT)
-            ->getAbsolutePath();
-
-        $path = str_replace('\\', '/', realpath(__DIR__ . '/../DataService/LayoutTest'));
-
-        $directoryList = new \Magento\Filesystem\DirectoryList(
-            $rootPath, array(
-            \Magento\Filesystem::MODULES => array('path' => $path),
-            \Magento\Filesystem::CONFIG => array('path' => $path)
-        ));
-
-        $this->filesystem = new \Magento\Filesystem(
-            $directoryList,
-            new \Magento\Filesystem\Directory\ReadFactory(),
-            new \Magento\Filesystem\Directory\WriteFactory()
-        );
-
-        $modulesDir = new \Magento\Module\Dir(
-            $this->filesystem,
-            $this->objectManager->get('Magento\Stdlib\String')
-        );
-        /** @var \Magento\Module\Dir\Reader $moduleReader */
-
-
-        $moduleList = $this->objectManager->create(
-            'Magento\Module\ModuleList',
-            array(
-                'reader' => $this->objectManager->create(
-                    'Magento\Module\Declaration\Reader\Filesystem',
-                    array(
-                        'fileResolver' => $this->objectManager->create(
-                            'Magento\Module\Declaration\FileResolver',
-                            array(
-                                'filesystem' => $this->filesystem
-                            )
-                        )
-                    )
-                ),
-                'cache' => $this->getMock('Magento\Config\CacheInterface')
-            )
-        );
-
-        $moduleReader = new \Magento\Module\Dir\Reader(
-            $modulesDir,
-            $moduleList,
-            $this->filesystem,
-            $this->objectManager->get('Magento\Config\FileIteratorFactory')
-        );
-
-        /** @var \Magento\Core\Model\DataService\Config\Reader\Factory $dsCfgReaderFactory */
-        $dsCfgReaderFactory = $this->objectManager->create(
-            'Magento\Core\Model\DataService\Config\Reader\Factory'
-        );
-
-        /** @var \Magento\Core\Model\DataService\Config $config */
-        $this->_config = new \Magento\Core\Model\DataService\Config(
-            $dsCfgReaderFactory,
-            $moduleReader
-        );
-
-    }
-
-    public function testGetClassByAliasOverride()
-    {
-        $classInfo = $this->_config->getClassByAlias('alias');
-        $this->assertEquals('last_service', $classInfo['class']);
-        $this->assertEquals('last_method', $classInfo['retrieveMethod']);
-        $this->assertEquals('last_value', $classInfo['methodArguments']['last_arg']);
-        $this->assertEquals('last_value_two', $classInfo['methodArguments']['last_arg_two']);
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php
deleted file mode 100644
index 4140a25fabe9592d5e6622aad38fb62d49eb4ee4..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest.php
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-/**
- * Set of tests of layout directives handling behavior
- *
- * 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\Core\Model\DataService;
-
-class LayoutTest extends \Magento\TestFramework\TestCase\AbstractController
-{
-    private $_dataServiceGraph;
-
-    /**
-     * @var \Magento\ObjectManager
-     */
-    protected $objectManager;
-
-    /**
-     * @var \Magento\Filesystem
-     */
-    protected $filesystem;
-
-    /**
-     * Setup
-     */
-    protected function setUp()
-    {
-        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $rootPath = $this->objectManager->get('Magento\Filesystem')
-            ->getDirectoryRead(\Magento\Filesystem::ROOT)
-            ->getAbsolutePath();
-
-        $path = str_replace('\\', '/', realpath(__DIR__ . '/../DataService/LayoutTest'));
-        $directoryList = new \Magento\Filesystem\DirectoryList(
-            $rootPath,
-            array(\Magento\Filesystem::MODULES => array('path' => $path))
-        );
-
-        $this->filesystem = new \Magento\Filesystem(
-            $directoryList,
-            new \Magento\Filesystem\Directory\ReadFactory(),
-            new \Magento\Filesystem\Directory\WriteFactory()
-        );
-
-        $config = $this->_loadServiceCallsConfig();
-        parent::setUp();
-        $this->dispatch("catalog/category/view/foo/bar");
-        $fixtureFileName = __DIR__ . '/LayoutTest/Magento/Catalog/Service/TestProduct.php';
-        include $fixtureFileName;
-        $invoker = $this->objectManager->create(
-            'Magento\Core\Model\DataService\Invoker',
-            array('config' => $config)
-        );
-        /** @var \Magento\Core\Model\DataService\Graph $dataServiceGraph */
-        $this->_dataServiceGraph = $this->objectManager->create(
-            'Magento\Core\Model\DataService\Graph',
-            array('dataServiceInvoker' => $invoker)
-        );
-    }
-
-    protected function _loadServiceCallsConfig()
-    {
-        $modulesDir = new \Magento\Module\Dir(
-            $this->filesystem,
-            $this->objectManager->get('Magento\Stdlib\String')
-        );
-        /** @var \Magento\Module\Dir\Reader $moduleReader */
-
-        $moduleReader = new \Magento\Module\Dir\Reader(
-            $modulesDir,
-            $this->objectManager->get('Magento\Module\ModuleListInterface'),
-            $this->filesystem,
-            $this->objectManager->get('Magento\Config\FileIteratorFactory')
-        );
-
-        /** @var \Magento\Core\Model\DataService\Config\Reader\Factory $dsCfgReaderFactory */
-        $dsCfgReaderFactory = $this->objectManager->create(
-            'Magento\Core\Model\DataService\Config\Reader\Factory'
-        );
-
-        /** @var \Magento\Core\Model\DataService\Config $config */
-        $dataServiceConfig = new \Magento\Core\Model\DataService\Config(
-            $dsCfgReaderFactory,
-            $moduleReader
-        );
-        return $dataServiceConfig;
-    }
-
-    /**
-     * Test Layout initialization of service calls
-     */
-    public function testServiceCalls()
-    {
-        /** @var \Magento\View\LayoutInterface $layout */
-        $layout = $this->_getLayoutModel('layout_update.xml');
-        $serviceCalls = $layout->getServiceCalls();
-        $expectedServiceCalls = array(
-            'testServiceCall' => array(
-                'namespaces' => array(
-                    'block_with_service_calls' => 'testData'
-                )
-            )
-        );
-        $this->assertEquals($expectedServiceCalls, $serviceCalls);
-        $dictionary = $this->_dataServiceGraph->getByNamespace('block_with_service_calls');
-        $expectedDictionary = array(
-            'testData' => array(
-                'testProduct' => array(
-                    'id' => 'bar'
-                )
-            )
-        );
-        $this->assertEquals($expectedDictionary, $dictionary);
-    }
-
-    /**
-     * Prepare a layout model with pre-loaded fixture of an update XML
-     *
-     * @param string $fixtureFile
-     *
-     * @return \Magento\View\LayoutInterface
-     */
-    protected function _getLayoutModel($fixtureFile)
-    {
-        /** @var $layout \Magento\View\LayoutInterface */
-        $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\View\LayoutInterface',
-            array('dataServiceGraph' => $this->_dataServiceGraph)
-        );
-        $xml = simplexml_load_file(__DIR__ . "/LayoutTest/{$fixtureFile}", 'Magento\View\Layout\Element');
-        $layout->setXml($xml);
-        $layout->generateElements();
-        return $layout;
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/etc/service_calls.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/etc/service_calls.xml
deleted file mode 100644
index a60e7e8b5ee1a71e2ff80af27a0c32e1db7b0fe6..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/etc/service_calls.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<service_calls>
-    <service_call name="testServiceCall"
-                  service="Magento\Core\Model\DataService\LayoutTest\Magento\Catalog\Service\TestProduct"
-                  method="getTestProduct">
-        <arg name="someArgName">{{request.params.foo}}</arg>
-    </service_call>
-</service_calls>
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/First/etc/module.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/First/etc/module.xml
deleted file mode 100755
index 004541282a7686100a401a89e9dabcba553cd3fc..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/First/etc/module.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<config>
-    <module name="Magento_First" version="1.6.0.0.23" active="true"/>
-</config>
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/First/etc/service_calls.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/First/etc/service_calls.xml
deleted file mode 100644
index 81b7133f3556f26fff6c42af80a98469b7eab72a..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/First/etc/service_calls.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<service_calls>
-    <service_call name="alias" service="first_service" method="first_method">
-        <arg name="first_arg">first_value</arg>
-        <arg name="first_arg_two">first_value_two</arg>
-    </service_call>
-</service_calls>
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Last/etc/service_calls.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Last/etc/service_calls.xml
deleted file mode 100644
index 7d824f73d5b474b2736007dcae9e7c95843b1238..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Last/etc/service_calls.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<service_calls>
-    <service_call name="alias" service="last_service" method="last_method">
-        <arg name="last_arg">last_value</arg>
-        <arg name="last_arg_two">last_value_two</arg>
-    </service_call>
-</service_calls>
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Test/etc/module.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Test/etc/module.xml
deleted file mode 100755
index 4bbcaf82cde93335c3ffb629bf6c151641fe831c..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Test/etc/module.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<config>
-    <module name="Magento_Test" version="1.6.0.0.23" active="true"/>
-</config>
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Test/etc/service_calls.xml b/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Test/etc/service_calls.xml
deleted file mode 100644
index e1630f9e1804ab8b30d2b19b93516c807d83dbe0..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Test/etc/service_calls.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<service_calls>
-    <service_call name="alias" service="some_class_name" method="some_method_name">
-        <arg name="some_arg_name_one">some_arg_value_one</arg>
-        <arg name="some_arg_name_two">some_arg_value_two</arg>
-    </service_call>
-</service_calls>
\ No newline at end of file
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/File/StorageTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/File/StorageTest.php
index 2db25eec833f7035c004b2019f62ea3964c01d55..929187dfe631466420b3e349615e9ae12fed2b5f 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/File/StorageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/File/StorageTest.php
@@ -44,7 +44,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         $this->assertArrayHasKey('update_time', $config);
         $this->assertEquals(
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->get('Magento\Filesystem')->getPath(\Magento\Filesystem::MEDIA),
+                ->get('Magento\App\Filesystem')->getPath(\Magento\App\Filesystem::MEDIA_DIR),
             $config['media_directory']
         );
         $this->assertInternalType('array', $config['allowed_resources']);
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php
index 1342496c7ea56f17edf2dd2130e0bd031bfc1ff8..e6d1ffd89eaa6604f1a2cde53a1b8aaa54b26717 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php
@@ -66,7 +66,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
             array(
                 $this->_objectManager->create('Magento\Core\Model\Resource\Theme\CollectionFactory'),
                 $this->_objectManager->create('Magento\Core\Model\Theme\Collection'),
-                $this->_objectManager->create('Magento\Filesystem')
+                $this->_objectManager->create('Magento\App\Filesystem')
             )
         );
         $themeRegistration->expects($this->once())
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Session/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Session/ConfigTest.php
index 669ff1c9b92301bada88f67bf085bfc53695eb7f..b3a0fa6678e180ef3d262833d447f18b3f8e0659 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Session/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Session/ConfigTest.php
@@ -69,7 +69,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     public function testDefaultConfiguration()
     {
         $this->assertEquals(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')->getPath('session'),
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath('session'),
             $this->_model->getSavePath()
         );
         $this->assertEquals(
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php
index 906eb99fc808d02bce8c9a05d0c204bc711bd012..f2cd9f2752e4b448fc106d0c4a0495a956aa8e4f 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/StoreTest.php
@@ -58,7 +58,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase
             'url'                     => $objectManager->get('Magento\Core\Model\Url'),
             'request'                 => $objectManager->get('Magento\App\RequestInterface'),
             'configDataResource'      => $objectManager->get('Magento\Core\Model\Resource\Config\Data'),
-            'filesystem'              => $objectManager->get('Magento\Filesystem'),
+            'filesystem'              => $objectManager->get('Magento\App\Filesystem'),
             'coreStoreConfig'         => $objectManager->get('Magento\Core\Model\Store\Config'),
             'coreConfig'              => $objectManager->get('Magento\Core\Model\Config'),
             'resource'                => $objectManager->get('Magento\Core\Model\Resource\Store'),
@@ -199,7 +199,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase
     public function testGetBaseUrlInPub()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-                \Magento\Filesystem::PARAM_APP_DIRS => array(\Magento\Filesystem::PUB => array('uri' => ''))
+                \Magento\App\Filesystem::PARAM_APP_DIRS => array(\Magento\App\Filesystem::PUB_DIR => array('uri' => ''))
         ));
         $this->_model = $this->_getStoreModel();
         $this->_model->load('default');
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
index 44ab28ab0aba9650c4debe731314845b65be1ccb..7aa1bea6afea4a28a1d5d222b4f9e0dc107896da 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
@@ -41,16 +41,16 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     {
         $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create(
-                'Magento\Filesystem\DirectoryList',
+                'Magento\App\Filesystem\DirectoryList',
                 array(
-                    'root' => \Magento\Filesystem::ROOT,
+                    'root' => \Magento\App\Filesystem::ROOT_DIR,
                     'directories' => array(
-                        \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/_files/design')
+                        \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/_files/design')
                     ),
                 )
             );
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Filesystem', array('directoryList' => $directoryList));
+            ->create('Magento\App\Filesystem', array('directoryList' => $directoryList));
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Core\Model\Theme\Collection', array('filesystem' => $filesystem));
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php
index b3ef30f63e11a97b23142c2aea61f26240eef7ac..781668f4d0bc2808c5ae33fe0b905798905b24ee 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php
@@ -45,8 +45,8 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/_files/design'),
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/_files/design'),
             )
         ));
         $this->_theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
index 377c2dc8dc3da18ce3221d1618fba7713035df82..8b4d61012972812a5aeef68070905ed33b399b84 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
@@ -55,21 +55,21 @@ class DesignTest extends \PHPUnit_Framework_TestCase
     public static function setUpBeforeClass()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $themeDir = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $themeDir = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $themeDir->delete('theme/frontend');
         $themeDir->delete('theme/_merged');
 
-        $pubLibPath = $filesystem->getPath(\Magento\Filesystem::PUB_LIB);
+        $pubLibPath = $filesystem->getPath(\Magento\App\Filesystem::PUB_LIB_DIR);
         copy($pubLibPath . '/prototype/prototype.js', $pubLibPath . '/prototype/prototype.min.js');
     }
 
     public static function tearDownAfterClass()
     {
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
-        $pubLibPath = $filesystem->getPath(\Magento\Filesystem::PUB_LIB);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
+        $pubLibPath = $filesystem->getPath(\Magento\App\Filesystem::PUB_LIB_DIR);
         unlink($pubLibPath . '/prototype/prototype.min.js');
     }
 
@@ -91,8 +91,8 @@ class DesignTest extends \PHPUnit_Framework_TestCase
     protected function _emulateFixtureTheme($themePath = 'test_default')
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => realpath(__DIR__ . '/../_files/design')),
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => realpath(__DIR__ . '/../_files/design')),
             ),
         ));
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
@@ -228,9 +228,9 @@ class DesignTest extends \PHPUnit_Framework_TestCase
             ->get('Magento\View\DesignInterface')
             ->getDesignTheme();
         $customConfigFile = $theme->getCustomization()->getCustomViewConfigPath();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $relativePath = $directory->getRelativePath($customConfigFile);
         try {
             $directory->writeFile($relativePath, '<?xml version="1.0" encoding="UTF-8"?>
@@ -335,8 +335,8 @@ class DesignTest extends \PHPUnit_Framework_TestCase
 
     public function testGetPublicFileUrl()
     {
-        $pubLibFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::PUB_LIB) . '/jquery/jquery.js';
+        $pubLibFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::PUB_LIB_DIR) . '/jquery/jquery.js';
         $actualResult = $this->_viewUrl->getPublicFileUrl($pubLibFile);
         $this->assertStringEndsWith('/jquery/jquery.js', $actualResult);
     }
@@ -346,8 +346,8 @@ class DesignTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetPublicFileUrlSigned()
     {
-        $pubLibFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::PUB_LIB) . '/jquery/jquery.js';
+        $pubLibFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::PUB_LIB_DIR) . '/jquery/jquery.js';
         $actualResult = $this->_viewUrl->getPublicFileUrl($pubLibFile);
         $this->assertStringMatchesFormat('%a/jquery/jquery.js?%d', $actualResult);
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php
index 27f34db42e73d8a56cf8b1fd103afac21d4adc11..94efdd66113593edfd2bb8f8bd9964a81655610d 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/_files/design/themes.php
@@ -30,8 +30,8 @@
         \Magento\Core\Model\App\Area::PART_CONFIG
     );
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Filesystem::PARAM_APP_DIRS => array(
-        \Magento\Filesystem::THEMES => array('path' => realpath(__DIR__)),
+    \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+        \Magento\App\Filesystem::THEMES_DIR => array('path' => realpath(__DIR__)),
     ),
 ));
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(array(
diff --git a/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php b/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php
index 9f0eae9ca7a44b23eecbec8f2236421cfddc2f72..551a59b649aa1c0c02b504f9d9d3390a7012837d 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Utility/Layout.php
@@ -104,7 +104,6 @@ class Layout
             'structure'          => $objectManager->create('Magento\Data\Structure', array()),
             'argumentProcessor'  => $objectManager->create('Magento\Core\Model\Layout\Argument\Processor', array()),
             'scheduledStructure' => $objectManager->create('Magento\Core\Model\Layout\ScheduledStructure', array()),
-            'dataServiceGraph'   => $objectManager->create('Magento\Core\Model\DataService\Graph', array()),
             'coreStoreConfig'    => $objectManager->create('Magento\Core\Model\Store\Config'),
             'appState'           => $objectManager->get('Magento\App\State'),
             'messageManager'     => $objectManager->get('Magento\Message\ManagerInterface'),
diff --git a/dev/tests/integration/testsuite/Magento/Core/Utility/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Core/Utility/LayoutTest.php
index 41c1e66651d450a40c88109502719c5ac5f928b5..f79ee54315d693b41b00a2ba15bbccc829bf735c 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Utility/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Utility/LayoutTest.php
@@ -34,8 +34,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::APP => array('path' => BP . '/dev/tests/integration'),
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::APP_DIR => array('path' => BP . '/dev/tests/integration'),
             )
         ));
         $this->_utility = new \Magento\Core\Utility\Layout($this);
diff --git a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php
index 710d7f39c558fd228174487c239cab60d08e6acc..f6c9edf813380789b474a0310a8181e36ee8b317 100644
--- a/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php
+++ b/dev/tests/integration/testsuite/Magento/Core/_files/media_for_change_rollback.php
@@ -29,12 +29,12 @@
 $themeDirectory = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir() . '/media_for_change';
 
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Filesystem::PARAM_APP_DIRS => array(
-        \Magento\Filesystem::VAR_DIR => array('path' => $themeDirectory),
+    \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+        \Magento\App\Filesystem::VAR_DIR => array('path' => $themeDirectory),
     ),
 ));
 /** @var $objectManager \Magento\ObjectManager */
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 /** @var $directoryWrite \Magento\Filesystem\Directory\Write */
-$directoryWrite = $objectManager->create('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+$directoryWrite = $objectManager->create('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
 $directoryWrite->delete();
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
index d2cb4d00ccda856b0009f276105d8f909c39304d..7d93f5e92e0e95e7e5eb0b1b7412a9e71a7e883a 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
@@ -50,10 +50,10 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem\DirectoryList $directoryList */
-        $directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
+        /** @var \Magento\App\Filesystem\DirectoryList $directoryList */
+        $directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
         $path = str_replace($directoryList->getRoot(), '', str_replace('\\', '/', __DIR__) . '/../_files/design');
-        $directoryList->addDirectory(\Magento\Filesystem::THEMES, array('path' => ltrim($path, '/')));
+        $directoryList->addDirectory(\Magento\App\Filesystem::THEMES_DIR, array('path' => ltrim($path, '/')));
         $this->_design = $objectManager->get('Magento\View\DesignInterface');
         $objectManager->get('Magento\App\State')->setAreaCode(\Magento\View\DesignInterface::DEFAULT_AREA);
         $this->_design->setDesignTheme('vendor_test');
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php
index 0aa24057245c5d6fc7d1ca207ad717f186949bbd..35a54ca25a2cb297734a95af1de33a39cbf52a01 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Editor/Tools/Controls/ConfigurationTest.php
@@ -65,13 +65,14 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
     public function testLoadConfigurations($type, $controlName, $controlData)
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
-        $relativePath = $objectManager->get('Magento\Filesystem')->getDirectoryRead(\Magento\Filesystem::ROOT)
+        /** @var \Magento\App\Filesystem $filesystem */
+        $relativePath = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR)
             ->getRelativePath(__DIR__ . '/../../../_files/design');
-        /** @var \Magento\Filesystem\DirectoryList $directoryList */
-        $directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
-        $directoryList->addDirectory(\Magento\Filesystem::ROOT, array('path' => $relativePath));
-        $directoryList->addDirectory(\Magento\Filesystem::THEMES, array('path' => $relativePath));
+        /** @var \Magento\App\Filesystem\DirectoryList $directoryList */
+        $directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
+        $directoryList->addDirectory(\Magento\App\Filesystem::ROOT_DIR, array('path' => $relativePath));
+        $directoryList->addDirectory(\Magento\App\Filesystem::THEMES_DIR, array('path' => $relativePath));
         $designTheme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\View\DesignInterface')
             ->getDesignTheme();
diff --git a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php
index b7a10dd547e643269641f578ad128bab8a5866c8..426b36dcc36d30acf1f7b3a12e0a6f36799d70fe 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/_files/design/themes.php
@@ -26,8 +26,8 @@
  */
 
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Filesystem::PARAM_APP_DIRS => array(
-        \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/design')
+    \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+        \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/design')
     )
 ));
 
diff --git a/dev/tests/integration/testsuite/Magento/Downloadable/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Downloadable/Model/ObserverTest.php
deleted file mode 100644
index d9c370827ca861ca43792f0b6e56f71b1968aea9..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Downloadable/Model/ObserverTest.php
+++ /dev/null
@@ -1,54 +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_Downloadable
- * @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)
- */
-
-/**
- * Test class for \Magento\Downloadable\Model\Observer (duplicate downloadable data)
- */
-namespace Magento\Downloadable\Model;
-
-class ObserverTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @magentoDataFixture Magento/Downloadable/_files/product_with_files.php
-     */
-    public function testDuplicateProductDownloadableProductWithFilesSuccessfullyDuplicated()
-    {
-        $currentProduct = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Catalog\Model\Product');
-        $currentProduct->load(1); // fixture for initial product
-        $currentLinks = $currentProduct->getTypeInstance($currentProduct)->getLinks($currentProduct);
-        $currentSamples = $currentProduct->getTypeInstance($currentProduct)->getSamples($currentProduct);
-
-        $newProduct = $currentProduct->duplicate();
-
-        $newLinks = $newProduct->getTypeInstance($newProduct)->getLinks($newProduct);
-        $newSamples = $newProduct->getTypeInstance($newProduct)->getSamples($newProduct);
-
-        $this->assertEquals($currentLinks, $newLinks);
-        $this->assertEquals($currentSamples, $newSamples);
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php
index ed1841c049e85f57b71c7b71bbfa32ac13965249..3070f39cf14089601de57167910ec5c9375e29f1 100644
--- a/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php
@@ -111,8 +111,8 @@ class FilterTest extends \PHPUnit_Framework_TestCase
     public function testLayoutDirective($area, $directiveParams, $expectedOutput)
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/_files/design')
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/_files/design')
             )
         ));
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php
index 19f87d115b0c041fc9bd82faebe7983e867fd05d..97dcaed5a057c54442da1e32c0421c211be71db8 100644
--- a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php
@@ -53,7 +53,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
                 $objectManager->get('Magento\Core\Model\Registry'),
                 $objectManager->get('Magento\Core\Model\App\Emulation'),
                 $objectManager->get('Magento\Core\Model\StoreManager'),
-                $objectManager->create('Magento\Filesystem'),
+                $objectManager->create('Magento\App\Filesystem'),
                 $objectManager->create('Magento\View\Url'),
                 $objectManager->create('Magento\View\FileSystem'),
                 $objectManager->create('Magento\Core\Model\Store\Config'),
diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php
index 233d76053b01ea31e20c908b1921176ab0aeb25f..3be9ec8a42562eca2faf5c773577bec3dc17a6fa 100644
--- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php
@@ -22,8 +22,8 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Filesystem::PARAM_APP_DIRS => array(
-        \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/_files/design')
+    \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+        \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/_files/design')
     )
 ));
 $objectManger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php
index 37a1b4aa75af5f93b96e0f94a3e31d041f0d70e4..901e7be10d7ad878f3553edb074ce88456b36400 100644
--- a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php
+++ b/dev/tests/integration/testsuite/Magento/Filesystem/Directory/ReadTest.php
@@ -59,6 +59,19 @@ class ReadTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    public function testGetRelativePath()
+    {
+        $dir = $this->getDirectoryInstance('foo');
+        $this->assertEquals(
+            '',
+            $dir->getRelativePath()
+        );
+        $this->assertEquals(
+            'bar',
+            $dir->getRelativePath(__DIR__ . '/../_files/foo/bar')
+        );
+    }
+
     /**
      * Test for read method
      *
@@ -270,6 +283,32 @@ class ReadTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($file instanceof \Magento\Filesystem\File\ReadInterface);
     }
 
+    /**
+     * Test readFile
+     *
+     * @dataProvider readFileProvider
+     * @param string $path
+     * @param string $content
+     */
+    public function testReadFile($path, $content)
+    {
+        $directory = $this->getDirectoryInstance('');
+        $this->assertEquals($content, $directory->readFile($path));
+    }
+
+    /**
+     * Data provider for testReadFile
+     *
+     * @return array
+     */
+    public function readFileProvider()
+    {
+        return array(
+            array('popup.csv', 'var myData = 5;'),
+            array('data.csv', '"field1", "field2"' . PHP_EOL . '"field3", "field4"' . PHP_EOL)
+        );
+    }
+
     /**
      * Get readable file instance
      * Get full path for files located in _files directory
@@ -286,7 +325,7 @@ class ReadTest extends \PHPUnit_Framework_TestCase
         $objectManager = Bootstrap::getObjectManager();
         $directoryFactory = $objectManager->create('Magento\Filesystem\Directory\ReadFactory');
         return $directoryFactory->create($config,
-            new \Magento\Filesystem\DriverFactory($objectManager->get('Magento\Filesystem\DirectoryList')));
+            new \Magento\Filesystem\DriverFactory($objectManager->get('Magento\App\Filesystem\DirectoryList')));
     }
 
     /**
@@ -295,12 +334,14 @@ class ReadTest extends \PHPUnit_Framework_TestCase
     public function testReadRecursively()
     {
         $expected = array(
-            'directory/read.txt',
-            'directory',
-            'directory.txt'
+            'bar/baz/file_one.txt',
+            'bar',
+            'bar/baz',
+            'bar/file_two.txt',
+            'file_three.txt'
         );
 
-        $dir = $this->getDirectoryInstance('recursively');
+        $dir = $this->getDirectoryInstance('foo');
         $actual = $dir->readRecursively('');
         $this->assertNotEquals($expected, $actual);
         sort($expected);
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php
index 4e3b8c968f73c658aae17032d74e9cf0c62ebef8..1711b47b674c00fb33ab62d2196fbe3204f0ef61 100644
--- a/dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php
+++ b/dev/tests/integration/testsuite/Magento/Filesystem/Directory/WriteTest.php
@@ -327,6 +327,53 @@ class WriteTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    /**
+     * Test writeFile
+     *
+     * @dataProvider writeFileProvider
+     * @param string $path
+     * @param string $content
+     * @param string $extraContent
+     */
+    public function testWriteFile($path, $content, $extraContent)
+    {
+        $directory = $this->getDirectoryInstance('writeFileDir', 0777);
+        $directory->writeFile($path, $content);
+        $this->assertEquals($content, $directory->readFile($path));
+        $directory->writeFile($path, $extraContent);
+        $this->assertEquals($extraContent, $directory->readFile($path));
+    }
+
+    /**
+     * Test writeFile for append mode
+     *
+     * @dataProvider writeFileProvider
+     * @param string $path
+     * @param string $content
+     * @param string $extraContent
+     */
+    public function testWriteFileAppend($path, $content, $extraContent)
+    {
+        $directory = $this->getDirectoryInstance('writeFileDir', 0777);
+        $directory->writeFile($path, $content, 'a+');
+        $this->assertEquals($content, $directory->readFile($path));
+        $directory->writeFile($path, $extraContent, 'a+');
+        $this->assertEquals($content . $extraContent, $directory->readFile($path));
+    }
+
+    /**
+     * Data provider for testWriteFile and testWriteFileAppend
+     *
+     * @return array
+     */
+    public function writeFileProvider()
+    {
+        return array(
+            array('file1', '123', '456'),
+            array('folder1/file1', '123', '456'),
+        );
+    }
+
     /**
      * Tear down
      */
@@ -359,7 +406,7 @@ class WriteTest extends \PHPUnit_Framework_TestCase
         $objectManager = Bootstrap::getObjectManager();
         $directoryFactory = $objectManager->create('Magento\Filesystem\Directory\WriteFactory');
         $directory = $directoryFactory->create($config,
-            new \Magento\Filesystem\DriverFactory($objectManager->get('Magento\Filesystem\DirectoryList')));
+            new \Magento\Filesystem\DriverFactory($objectManager->get('Magento\App\Filesystem\DirectoryList')));
         $this->testDirectories[] = $directory;
         return $directory;
     }
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php
index 6384a1d667a471d08e7cd1235ffcb5dd9ac83e8f..1c185ce856261b4f5b68ae8eefb501a53a5d2714 100644
--- a/dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php
+++ b/dev/tests/integration/testsuite/Magento/Filesystem/Driver/FileTest.php
@@ -63,12 +63,15 @@ class FileTest extends \PHPUnit_Framework_TestCase
      */
     public function testReadDirectoryRecursively()
     {
-        $expected = array(
-            $this->getTestPath('recursively/directory'),
-            $this->getTestPath('recursively/directory.txt'),
-            $this->getTestPath('recursively/directory/read.txt')
+        $paths = array(
+            'foo/bar',
+            'foo/bar/baz',
+            'foo/bar/baz/file_one.txt',
+            'foo/bar/file_two.txt',
+            'foo/file_three.txt'
         );
-        $actual = $this->driver->readDirectoryRecursively($this->getTestPath('recursively'));
+        $expected = array_map(array('self', 'getTestPath'), $paths);
+        $actual = $this->driver->readDirectoryRecursively($this->getTestPath('foo'));
         sort($actual);
         $this->assertEquals($expected, $actual);
     }
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php
index 93b3f1656d88bf9266d1f4021bf2d2a0fb6f4b3b..54e60ee39d5f001244ad3ccb703118461c283336 100644
--- a/dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php
+++ b/dev/tests/integration/testsuite/Magento/Filesystem/File/ReadTest.php
@@ -91,6 +91,96 @@ class ReadTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    /**
+     * Test readAll
+     *
+     * @dataProvider readAllProvider
+     * @param string $path
+     * @param string $content
+     */
+    public function testReadAll($path, $content)
+    {
+        $file = $this->getFileInstance($path);
+        $this->assertEquals($content, $file->readAll($path));
+    }
+
+    /**
+     * Data provider for testReadFile
+     *
+     * @return array
+     */
+    public function readAllProvider()
+    {
+        return array(
+            array('popup.csv', 'var myData = 5;'),
+            array('data.csv', '"field1", "field2"' . PHP_EOL . '"field3", "field4"' . PHP_EOL)
+        );
+    }
+
+    /**
+     * Test readLine
+     *
+     * @dataProvider readLineProvider
+     * @param string $path
+     * @param array $lines
+     * @param int $length
+     */
+    public function testReadLine($path, $lines, $length)
+    {
+        $file = $this->getFileInstance($path);
+        foreach ($lines as $line) {
+            $this->assertEquals($line, $file->readLine($length, PHP_EOL));
+        }
+    }
+
+    /**
+     * Data provider for testReadLine
+     *
+     * @return array
+     */
+    public function readLineProvider()
+    {
+        return array(
+            array('popup.csv', array('var myData = 5;'), 999),
+            array('data.csv', array('"field1", "field2"', '"field3", "field4"'), 999),
+            array('popup.csv', array('var'), 3),
+            array('data.csv', array('"f', 'ie', 'ld', '1"'), 2)
+        );
+    }
+
+    /**
+     * Test for stat method
+     *
+     * @dataProvider statProvider
+     * @param string $path
+     */
+    public function testStat($path)
+    {
+        $file = $this->getFileInstance($path);
+        $expectedInfo =  array(
+            'dev', 'ino', 'mode', 'nlink', 'uid',
+            'gid', 'rdev', 'size', 'atime',
+            'mtime', 'ctime', 'blksize', 'blocks'
+        );
+        $result = $file->stat();
+        foreach ($expectedInfo as $key) {
+            $this->assertTrue(array_key_exists($key, $result));
+        }
+    }
+
+    /**
+     * Data provider for testStat
+     *
+     * @return array
+     */
+    public function statProvider()
+    {
+        return array(
+            array('popup.csv'),
+            array('foo/file_three.txt')
+        );
+    }
+
     /**
      * Test for readCsv method
      *
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php b/dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php
index 53a22a57927fb01337f6453edeb649aa58d3fa2e..9cd9b18489cfc4b897baf54e53caeed635aeadd4 100644
--- a/dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php
+++ b/dev/tests/integration/testsuite/Magento/Filesystem/FilesystemTest.php
@@ -36,13 +36,13 @@ use Magento\TestFramework\Helper\Bootstrap;
 class FilesystemTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
     protected function setUp()
     {
-        $this->filesystem = Bootstrap::getObjectManager()->create('Magento\Filesystem');
+        $this->filesystem = Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
     }
 
     /**
@@ -50,7 +50,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetDirectoryReadInstance()
     {
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Filesystem::VAR_DIR);
+        $dir = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::VAR_DIR);
         $this->assertInstanceOf('\Magento\Filesystem\Directory\Read', $dir);
     }
 
@@ -59,7 +59,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetDirectoryWriteInstance()
     {
-        $dir = $this->filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $dir = $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $this->assertInstanceOf('\Magento\Filesystem\Directory\Write', $dir);
     }
 
@@ -70,7 +70,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetDirectoryWriteException()
     {
-        $this->filesystem->getDirectoryWrite(\Magento\Filesystem::THEMES);
+        $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::THEMES_DIR);
     }
 
     /**
@@ -78,7 +78,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetPath()
     {
-        $this->assertContains('design', $this->filesystem->getPath(\Magento\Filesystem::THEMES));
+        $this->assertContains('design', $this->filesystem->getPath(\Magento\App\Filesystem::THEMES_DIR));
     }
 
     /**
@@ -86,6 +86,6 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetUri()
     {
-        $this->assertContains('media', $this->filesystem->getPath(\Magento\Filesystem::MEDIA));
+        $this->assertContains('media', $this->filesystem->getPath(\Magento\App\Filesystem::MEDIA_DIR));
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/recursively/directory.txt b/dev/tests/integration/testsuite/Magento/Filesystem/_files/recursively/directory.txt
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/dev/tests/integration/testsuite/Magento/Filesystem/_files/recursively/directory/read.txt b/dev/tests/integration/testsuite/Magento/Filesystem/_files/recursively/directory/read.txt
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..916394f35b833498a4aaab99a7136736eccc1f1f
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php
@@ -0,0 +1,50 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento_Catalog
+ * @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\GroupedProduct\Model\Product\Type;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Catalog\Model\Product\Type
+     */
+    protected $_productType;
+
+    protected function setUp()
+    {
+        $this->_productType = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->get('Magento\Catalog\Model\Product\Type');
+    }
+
+    public function testFactory()
+    {
+        $product = new \Magento\Object;
+        $product->setTypeId(\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE);
+        $type = $this->_productType->factory($product);
+        $this->assertInstanceOf('\Magento\GroupedProduct\Model\Product\Type\Grouped', $type);
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php
similarity index 82%
rename from dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php
rename to dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php
index bda84b7384df7f7ad8da802e6197d00b75766fcc..ec54e2dd8abf74ba2d9b662ddcadb7a5af54a99b 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/Model/Resource/Product/Type/Grouped/AssociatedProductsCollectionTest.php
@@ -22,13 +22,13 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Catalog\Model\Resource\Product\Type\Grouped;
+namespace Magento\GroupedProduct\Model\Resource\Product\Type\Grouped;
 
 class AssociatedProductsCollectionTest
     extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @magentoDataFixture Magento/Catalog/_files/product_grouped.php
+     * @magentoDataFixture Magento/GroupedProduct/_files/product_grouped.php
      * @magentoAppIsolation enabled
      */
     public function testGetColumnValues()
@@ -41,9 +41,9 @@ class AssociatedProductsCollectionTest
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $objectManager->get('Magento\Core\Model\Registry')->register('current_product', $product);
 
-        /** @var \Magento\Catalog\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection $collection */
+        /** @var \Magento\GroupedProduct\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection $collection */
         $collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Catalog\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection'
+            'Magento\GroupedProduct\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection'
         );
 
         $this->assertEquals(array('simple-1', 'virtual-product'), $collection->getColumnValues('sku'));
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_grouped.php b/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped.php
similarity index 86%
rename from dev/tests/integration/testsuite/Magento/Catalog/_files/product_grouped.php
rename to dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped.php
index b666651e749b9bac65a05bb2ec1b716bf8852492..a3cb6d81ef01454394a309992271d0c622c1090a 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_grouped.php
+++ b/dev/tests/integration/testsuite/Magento/GroupedProduct/_files/product_grouped.php
@@ -22,14 +22,14 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-require __DIR__ . '/product_simple_duplicated.php';
-require __DIR__ . '/product_virtual.php';
+require realpath(__DIR__ . '/../../') . '/Catalog/_files/product_simple_duplicated.php';
+require realpath(__DIR__ . '/../../') . '/Catalog/_files/product_virtual.php';
 
 /** @var $product \Magento\Catalog\Model\Product */
 $product = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
     ->create('Magento\Catalog\Model\Product');
 $product->isObjectNew(true);
-$product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_GROUPED)
+$product->setTypeId(\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE)
     ->setId(9)
     ->setAttributeSetId(4)
     ->setWebsiteIds(array(1))
diff --git a/dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php b/dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php
index 676cb5f3754295d1f2d0d543fb71954d8341d3fd..5ff85169930e1e4f3912902b209934c0e706d32c 100644
--- a/dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Image/Adapter/InterfaceTest.php
@@ -586,19 +586,21 @@ class InterfaceTest extends \PHPUnit_Framework_TestCase
     /**
      * @dataProvider createPngFromStringDataProvider
      *
-     * @param array $pixe1
+     * @param array $pixel1
      * @param array $expectedColor1
-     * @param array $pixe2
+     * @param array $pixel2
      * @param array $expectedColor2
      * @param string $adapterType
      */
     public function testCreatePngFromString($pixel1, $expectedColor1, $pixel2, $expectedColor2, $adapterType)
     {
         $adapter = $this->_getAdapter($adapterType);
+        $path = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::ROOT_DIR) .
+            '/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf';
         $adapter->createPngFromString(
             'T',
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')->getPath()
-                . '/lib/LinLibertineFont/LinLibertine_Re-4.4.1.ttf'
+            $path
         );
         $adapter->refreshImageDimensions();
 
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php
index 3f64ada4ba3b48e8531b4364974e241ada30831b..18b60d3d0f0146102a13d43beafc01b2dd6ba098 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/Entity/ProductTest.php
@@ -88,7 +88,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase
      */
     public function testExportStockItemAttributesAreFilled()
     {
-        $filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
 
         $filesystemMock->expects($this->once())
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
index 5ce3d3d48036a392dd7058ef328c98cc36133212..506f44b19afc69ed0397fa19e992bab21618db33 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/CustomerCompositeTest.php
@@ -163,9 +163,9 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
             ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         // set entity adapter parameters
         $this->_entityAdapter->setParameters(array('behavior' => $behavior));
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = $this->_objectManager->create('Magento\Filesystem');
-        $rootDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = $this->_objectManager->create('Magento\App\Filesystem');
+        $rootDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
         // set fixture CSV file
         $result = $this->_entityAdapter
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
index e165134aa2e66154f70ae41f28b8580c14688caa..cedf1ffa82e2aa96c4569af6d4f4c0f26c2849a4 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/Customer/AddressTest.php
@@ -388,9 +388,9 @@ class AddressTest extends \PHPUnit_Framework_TestCase
 
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $filesystem = $objectManager->create('Magento\Filesystem');
+        $filesystem = $objectManager->create('Magento\App\Filesystem');
 
-        $directoryWrite = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directoryWrite = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
         $result = $this->_entityAdapter
             ->setSource(\Magento\ImportExport\Model\Import\Adapter::findAdapterFor($sourceFile, $directoryWrite))
@@ -479,8 +479,8 @@ class AddressTest extends \PHPUnit_Framework_TestCase
 
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $filesystem = $objectManager->create('Magento\Filesystem');
-        $directoryWrite = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = $objectManager->create('Magento\App\Filesystem');
+        $directoryWrite = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $result = $this->_entityAdapter
             ->setSource(\Magento\ImportExport\Model\Import\Adapter::findAdapterFor($sourceFile, $directoryWrite))
             ->isDataValid();
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
index 517345beada028b2253fdeb12d85e58fd4932b77..bcf8b3321e5ca00bceed3120b6dab4e3da46a004 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/Eav/CustomerImportTest.php
@@ -51,8 +51,8 @@ class CustomerImportTest extends \PHPUnit_Framework_TestCase
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\ImportExport\Model\Import\Entity\Eav\Customer');
 
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $this->directoryWrite = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $this->directoryWrite = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php
index 13cd0b251abc2b51bc4dcd450485c96f825a2b57..d954db8432ccb254ec519d3e182a99c9a8e0bae9 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/Entity/ProductTest.php
@@ -101,8 +101,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
             $productsBeforeImport[] = $product;
         }
 
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_to_import.csv',
@@ -148,8 +148,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
             $stockItems[$productId] = $stockItem;
         }
 
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_to_import.csv',
             $directory
@@ -192,8 +192,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         // import data from CSV file
         $pathToFile = __DIR__ . '/_files/product_with_custom_options.csv';
 
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory);
         $this->_model->setSource($source)
@@ -254,8 +254,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
             $productsBeforeImport[$product->getSku()] = $product;
         }
 
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_to_import_with_datetime.csv',
@@ -524,7 +524,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         /** @var \Magento\Filesystem\Directory\Write $mediaDirectory */
         $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+            ->get('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $mediaDirectory->create('import');
         $dirPath = $mediaDirectory->getAbsolutePath('import');
         copy(__DIR__ . '/../../../../../Magento/Catalog/_files/magento_image.jpg', "{$dirPath}/magento_image.jpg");
@@ -537,7 +537,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         /** @var \Magento\Filesystem\Directory\Write $mediaDirectory */
         $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Filesystem')->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+            ->get('Magento\App\Filesystem')->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $mediaDirectory->delete('import');
         $mediaDirectory->delete('catalog');
     }
@@ -584,8 +584,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         // import data from CSV file
         $pathToFile = __DIR__ . '/_files/products_to_import_invalid_attribute_set.csv';
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             $pathToFile,
             $directory
diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
index 49cdd4f0afb4597df07aee05db22c3d733700d3f..3f191df1fda7cdf21a74eb2359a5829a13c5ca34 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
@@ -37,8 +37,8 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase
      */
     public function testSaveValidatedBunches()
     {
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/Entity/Eav/_files/customers_for_validation_test.csv',
             $directory
diff --git a/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php b/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php
index 1c1d0acfc152135968733b40b70db1b77a83dc90..cd3766b387f74611c73b42c6af8d0b78b61c0758 100644
--- a/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php
+++ b/dev/tests/integration/testsuite/Magento/Index/Model/Process/FileTest.php
@@ -61,8 +61,8 @@ class FileTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 
-        $filesystem = $this->_objectManager->create('Magento\Filesystem');
-        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $filesystem = $this->_objectManager->create('Magento\App\Filesystem');
+        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
 
         $fullFileName = $this->_varDirectory->getAbsolutePath(self::FILE_PATH);
         $this->_testFileHandler = fopen($fullFileName, 'w');
diff --git a/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php b/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php
index 987c22934069fa9efc2640ff9e80a0f3423920d0..37c1f2fd424d59998f1d8354be439d67f721cc01 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Controller/WizardTest.php
@@ -41,9 +41,9 @@ class WizardTest extends \Magento\TestFramework\TestCase\AbstractController
 
     public static function setUpBeforeClass()
     {
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
-        $varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
+        $varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $tmpDir =  'WizardTest';
         $varDirectory->delete($tmpDir);
         // deliberately create a file instead of directory to emulate broken access to static directory
diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
index 2020cfc0f447f026eaf8ffcca0b171f6732ce93f..0348708a58c08e82cb4e3fbbd8e959e7ba8ff14b 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
@@ -53,17 +53,17 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         }
         $cacheState->persist();
 
-        /** @var \Magento\Filesystem $filesystem */
+        /** @var \Magento\App\Filesystem $filesystem */
         $filesystem = $this->_objectManager->create(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array(
                 'directoryList' => $this->_objectManager->create(
-                        'Magento\Filesystem\DirectoryList',
+                        'Magento\App\Filesystem\DirectoryList',
                         array(
                             'root' => BP,
                             'directories' => array(
-                                \Magento\Filesystem::MODULES => array('path' => __DIR__ . '/_files'),
-                                \Magento\Filesystem::CONFIG => array('path' => __DIR__ . '/_files'),
+                                \Magento\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files'),
+                                \Magento\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files'),
                             )
                         )
                 )
diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php
index 4af84a3564208b0a84a753ab1d4eed658f39873b..4cfb00da095bf25d5a6ed800b0b8e49f39ebb902 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Model/Installer/ConfigTest.php
@@ -37,9 +37,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
 
     public static function setUpBeforeClass()
     {
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
-        self::$_varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
+        self::$_varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         self::$_tmpDir = self::$_varDirectory->getAbsolutePath('ConfigTest');
         self::$_varDirectory->create(self::$_varDirectory->getRelativePath(self::$_tmpDir));
     }
@@ -69,15 +69,16 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
 
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $directoryList = $objectManager->create(
-            'Magento\Filesystem\DirectoryList',
+            'Magento\App\Filesystem\DirectoryList',
             array(
                 'root' => self::$_tmpDir,
                 'directories' => array(
-                    \Magento\Filesystem::CONFIG => array('path' => self::$_tmpDir)
+                    \Magento\App\Filesystem::CONFIG_DIR => array('path' => self::$_tmpDir)
                 ),
             )
         );
-        $filesystem = $objectManager->create('Magento\Filesystem', array('directoryList' => $directoryList));
+        $objectManager->get('\Magento\App\Filesystem\DirectoryList\Configuration')->configure($directoryList);
+        $filesystem = $objectManager->create('Magento\App\Filesystem', array('directoryList' => $directoryList));
         $model = $objectManager->create(
             'Magento\Install\Model\Installer\Config',
             array('request' => $request, 'filesystem' => $filesystem)
diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php
index 43263afd6be7b739dd701ee8248e46f438f2dbba..8fcffa0106ba6e63ee8caf263694895959adcf6a 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Model/InstallerTest.php
@@ -46,9 +46,9 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
 
     public static function setUpBeforeClass()
     {
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
-        self::$_varDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
+        self::$_varDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         self::$_tmpDir = self::$_varDirectory->getAbsolutePath('InstallerTest');
         self::$_tmpConfigFile = self::$_tmpDir . '/local.xml';
         self::$_varDirectory->create(self::$_varDirectory->getRelativePath(self::$_tmpDir));
@@ -70,15 +70,16 @@ class InstallerTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $directoryList = $objectManager->create(
-                'Magento\Filesystem\DirectoryList',
-                    array(
-                        'root' => __DIR__,
-                        'directories' => array(
-                            \Magento\Filesystem::CONFIG => array('path' => self::$_tmpDir)
-                        )
-                    )
-                );
-        $filesystem = $objectManager->create('Magento\Filesystem', array('directoryList' => $directoryList));
+            'Magento\App\Filesystem\DirectoryList',
+            array(
+                'root' => __DIR__,
+                'directories' => array(
+                    \Magento\App\Filesystem::CONFIG_DIR => array('path' => self::$_tmpDir)
+                )
+            )
+        );
+        $objectManager->get('\Magento\App\Filesystem\DirectoryList\Configuration')->configure($directoryList);
+        $filesystem = $objectManager->create('Magento\App\Filesystem', array('directoryList' => $directoryList));
 
         if ($emulateConfig) {
             $installerConfig = new \Magento\Install\Model\Installer\Config(
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php
similarity index 92%
rename from dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php
rename to dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php
index b723ca684b27a99727f87404e5e2578a381b3e93..8be11c8f1876d0b16bdf07f8c42c0a7532d0ebf6 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Block/Multishipping/OverviewTest.php
+++ b/dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Checkout\Block\Multishipping;
+namespace Magento\Multishipping\Block\Checkout;
 
 /**
  * @magentoDataFixture Magento/Catalog/_files/product_simple.php
@@ -30,7 +30,7 @@ namespace Magento\Checkout\Block\Multishipping;
 class OverviewTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Checkout\Block\Multishipping\Overview
+     * @var \Magento\Multishipping\Block\Checkout\Overview
      */
     protected $_block;
 
@@ -45,7 +45,7 @@ class OverviewTest extends \PHPUnit_Framework_TestCase
         $this->_objectManager->get('Magento\Core\Model\App')
             ->loadArea(\Magento\Core\Model\App\Area::AREA_FRONTEND);
         $this->_block = $this->_objectManager->get('Magento\View\LayoutInterface')
-            ->createBlock('Magento\Checkout\Block\Multishipping\Overview');
+            ->createBlock('Magento\Multishipping\Block\Checkout\Overview');
     }
 
     public function testGetRowItemHtml()
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php b/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php
similarity index 91%
rename from dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php
rename to dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php
index 599447947e9114e346ffc37e9efc4f3b16b68f52..0c4325f5beff8c13f621bd0b4f0eef879d70fbbf 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/MultishippingTest.php
+++ b/dev/tests/integration/testsuite/Magento/Multishipping/Controller/CheckoutTest.php
@@ -25,14 +25,14 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Checkout\Controller;
+namespace Magento\Multishipping\Controller;
 
 /**
- * Test class for \Magento\Checkout\Controller\Multishipping
+ * Test class for \Magento\Multishipping\Controller\Checkout
  *
  * @magentoAppArea frontend
  */
-class MultishippingTest extends \Magento\TestFramework\TestCase\AbstractController
+class CheckoutTest extends \Magento\TestFramework\TestCase\AbstractController
 {
     /**
      * Covers app/code/Magento/Checkout/Block/Multishipping/Payment/Info.php
@@ -56,7 +56,7 @@ class MultishippingTest extends \Magento\TestFramework\TestCase\AbstractControll
             ->create('Magento\Customer\Model\Session', array($logger));
         $session->login('customer@example.com', 'password');
         $this->getRequest()->setPost('payment', array('method' => 'checkmo'));
-        $this->dispatch('checkout/multishipping/overview');
+        $this->dispatch('multishipping/checkout/overview');
         $html = $this->getResponse()->getBody();
         $this->assertContains('<div class="box method">', $html);
         $this->assertContains('<dt class="title">'
diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php
index 0092af95b9a8ebbe00e8eb755f76af0d02c36eb5..098a317fe9b9b27b354079109db6b285367a8542 100644
--- a/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php
+++ b/dev/tests/integration/testsuite/Magento/Newsletter/Model/QueueTest.php
@@ -78,7 +78,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase
                 $objectManager->get('Magento\Core\Model\Registry'),
                 $appEmulation,
                 $objectManager->get('Magento\Core\Model\StoreManagerInterface'),
-                $objectManager->get('Magento\Filesystem'),
+                $objectManager->get('Magento\App\Filesystem'),
                 $objectManager->get('Magento\View\Url'),
                 $objectManager->get('Magento\View\FileSystem'),
                 $objectManager->get('Magento\Core\Model\Store\ConfigInterface'),
@@ -124,7 +124,7 @@ class QueueTest extends \PHPUnit_Framework_TestCase
                 $objectManager->get('Magento\Core\Model\Registry'),
                 $objectManager->get('Magento\Core\Model\App\Emulation'),
                 $objectManager->get('Magento\Core\Model\StoreManagerInterface'),
-                $objectManager->get('Magento\Filesystem'),
+                $objectManager->get('Magento\App\Filesystem'),
                 $objectManager->get('Magento\View\Url'),
                 $objectManager->get('Magento\View\FileSystem'),
                 $objectManager->get('Magento\Core\Model\Store\ConfigInterface'),
diff --git a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php
index 8d3dd51cf6b052fe6eda1d426939f3bd16a4e05c..036810c24e82089648ca7448b3a14835aa5d888b 100644
--- a/dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Object/Copy/Config/ReaderTest.php
@@ -38,16 +38,16 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
+        /** @var \Magento\App\Filesystem $filesystem */
         $filesystem = $objectManager->create(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('directoryList' => $objectManager->create(
-                    'Magento\Filesystem\DirectoryList',
+                    'Magento\App\Filesystem\DirectoryList',
                     array(
                         'root' => BP,
                         'directories' => array(
-                            \Magento\Filesystem::MODULES => array('path' => __DIR__ . '/_files'),
-                            \Magento\Filesystem::CONFIG => array('path' => __DIR__ . '/_files'),
+                            \Magento\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files'),
+                            \Magento\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files'),
                         )
                     )
                 )
diff --git a/dev/tests/integration/testsuite/Magento/PageCache/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/PageCache/Helper/DataTest.php
deleted file mode 100644
index cb023da6423a1a4c78a38ea514356781441d383b..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/PageCache/Helper/DataTest.php
+++ /dev/null
@@ -1,80 +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_PageCache
- * @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\PageCache\Helper;
-
-class DataTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\PageCache\Helper\Data
-     */
-    protected $_helper;
-
-    protected function setUp()
-    {
-        $this->_helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\PageCache\Helper\Data');
-    }
-
-    public function testSetNoCacheCookie()
-    {
-        /** @var $cookie \Magento\Stdlib\Cookie */
-        $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Stdlib\Cookie');
-        $this->assertEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-        $this->_helper->setNoCacheCookie();
-        $this->assertNotEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-    }
-
-    public function testRemoveNoCacheCookie()
-    {
-        /** @var $cookie \Magento\Stdlib\Cookie */
-        $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Stdlib\Cookie');
-        $this->_helper->setNoCacheCookie();
-        $this->_helper->removeNoCacheCookie();
-        $this->assertEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-    }
-
-    public function testLockUnlockNoCacheCookie()
-    {
-        /** @var $cookie \Magento\Stdlib\Cookie */
-        $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Stdlib\Cookie');
-        $this->_helper->setNoCacheCookie();
-        $this->assertNotEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-
-        $this->_helper->lockNoCacheCookie();
-        $this->_helper->removeNoCacheCookie();
-        $this->assertNotEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-
-        $this->_helper->unlockNoCacheCookie();
-        $this->_helper->removeNoCacheCookie();
-        $this->assertEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-
-        $this->_helper->lockNoCacheCookie();
-        $this->_helper->setNoCacheCookie();
-        $this->assertEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/PageCache/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/PageCache/Model/ObserverTest.php
deleted file mode 100644
index a8b48fd34fd095bba1f3845719aa02f2318b00d3..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/PageCache/Model/ObserverTest.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento_PageCache
- * @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\PageCache\Model;
-
-class ObserverTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\PageCache\Model\Observer
-     */
-    protected $_observer;
-
-    protected function setUp()
-    {
-        $this->_observer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\PageCache\Model\Observer');
-    }
-
-    /**
-     * @magentoConfigFixture current_store system/external_page_cache/enabled 1
-     */
-    public function testSetNoCacheCookie()
-    {
-        /** @var $cookie \Magento\Stdlib\Cookie */
-        $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Stdlib\Cookie');
-        $this->assertEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-        $this->_observer->setNoCacheCookie(new \Magento\Event\Observer());
-        $this->assertNotEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-    }
-
-    /**
-     * @magentoConfigFixture current_store system/external_page_cache/enabled 1
-     */
-    public function testDeleteNoCacheCookie()
-    {
-        /** @var $cookie \Magento\Stdlib\Cookie */
-        $cookie = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Stdlib\Cookie');
-        $cookie->set(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE, '1');
-        $this->_observer->deleteNoCacheCookie(new \Magento\Event\Observer());
-        $this->assertEmpty($cookie->get(\Magento\PageCache\Helper\Data::NO_CACHE_COOKIE));
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php
index 0bfd1b8de9cbd1516e6185b84b49b18b9497ae64..1717f69c96e0c35b70531be6fc51e7212ae9a444 100644
--- a/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php
@@ -39,16 +39,16 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     {
         $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create(
-                'Magento\Filesystem\DirectoryList',
+                'Magento\App\Filesystem\DirectoryList',
                 array(
-                    'root' => \Magento\Filesystem::ROOT,
+                    'root' => \Magento\App\Filesystem::ROOT_DIR,
                     'directories' => array(
-                        \Magento\Filesystem::MODULES => array('path' => dirname(__DIR__))
+                        \Magento\App\Filesystem::MODULES_DIR => array('path' => dirname(__DIR__))
                     ),
                 )
             );
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Filesystem', array('directoryList' => $directoryList));
+            ->create('Magento\App\Filesystem', array('directoryList' => $directoryList));
 
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $this->_model = $this->_objectManager->create(
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php b/dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php
similarity index 93%
rename from dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php
rename to dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php
index 88f99435ea330a0a54f6677c3d9d254359c3d0ba..4e2ff762a29e60ee8c7fa61bd36fd3b25d59bc54 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Block/Order/Shipment/ItemsTest.php
+++ b/dev/tests/integration/testsuite/Magento/Shipping/Block/ItemsTest.php
@@ -25,14 +25,14 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Sales\Block\Order\Shipment;
+namespace Magento\Shipping\Block;
 
 class ItemsTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetCommentsHtml()
     {
         $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\View\LayoutInterface');
-        $block = $layout->createBlock('Magento\Sales\Block\Order\Shipment\Items', 'block');
+        $block = $layout->createBlock('Magento\Shipping\Block\Items', 'block');
         $childBlock = $layout->addBlock('Magento\View\Element\Text', 'shipment_comments', 'block');
         $shipment = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Sales\Model\Order\Shipment');
diff --git a/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php b/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php
index 512908daa4c32d8d25a49be40e3baa460761c482..ced8e7a0928acae597f79c29fa8c0a09962d255e 100644
--- a/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php
+++ b/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php
@@ -31,9 +31,9 @@ $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
 
 /** @var \Magento\Filesystem\Directory\WriteInterface $mediaDirectory */
-$filesystem = $objectManager->get('Magento\Filesystem');
-$mediaPath = $filesystem->getPath(\Magento\Filesystem::MEDIA);
-$mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+$filesystem = $objectManager->get('Magento\App\Filesystem');
+$mediaPath = $filesystem->getPath(\Magento\App\Filesystem::MEDIA_DIR);
+$mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
 
 $baseTmpMediaPath = $config->getBaseTmpMediaPath();
 $mediaDirectory->create($baseTmpMediaPath);
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/ServiceCallsConfigTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/ServiceCallsConfigTest.php
deleted file mode 100644
index 401fdcdf428405c73ad18337acd27e67d9479af9..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/ServiceCallsConfigTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * Find service_calls definitions and validate that name, service and method are present.
- *
- * Also validate that service is an existing class and the method exists on the service class.
- *
- * 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\Test\Integrity\Magento\Core\Model\DataService;
-
-class ServiceCallsConfigTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @dataProvider xmlDataProvider
-     */
-    public function testXmlFile($configFile, $dummy = false)
-    {
-        if (!$dummy) {
-            $dom = new \DOMDocument();
-            $dom->loadXML(file_get_contents($configFile));
-            $this->assertNotNull($dom);
-            $serviceCalls = $dom->getElementsByTagName('service_calls')->item(0);
-            if ($serviceCalls->hasChildNodes()) {
-                foreach ($serviceCalls->childNodes as $serviceCall) {
-                    /** @var $serviceCall \DOMNode */
-                    if ($serviceCall->localName == 'service_call') {
-                        $name = $serviceCall->attributes->getNamedItem('name')->nodeValue;
-                        $service = $serviceCall->attributes->getNamedItem('service')->nodeValue;
-                        $method = $serviceCall->attributes->getNamedItem('method')->nodeValue;
-                        try {
-                            $ref = new \ReflectionClass($service);
-                        } catch (\ReflectionException $re) {
-                            $this->fail(
-                                "$configFile has service_call $name with non-existent service class $service: $re"
-                            );
-                        }
-                        $this->assertTrue(
-                            $ref->hasMethod($method),
-                            "$configFile has service_call $name invalid method $method"
-                        );
-                    }
-                }
-            }
-        }
-    }
-
-    public function xmlDataProvider()
-    {
-        $files = \Magento\TestFramework\Utility\Files::init()->getConfigFiles('service_calls.xml', array());
-        if (empty($files)) {
-            $files = array(
-                array('dummy', true)
-            );
-        }
-        return $files;
-    }
-}
-
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php
index eae2d99c74e08666daf9f1ca3362063443826e51..961095e777e1016c32d2ff0bfa21153077b5a74e 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php
@@ -45,8 +45,8 @@ class AclConfigFilesTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::LIB) . '/Magento/Acl/etc/acl.xsd';
+        $this->_schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::LIB_DIR) . '/Magento/Acl/etc/acl.xsd';
     }
 
     /**
@@ -71,8 +71,8 @@ class AclConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function aclConfigFileDataProvider()
     {
         $fileList = glob(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::APP) . '/*/*/*/etc/adminhtml/acl.xml'
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::APP_DIR) . '/*/*/*/etc/adminhtml/acl.xml'
         );
         $dataProviderResult = array();
         foreach ($fileList as $file) {
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
index 31c1930c55c30e3a288c5668ddac2f72f7e05f29..317985f82e15abd315ba51b9d3b5eda3088b6fe2 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
@@ -47,9 +47,9 @@ class DiConfigFilesTest extends \PHPUnit_Framework_TestCase
     {
         //init primary configs
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $configDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::CONFIG);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $configDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::CONFIG_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         self::$_primaryFiles = $fileIteratorFactory->create(
             $configDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php
index dca405bf4fdfa8eef3158490288f18e4b981aca7..fecdb44c8463589cbc2aa6d653e92f6db14a0d55 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php
@@ -33,9 +33,9 @@ class EavAttributesConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php
index 913b76b447088ec515083e5845b76d02ad077469..42d9d4c8d6390ea8b5d95d856b1b14e0040dbf8b 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php
@@ -33,9 +33,9 @@ class ExportConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php
index 0b81c914b34c447ab5afa9874117cb299de7ed80..19ec1b00b180da997666de34460503b7a1354a39 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php
@@ -33,9 +33,9 @@ class ImportConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php
index 6f4cf8978d84f20822f128c629c289c85946c774..1e0e28245aff62b61a037b6a201a8d826b4cd0f4 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php
@@ -33,9 +33,9 @@ class IndexerConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php
index b5151936c283ddc4d48b0c011511cd2153d13054..36c7ea13e543a257340fbd3fd7fd61e3e7e54611 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php
@@ -104,7 +104,7 @@ class LayoutFilesTest extends \PHPUnit_Framework_TestCase
             // ignored objects
             || isset($argument['value']['object'])
                 && in_array($argument['value']['object'], array(
-                    'Magento\Catalog\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection',
+                    'Magento\GroupedProduct\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection',
                     'Magento\Catalog\Model\Resource\Product\Collection\AssociatedProduct',
                     'Magento\Search\Model\Resource\Search\Grid\Collection',
                     'Magento\Wishlist\Model\Resource\Item\Collection\Grid',
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php
index c316d25107b159b54481828d0a1e2465bbefd775..7b03d3d876ce1710e06985c60d04d346461b12bf 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php
@@ -34,9 +34,9 @@ class ProductOptionsConfigFilesTest extends \PHPUnit_Framework_TestCase
     {
         //init primary configs
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php
index 0d2a9bdfe6b05d984f4d587038424dc1dc75fb50..4f041380438d9e8b4ca728e6590ba9bfe8894864 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php
@@ -33,9 +33,9 @@ class ProductTypesConfigFilesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
index 769d318398d59430cf4ffd5f58691d565c92a8dc..3bf8f0fe9fd73e25bdb73a8a7c0c44cb84c94042 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
@@ -33,9 +33,9 @@ class ResourcesConfigFilesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
         $fileIteratorFactory = $objectManager->get('Magento\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ServiceCallsConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ServiceCallsConfigFilesTest.php
deleted file mode 100644
index a4a66f0067938140a877dfb1200f4ae7ca16dbbd..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ServiceCallsConfigFilesTest.php
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/**
- * Tests that existing service_calls.xml files are valid to schema.
- *
- * 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\Test\Integrity\Modular;
-
-class ServiceCallsConfigFilesTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var string
-     */
-    protected $_schemaFile;
-
-    /**
-     * @var  \Magento\Core\Model\DataService\Config\Reader
-     */
-    protected $_reader;
-
-    /**
-     * @var \Magento\TestFramework\ObjectManager
-     */
-    protected $_objectManager;
-
-    protected function setUp()
-    {
-        $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $serviceCallsFiles = $this->getServiceCallsConfigFiles();
-        if (!empty($serviceCallsFiles)) {
-            $this->_reader = $this->_objectManager->create('Magento\Core\Model\DataService\Config\Reader', array(
-                'configFiles' => $serviceCallsFiles));
-            $this->_schemaFile = $this->_reader->getSchemaFile();
-        }
-    }
-
-    protected function tearDown()
-    {
-        $this->_objectManager->removeSharedInstance('Magento\Core\Model\DataService\Config\Reader');
-    }
-
-    public function getServiceCallsConfigFiles()
-    {
-        return glob(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::APP)
-                . '/*/*/*/etc/service_calls.xml'
-        );
-    }
-
-    public function serviceCallsConfigFilesProvider()
-    {
-        $fileList = $this->getServiceCallsConfigFiles();
-        if (empty($fileList)) {
-            return array(array(false, true));
-        }
-
-        $dataProviderResult = array();
-        foreach ($fileList as $file) {
-            $dataProviderResult[$file] = array($file);
-        }
-        return $dataProviderResult;
-    }
-
-    /**
-     * @dataProvider serviceCallsConfigFilesProvider
-     */
-    public function testServiceCallsConfigFile($file, $skip = false)
-    {
-        if ($skip) {
-            $this->markTestSkipped('There is no service_calls.xml files in the system');
-        }
-        $domConfig = new \Magento\Config\Dom(file_get_contents($file));
-        $result = $domConfig->validate($this->_schemaFile, $errors);
-        $message = "Invalid XML-file: {$file}\n";
-        foreach ($errors as $error) {
-            $message .= "$error\n";
-        }
-
-        $this->assertTrue($result, $message);
-    }
-
-    public function testMergedConfig()
-    {
-        if (is_null($this->_reader)) {
-            $this->markTestSkipped('There is no service_calls.xml files in the system');
-            return;
-        }
-
-        try {
-            $this->_reader->validate();
-        } catch (\Magento\Exception $e) {
-            $this->fail($e->getMessage());
-        }
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
index a1dcc6f63eee1c64635103409add20e3b5b681ed..271f9666b52cb2a2f54d282a33fd352c40d867e3 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
@@ -38,7 +38,7 @@ class SystemConfigFilesTest extends \PHPUnit_Framework_TestCase
         $cacheState = $objectManager->get('Magento\App\Cache\StateInterface');
         $cacheState->setEnabled(\Magento\App\Cache\Type\Config::TYPE_IDENTIFIER, false);
 
-        $modulesDir = $objectManager->get('Magento\Filesystem')->getPath(\Magento\Filesystem::MODULES);
+        $modulesDir = $objectManager->get('Magento\App\Filesystem')->getPath(\Magento\App\Filesystem::MODULES_DIR);
 
         $fileList = glob($modulesDir . '/*/*/etc/adminhtml/system.xml');
 
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
index 4f29b1c7eaf02cabec563836b8755a4bf5f4fef1..f4f8d73f072d64b6e1a4f546774d3d7c2b09e751 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
@@ -38,7 +38,7 @@ class ViewConfigFilesTest extends \PHPUnit_Framework_TestCase
         $domConfig = new \Magento\Config\Dom($file);
         $result = $domConfig->validate(
             \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-                ->get('Magento\Filesystem')->getPath(\Magento\Filesystem::LIB)
+                ->get('Magento\App\Filesystem')->getPath(\Magento\App\Filesystem::LIB_DIR)
                 . '/Magento/Config/etc/view.xsd',
             $errors
         );
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php
index d7549d8961c9230b854594652b62edc781132985..0d765ba18a656013e1ac39366bf132d0f098bd8c 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/ViewFilesTest.php
@@ -240,7 +240,7 @@ class ViewFilesTest extends \Magento\TestFramework\TestCase\AbstractIntegrity
     {
         $this->markTestIncomplete('Should be fixed when static when we have static folder jslib implemented');
         $this->assertFileExists(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')->getPath('jslib')
+            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')->getPath('jslib')
                 . '/' . $file
         );
     }
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php
index 069f178e092b50c4c1adaf09a71828773c8d2a70..53ef9985d6d51ab4f477c717b93c5aaa463329b7 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php
@@ -42,7 +42,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
         }
         $this->_validateConfigFile(
             $file,
-            $this->getPath(\Magento\Filesystem::LIB) . '/Magento/Config/etc/view.xsd'
+            $this->getPath(\Magento\App\Filesystem::LIB_DIR) . '/Magento/Config/etc/view.xsd'
         );
     }
 
@@ -53,7 +53,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     {
         $result = array();
         $files = glob(
-            $this->getPath(\Magento\Filesystem::THEMES) . '/*/*/view.xml'
+            $this->getPath(\Magento\App\Filesystem::THEMES_DIR) . '/*/*/view.xml'
         );
         foreach ($files as $file) {
             $result[$file] = array($file);
@@ -77,7 +77,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     {
         $result = array();
         $files = glob(
-            $this->getPath(\Magento\Filesystem::THEMES) . '/*/*', GLOB_ONLYDIR
+            $this->getPath(\Magento\App\Filesystem::THEMES_DIR) . '/*/*', GLOB_ONLYDIR
         );
         foreach ($files as $themeDir) {
             $result[$themeDir] = array($themeDir);
@@ -93,7 +93,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     {
         $this->_validateConfigFile(
             $file,
-            $this->getPath(\Magento\Filesystem::LIB) . '/Magento/Config/etc/theme.xsd'
+            $this->getPath(\Magento\App\Filesystem::LIB_DIR) . '/Magento/Config/etc/theme.xsd'
         );
     }
 
@@ -118,7 +118,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     {
         $result = array();
         $files = glob(
-            $this->getPath(\Magento\Filesystem::THEMES) . '/*/*/theme.xml'
+            $this->getPath(\Magento\App\Filesystem::THEMES_DIR) . '/*/*/theme.xml'
         );
         foreach ($files as $file) {
             $result[$file] = array($file);
@@ -152,6 +152,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
      */
     protected function getPath($code)
     {
-        return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')->getPath($code);
+        return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
+            ->get('Magento\App\Filesystem')->getPath($code);
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php
index 64ef86bbb3af892b11db01f68e0c1e03481bc70e..a02640baac7c0cfeb01975e5a9b70c1767b645d8 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Layout/Reference/ProcessorTest.php
@@ -61,8 +61,8 @@ class ProcessorTest extends \PHPUnit_Framework_TestCase
         }
         $this->_testDir = realpath(__DIR__ . '/_files') . '/';
 
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
-        $this->_varDir = $filesystem->getPath(\Magento\Filesystem::VAR_DIR) . '/references/';
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
+        $this->_varDir = $filesystem->getPath(\Magento\App\Filesystem::VAR_DIR) . '/references/';
         mkdir($this->_varDir, 0777, true);
 
         $this->_formatter = new Formatter();
diff --git a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php
index 4a65c7b2fd7dc29b662e154e1c7289b044dab87d..20ea2b3848e4a72e77b5bb88198ce4b8deb7e6ee 100644
--- a/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php
+++ b/dev/tests/integration/testsuite/Magento/Theme/Controller/Adminhtml/System/Design/ThemeControllerTest.php
@@ -32,14 +32,14 @@ namespace Magento\Theme\Controller\Adminhtml\System\Design;
  */
 class ThemeControllerTest extends \Magento\Backend\Utility\Controller
 {
-    /** @var \Magento\Filesystem */
+    /** @var \Magento\App\Filesystem */
     protected $_filesystem;
 
     protected function setUp()
     {
         parent::setUp();
 
-        $this->_filesystem = $this->_objectManager->get('Magento\Filesystem');
+        $this->_filesystem = $this->_objectManager->get('Magento\App\Filesystem');
     }
 
     /**
@@ -58,9 +58,9 @@ class ThemeControllerTest extends \Magento\Backend\Utility\Controller
         );
 
         $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-        ->get('Magento\Filesystem\DirectoryList');
-        /** @var $directoryList \Magento\Filesystem\DirectoryList */
-        $directoryList->addDirectory(\Magento\Filesystem::SYS_TMP,
+        ->get('Magento\App\Filesystem\DirectoryList');
+        /** @var $directoryList \Magento\App\Filesystem\DirectoryList */
+        $directoryList->addDirectory(\Magento\App\Filesystem::SYS_TMP_DIR,
             array('path' => '/'));
 
         $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface')->getCollection()->getFirstItem();
@@ -84,8 +84,8 @@ class ThemeControllerTest extends \Magento\Backend\Utility\Controller
          * Uploader can copy(upload) and then remove this temporary file.
          */
         $fileName = __DIR__ . '/_files/simple-js-file.js';
-        $varDir = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
-        $rootDir = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $varDir = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
+        $rootDir = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $destinationFilePath = 'simple-js-file.js';
 
         $rootDir->copyFile($rootDir->getRelativePath($fileName), $destinationFilePath, $varDir);
diff --git a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php b/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
index fa4e5436ae15d4cefbf18bb605e1f430cc65be5d..93aa117e9ec0db9983273be16ebf058c27b11839 100644
--- a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
@@ -47,7 +47,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
     protected $_helperStorage;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -71,22 +71,22 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 
         $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Filesystem\DirectoryList');
+            ->get('Magento\App\Filesystem\DirectoryList');
 
         $dirPath = ltrim(str_replace($directoryList->getRoot(), '', str_replace('\\', '/', __DIR__)) . '/_files', '/');
 
         $tmpDirPath = ltrim(str_replace($directoryList->getRoot(), '',
             str_replace('\\', '/', realpath(__DIR__ . '/../../../../../tmp'))), '/');
 
-        $directoryList->addDirectory(\Magento\Filesystem::VAR_DIR, array('path' => $dirPath));
-        $directoryList->addDirectory(\Magento\Filesystem::TMP, array('path' => $tmpDirPath));
-        $directoryList->addDirectory(\Magento\Filesystem::MEDIA, array('path' => $tmpDirPath));
+        $directoryList->addDirectory(\Magento\App\Filesystem::VAR_DIR, array('path' => $dirPath));
+        $directoryList->addDirectory(\Magento\App\Filesystem::TMP_DIR, array('path' => $tmpDirPath));
+        $directoryList->addDirectory(\Magento\App\Filesystem::MEDIA_DIR, array('path' => $tmpDirPath));
 
         $this->_filesystem = $this->_objectManager->create(
-            'Magento\Filesystem', array('directoryList' => $directoryList)
+            'Magento\App\Filesystem', array('directoryList' => $directoryList)
         );
-        $this->directoryVar = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
-        $this->directoryTmp = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::TMP);
+        $this->directoryVar = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
+        $this->directoryTmp = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::TMP_DIR);
 
         /** @var $theme \Magento\View\Design\ThemeInterface */
         $theme = $this->_objectManager->create('Magento\View\Design\ThemeInterface')->getCollection()->getFirstItem();
diff --git a/dev/tests/integration/testsuite/Magento/View/Asset/MergedTest.php b/dev/tests/integration/testsuite/Magento/View/Asset/MergedTest.php
index 339c97dd20080f8baa63440733b1162e1af7f3a2..1505f3842a0c06cb61baafebec4e32f7bb562688 100644
--- a/dev/tests/integration/testsuite/Magento/View/Asset/MergedTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/Asset/MergedTest.php
@@ -46,18 +46,18 @@ class MergedTest extends \PHPUnit_Framework_TestCase
     public static function setUpBeforeClass()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = $objectManager->get('Magento\Filesystem');
-        self::$_themePublicDir = $filesystem->getDirectoryWrite(\Magento\Filesystem::STATIC_VIEW);
-        self::$_viewPublicMergedDir = $filesystem->getDirectoryWrite(\Magento\Filesystem::PUB_VIEW_CACHE);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\App\Filesystem');
+        self::$_themePublicDir = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::STATIC_VIEW_DIR);
+        self::$_viewPublicMergedDir = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR);
     }
 
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(dirname(__DIR__)) . '/_files/design'),
-                \Magento\Filesystem::PUB => array('path' => BP),
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(dirname(__DIR__)) . '/_files/design'),
+                \Magento\App\Filesystem::PUB_DIR => array('path' => BP),
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
diff --git a/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php b/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
index 0f34894d43fe559a189ff0c80ce6e7d80493eddb..f3ef55dce761d2a86d1dca532100f5c286219405 100644
--- a/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
@@ -63,14 +63,14 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
     {
         // Prepare config with directories
         $filesystem = Bootstrap::getObjectManager()->create(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array(
                 'directoryList' => Bootstrap::getObjectManager()->create(
-                    'Magento\Filesystem\DirectoryList',
+                    'Magento\App\Filesystem\DirectoryList',
                     array(
                         'root' => $this->_baseDir,
                         'directories' => array(
-                            \Magento\Filesystem::THEMES => array('path' => $this->_viewDir)
+                            \Magento\App\Filesystem::THEMES_DIR => array('path' => $this->_viewDir)
                         )
                     )
                 )
diff --git a/dev/tests/integration/testsuite/Magento/View/Element/AbstractBlockTest.php b/dev/tests/integration/testsuite/Magento/View/Element/AbstractBlockTest.php
index 3bde1ddd9ef38ca9e961179a1a9ca97a232b6bba..9bb7de97aee16490ccbbece001ad6c6243b10858 100644
--- a/dev/tests/integration/testsuite/Magento/View/Element/AbstractBlockTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/Element/AbstractBlockTest.php
@@ -27,7 +27,7 @@
 
 namespace Magento\View\Element;
 
-use Magento\Filesystem\DirectoryList;
+use Magento\App\Filesystem\DirectoryList;
 
 /**
  * @magentoAppIsolation enabled
@@ -65,12 +65,13 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase
     public function testCssWithWrongImage()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
-        $relativePath = $objectManager->get('Magento\Filesystem')->getDirectoryRead(\Magento\Filesystem::ROOT)
+        /** @var \Magento\App\Filesystem $filesystem */
+        $relativePath = $objectManager->get('Magento\App\Filesystem')
+            ->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR)
             ->getRelativePath(__DIR__ . '/_files');
-        /** @var $directoryList \Magento\Filesystem\DirectoryList */
-        $directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
-        $directoryList->addDirectory(\Magento\Filesystem::THEMES, array('path' => $relativePath));
+        /** @var $directoryList \Magento\App\Filesystem\DirectoryList */
+        $directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
+        $directoryList->addDirectory(\Magento\App\Filesystem::THEMES_DIR, array('path' => $relativePath));
 
         $cssUrl = $this->_block->getViewFileUrl('css/wrong.css', array(
             'area'    => 'frontend',
diff --git a/dev/tests/integration/testsuite/Magento/View/FileSystemTest.php b/dev/tests/integration/testsuite/Magento/View/FileSystemTest.php
index 83638955f29196758dae81ed9c091e77cb4716d2..bc0e891108725213194ca0388682b065cac07826 100644
--- a/dev/tests/integration/testsuite/Magento/View/FileSystemTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/FileSystemTest.php
@@ -39,8 +39,8 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/Core/Model/_files/design')
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/Core/Model/_files/design')
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
diff --git a/dev/tests/integration/testsuite/Magento/View/PublicationTest.php b/dev/tests/integration/testsuite/Magento/View/PublicationTest.php
index fc4a86744c55dc5039e6b1a5deb6033f15b7d367..1ec8929ad5fce95ab962dff72b5b8d9a75154f4f 100644
--- a/dev/tests/integration/testsuite/Magento/View/PublicationTest.php
+++ b/dev/tests/integration/testsuite/Magento/View/PublicationTest.php
@@ -60,9 +60,9 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
 
     protected function tearDown()
     {
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Filesystem');
-        $publicDir = $filesystem->getDirectoryWrite(\Magento\Filesystem::STATIC_VIEW);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\App\Filesystem');
+        $publicDir = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::STATIC_VIEW_DIR);
         $publicDir->delete('adminhtml');
         $publicDir->delete('frontend');
         $this->_model = null;
@@ -73,9 +73,9 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetPublicDir()
     {
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem');
-        $expectedPublicDir = $filesystem->getPath(\Magento\Filesystem::STATIC_VIEW);
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem');
+        $expectedPublicDir = $filesystem->getPath(\Magento\App\Filesystem::STATIC_VIEW_DIR);
         $this->assertEquals($expectedPublicDir, $this->_viewService->getPublicDir());
     }
 
@@ -440,8 +440,8 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     {
         $appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir();
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => "$appInstallDir/media_for_change"),
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => "$appInstallDir/media_for_change"),
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
@@ -531,8 +531,8 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     {
         $appInstallDir = \Magento\TestFramework\Helper\Bootstrap::getInstance()->getAppInstallDir();
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => "$appInstallDir/media_for_change"),
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => "$appInstallDir/media_for_change"),
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
@@ -579,8 +579,8 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     protected function _initTestTheme($allowDuplication = null)
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/Core/Model/_files/design/')
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/Core/Model/_files/design/')
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\State')->setAreaCode('frontend');
@@ -616,8 +616,8 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     public function testCssWithBase64Data()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/Core/Model/_files/design/')
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/Core/Model/_files/design/')
             )
         ));
         \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Core\Model\App')->loadAreaPart(
@@ -674,8 +674,8 @@ class PublicationTest extends \PHPUnit_Framework_TestCase
     public function testGetViewFilePublicPathExistingFile()
     {
         $filePath = 'mage/mage.js';
-        $expectedFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::PUB_LIB) . '/' . $filePath;
+        $expectedFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::PUB_LIB_DIR) . '/' . $filePath;
         $this->assertFileExists($expectedFile, 'Please verify existence of public library file');
 
         $actualFile = $this->_viewUrl->getViewFilePublicPath($filePath);
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
index cd30e248c061da9cdb275cb7b12a0b22a9204b7c..5aab31a69e5cd37f908f6734beee28fb301960f7 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
@@ -38,34 +38,34 @@ class DataTest extends \PHPUnit_Framework_TestCase
     protected $_configData;
 
     /**
-     * @var \Magento\Filesystem\DirectoryList
+     * @var \Magento\App\Filesystem\DirectoryList
      */
     protected $directoryList;
 
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
+        /** @var \Magento\App\Filesystem $filesystem */
         $filesystem = $objectManager->create(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('directoryList' => $objectManager->create(
-                    'Magento\Filesystem\DirectoryList',
+                    'Magento\App\Filesystem\DirectoryList',
                     array(
                         'root' => BP,
                         'directories' => array(
-                            \Magento\Filesystem::MODULES => array('path' => __DIR__ . '/_files/code'),
-                            \Magento\Filesystem::CONFIG => array('path' => __DIR__ . '/_files/code'),
-                            \Magento\Filesystem::THEMES => array('path' => __DIR__ . '/_files/design')
+                            \Magento\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files/code'),
+                            \Magento\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files/code'),
+                            \Magento\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/_files/design')
                         )
                     )
                 )
             )
         );
 
-        $this->directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
+        $this->directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
         $dirPath = ltrim(str_replace($this->directoryList->getRoot(), '', str_replace('\\', '/', __DIR__))
             . '/_files', '/');
-        $this->directoryList->addDirectory(\Magento\Filesystem::MODULES, array('path' => $dirPath));
+        $this->directoryList->addDirectory(\Magento\App\Filesystem::MODULES_DIR, array('path' => $dirPath));
 
         /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $objectManager->create(
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
index 76d1ea791d962f379ef0990adf806f3109497e9b..56d3f3adeb63a4365568f8abd59e241f570e8d8a 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
@@ -33,24 +33,24 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
     private $_object;
 
     /**
-     * @var \Magento\Filesystem\DirectoryList
+     * @var \Magento\App\Filesystem\DirectoryList
      */
     protected $directoryList;
 
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Filesystem $filesystem */
+        /** @var \Magento\App\Filesystem $filesystem */
         $filesystem = $objectManager->create(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('directoryList' => $objectManager->create(
-                    'Magento\Filesystem\DirectoryList',
+                    'Magento\App\Filesystem\DirectoryList',
                     array(
                         'root' => BP,
                         'directories' => array(
-                            \Magento\Filesystem::MODULES => array('path' => __DIR__ . '/_files/code'),
-                            \Magento\Filesystem::THEMES => array('path' => __DIR__ . '/_files/design'),
-                            \Magento\Filesystem::CONFIG => array('path' => __DIR__ . '/_files/'),
+                            \Magento\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files/code'),
+                            \Magento\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/_files/design'),
+                            \Magento\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files/'),
                         )
                     )
                 )
@@ -79,10 +79,10 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             'filesystem' => $filesystem
         ));
 
-        $this->directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
+        $this->directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
         $dirPath = ltrim(str_replace($this->directoryList->getRoot(), '', str_replace('\\', '/', __DIR__))
             . '/_files', '/');
-        $this->directoryList->addDirectory(\Magento\Filesystem::MODULES, array('path' => $dirPath));
+        $this->directoryList->addDirectory(\Magento\App\Filesystem::MODULES_DIR, array('path' => $dirPath));
 
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
index 117377a5ccb6d6b29008559e232665760cf31d5e..a68c2dcf0676c7b0e441c77da726e29ab47bf949 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
@@ -28,7 +28,7 @@ namespace Magento\Widget\Model\Config;
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Filesystem\DirectoryList
+     * @var \Magento\App\Filesystem\DirectoryList
      */
     protected $directoryList;
 
@@ -42,14 +42,14 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 
-        $this->directoryList = $objectManager->get('Magento\Filesystem\DirectoryList');
+        $this->directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
         $dirPath = ltrim(str_replace($this->directoryList->getRoot(), '', str_replace('\\', '/', __DIR__))
             . '/_files', '/');
-        $this->directoryList->addDirectory(\Magento\Filesystem::MODULES, array('path' => $dirPath . '/code'));
-        $this->directoryList->addDirectory(\Magento\Filesystem::CONFIG, array('path' => $dirPath));
-        $this->directoryList->addDirectory(\Magento\Filesystem::ROOT, array('path' => $dirPath));
+        $this->directoryList->addDirectory(\Magento\App\Filesystem::MODULES_DIR, array('path' => $dirPath . '/code'));
+        $this->directoryList->addDirectory(\Magento\App\Filesystem::CONFIG_DIR, array('path' => $dirPath));
+        $this->directoryList->addDirectory(\Magento\App\Filesystem::ROOT_DIR, array('path' => $dirPath));
 
-        $filesystem = $objectManager->create('Magento\Filesystem', array('directoryList' => $this->directoryList));
+        $filesystem = $objectManager->create('Magento\App\Filesystem', array('directoryList' => $this->directoryList));
 
         /** @var \Magento\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $objectManager->create(
diff --git a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php
index a61926ece183d65227ac19e146bbee335560b60f..826810c1eedd8b20f12ba2884f22577fda7d6e17 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/WidgetTest.php
@@ -69,8 +69,10 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
         $objectManager->get('Magento\Core\Model\App')
             ->loadArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE);
         $objectManager->get('Magento\View\DesignInterface')->setDesignTheme('magento_backend');
-        $expectedPubFile = $objectManager->get('Magento\Filesystem')
-                ->getPath(\Magento\Filesystem::STATIC_VIEW) . "/adminhtml/magento_backend/en_US/{$expectedFile}";
+        $expectedFilePath = "/adminhtml/magento_backend/en_US/{$expectedFile}";
+        $expectedPubFile = $objectManager->get('Magento\App\Filesystem')
+                ->getPath(\Magento\App\Filesystem::STATIC_VIEW_DIR) . $expectedFilePath;
+
         if (file_exists($expectedPubFile)) {
             unlink($expectedPubFile);
         }
@@ -107,8 +109,8 @@ class WidgetTest extends \PHPUnit_Framework_TestCase
     public function testGetPlaceholderImageUrlAtTheme()
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Filesystem::THEMES => array('path' => dirname(__DIR__) . '/_files/design')
+            \Magento\App\Filesystem::PARAM_APP_DIRS => array(
+                \Magento\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/_files/design')
             )
         ));
         $actualFile = $this->testGetPlaceholderImageUrl(
diff --git a/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..485bf04a5277720d0d6887ffb2982c853eea8b28
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/Wishlist/Helper/DataTest.php
@@ -0,0 +1,107 @@
+<?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_Wishlist
+ * @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\Wishlist\Helper;
+
+class DataTest extends \Magento\TestFramework\TestCase\AbstractController
+{
+    /**
+     * @var Data
+     */
+    private $wishlistHelper;
+
+    /**
+     * @var \Magento\ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * Get requrer instance
+     */
+    protected function setUp()
+    {
+        $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
+        $this->wishlistHelper = $this->objectManager->get('Magento\Wishlist\Helper\Data');
+    }
+
+    /**
+     * Clear wishlist helper property
+     */
+    protected function tearDown()
+    {
+        $this->_wishlistHelper = null;
+    }
+
+    public function testGetAddParams()
+    {
+        $product = $this->objectManager->get('Magento\Catalog\Model\Product');
+        $product->setId(11);
+        $json = $this->wishlistHelper->getAddParams($product);
+        $params = (array) json_decode($json);
+        $data = (array) $params['data'];
+        $this->assertEquals('11', $data['product']);
+        $this->assertArrayHasKey('form_key', $data);
+        $this->assertArrayHasKey('uenc', $data);
+        $this->assertStringEndsWith(
+            'wishlist/index/add/',
+            $params['action']
+        );
+    }
+
+    public function testGetMoveFromCartParams()
+    {
+        $json = $this->wishlistHelper->getMoveFromCartParams(11);
+        $params = (array) json_decode($json);
+        $data = (array) $params['data'];
+        $this->assertEquals('11', $data['item']);
+        $this->assertArrayHasKey('form_key', $data);
+        $this->assertArrayHasKey('uenc', $data);
+        $this->assertStringEndsWith(
+            'wishlist/index/fromcart/',
+            $params['action']
+        );
+    }
+
+    public function testGetUpdateParams()
+    {
+        $product = $this->objectManager->get('Magento\Catalog\Model\Product');
+        $product->setId(11);
+        $product->setWishlistItemId(15);
+        $json = $this->wishlistHelper->getUpdateParams($product);
+        $params = (array) json_decode($json);
+        $data = (array) $params['data'];
+        $this->assertEquals('11', $data['product']);
+        $this->assertEquals('15', $data['id']);
+        $this->assertArrayHasKey('form_key', $data);
+        $this->assertArrayHasKey('uenc', $data);
+        $this->assertStringEndsWith(
+            'wishlist/index/updateItemOptions/',
+            $params['action']
+        );
+    }
+
+}
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php
index 4cebc1770ad182c072bb8f72a6cb029d5f8b4f41..1db471fe515d7227059e0553205a307499904934 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php
@@ -195,8 +195,8 @@ class Application
     protected function _updateFilesystemPermissions()
     {
         /** @var \Magento\Filesystem\Directory\Write $varDirectory */
-        $varDirectory = $this->getObjectManager()->get('Magento\Filesystem')
-            ->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+        $varDirectory = $this->getObjectManager()->get('Magento\App\Filesystem')
+            ->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
         $varDirectory->changePermissions('', 0777);
     }
 
diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/DbRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/DbRule.php
index ba085b83842286bf1f521f17c23ca677b921770a..d811e9d08a663380685fd7d5ca6168f9407eb753 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Dependency/DbRule.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/DbRule.php
@@ -39,16 +39,12 @@ class DbRule implements \Magento\TestFramework\Dependency\RuleInterface
 
     /**
      * Constructor
+     *
+     * @param array $tables
      */
-    public function __construct()
+    public function __construct(array $tables)
     {
-        $replaceFilePattern = str_replace('\\', '/', realpath(__DIR__)) . '/_files/*.php';
-
-        $this->_moduleTableMap = array();
-        foreach (glob($replaceFilePattern) as $fileName) {
-            $tables = @include $fileName;
-            $this->_moduleTableMap = array_merge($this->_moduleTableMap, $tables);
-        }
+        $this->_moduleTableMap = $tables;
     }
 
     /**
diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php
index 65e3cebac976c92b904c7cce241851fa9ec562d8..099f3ac46e861842dcea098bbfb281591c701180 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/LayoutRule.php
@@ -30,21 +30,6 @@ namespace Magento\TestFramework\Dependency;
 
 class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
 {
-    /**
-     * Cases to search dependencies
-     *
-     * @var array
-     */
-    protected $_cases = array(
-        '_caseAttributeModule',
-        '_caseElementBlock',
-        '_caseElementAction',
-        '_caseLayoutHandle',
-        '_caseLayoutHandleParent',
-        '_caseLayoutHandleUpdate',
-        '_caseLayoutReference',
-    );
-
     /**
      * Default modules list.
      *
@@ -100,22 +85,6 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      */
     protected $_mapLayoutHandles = array();
 
-    /**
-     * List of exceptions
-     *
-     * Format: array(
-     *  '{Exception_Type}' => '{Source}'
-     * )
-     *
-     * @var array
-     */
-    protected $_exceptions = array();
-
-    /**
-     * Display exceptions
-     */
-    const EXCEPTION_ALLOWED = false;
-
     /**
      * Unknown layout handle
      */
@@ -133,22 +102,16 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
 
     /**
      * Constructor
+     *
+     * @param array $mapRouters
+     * @param array $mapLayoutBlocks
+     * @param array $mapLayoutHandles
      */
-    public function __construct()
+    public function __construct(array $mapRouters, array $mapLayoutBlocks, array $mapLayoutHandles)
     {
-        $args = func_get_args();
-        if (count($args)) {
-            if (isset($args[0]['mapRouters'])) {
-                $this->_mapRouters = $args[0]['mapRouters'];
-            }
-            if (isset($args[0]['mapLayoutBlocks'])) {
-                $this->_mapLayoutBlocks = $args[0]['mapLayoutBlocks'];
-            }
-            if (isset($args[0]['mapLayoutHandles'])) {
-                $this->_mapLayoutHandles = $args[0]['mapLayoutHandles'];
-            }
-        }
-
+        $this->_mapRouters = $mapRouters;
+        $this->_mapLayoutBlocks = $mapLayoutBlocks;
+        $this->_mapLayoutHandles = $mapLayoutHandles;
         $this->_namespaces = implode('|', \Magento\TestFramework\Utility\Files::init()->getNamespaces());
     }
 
@@ -167,43 +130,18 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
             return array();
         }
 
-        $this->_exceptions = array();
+        $attributes = $this->_caseAttributeModule($currentModule, $contents);
+        $blocks = $this->_caseElementBlock($currentModule, $contents);
+        $actions = $this->_caseElementAction($currentModule, $contents);
+        $handle = $this->_caseLayoutHandle($currentModule, $file, $contents);
+        $handleParents = $this->_caseLayoutHandleParent($currentModule, $file, $contents);
+        $handleUpdates = $this->_caseLayoutHandleUpdate($currentModule, $file, $contents);
+        $references = $this->_caseLayoutReference($currentModule, $file, $contents);
 
-        $dependencies = array();
-        foreach ($this->_cases as $case) {
-            if (method_exists($this, $case)) {
-                $result = $this->$case($currentModule, $fileType, $file, $contents);
-                if (count($result)) {
-                    $dependencies = array_merge($dependencies, $result);
-                }
-            }
-        }
-        return array_merge($dependencies, $this->_applyExceptions());
-    }
-
-    /**
-     * Apply exceptions
-     *
-     * @return array
-     */
-    protected function _applyExceptions()
-    {
-        if (!self::EXCEPTION_ALLOWED) {
-            return array();
-        }
-
-        $result = array();
-        foreach ($this->_exceptions as $type => $source) {
-            if (is_array($source)) {
-                $source = array_keys($source);
-            }
-            $result[] = array(
-                'exception' => $type,
-                'module' => '',
-                'source' => $source,
-            );
-        }
-        return $result;
+        $dependencies = array_merge(
+            $attributes, $blocks, $actions, $handle, $handleParents, $handleUpdates, $references
+        );
+        return $dependencies;
     }
 
     /**
@@ -212,19 +150,14 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      * Ex.: <element module="{module}">
      *
      * @param $currentModule
-     * @param $fileType
-     * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseAttributeModule($currentModule, $fileType, $file, &$contents)
+    protected function _caseAttributeModule($currentModule, &$contents)
     {
         $patterns = array(
-            \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
             '/(?<source><.+module\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)[\'"].*>)/',
+                . '(?<module>[A-Z][a-zA-Z]+)[\'"].*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
         );
         return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
     }
@@ -236,22 +169,17 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      *      <block template="{path}">
      *
      * @param $currentModule
-     * @param $fileType
-     * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseElementBlock($currentModule, $fileType, $file, &$contents)
+    protected function _caseElementBlock($currentModule, &$contents)
     {
         $patterns = array(
-            \Magento\Test\Integrity\DependencyTest::TYPE_HARD =>
             '/(?<source><block.*class\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)[_\\\\](?:[A-Z][a-zA-Z]+[_\\\\]?){1,}[\'"].*>)/',
-            \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
+                . '(?<module>[A-Z][a-zA-Z]+)[_\\\\]'
+                . '(?:[A-Z][a-zA-Z]+[_\\\\]?){1,}[\'"].*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_HARD,
             '/(?<source><block.*template\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.]+[\'"].*>)/',
+                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.]+[\'"].*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
         );
         return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
     }
@@ -265,28 +193,24 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      *      <element helper="{name}">
      *
      * @param $currentModule
-     * @param $fileType
-     * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseElementAction($currentModule, $fileType, $file, &$contents)
+    protected function _caseElementAction($currentModule, &$contents)
     {
         $patterns = array(
-            \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
             '/(?<source><block\s*>(?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)[_\\\\](?:[A-Z][a-zA-Z]+[_\\\\]?){1,}<\/block\s*>)/',
-            \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
+                . '(?<module>[A-Z][a-zA-Z]+)[_\\\\]'
+                . '(?:[A-Z][a-zA-Z]+[_\\\\]?){1,}<\/block\s*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
             '/(?<source><template\s*>(?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.]+<\/template\s*>)/',
-            \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
+                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.]+'
+                . '<\/template\s*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
             '/(?<source><file\s*>(?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.-]+<\/file\s*>)/',
-            \Magento\Test\Integrity\DependencyTest::TYPE_SOFT =>
+                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.-]+'
+                . '<\/file\s*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
             '/(?<source><.*helper\s*=\s*[\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)[_\\\\](?:[A-Z][a-z]+[_\\\\]?){1,}::[\w]+[\'"].*>)/',
+                . '(?<module>[A-Z][a-zA-Z]+)[_\\\\](?:[A-Z][a-z]+[_\\\\]?){1,}::[\w]+'
+                . '[\'"].*>)/' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
         );
         return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
     }
@@ -297,28 +221,33 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      * Ex.: <layout><{name}>...</layout>
      *
      * @param $currentModule
-     * @param $fileType
      * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseLayoutHandle($currentModule, $fileType, $file, &$contents)
+    protected function _caseLayoutHandle($currentModule, $file, &$contents)
     {
-        $xml = simplexml_load_file($file);
+        $xml = @simplexml_load_string($contents);
+        if (!$xml) {
+            return array();
+        }
 
         $area = $this->_getAreaByFile($file);
 
         $result = array();
         foreach ((array)$xml->xpath('/layout/child::*') as $element) {
             $check = $this->_checkDependencyLayoutHandle($currentModule, $area, $element->getName());
-            $module = isset($check['module']) ? $check['module'] : null;
-            if ($module) {
-                $result[$module] = array(
-                    'type' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
-                    'source' => $element->getName(),
-                );
+            $modules = isset($check['module']) ? $check['module'] : null;
+            if ($modules) {
+                if (!is_array($modules)) {
+                    $modules = [$modules];
+                }
+                foreach ($modules as $module) {
+                    $result[$module] = array(
+                        'type' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                        'source' => $element->getName(),
+                    );
+                }
             }
         }
         return $this->_getUniqueDependencies($result);
@@ -330,28 +259,33 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      * Ex.: <layout_name  parent="{name}">
      *
      * @param $currentModule
-     * @param $fileType
      * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseLayoutHandleParent($currentModule, $fileType, $file, &$contents)
+    protected function _caseLayoutHandleParent($currentModule, $file, &$contents)
     {
-        $xml = simplexml_load_file($file);
+        $xml = @simplexml_load_string($contents);
+        if (!$xml) {
+            return array();
+        }
 
         $area = $this->_getAreaByFile($file);
 
         $result = array();
         foreach ((array)$xml->xpath('/layout/child::*/@parent') as $element) {
             $check = $this->_checkDependencyLayoutHandle($currentModule, $area, (string)$element);
-            $module = isset($check['module']) ? $check['module'] : null;
-            if ($module) {
-                $result[$module] = array(
-                    'type' => \Magento\Test\Integrity\DependencyTest::TYPE_HARD,
-                    'source' => (string)$element,
-                );
+            $modules = isset($check['module']) ? $check['module'] : null;
+            if ($modules) {
+                if (!is_array($modules)) {
+                    $modules = [$modules];
+                }
+                foreach ($modules as $module) {
+                    $result[$module] = array(
+                        'type' => \Magento\Test\Integrity\DependencyTest::TYPE_HARD,
+                        'source' => (string)$element,
+                    );
+                }
             }
         }
         return $this->_getUniqueDependencies($result);
@@ -363,28 +297,33 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      * Ex.: <update handle="{name}" />
      *
      * @param $currentModule
-     * @param $fileType
      * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseLayoutHandleUpdate($currentModule, $fileType, $file, &$contents)
+    protected function _caseLayoutHandleUpdate($currentModule, $file, &$contents)
     {
-        $xml = simplexml_load_file($file);
+        $xml = @simplexml_load_string($contents);
+        if (!$xml) {
+            return array();
+        }
 
         $area = $this->_getAreaByFile($file);
 
         $result = array();
         foreach ((array)$xml->xpath('//update/@handle') as $element) {
             $check = $this->_checkDependencyLayoutHandle($currentModule, $area, (string)$element);
-            $module = isset($check['module']) ? $check['module'] : null;
-            if ($module) {
-                $result[$module] = array(
-                    'type' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
-                    'source' => (string)$element,
-                );
+            $modules = isset($check['module']) ? $check['module'] : null;
+            if ($modules) {
+                if (!is_array($modules)) {
+                    $modules = [$modules];
+                }
+                foreach ($modules as $module) {
+                    $result[$module] = array(
+                        'type' => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                        'source' => (string)$element,
+                    );
+                }
             }
         }
         return $this->_getUniqueDependencies($result);
@@ -396,16 +335,16 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
      * Ex.: <reference name="{name}">
      *
      * @param $currentModule
-     * @param $fileType
      * @param $file
      * @param $contents
      * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
-    protected function _caseLayoutReference($currentModule, $fileType, $file, &$contents)
+    protected function _caseLayoutReference($currentModule, $file, &$contents)
     {
-        $xml = simplexml_load_file($file);
+        $xml = @simplexml_load_string($contents);
+        if (!$xml) {
+            return array();
+        }
 
         $area = $this->_getAreaByFile($file);
 
@@ -434,7 +373,7 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
     protected function _checkDependenciesByRegexp($currentModule, &$contents, $patterns = array())
     {
         $result = array();
-        foreach ($patterns as $type => $pattern) {
+        foreach ($patterns as $pattern => $type) {
             if (preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
                 foreach ($matches as $match) {
                     $module = $match['namespace'] . '\\' . $match['module'];
@@ -472,9 +411,9 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
         $router = implode('_', $chunks);
         if (isset($this->_mapRouters[$router])) {
             // CASE 1: Single dependency
-            $module = $this->_mapRouters[$router];
-            if ($currentModule != $module) {
-                return array('module' => $module);
+            $modules = $this->_mapRouters[$router];
+            if (!in_array($currentModule, $modules)) {
+                return array('module' => $modules);
             }
         }
 
@@ -495,14 +434,8 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
             if (isset($modules[$defaultModule])) {
                 return array('module' => $defaultModule);
             }
-
-            // CASE 5: \Exception - Undefined dependency
-            $undefinedDependency = implode(', ', $modules);
-            $this->_exceptions[self::EXCEPTION_TYPE_UNDEFINED_DEPENDENCY][$undefinedDependency] = $undefinedDependency;
         }
 
-        // CASE 6: \Exception - Undefined handle
-        $this->_exceptions[self::EXCEPTION_TYPE_UNKNOWN_HANDLE][$handle] = $handle;
         return array();
     }
 
@@ -538,14 +471,7 @@ class LayoutRule implements \Magento\TestFramework\Dependency\RuleInterface
             if (isset($modules[$defaultModule])) {
                 return array('module' => $defaultModule);
             }
-
-            // CASE 4: \Exception - Undefined dependency
-            $undefinedDependency = implode(', ', $modules);
-            $this->_exceptions[self::EXCEPTION_TYPE_UNDEFINED_DEPENDENCY][$undefinedDependency] = $undefinedDependency;
         }
-
-        // CASE 5: \Exception - Undefined block
-        $this->_exceptions[self::EXCEPTION_TYPE_UNKNOWN_BLOCK][$block] = $block;
         return array();
     }
 
diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php
index 03fd97b9ee37aead2e9abc477fba308c17f68826..17ccfc54eb020eae7474604beb34da44988a2203 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Dependency/PhpRule.php
@@ -31,6 +31,53 @@ namespace Magento\TestFramework\Dependency;
 
 class PhpRule implements \Magento\TestFramework\Dependency\RuleInterface
 {
+    /**
+     * List of routers
+     *
+     * Format: array(
+     *  '{Router}' => '{Module_Name}'
+     * )
+     *
+     * @var array
+     */
+    protected $_mapRouters = array();
+
+    /**
+     * List of layout blocks
+     *
+     * Format: array(
+     *  '{Area}' => array(
+     *   '{Block_Name}' => array('{Module_Name}' => '{Module_Name}')
+     * ))
+     *
+     * @var array
+     */
+    protected $_mapLayoutBlocks = array();
+
+    /**
+     * Default modules list.
+     *
+     * @var array
+     */
+    protected $_defaultModules = array(
+        'default'   => 'Magento\Install',
+        'frontend'  => 'Magento\Theme',
+        'adminhtml' => 'Magento\Adminhtml',
+    );
+
+    /**
+     * Constructor
+     *
+     * @param array $mapRouters
+     * @param array $mapLayoutBlocks
+     */
+    public function __construct(array $mapRouters, array $mapLayoutBlocks)
+    {
+        $this->_mapRouters = $mapRouters;
+        $this->_mapLayoutBlocks = $mapLayoutBlocks;
+        $this->_namespaces = implode('|', \Magento\TestFramework\Utility\Files::init()->getNamespaces());
+    }
+
     /**
      * Gets alien dependencies information for current module by analyzing file's contents
      *
@@ -42,7 +89,7 @@ class PhpRule implements \Magento\TestFramework\Dependency\RuleInterface
      */
     public function getDependencyInfo($currentModule, $fileType, $file, &$contents)
     {
-        if (!in_array($fileType, array('php'))) {
+        if (!in_array($fileType, ['php', 'template'])) {
             return array();
         }
 
@@ -55,7 +102,7 @@ class PhpRule implements \Magento\TestFramework\Dependency\RuleInterface
             $matches['module'] = array_unique($matches['module']);
             foreach ($matches['module'] as $i => $referenceModule) {
                 $referenceModule = str_replace('_', '\\', $referenceModule);
-                if ($currentModule == $referenceModule || $referenceModule == 'Magento\MagentoException') {
+                if ($currentModule == $referenceModule) {
                     continue;
                 }
                 $dependenciesInfo[] = array(
@@ -65,6 +112,183 @@ class PhpRule implements \Magento\TestFramework\Dependency\RuleInterface
                 );
             }
         }
+        $result = $this->_caseGetUrl($currentModule, $contents);
+        if (count($result)) {
+            $dependenciesInfo = array_merge($dependenciesInfo, $result);
+        }
+        $result = $this->_caseLayoutBlock($currentModule, $fileType, $file, $contents);
+        if (count($result)) {
+            $dependenciesInfo = array_merge($dependenciesInfo, $result);
+        }
+
         return $dependenciesInfo;
     }
+
+    /**
+     * Check get URL method
+     *
+     * Ex.: getUrl('{path}')
+     *
+     * @param $currentModule
+     * @param $contents
+     * @return array
+     */
+    protected function _caseGetUrl($currentModule, &$contents)
+    {
+        $pattern = '/[\->:]+(?<source>getUrl\([\'"](?<router>[\w\/*]+)[\'"])/';
+
+        $dependencies = array();
+        if (!preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
+            return $dependencies;
+        }
+
+        foreach ($matches as $item) {
+            $router = str_replace('/', '\\', $item['router']);
+            if (isset($this->_mapRouters[$router])) {
+                $modules = $this->_mapRouters[$router];
+                if (!in_array($currentModule, $modules)) {
+                    foreach ($modules as $module) {
+                        $dependencies[] = array(
+                            'module' => $module,
+                            'type' => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                            'source' => $item['source'],
+                        );
+                    }
+                }
+            }
+        }
+        return $dependencies;
+    }
+
+    /**
+     * Check layout blocks
+     *
+     * @param $currentModule
+     * @param $fileType
+     * @param $file
+     * @param $contents
+     * @return array
+     */
+    protected function _caseLayoutBlock($currentModule, $fileType, $file, &$contents)
+    {
+        $pattern = '/[\->:]+(?<source>(?:getBlock|getBlockHtml)\([\'"](?<block>[\w\.\-]+)[\'"]\))/';
+
+        $area = $this->_getAreaByFile($file, $fileType);
+
+        $result = array();
+        if (!preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
+            return $result;
+        }
+
+        foreach ($matches as $match) {
+            if (in_array($match['block'], ['root', 'content'])) {
+                continue;
+            }
+            $check = $this->_checkDependencyLayoutBlock($currentModule, $area, $match['block']);
+            $module = isset($check['module']) ? $check['module'] : null;
+            if ($module) {
+                $result[$module] = array(
+                    'type' => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => $match['source'],
+                );
+            }
+        }
+        return $this->_getUniqueDependencies($result);
+    }
+
+    /**
+     * Get area from file path
+     *
+     * @param $file
+     * @param $fileType
+     * @return string|null
+     */
+    protected function _getAreaByFile($file, $fileType)
+    {
+        if ($fileType == 'php') {
+            return null;
+        }
+        $area = 'default';
+        if (preg_match('/\/(?<area>adminhtml|frontend)\//', $file, $matches)) {
+            $area = $matches['area'];
+        }
+        return $area;
+    }
+
+    /**
+     * Check layout block dependency
+     *
+     * Return: array(
+     *  'module'  // dependent module
+     *  'source'  // source text
+     * )
+     *
+     * @param $currentModule
+     * @param $area
+     * @param $block
+     * @return array
+     */
+    protected function _checkDependencyLayoutBlock($currentModule, $area, $block)
+    {
+        if (isset($this->_mapLayoutBlocks[$area][$block]) || is_null($area)) {
+            // CASE 1: No dependencies
+            $modules = [];
+            if (is_null($area)) {
+                foreach ($this->_mapLayoutBlocks as $blocks) {
+                    if (array_key_exists($block, $blocks)) {
+                        $modules += $blocks[$block];
+                    }
+                }
+            } else {
+                $modules = $this->_mapLayoutBlocks[$area][$block];
+            }
+            if (isset($modules[$currentModule])) {
+                return array('module' => null);
+            }
+            // CASE 2: Single dependency
+            if (1 == count($modules)) {
+                return array('module' => current($modules));
+            }
+            // CASE 3: Default module dependency
+            $defaultModule = $this->_getDefaultModuleName($area);
+            if (isset($modules[$defaultModule])) {
+                return array('module' => $defaultModule);
+            }
+        }
+        // CASE 4: \Exception - Undefined block
+        return array();
+    }
+
+    /**
+     * Retrieve default module name (by area)
+     *
+     * @param string $area
+     * @return null
+     */
+    protected function _getDefaultModuleName($area = 'default')
+    {
+        if (isset($this->_defaultModules[$area])) {
+            return $this->_defaultModules[$area];
+        }
+        return null;
+    }
+
+    /**
+     * Retrieve unique dependencies
+     *
+     * @param array $dependencies
+     * @return array
+     */
+    protected function _getUniqueDependencies($dependencies = array())
+    {
+        $result = array();
+        foreach ($dependencies as $module => $value) {
+            $result[] = array(
+                'module' => $module,
+                'type'   => $value['type'],
+                'source' => $value['source'],
+            );
+        }
+        return $result;
+    }
 }
diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/TemplateRule.php b/dev/tests/static/framework/Magento/TestFramework/Dependency/TemplateRule.php
deleted file mode 100644
index 62815e0523aab509ab121ca02b679c966998e353..0000000000000000000000000000000000000000
--- a/dev/tests/static/framework/Magento/TestFramework/Dependency/TemplateRule.php
+++ /dev/null
@@ -1,494 +0,0 @@
-<?php
-/**
- * Rule for searching dependencies in layout files
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category    Magento
- * @package     Magento
- * @subpackage  static_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\TestFramework\Dependency;
-
-class TemplateRule implements \Magento\TestFramework\Dependency\RuleInterface
-{
-    /**
-     * Cases to search dependencies
-     *
-     * @var array
-     */
-    protected $_cases = array(
-        '_caseModelSingleton',
-        '_caseHelper',
-        '_caseCreateBlock',
-        '_caseConstant',
-        '_caseAddFile',
-        '_caseGetUrl',
-        '_caseLayoutBlock',
-    );
-
-    /**
-     * Default modules list.
-     *
-     * @var array
-     */
-    protected $_defaultModules = array(
-        'default'   => 'Magento_Install',
-        'frontend'  => 'Magento_Theme',
-        'adminhtml' => 'Magento_Adminhtml',
-    );
-
-    /**
-     * Namespaces to analyze
-     *
-     * Format: {Namespace}|{Namespace}|...
-     *
-     * @var string
-     */
-    protected $_namespaces;
-
-    /**
-     * List of routers
-     *
-     * Format: array(
-     *  '{Router}' => '{Module_Name}'
-     * )
-     *
-     * @var array
-     */
-    protected $_mapRouters = array();
-
-    /**
-     * List of layout blocks
-     *
-     * Format: array(
-     *  '{Area}' => array(
-     *   '{Block_Name}' => array('{Module_Name}' => '{Module_Name}')
-     * ))
-     *
-     * @var array
-     */
-    protected $_mapLayoutBlocks = array();
-
-    /**
-     * List of exceptions
-     *
-     * Format: array(
-     *  '{Exception_Type}' => '{Source}'
-     * )
-     *
-     * @var array
-     */
-    protected $_exceptions = array();
-
-    /**
-     * Display exceptions
-     */
-    const EXCEPTION_ALLOWED = false;
-
-    /**
-     * Unknown layout block
-     */
-    const EXCEPTION_TYPE_UNKNOWN_BLOCK = 'UNKNOWN_BLOCK';
-
-    /**
-     * Undefined dependency
-     */
-    const EXCEPTION_TYPE_UNDEFINED_DEPENDENCY = 'UNDEFINED_DEPENDENCY';
-
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        $args = func_get_args();
-        if (count($args)) {
-            if (isset($args[0]['mapRouters'])) {
-                $this->_mapRouters = $args[0]['mapRouters'];
-            }
-            if (isset($args[0]['mapLayoutBlocks'])) {
-                $this->_mapLayoutBlocks = $args[0]['mapLayoutBlocks'];
-            }
-        }
-
-        $this->_namespaces = implode('|', \Magento\TestFramework\Utility\Files::init()->getNamespaces());
-    }
-
-    /**
-     * Retrieve dependencies information for current module
-     *
-     * @param string $currentModule
-     * @param string $fileType
-     * @param string $file
-     * @param string $contents
-     * @return array
-     */
-    public function getDependencyInfo($currentModule, $fileType, $file, &$contents)
-    {
-        if ('template' != $fileType) {
-            return array();
-        }
-
-        $this->_exceptions = array();
-
-        $dependencies = array();
-        foreach ($this->_cases as $case) {
-            if (method_exists($this, $case)) {
-                $result = $this->$case($currentModule, $fileType, $file, $contents);
-                if (count($result)) {
-                    $dependencies = array_merge($dependencies, $result);
-                }
-            }
-        }
-        return array_merge($dependencies, $this->_applyExceptions());
-    }
-
-    /**
-     * Apply exceptions
-     *
-     * @return array
-     */
-    protected function _applyExceptions()
-    {
-        if (!self::EXCEPTION_ALLOWED) {
-            return array();
-        }
-
-        $result = array();
-        foreach ($this->_exceptions as $type => $source) {
-            if (is_array($source)) {
-                $source = array_keys($source);
-            }
-            $result[] = array(
-                'exception' => $type,
-                'module' => '',
-                'source' => $source,
-            );
-        }
-        return $result;
-    }
-
-    /**
-     * Check models calls
-     *
-     * Ex.: \Mage::getModel('{Class_Name}')
-     *      \Mage::getSingleton('{Class_Name}')
-     *      \Mage::getBlockSingleton('{Class_Name}')
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseModelSingleton($currentModule, $fileType, $file, &$contents)
-    {
-        $patterns = array(
-            \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD =>
-            '/(?<source>Mage::(?:getModel|getSingleton|getBlockSingleton)+\([\'"]'
-                . '(?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)\w*[\'"]\))/',
-        );
-        return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
-    }
-
-    /**
-     * Check helpers calls
-     *
-     * Ex.: \Mage::helper('{Class_Name}')
-     *      $this->helper('{Class_Name}')
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseHelper($currentModule, $fileType, $file, &$contents)
-    {
-        $patterns = array(
-            \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD =>
-            '/(?<source>[$a-zA-Z0-9_\->:]+helper\([\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)\w*)/',
-        );
-        return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
-    }
-
-    /**
-     * Check createBlock() methods
-     *
-     * Ex.: createBlock('{Class_Name}')
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseCreateBlock($currentModule, $fileType, $file, &$contents)
-    {
-        $patterns = array(
-            \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD =>
-            '/[\->:]+(?<source>createBlock\([\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)\w*)/',
-        );
-        return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
-    }
-
-    /**
-     * Check using of constants
-     *
-     * Ex.: {Class_Name}::{Constant_Name}
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseConstant($currentModule, $fileType, $file, &$contents)
-    {
-        $patterns = array(
-            \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD =>
-            '/(?<source>(?<namespace>' . $this->_namespaces . ')[_\\\\](?<module>[A-Z][a-zA-Z]+)[_\\\\]'
-                . '(?:[A-Z][a-z]+[_\\\\]?){1,}::[A-Z[_\\\\]]+)/',
-        );
-        return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
-    }
-
-    /**
-     * Check adding additional files
-     *
-     * Ex.: $this->getViewFileUrl('{Module_name}::{File_Name}')
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseAddFile($currentModule, $fileType, $file, &$contents)
-    {
-        $patterns = array(
-            \Magento\TestFramework\Dependency\RuleInterface::TYPE_SOFT =>
-            '/(?<source>[$a-zA-Z0-9_\->:]+getViewFileUrl\([\'"](?<namespace>' . $this->_namespaces . ')[_\\\\]'
-                . '(?<module>[A-Z][a-zA-Z]+)::[\w\/\.-]+)/',
-        );
-        return $this->_checkDependenciesByRegexp($currentModule, $contents, $patterns);
-    }
-
-    /**
-     * Check get URL method
-     *
-     * Ex.: getUrl('{path}')
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseGetUrl($currentModule, $fileType, $file, &$contents)
-    {
-        $pattern = '/[\->:]+(?<source>getUrl\([\'"](?<router>[\w\/*]+)[\'"])/';
-
-        $dependencies = array();
-        if (preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
-            foreach ($matches as $item) {
-                $router = str_replace('/', '\\', $item['router']);
-                if (isset($this->_mapRouters[$router])) {
-                    $moduleName = $this->_mapRouters[$router];
-                    if ($currentModule != $moduleName) {
-                        $dependencies[] = array(
-                            'module' => $moduleName,
-                            'type' => \Magento\TestFramework\Dependency\RuleInterface::TYPE_SOFT,
-                            'source' => $item['source'],
-                        );
-                    }
-                }
-            }
-        }
-        return $dependencies;
-    }
-
-    /**
-     * Check layout blocks
-     *
-     * @param $currentModule
-     * @param $fileType
-     * @param $file
-     * @param $contents
-     * @return array
-     *
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function _caseLayoutBlock($currentModule, $fileType, $file, &$contents)
-    {
-        $pattern = '/[\->:]+(?<source>(?:getBlock|getBlockHtml)\([\'"](?<block>[\w\.\-]+)[\'"]\))/';
-
-        $area = $this->_getAreaByFile($file);
-
-        $result = array();
-        if (preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
-            foreach ($matches as $match) {
-                $check = $this->_checkDependencyLayoutBlock($currentModule, $area, $match['block']);
-                $module = isset($check['module']) ? $check['module'] : null;
-                if ($module) {
-                    $result[$module] = array(
-                        'type' => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
-                        'source' => $match['source'],
-                    );
-                }
-            }
-        }
-        return $this->_getUniqueDependencies($result);
-    }
-
-    /**
-     * Search dependencies by defined regexp patterns
-     *
-     * @param $currentModule
-     * @param $contents
-     * @param array $patterns
-     * @return array
-     */
-    protected function _checkDependenciesByRegexp($currentModule, $contents, $patterns = array())
-    {
-        $result = array();
-        foreach ($patterns as $type => $pattern) {
-            if (preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER)) {
-                foreach ($matches as $match) {
-                    $module = $match['namespace'] . '\\' . $match['module'];
-                    if ($currentModule != $module) {
-                        $result[$module] = array(
-                            'type' => $type,
-                            'source' => $match['source'],
-                        );
-                    }
-                }
-            }
-        }
-        return $this->_getUniqueDependencies($result);
-    }
-
-    /**
-     * Check layout block dependency
-     *
-     * Return: array(
-     *  'module'  // dependent module
-     *  'source'  // source text
-     * )
-     *
-     * @param $currentModule
-     * @param $area
-     * @param $block
-     * @return array
-     */
-    protected function _checkDependencyLayoutBlock($currentModule, $area, $block)
-    {
-        if (isset($this->_mapLayoutBlocks[$area][$block])) {
-            // CASE 1: No dependencies
-            $modules = $this->_mapLayoutBlocks[$area][$block];
-            if (isset($modules[$currentModule])) {
-                return array('module' => null);
-            }
-
-            // CASE 2: Single dependency
-            if (1 == count($modules)) {
-                return array('module' => current($modules));
-            }
-
-            // CASE 3: Default module dependency
-            $defaultModule = $this->_getDefaultModuleName($area);
-            if (isset($modules[$defaultModule])) {
-                return array('module' => $defaultModule);
-            }
-
-            // CASE 4: \Exception - Undefined dependency
-            $undefinedDependency = implode(', ', $modules);
-            $this->_exceptions[self::EXCEPTION_TYPE_UNDEFINED_DEPENDENCY][$undefinedDependency] = $undefinedDependency;
-        }
-
-        // CASE 5: \Exception - Undefined block
-        $this->_exceptions[self::EXCEPTION_TYPE_UNKNOWN_BLOCK][$block] = $block;
-        return array();
-    }
-
-    /**
-     * Get area from file path
-     *
-     * @param $file
-     * @return string
-     */
-    protected function _getAreaByFile($file)
-    {
-        $area = 'default';
-        if (preg_match('/\/(?<area>adminhtml|frontend)\//', $file, $matches)) {
-            $area = $matches['area'];
-        }
-        return $area;
-    }
-
-    /**
-     * Retrieve default module name (by area)
-     *
-     * @param string $area
-     * @return null
-     */
-    protected function _getDefaultModuleName($area = 'default')
-    {
-        if (isset($this->_defaultModules[$area])) {
-            return $this->_defaultModules[$area];
-        }
-        return null;
-    }
-
-    /**
-     * Retrieve unique dependencies
-     *
-     * @param array $dependencies
-     * @return array
-     */
-    protected function _getUniqueDependencies($dependencies = array())
-    {
-        $result = array();
-        foreach ($dependencies as $module => $value) {
-            $result[] = array(
-                'module' => $module,
-                'type'   => $value['type'],
-                'source' => $value['source'],
-            );
-        }
-        return $result;
-    }
-}
diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DbRuleTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DbRuleTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7f9df5b091a99ec2dc4ef9a3d6fe680a14ca8759
--- /dev/null
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/DbRuleTest.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento
+ * @subpackage  static_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\TestFramework\Dependency;
+
+class DbRuleTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var DbRule
+     */
+    protected $model;
+
+    protected function setUp()
+    {
+        $this->model = new DbRule(['some_table' => 'SomeModule']);
+    }
+
+    /**
+     * @param string $module
+     * @param string $file
+     * @param string $contents
+     * @param array $expected
+     * @dataProvider getDependencyInfoDataProvider
+     */
+    public function testGetDependencyInfo($module, $file, $contents, array $expected)
+    {
+        $this->assertEquals($expected, $this->model->getDependencyInfo($module, 'any', $file, $contents));
+    }
+
+    public function getDependencyInfoDataProvider()
+    {
+        return [
+            ['any', 'non-resource-file-path.php', 'any', []],
+            [
+                'any',
+                '/app/some/path/sql/some-file.php',
+                '$install->getTableName("unknown_table")',
+                [['module' => 'Unknown', 'source' => 'unknown_table']]
+            ],
+            [
+                'any',
+                '/app/some/path/data/some-file.php',
+                '$install->getTableName("unknown_table")',
+                [['module' => 'Unknown', 'source' => 'unknown_table']]
+            ],
+            [
+                'SomeModule',
+                '/app/some/path/resource/some-file.php',
+                '$install->getTableName("some_table")',
+                []
+            ],
+            [
+                'any',
+                '/app/some/path/resource/some-file.php',
+                '$install->getTableName(\'some_table\')',
+                [[
+                    'module' => 'SomeModule',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'some_table'
+                ]]
+            ],
+        ];
+    }
+}
diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/LayoutRuleTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/LayoutRuleTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..412bb29ba0e9ec94c495b511bad4bac55281b88f
--- /dev/null
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/LayoutRuleTest.php
@@ -0,0 +1,264 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento
+ * @subpackage  static_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\TestFramework\Dependency;
+
+class LayoutRuleTest extends \PHPUnit_Framework_TestCase
+{
+    public function testNonLayoutGetDependencyInfo()
+    {
+        $model = new LayoutRule([], [], []);
+        $content = 'any content';
+        $this->assertEmpty($model->getDependencyInfo('any', 'not layout', 'any', $content));
+    }
+
+    /**
+     * @param string $contents
+     * @param array $expected
+     * @dataProvider getDependencyInfoDataProvider
+     */
+    public function testGetDependencyInfo($contents, array $expected)
+    {
+        $model = new LayoutRule([], [], []);
+        $this->assertEquals($expected, $model->getDependencyInfo('Magento\SomeModule', 'layout', 'any', $contents));
+    }
+
+    public function getDependencyInfoDataProvider()
+    {
+        return [
+            [
+                '<element module="Magento\AnotherModule">',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                    'source' => '<element module="Magento\AnotherModule">',
+                ]]
+            ],
+            [
+                '<element module="Magento\SomeModule">',
+                []
+            ],
+            [
+                '<block class="Magento\AnotherModule\Several\Chunks">',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_HARD,
+                    'source' => '<block class="Magento\AnotherModule\Several\Chunks">',
+                ]]
+            ],
+            [
+                '<block class="Magento\SomeModule\Several\Chunks">',
+                []
+            ],
+            [
+                '<extra></extra><block template="Magento_AnotherModule::template/path.phtml">',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                    'source' => '<block template="Magento_AnotherModule::template/path.phtml">',
+                ]]
+            ],
+            [
+                '<block template="Magento_SomeModule::template/path.phtml">',
+                []
+            ],
+            [
+                '<block>Magento\AnotherModule\Several\Chunks</block>',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                    'source' => '<block>Magento\AnotherModule\Several\Chunks</block>',
+                ]]
+            ],
+            [
+                '<block>Magento\SomeModule\Several\Chunks</block>',
+                []
+            ],
+            [
+                '<template>Magento_AnotherModule::template/path.phtml</template>',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                    'source' => '<template>Magento_AnotherModule::template/path.phtml</template>',
+                ]]
+            ],
+            [
+                '<template>Magento_SomeModule::template/path.phtml</template>',
+                []
+            ],
+            [
+                '<file>Magento_AnotherModule::file/path.txt</file>',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                    'source' => '<file>Magento_AnotherModule::file/path.txt</file>',
+                ]]
+            ],
+            [
+                '<file>Magento_SomeModule::file/path.txt</file>',
+                []
+            ],
+            [
+                '<any helper="Magento\AnotherModule\Several\Chunks::text">',
+                [[
+                    'module' => 'Magento\AnotherModule',
+                    'type'   => \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                    'source' => '<any helper="Magento\AnotherModule\Several\Chunks::text">',
+                ]]
+            ],
+            [
+                '<any helper="Magento\SomeModule\Several\Chunks::text">',
+                []
+            ],
+        ];
+    }
+
+    /**
+     * @param string $contents
+     * @param string $type
+     * @dataProvider layoutGetDependencyInfoDataProvider
+     */
+    public function testUpdatesRouterGetDependencyInfo($contents, $type)
+    {
+        $model = new LayoutRule(
+            ['router_name' => ['Magento\RouterModule']],
+            [],
+            []
+        );
+        $this->assertEquals([], $model->getDependencyInfo('Magento\RouterModule', 'layout', 'any', $contents));
+        $this->assertEquals(
+            [[
+                'module' => 'Magento\RouterModule',
+                'type' => $type,
+                'source' => 'router_name_action',
+            ]],
+            $model->getDependencyInfo('Magento\AnotherModule', 'layout', 'any', $contents)
+        );
+    }
+
+    /**
+     * @param string $contents
+     * @param string $type
+     * @param bool $isHandle
+     * @dataProvider layoutGetDependencyInfoWithReferenceDataProvider
+     */
+    public function testLayoutGetDependencyInfo($contents, $type, $isHandle)
+    {
+        // test one module
+        $data = [
+            'frontend' => ['any_handle_name' => ['Magento\AnyHandleModule' => 'Magento\AnyHandleModule']],
+            'default' => ['singlechunk' => ['Magento\DefaultHandleModule' => 'Magento\DefaultHandleModule']]
+        ];
+        $model = $isHandle ? new LayoutRule([], [], $data) : new LayoutRule([], $data, []);
+        $this->assertEquals(
+            [],
+            $model->getDependencyInfo('Magento\AnyHandleModule', 'layout', 'path/frontend/file.txt', $contents)
+        );
+        $this->assertEquals(
+            [],
+            $model->getDependencyInfo('Magento\DefaultHandleModule', 'layout', 'any', $contents)
+        );
+        $this->assertEquals(
+            [[
+                'module' => 'Magento\DefaultHandleModule',
+                'type' => $type,
+                'source' => 'singlechunk',
+            ]],
+            $model->getDependencyInfo('any', 'layout', 'any', $contents)
+        );
+        $this->assertEquals(
+            [[
+                'module' => 'Magento\AnyHandleModule',
+                'type' => $type,
+                'source' => 'any_handle_name',
+            ]],
+            $model->getDependencyInfo('any', 'layout', 'path/frontend/file.txt', $contents)
+        );
+        // test several modules
+        $data = ['frontend' => ['any_handle_name' => [
+            'Magento\Theme' => 'Magento\Theme',
+            'Magento\HandleModule' => 'Magento\HandleModule',
+        ]]];
+        $model = $isHandle ? new LayoutRule([], [], $data) : new LayoutRule([], $data, []);
+        $this->assertEquals(
+            [[
+                'module' => 'Magento\Theme',
+                'type' => $type,
+                'source' => 'any_handle_name',
+            ]],
+            $model->getDependencyInfo('any', 'layout', 'path/frontend/file.txt', $contents)
+        );
+        $this->assertEquals(
+            [],
+            $model->getDependencyInfo('Magento\HandleModule', 'layout', 'path/frontend/file.txt', $contents)
+        );
+    }
+
+    public function layoutGetDependencyInfoDataProvider()
+    {
+        return [
+            [
+                $this->_getLayoutFileContent('layout_handle.xml'),
+                \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                true
+            ],
+            [
+                $this->_getLayoutFileContent('layout_handle_parent.xml'),
+                \Magento\Test\Integrity\DependencyTest::TYPE_HARD,
+                true
+            ],
+            [
+                $this->_getLayoutFileContent('layout_handle_update.xml'),
+                \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                true
+            ]
+        ];
+    }
+
+    public function layoutGetDependencyInfoWithReferenceDataProvider()
+    {
+        return array_merge(
+            $this->layoutGetDependencyInfoDataProvider(),
+            [[
+                $this->_getLayoutFileContent('layout_reference.xml'),
+                \Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
+                false
+            ]]
+        );
+    }
+
+    /**
+     * Get content of layout file
+     *
+     * @param string $fileName
+     * @return string
+     */
+    protected function _getLayoutFileContent($fileName)
+    {
+        return file_get_contents(str_replace('\\', '/', realpath(__DIR__)) . '/_files/' . $fileName);
+    }
+}
diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..67cb23656e1cb75ad75d25b3c045002993eb9fbf
--- /dev/null
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/PhpRuleTest.php
@@ -0,0 +1,154 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento
+ * @subpackage  static_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\TestFramework\Dependency;
+
+class PhpRuleTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PhpRule
+     */
+    protected $model;
+
+    protected function setUp()
+    {
+        $mapRoutes = array(
+            'someModule' => array('Magento\SomeModule'),
+            'anotherModule' => array('Magento\OneModule')
+        );
+        $mapLayoutBlocks = array(
+            'area' => array('block.name' => array('Magento\SomeModule' => 'Magento\SomeModule'))
+        );
+        $this->model = new PhpRule($mapRoutes, $mapLayoutBlocks);
+    }
+
+    public function testNonPhpGetDependencyInfo()
+    {
+        $content = 'any content';
+        $this->assertEmpty($this->model->getDependencyInfo('any', 'not php', 'any', $content));
+    }
+
+    /**
+     * @param string $module
+     * @param string $content
+     * @param array $expected
+     * @dataProvider getDependencyInfoDataProvider
+     */
+    public function testGetDependencyInfo($module, $content, array $expected)
+    {
+        $this->assertEquals($expected, $this->model->getDependencyInfo($module, 'php', 'any', $content));
+    }
+
+    public function getDependencyInfoDataProvider()
+    {
+        return [
+            ['Magento\SomeModule', 'something extends \Magento\SomeModule\Any\ClassName {', []], //1
+            [
+                'Magento\AnotherModule',
+                'something extends \Magento\SomeModule\Any\ClassName {',
+                [[
+                    'module' => 'Magento\SomeModule',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'Magento\SomeModule\Any\ClassName',
+                ]]
+            ], // 2
+            ['Magento\SomeModule', '$this->getViewFileUrl("Magento_SomeModule::js/order-by-sku-failure.js")', []], //3
+            [
+                'Magento\AnotherModule',
+                '$this->getViewFileUrl("Magento_SomeModule::js/order-by-sku-failure.js")',
+                [[
+                    'module' => 'Magento\SomeModule',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'Magento_SomeModule',
+                ]]
+            ], //4
+            ['Magento\SomeModule', '$this->helper("Magento\SomeModule\Any\ClassName")', []], //5
+            [
+                'Magento\AnotherModule',
+                '$this->helper("Magento\SomeModule\Any\ClassName")',
+                [[
+                    'module' => 'Magento\SomeModule',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'Magento\SomeModule\Any\ClassName',
+                ]]
+            ], //6
+            ['Magento\SomeModule', '$this->getUrl("someModule")', []], // 7
+            [
+                'Magento\AnotherModule',
+                '$this->getUrl("anotherModule")',
+                [[
+                    'module' => 'Magento\OneModule',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'getUrl("anotherModule"',
+                ]]
+            ], //8
+            ['Magento\SomeModule', '$this->getLayout()->getBlock(\'block.name\');', []], // 9
+            [
+                'Magento\AnotherModule',
+                '$this->getLayout()->getBlock(\'block.name\');',
+                [[
+                    'module' => 'Magento\SomeModule',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'getBlock(\'block.name\')',
+                ]]
+            ], //10
+        ];
+    }
+
+    /**
+     * @param string $module
+     * @param string $content
+     * @param array $expected
+     * @dataProvider getDefaultModelDependencyDataProvider
+     */
+    public function testGetDefaultModelDependency($module, $content, array $expected)
+    {
+        $mapLayoutBlocks = array(
+            'default' => array('block.name' => array(
+                'Magento\SomeModule' => 'Magento\SomeModule',
+                'Magento\Install' => 'Magento\Install'
+            ))
+        );
+        $this->model = new PhpRule([], $mapLayoutBlocks);
+        $this->assertEquals($expected, $this->model->getDependencyInfo($module, 'template', 'any', $content));
+    }
+
+    public function getDefaultModelDependencyDataProvider()
+    {
+        return [
+            [
+                'Magento\AnotherModule',
+                '$this->getLayout()->getBlock(\'block.name\');',
+                [[
+                    'module' => 'Magento\Install',
+                    'type'   => \Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD,
+                    'source' => 'getBlock(\'block.name\')',
+                ]]
+            ],
+        ];
+    }
+}
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/etc/module.xml b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle.xml
similarity index 86%
rename from dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/etc/module.xml
rename to dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle.xml
index a90721f32a850294a555afe9500412dcb5e73f92..797a7495733dcf743ef4f30296e205a9d1b3b691 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/Magento/Catalog/etc/module.xml
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle.xml
@@ -23,6 +23,8 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<config>
-    <module name="Magento_Catalog" version="1.6.0.0.23" active="true"/>
-</config>
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <any_handle_name />
+    <singlechunk />
+    <router_name_action />
+</layout>
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle_parent.xml
similarity index 86%
rename from dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml
rename to dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle_parent.xml
index e56c2fb48894799c0b566e3a3c0df26ed8111dc6..7aa13ed5a36c579867e13196370b8a0437867df4 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/DataService/LayoutTest/layout_update.xml
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle_parent.xml
@@ -24,7 +24,7 @@
  */
 -->
 <layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-    <block class="Magento\View\Element\Template" name="block_with_service_calls">
-        <data service_call="testServiceCall" alias="testData"/>
-    </block>
+    <any_node1 parent="any_handle_name" />
+    <any_node2 parent="singlechunk" />
+    <any_node3 parent="router_name_action" />
 </layout>
diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle_update.xml b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle_update.xml
new file mode 100644
index 0000000000000000000000000000000000000000..41648f6c00cd6c51a1a9a4cd981c10deef8bd4cf
--- /dev/null
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_handle_update.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)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <update handle="any_handle_name" />
+    <any_node>
+        <update handle="singlechunk">
+            <update handle="router_name_action" />
+        </update>
+    </any_node>
+</layout>
diff --git a/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_reference.xml b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_reference.xml
new file mode 100644
index 0000000000000000000000000000000000000000..bc3e54dda6bc86d89e74e7a737ba78373859faa8
--- /dev/null
+++ b/dev/tests/static/framework/tests/unit/testsuite/Magento/TestFramework/Dependency/_files/layout_reference.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <reference name="any_handle_name" />
+    <any_node>
+        <reference name="singlechunk" />
+    </any_node>
+</layout>
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php
index 32bc2989a1ebf5d8345af0089bef181527784db0..2157bded42892f6d8f3b69dfd3ca410f7be84b7b 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/DependencyTest.php
@@ -29,9 +29,6 @@
  */
 namespace Magento\Test\Integrity;
 
-/**
- * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
- */
 class DependencyTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -47,6 +44,11 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
     const MAP_TYPE_FOUND         = 'found';
     const MAP_TYPE_REDUNDANT     = 'redundant';
 
+    /**
+     * Count of directories in path
+     */
+    const DIR_PATH_COUNT = 4;
+
     /**
      * List of config.xml files by modules
      *
@@ -58,6 +60,17 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
      */
     protected static $_listConfigXml = array();
 
+    /**
+     * List of routes.xml files by modules
+     *
+     * Format: array(
+     *  '{Module_Name}' => '{Filename}'
+     * )
+     *
+     * @var array
+     */
+    protected static $_listRoutesXml = array();
+
     /**
      * List of routers
      *
@@ -107,18 +120,6 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
      */
     protected static $_mapDependencies = array();
 
-    /**
-     * List of fake dependencies
-     *
-     * Format: array(
-     *  '{Module_Name}' => array(
-     *   '{Dependency_Name}' => '{Dependency_Name}',
-     * ))
-     *
-     * @var array
-     */
-    protected static $_mapExceptions = array();
-
     /**
      * Regex pattern for validation file path of theme
      *
@@ -135,18 +136,6 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
      */
     protected static $_namespaces;
 
-    /**
-     * Rule list
-     *
-     * @var array
-     */
-    protected static $_rules = array(
-        'Magento\TestFramework\Dependency\PhpRule',
-        'Magento\TestFramework\Dependency\DbRule',
-        'Magento\TestFramework\Dependency\LayoutRule',
-        'Magento\TestFramework\Dependency\TemplateRule',
-    );
-
     /**
      * Rule instances
      *
@@ -156,13 +145,13 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
 
     /**
      * Sets up data
-     *
      */
     public static function setUpBeforeClass()
     {
         self::$_namespaces = implode('|', \Magento\TestFramework\Utility\Files::init()->getNamespaces());
 
         self::_prepareListConfigXml();
+        self::_prepareListRoutesXml();
 
         self::_prepareMapRouters();
         self::_prepareMapLayoutBlocks();
@@ -181,7 +170,7 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
         $defaultThemes = array();
         foreach (self::$_listConfigXml as $file) {
             $config = simplexml_load_file($file);
-            $nodes = $config->xpath("/config/*/design/theme/full_name") ?: array();
+            $nodes = @ ($config->xpath("/config/*/design/theme/full_name") ?: array());
             foreach ($nodes as $node) {
                 $defaultThemes[] = (string)$node;
             }
@@ -194,32 +183,20 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
      */
     protected static function _initRules()
     {
-        self::$_rulesInstances = array();
-        foreach (self::$_rules as $ruleClass) {
-            if (class_exists($ruleClass)) {
-                /** @var \Magento\TestFramework\Dependency\RuleInterface $rule */
-                $rule = new $ruleClass(array(
-                    'mapRouters'        => self::$_mapRouters,
-                    'mapLayoutBlocks'   => self::$_mapLayoutBlocks,
-                    'mapLayoutHandles'  => self::$_mapLayoutHandles,
-                ));
-                if ($rule instanceof \Magento\TestFramework\Dependency\RuleInterface) {
-                    self::$_rulesInstances[$ruleClass] = $rule;
-                }
-            }
+        $replaceFilePattern = str_replace('\\', '/', realpath(__DIR__)) . '/_files/dependency_test/*.php';
+        $dbRuleTables = array();
+        foreach (glob($replaceFilePattern) as $fileName) {
+            $dbRuleTables = array_merge($dbRuleTables, @include($fileName));
         }
-    }
-
-    /**
-     * Validates file when it is belonged to default themes
-     *
-     * @param $file string
-     * @return bool
-     */
-    protected function _isThemeFile($file)
-    {
-        $filename = self::_getRelativeFilename($file);
-        return (bool)preg_match(self::$_defaultThemes, $filename);
+        self::$_rulesInstances = array(
+            new \Magento\TestFramework\Dependency\PhpRule(self::$_mapRouters, self::$_mapLayoutBlocks),
+            new \Magento\TestFramework\Dependency\DbRule($dbRuleTables),
+            new \Magento\TestFramework\Dependency\LayoutRule(
+                self::$_mapRouters,
+                self::$_mapLayoutBlocks,
+                self::$_mapLayoutHandles
+            ),
+        );
     }
 
     /**
@@ -274,7 +251,11 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
              * @param string $file
              */
             function ($fileType, $file) {
-                if (strpos($file, 'app/code') === false && !$this->_isThemeFile($file)) {
+                // Validates file when it is belonged to default themes
+                $filename = self::_getRelativeFilename($file);
+                $isThemeFile = (bool)preg_match(self::$_defaultThemes, $filename);
+
+                if (strpos($file, 'app/code') === false && !$isThemeFile) {
                     return;
                 }
 
@@ -285,16 +266,16 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
                 $dependencies = array();
                 foreach (self::$_rulesInstances as $rule) {
                     /** @var \Magento\TestFramework\Dependency\RuleInterface $rule */
-                    $dependencies = array_merge($dependencies,
-                        $rule->getDependencyInfo($module, $fileType, $file, $contents));
+                    $newDependencies = $rule->getDependencyInfo($module, $fileType, $file, $contents);
+                    $dependencies = array_merge($dependencies, $newDependencies);
                 }
 
                 // Collect dependencies
-                $undeclared = $this->_collectDependencies($module, $dependencies);
+                $undeclaredDependency = $this->_collectDependencies($module, $dependencies);
 
                 // Prepare output message
                 $result = array();
-                foreach ($undeclared as $type => $modules) {
+                foreach ($undeclaredDependency as $type => $modules) {
                     $modules = array_unique($modules);
                     if (!count($modules)) {
                         continue;
@@ -312,19 +293,18 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
     /**
      * Collect dependencies
      *
-     * @param $currentModule
+     * @param string $currentModuleName
      * @param array $dependencies
      * @return array
      */
-    protected function _collectDependencies($currentModule, $dependencies = array())
+    protected function _collectDependencies($currentModuleName, $dependencies = array())
     {
         if (!count($dependencies)) {
             return array();
         }
-
         $undeclared = array();
         foreach ($dependencies as $dependency) {
-            $this->collectDependency($dependency, $currentModule, $undeclared);
+            $this->collectDependency($dependency, $currentModuleName, $undeclared);
         }
         return $undeclared;
     }
@@ -332,11 +312,11 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
     /**
      * Collect a dependency
      *
-     * @param $dependency
-     * @param $currentModule
-     * @return array
+     * @param string $currentModule
+     * @param array $dependency
+     * @param array $undeclared
      */
-    private function collectDependency($dependency, $currentModule, $undeclared)
+    private function collectDependency($dependency, $currentModule, &$undeclared)
     {
         $module = $dependency['module'];
         $nsModule = str_replace('_', '\\', $module);
@@ -346,12 +326,10 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
         $hard = $this->_getDependencies($currentModule, self::TYPE_HARD, self::MAP_TYPE_DECLARED);
 
         $declared = ($type == self::TYPE_SOFT) ? array_merge($soft, $hard) : $hard;
-        if (!in_array($module, $declared) && !in_array($nsModule, $declared)) {
-            if ($this->_isFake($module)) {
-                $this->_addFake($currentModule, $module);
-                return;
-            }
+        if (!in_array($module, $declared) && !in_array($nsModule, $declared) && !$this->_isFake($module)) {
             $undeclared[$type][] = $module;
+        } elseif ((in_array($module, $declared) || in_array($nsModule, $declared)) && $this->_isFake($module)) {
+            $this->_setDependencies($currentModule, $type, self::MAP_TYPE_REDUNDANT, $module);
         }
 
         $this->_addDependencies($currentModule, $type, self::MAP_TYPE_FOUND, $nsModule);
@@ -366,20 +344,14 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
     public function collectRedundant()
     {
         foreach (array_keys(self::$_mapDependencies) as $module) {
-
             // Override 'soft' dependencies with 'hard'
             $soft = $this->_getDependencies($module, self::TYPE_SOFT, self::MAP_TYPE_FOUND);
             $hard = $this->_getDependencies($module, self::TYPE_HARD, self::MAP_TYPE_FOUND);
-
-            $this->_setDependencies($module, self::TYPE_SOFT, self::MAP_TYPE_FOUND,
-                array_diff($soft, $hard));
-
+            $this->_setDependencies($module, self::TYPE_SOFT, self::MAP_TYPE_FOUND, array_diff($soft, $hard));
             foreach ($this->_getTypes() as $type) {
                 $declared = $this->_getDependencies($module, $type, self::MAP_TYPE_DECLARED);
                 $found = $this->_getDependencies($module, $type, self::MAP_TYPE_FOUND);
-
-                $this->_setDependencies($module, $type, self::MAP_TYPE_REDUNDANT,
-                    array_diff($declared, $found));
+                $this->_setDependencies($module, $type, self::MAP_TYPE_REDUNDANT, array_diff($declared, $found));
             }
         }
     }
@@ -410,25 +382,6 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
         }
     }
 
-    /**
-     * Check fake dependencies that was found in a previous tests
-     *
-     * @depends testUndeclared
-     */
-    public function testFake()
-    {
-        $this->markTestSkipped('Skip fake modules!');
-
-        if (count(self::$_mapExceptions)) {
-            $result = array();
-            foreach (self::$_mapExceptions as $module => $items) {
-                $result[] = sprintf("\r\nModule %s: [%s]",
-                    $module, implode(', ', array_values($items)));
-            }
-            $this->fail("Undefined dependencies found!\r\n" . implode(' ', $result));
-        }
-    }
-
     /**
      * Extract Magento relative filename from absolute filename
      *
@@ -437,8 +390,8 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
      */
     static protected function _getRelativeFilename($absoluteFilename)
     {
-        $relativeFileName = str_replace(\Magento\TestFramework\Utility\Files::init()->getPathToSource(),
-            '', $absoluteFilename);
+        $pathToSource = \Magento\TestFramework\Utility\Files::init()->getPathToSource();
+        $relativeFileName = str_replace($pathToSource, '', $absoluteFilename);
         return trim(str_replace('\\', '/', $relativeFileName), '/');
     }
 
@@ -454,6 +407,7 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
         if (preg_match('/\/(?<namespace>' . self::$_namespaces . ')[\/_\\\\]?(?<module>[^\/]+)\//', $file, $matches)) {
             return $matches['namespace'] . '\\' . $matches['module'];
         }
+        return '';
     }
 
     /**
@@ -461,13 +415,14 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
      *
      * @param string $fileType
      * @param array $files
+     * @param bool|null $skip
      * @return array
      */
-    protected function _prepareFiles($fileType, $files)
+    protected function _prepareFiles($fileType, $files, $skip = null)
     {
         $result = array();
         foreach (array_keys($files) as $file) {
-            if (substr_count(self::_getRelativeFilename($file), '/') < 4) {
+            if (!$skip && (substr_count(self::_getRelativeFilename($file), '/') < self::DIR_PATH_COUNT)) {
                 continue;
             }
             $result[$file] = array($fileType, $file);
@@ -487,7 +442,7 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
         // Get all php files
         $files = array_merge($files,
             $this->_prepareFiles('php',
-                \Magento\TestFramework\Utility\Files::init()->getPhpFiles(true, false, false, true)));
+                \Magento\TestFramework\Utility\Files::init()->getPhpFiles(true, false, false, true), true));
 
         // Get all configuration files
         $files = array_merge($files,
@@ -518,51 +473,50 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
         }
     }
 
+    /**
+     * Prepare list of routes.xml files (by modules)
+     */
+    protected static function _prepareListRoutesXml()
+    {
+        $files = \Magento\TestFramework\Utility\Files::init()->getConfigFiles('*/routes.xml', array(), false);
+        foreach ($files as $file) {
+            if (preg_match('/(?<namespace>[A-Z][a-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)/', $file, $matches)) {
+                $module = $matches['namespace'] . '\\' . $matches['module'];
+                self::$_listRoutesXml[$module] = $file;
+            }
+        }
+    }
+
     /**
      * Prepare map of routers
-     *
-     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
-     * @SuppressWarnings(PHPMD.NPathComplexity)
      */
     protected static function _prepareMapRouters()
     {
-        $pattern = '/(?<namespace>[A-Z][a-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)\/controllers\/'
-            . '(?<path>[\/\w]*)Controller.php/';
+        $pattern = '/(?<namespace>[A-Z][a-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)\/Controller\/'
+            . '(?<path>[\/\w]*).php/';
 
         $files = \Magento\TestFramework\Utility\Files::init()->getPhpFiles(true, false, false, false);
         foreach ($files as $file) {
             if (preg_match($pattern, $file, $matches)) {
-
-                $chunks = explode('/', strtolower($matches['path']));
                 $module = $matches['namespace'] . '\\' . $matches['module'];
-
-                // Read module's config.xml file
-                $config = simplexml_load_file(self::$_listConfigXml[$module]);
-
-                if ($module == 'Magento\Adminhtml') {
-                    $nodes = $config->xpath("/config/admin/routers/*") ?: array();
-                } elseif ('adminhtml' == $chunks[0]) {
-                    array_shift($chunks);
-                    $nodes = $config->xpath("/config/admin/routers/*") ?: array();
-                } else {
-                    $nodes = $config->xpath("/config/frontend/routers/*") ?: array();
-                    foreach ($nodes as $nodeKey => $node) {
-                        // Exclude overridden routers
-                        if ('' == (string)$node->args->frontName) {
-                            unset($nodes[$nodeKey]);
+                if (isset(self::$_listRoutesXml[$module])) {
+                    // Read module's routes.xml file
+                    $config = simplexml_load_file(self::$_listRoutesXml[$module]);
+                    $nodes = $config->xpath("/config/router/*");
+                    foreach ($nodes as $node) {
+                        $id = (string)$node['id'];
+                        if ($id != 'adminhtml' && '' == (string)$node['frontName']) {
+                            // Exclude overridden routers
+                            continue;
+                        }
+                        if (!isset(self::$_mapRouters[$id])) {
+                            self::$_mapRouters[$id] = [];
+                        }
+                        if (!in_array($module, self::$_mapRouters[$id])) {
+                            self::$_mapRouters[$id][] = $module;
                         }
                     }
                 }
-
-                $controllerName = implode('\\', $chunks);
-                foreach ($nodes as $node) {
-                    /** @var \SimpleXMLElement $node */
-                    $path = $node->getName() ? $node->getName() . '\\' . $controllerName : $controllerName;
-                    if (isset(self::$_mapRouters[$path]) && (self::$_mapRouters[$path] == 'Magento\Adminhtml')) {
-                        continue;
-                    }
-                    self::$_mapRouters[$path] = $module;
-                }
             }
         }
     }
@@ -577,24 +531,17 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
             $area = 'default';
             if (preg_match('/[\/](?<area>adminhtml|frontend)[\/]/', $file, $matches)) {
                 $area = $matches['area'];
-                if (!isset(self::$_mapLayoutBlocks[$area])) {
-                    self::$_mapLayoutBlocks[$area] = array();
-                }
+                self::$_mapLayoutBlocks[$area] = @ (self::$_mapLayoutBlocks[$area] ?: array());
             }
-
             if (preg_match('/(?<namespace>[A-Z][a-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)/', $file, $matches)) {
                 $module = $matches['namespace'] . '\\' . $matches['module'];
-
                 $xml = simplexml_load_file($file);
                 foreach ((array)$xml->xpath('//container | //block') as $element) {
                     /** @var \SimpleXMLElement $element */
                     $attributes = $element->attributes();
-
                     $block = (string)$attributes->name;
                     if (!empty($block)) {
-                        if (!isset(self::$_mapLayoutBlocks[$area][$block])) {
-                            self::$_mapLayoutBlocks[$area][$block] = array();
-                        }
+                        self::$_mapLayoutBlocks[$area][$block] = @ (self::$_mapLayoutBlocks[$area][$block] ?: []);
                         self::$_mapLayoutBlocks[$area][$block][$module] = $module;
                     }
                 }
@@ -612,22 +559,16 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
             $area = 'default';
             if (preg_match('/\/(?<area>adminhtml|frontend)\//', $file, $matches)) {
                 $area = $matches['area'];
-                if (!isset(self::$_mapLayoutHandles[$area])) {
-                    self::$_mapLayoutHandles[$area] = array();
-                }
+                self::$_mapLayoutHandles[$area] = @ (self::$_mapLayoutHandles[$area] ?: array());
             }
-
             if (preg_match('/app\/code\/(?<namespace>[A-Z][a-z]+)[_\/\\\\](?<module>[A-Z][a-zA-Z]+)/',
                     $file, $matches)) {
                 $module = $matches['namespace'] . '\\' . $matches['module'];
-
                 $xml = simplexml_load_file($file);
                 foreach ((array)$xml->xpath('/layout/child::*') as $element) {
                     /** @var \SimpleXMLElement $element */
                     $handle = $element->getName();
-                    if (!isset(self::$_mapLayoutHandles[$area][$handle])) {
-                        self::$_mapLayoutHandles[$area][$handle] = array();
-                    }
+                    self::$_mapLayoutHandles[$area][$handle] = @ (self::$_mapLayoutHandles[$area][$handle] ?: array());
                     self::$_mapLayoutHandles[$area][$handle][$module] = $module;
                 }
             }
@@ -649,9 +590,6 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
 
     /**
      * Initialise map of dependencies
-     *
-     * @SuppressWarnings(PHPMD.NPathComplexity)
-     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
      */
     protected static function _initDependencies()
     {
@@ -659,14 +597,11 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
 
         foreach ($files as $file) {
             $config = simplexml_load_file($file);
-
-            $module = $config->xpath("/config/module") ?: array();
+            $module = $config->xpath("/config/module");
             $moduleName = (string)$module[0]->attributes()->name;
             $moduleName = str_replace('_', '\\', $moduleName);
+            self::$_mapDependencies[$moduleName] = @ (self::$_mapDependencies[$moduleName] ?: array());
 
-            if (!isset(self::$_mapDependencies[$moduleName])) {
-                self::$_mapDependencies[$moduleName] = array();
-            }
             foreach (self::_getTypes() as $type) {
                 if (!isset(self::$_mapDependencies[$moduleName][$type])) {
                     self::$_mapDependencies[$moduleName][$type] = array(
@@ -679,8 +614,8 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
 
             foreach ($module[0]->depends->children() as $dependency) {
                 /** @var \SimpleXMLElement $dependency */
-                $type = (isset($dependency['type']) && (string)$dependency['type'] == self::TYPE_SOFT) ? self::TYPE_SOFT
-                    : self::TYPE_HARD;
+                $type = (isset($dependency['type']) && (string)$dependency['type'] == self::TYPE_SOFT)
+                    ? self::TYPE_SOFT : self::TYPE_HARD;
                 if ($dependency->getName() == 'module') {
                     self::_addDependencies($moduleName, $type, self::MAP_TYPE_DECLARED,
                         str_replace('_', '\\', (string)$dependency->attributes()->name));
@@ -753,15 +688,4 @@ class DependencyTest extends \PHPUnit_Framework_TestCase
     {
         return isset(self::$_mapDependencies[$module]) ? false : true;
     }
-
-    /**
-     * Add fake dependency to list
-     *
-     * @param $module
-     * @param $dependency
-     */
-    protected function _addFake($module, $dependency)
-    {
-        self::$_mapExceptions[$module][$dependency] = $dependency;
-    }
 }
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt
index eb19033d294a92f8d191978ed41f0e8393017d6a..ce2b62d4129dfe2c551900bdcdb56f4116925bbc 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/Library/_files/blacklist.txt
@@ -64,5 +64,5 @@ lib/Magento/App/Helper/Context.php
 lib/Magento/View/DesignLoader.php
 lib/Magento/Session/SidResolverInterface.php
 
-lib/Magento/Filesystem/DirectoryList/Configuration.php
+lib/Magento/App/Filesystem/DirectoryList/Configuration.php
 lib/Magento/Filesystem/Driver/Http.php
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/LayoutConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/LayoutConfigTest.php
deleted file mode 100644
index ac83d94ca9100e78af18fe3795ca6bc19eb9b53e..0000000000000000000000000000000000000000
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/LayoutConfigTest.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?php
-/**
- * Validates that all layouts with service_calls actually reference a valid service call
- *
- * 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\Test\Integrity\Magento\Core\Model\DataService;
-
-class LayoutConfigTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var array string[] $_serviceCalls Array of valid service calls available to layouts
-     */
-    protected static $_serviceCalls;
-
-    /**
-     * Gathers all valid service calls from config files
-     */
-    public static function setUpBeforeClass()
-    {
-        /**
-         * @var array string[] $configFiles
-         */
-        $configFiles = \Magento\TestFramework\Utility\Files::init()->getConfigFiles('service_calls.xml', array());
-        /**
-         * @var string $file
-         */
-        foreach ($configFiles as $file) {
-            /**
-             * @var \DOMDocument $dom
-             */
-            $dom = new \DOMDocument();
-            $dom->loadXML(file_get_contents($file[0]));
-
-            /**
-             * @var \DOMNodeList $serviceCalls
-             */
-            $serviceCalls = $dom->getElementsByTagName('service_calls');
-            $serviceCalls = $serviceCalls->item(0);
-            if ($serviceCalls != null && $serviceCalls->hasChildNodes()) {
-
-                /**
-                 * @var $serviceCall \DOMNode
-                 */
-                foreach ($serviceCalls->childNodes as $serviceCall) {
-                    if ($serviceCall->localName == 'service_call') {
-                        self::$_serviceCalls[] = $serviceCall->attributes->getNamedItem('name')->nodeValue;
-                    }
-                }
-            }
-        }
-    }
-
-    public function testXmlFiles()
-    {
-        $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this);
-        $invoker(
-            /**
-             * Given a layout file, test whether all of its service calls are valid
-             *
-             * @param $layoutFile
-             */
-            function ($layoutFile) {
-                $dom = new \DOMDocument();
-                $dom->loadXML(file_get_contents($layoutFile));
-                $dataList = $dom->getElementsByTagName('data');
-                /** @var \DOMNode $data */
-                foreach ($dataList as $data) {
-                    if ($data->hasAttributes()) {
-                        /** @var \DOMNode $serviceCallAttribute */
-                        $serviceCallAttribute = $data->attributes->getNamedItem('service_call');
-                        if ($serviceCallAttribute) {
-                            /** @var string $serviceCall */
-                            $serviceCall = $serviceCallAttribute->nodeValue;
-                            $this->assertContains(
-                                $serviceCall,
-                                self::$_serviceCalls,
-                                "Unknown service call: $serviceCall"
-                            );
-                        }
-                    }
-                }
-            },
-            \Magento\TestFramework\Utility\Files::init()->getLayoutFiles()
-        );
-    }
-}
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/SystemConfigTest.php b/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/SystemConfigTest.php
deleted file mode 100644
index f192bf53947f30921ad20408f656614e89094a1b..0000000000000000000000000000000000000000
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Core/Model/DataService/SystemConfigTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * Validates that all options with service_calls actually reference a valid service call
- *
- * 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\Test\Integrity\Magento\Core\Model\DataService;
-
-class SystemConfigTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var array string[] */
-    protected static $_serviceCalls = array();
-
-    public static function setUpBeforeClass()
-    {
-        $configFiles = \Magento\TestFramework\Utility\Files::init()->getConfigFiles('service_calls.xml', array());
-        foreach ($configFiles as $file) {
-            $dom = new \DOMDocument();
-            $dom->loadXML(file_get_contents($file[0]));
-            $serviceCalls = $dom->getElementsByTagName('service_calls');
-            $serviceCalls = $serviceCalls->item(0);
-            if ($serviceCalls->hasChildNodes()) {
-                foreach ($serviceCalls->childNodes as $serviceCall) {
-                    /** @var $serviceCall \DOMNode */
-                    if ($serviceCall->localName == 'service_call') {
-                        self::$_serviceCalls[] = $serviceCall->attributes->getNamedItem('name')->nodeValue;
-                    }
-                }
-            }
-        }
-    }
-
-    public function testXmlFiles()
-    {
-        $invoker = new \Magento\TestFramework\Utility\AggregateInvoker($this);
-        $invoker(
-            function ($configFile) {
-                $dom = new \DOMDocument();
-                $dom->loadXML(file_get_contents($configFile));
-                $this->assertNotNull($dom);
-                $optionsList = $dom->getElementsByTagName('options');
-                foreach ($optionsList as $options) {
-                    /** @var $options \DOMNode */
-                    if ($options->hasAttributes()) {
-                        $serviceCallAttribute = $options->attributes->getNamedItem('service_call');
-                        if (null != $serviceCallAttribute) {
-                            $serviceCall = $serviceCallAttribute->nodeValue;
-                            $this->assertTrue(
-                                in_array($serviceCall, self::$_serviceCalls), "Unknown service call: $serviceCall"
-                            );
-                        }
-                    }
-                }
-            },
-            \Magento\TestFramework\Utility\Files::init()->getConfigFiles('adminhtml/system.xml', array())
-        );
-    }
-}
diff --git a/dev/tests/static/framework/Magento/TestFramework/Dependency/_files/tables_ce.php b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/dependency_test/tables_ce.php
similarity index 99%
rename from dev/tests/static/framework/Magento/TestFramework/Dependency/_files/tables_ce.php
rename to dev/tests/static/testsuite/Magento/Test/Integrity/_files/dependency_test/tables_ce.php
index 9e442150901a795e5affd1d5ed44745977f5acc6..349012feacf08296da864c584e5a5907c765f82d 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Dependency/_files/tables_ce.php
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/dependency_test/tables_ce.php
@@ -241,7 +241,7 @@ return array (
     'oauth_consumer' => 'Magento_Integration',
     'oauth_nonce' => 'Magento_Integration',
     'oauth_token' => 'Magento_Integration',
-    'paygate_authorizenet_debug' => 'Magento_Paygate',
+    'authorizenet_debug' => 'Magento_Authorizenet',
     'paypal_cert' => 'Magento_Paypal',
     'paypal_payment_transaction' => 'Magento_Paypal',
     'paypal_settlement_report' => 'Magento_Paypal',
diff --git a/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt b/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt
index 0b919ec4ec732569496d5bcf66342b1a951b29de..3abb2660b655521f14a00690f05f8aae1698703d 100644
--- a/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/core.txt
@@ -10,7 +10,7 @@ app/code/Magento/Rule/view/adminhtml/rules.js
 app/code/Magento/Sales/view/adminhtml/order/create/giftmessage.js
 app/code/Magento/Sales/view/adminhtml/order/create/scripts.js
 app/code/Magento/Sales/view/adminhtml/order/giftoptions_tooltip.js
-app/code/Magento/Sales/view/adminhtml/order/shipment/packaging.js
+app/code/Magento/Shipping/view/adminhtml/order/packaging.js
 app/code/Magento/Theme/view/frontend/menu.js
 pub/lib/mage/adminhtml
 pub/lib/mage/backend/editablemultiselect.js
diff --git a/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt b/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt
index c7a5d925e00bf631001e419c07b3bd8600bd49ee..4010d4ff6edf6328b19d3b49ef60b21e7dcfcb63 100644
--- a/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/core.txt
@@ -9,8 +9,6 @@ app/code/Magento/Downloadable
 app/code/Magento/GiftMessage
 app/code/Magento/Install
 app/code/Magento/Newsletter
-app/code/Magento/PageCache
-app/code/Magento/Paygate
 app/code/Magento/Payment
 app/code/Magento/Paypal
 app/code/Magento/Persistent
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php
index 125bc8ed63833e22aaa0e66c3c8abd01f22fdb80..e3688f440cd6a0693b8b356d4ef0fb2118986a8a 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/LayoutTest.php
@@ -137,8 +137,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
                     $this->assertContains('::', $action->getAttribute('helper'));
                 }
 
-                if (false
-                    !== strpos($layoutFile, 'app/code/Magento/Sales/view/adminhtml/layout/sales_order')
+                if (false !== strpos($layoutFile, 'app/code/Magento/Sales/view/adminhtml/layout/sales_order')
+                    || false !== strpos($layoutFile, 'app/code/Magento/Shipping/view/adminhtml/layout/adminhtml_order')
                 ) {
                     $this->markTestIncomplete("The file {$layoutFile} has to use \\Magento\\Core\\Block\\Text\\List, \n"
                             . 'there is no solution to get rid of it right now.'
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
index b5aa7fa00be8a4ec6326f4dfc1f2d6283c350ab4..5005cea86c1b4e1b8b28cd53e4cd1eaad1a0ae26 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
@@ -324,7 +324,7 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase
             '/getOptions\(\)\s*->get(Base|App|Code|Design|Etc|Lib|Locale|Js|Media'
                 .'|Var|Tmp|Cache|Log|Session|Upload|Export)?Dir\(/S',
             $content,
-            'The class \Magento\Core\Model\Config\Options is obsolete. Replacement suggestion: \Magento\Filesystem'
+            'The class \Magento\Core\Model\Config\Options is obsolete. Replacement suggestion: \Magento\App\Filesystem'
         );
     }
 
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 0fce58d9963ecdbfd4cc8eefde048b29ae1b6105..8e548d12698edce0465b49eea235bfca179bdedf 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
@@ -117,6 +117,16 @@ return array(
     array('Mage_Adminhtml_Block_Report_Refresh_Statistics_Grid'),
     array('Mage_Adminhtml_Block_Report_Search_Grid'),
     array('Mage_Adminhtml_Block_Sales'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Form', 'Magento\Shipping\Block\Adminhtml\Create\Form'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Items', 'Magento\Shipping\Block\Adminhtml\Create\Items'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\View\Comments', 'Magento\Shipping\Block\Adminhtml\View\Comments'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\View\Form', 'Magento\Shipping\Block\Adminhtml\View\Form'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\View\Items', 'Magento\Shipping\Block\Adminhtml\View\Items'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Create', 'Magento\Shipping\Block\Adminhtml\Create'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\View', 'Magento\Shipping\Block\Adminhtml\View'),
+    array('Magento\Sales\Block\Order\Shipment\Items', 'Magento\Shipping\Block\Items'),
+    array('Magento\Sales\Controller\Adminhtml\Order\Shipment', 'Magento\Shipping\Controller\Adminhtml\Order\Shipment'),
+    array('Magento\Sales\Block\Order\Shipment', 'Magento\Shipping\Block\Order\Shipment'),
     array('Mage_Adminhtml_Block_Sales_Order_Create_Customer_Grid'),
     array('Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Giftmessage'),
     array('Mage_Adminhtml_Block_Sales_Order_Status_Grid'),
@@ -616,7 +626,7 @@ return array(
     array('Mage_Core_Controller_Magento_Router_Admin', 'Magento\Backend\App\Router\DefaultRouter'),
     array('Mage_Core_Model_Convert'),
     array('Mage_Core_Model_Config_Fieldset', 'Magento\Core\Model\Fieldset\Config'),
-    array('Mage_Core_Model_Config_Options', 'Magento\Filesystem'),
+    array('Mage_Core_Model_Config_Options', 'Magento\App\Filesystem'),
     array('Magento\App\Dir', 'Magento\Filesystem'),
     array('Magento\Filesystem\Adapter\Local', 'Magento\Filesystem\Driver\File'),
     array('Magento\Filesystem\Adapter\Zlib', 'Magento\Filesystem\Driver\Zlib'),
@@ -699,6 +709,18 @@ return array(
     array('Mage_Reports_Model_Test'),
     array('Mage_Rss_Model_Observer'),
     array('Mage_Rss_Model_Session', 'Magento_Backend_Model_Auth and \Magento\Backend\Model\Auth\Session'),
+    array('Magento\Sales\Block\Adminhtml\Order\Invoice\Create\Tracking',
+        '\Magento\Shipping\Block\Adminhtml\Order\Tracking'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Create\Tracking',
+        'Magento\Shipping\Block\Adminhtml\Order\Tracking'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging',
+        '\Magento\Shipping\Block\Adminhtml\Order\Packaging'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Packaging\Grid',
+        '\Magento\Shipping\Block\Adminhtml\Order\Packaging\Grid'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\Tracking\Info',
+        '\Magento\Shipping\Block\Adminhtml\Order\Tracking'),
+    array('Magento\Sales\Block\Adminhtml\Order\Shipment\View\Tracking',
+        'Magento\Shipping\Block\Adminhtml\Order\Tracking\View'),
     array('Mage_Sales_Block_Order_Details'),
     array('Mage_Sales_Block_Order_Tax'),
     array('Mage_Sales_Block_Guest_Links'),
@@ -1040,6 +1062,9 @@ return array(
     array('Magento\ImportExport\Model\Resource\Helper\Mysql4', 'Magento\ImportExport\Model\Resource\Helper'),
     array('Magento\Reports\Model\Resource\Helper\Mysql4', 'Magento\Reports\Model\Resource\Helper'),
     array('Magento\Backup\Model\Resource\Helper\Mysql4', 'Magento\Backup\Model\Resource\Helper'),
+    array('Magento\Sales\Model\CarrierFactory', 'Magento\Shipping\Model\CarrierFactory'),
+    array('Magento\Sales\Model\Order\Pdf\Shipment\Packaging', 'Magento\Shipping\Model\Order\Pdf\Packaging'),
+    array('Magento\Sales\Model\ResourceFactory'),
     array('Magento\Sales\Model\Resource\Helper\Mysql4', 'Magento\Sales\Model\Resource\Helper'),
     array('Magento\Core\Model\Resource\Helper\Mysql4', 'Magento\Core\Model\Resource\Helper'),
     array('Magento\Catalog\Model\Resource\Helper\Mysql4', 'Magento\Catalog\Model\Resource\Helper'),
@@ -1702,7 +1727,7 @@ return array(
     ),
     array(
         'Magento\App\Dir\Verification',
-        'Magento\Filesystem\DirectoryList\Verification'
+        'Magento\App\Filesystem\DirectoryList\Verification'
     ),
     array('Magento\Core\Model\Cookie', 'Magento\Stdlib\Cookie'),
     array('Magento\Core\Model\Logger', 'Magento\Logger'),
@@ -1778,4 +1803,59 @@ return array(
     array('Magento\Reminder\Model\Resource\HelperFactory'),
     array('Magento\Reminder\Model\Resource\Helper'),
     array('Magento\CatalogRule\Block\Adminhtml\Promo\Widget\Chooser'),
+    array(
+        'Magento\Catalog\Model\Product\Type\Grouped\Backend',
+        'Magento\GroupedProduct\Model\Product\Type\Grouped\Backend'
+    ),
+    array(
+        'Magento\Catalog\Model\Product\Type\Grouped\Price',
+        'Magento\GroupedProduct\Model\Product\Type\Grouped\Price'
+    ),
+    array(
+        'Magento\Catalog\Model\Resource\Product\Indexer\Price\Grouped',
+        'Magento\GroupedProduct\Model\Resource\Product\Indexer\Price\Grouped'
+    ),
+    array(
+        'Magento\Catalog\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection',
+        'Magento\GroupedProduct\Model\Resource\Product\Type\Grouped\AssociatedProductsCollection'
+    ),
+    array(
+        'Magento\Catalog\Model\Product\Type\Grouped',
+        'Magento\GroupedProduct\Model\Product\Type\Grouped'
+    ),
+    array(
+        'Magento\Catalog\Block\Adminhtml\Product\Composite\Fieldset\Grouped',
+        'Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped'
+    ),
+    array(
+        'Magento\Catalog\Block\Adminhtml\Product\Edit\Tabs\Grouped',
+    ),
+    array(
+        'Magento\Catalog\Block\Product\Grouped\AssociatedProducts',
+        'Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts',
+    ),
+    array(
+        'Magento\Catalog\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts',
+        'Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts'
+    ),
+    array(
+        'Magento\Catalog\Block\Product\View\Type\Grouped',
+        'Magento\GroupedProduct\Block\Product\View\Type\Grouped'
+    ),
+    ['CollFactory', 'CollectionFactory'], // no need to shorten anymore
+    ['Magento\Shipping\Model\Rate\Result\AbstractResult', 'Magento\Sales\Model\Quote\Address\RateResult\AbstractResult'],
+    ['Magento\Shipping\Model\Rate\Result\Error', 'Magento\Sales\Model\Quote\Address\RateResult\Error'],
+    ['Magento\Shipping\Model\Rate\Result\Method', 'Magento\Sales\Model\Quote\Address\RateResult\Method'],
+    [
+        'Magento\Shipping\Model\Rate\AbstractRate',
+        'Magento\Sales\Model\Quote\Address\Rate + Magento\Shipping\Model\CarrierFactory'
+    ],
+    ['Magento\Shipping\Model\Rate\Request', 'Magento\Sales\Model\Quote\Address\RateRequest'],
+    array('Magento\PageCache\Block\Adminhtml\Cache\Additional'),
+    array('Magento\PageCache\Controller\Adminhtml\PageCache'),
+    array('Magento\PageCache\Model\Control\ControlInterface'),
+    array('Magento\PageCache\Model\Control\Zend'),
+    array('Magento\PageCache\Model\System\Config\Source\Controls'),
+    array('Magento\PageCache\Model\CacheControlFactory'),
+    array('Magento\PageCache\Model\Observer'),
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php
index 783a3677b3bb50311ad87af0f2a5e8710287f544..620f02e6d0a08b6b03a7f3bc1f86436cc4cfce90 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_constants.php
@@ -192,9 +192,6 @@ return array(
     ),
     array('XML_PATH_INDEXER_DATA', 'Magento\Index\Model\Process'),
     array('XML_PATH_INSTALL_DATE', 'Mage_Core_Model_App', 'Mage_Core_Model_Config_Primary::XML_PATH_INSTALL_DATE'),
-    array('XML_PATH_EXTERNAL_CACHE_CONTROLS', 'Magento\PageCache\Helper\Data'),
-    array('XML_PATH_EXTERNAL_CACHE_CONTROLS', 'Magento\PageCache\Model\CacheControlFactory'),
-    array('XML_PATH_EXTERNAL_CACHE_CONTROL', 'Magento\PageCache\Helper\Data'),
     array('XML_PATH_LOCALE_INHERITANCE', 'Mage_Core_Model_Translate'),
     array('XML_PATH_PRODUCT_ATTRIBUTES', 'Magento\Wishlist\Model\Config'),
     array('XML_PATH_PRODUCT_COLLECTION_ATTRIBUTES', 'Magento\Catalog\Model\Config'),
@@ -210,6 +207,36 @@ return array(
         'Magento\Core\Helper\Data',
         'Magento_Core_Model_Design_Package::XML_PATH_STATIC_FILE_SIGNATURE'
     ),
+    array(
+        'XML_PATH_STORE_ADDRESS1',
+        'Magento\Shipping\Model\Shipping',
+        'Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ADDRESS1'
+    ),
+    array(
+        'XML_PATH_STORE_ADDRESS2',
+        'Magento\Shipping\Model\Shipping',
+        'Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ADDRESS2'
+    ),
+    array(
+        'XML_PATH_STORE_CITY',
+        'Magento\Shipping\Model\Shipping',
+        'Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_CITY'
+    ),
+    array(
+        'XML_PATH_STORE_REGION_ID',
+        'Magento\Shipping\Model\Shipping',
+        'Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_REGION_ID'
+    ),
+    array(
+        'XML_PATH_STORE_ZIP',
+        'Magento\Shipping\Model\Shipping',
+        'Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_ZIP'
+    ),
+    array(
+        'XML_PATH_STORE_COUNTRY_ID',
+        'Magento\Shipping\Model\Shipping',
+        'Magento\Sales\Model\Order\Shipment::XML_PATH_STORE_COUNTRY_ID'
+    ),
     array('XML_PATH_TEMPLATE_EMAIL', 'Magento\Core\Model\Email\Template'),
     array(
         'XML_PATH_TEMPLATE_FILTER',
@@ -512,5 +539,38 @@ return array(
     array('UPLOAD_ROOT', 'Magento\Backend\Model\Config\Backend\Logo'),
     array('UPLOAD_ROOT', 'Magento\Backend\Model\Config\Backend\Favicon'),
     array('DIRECTORY_SEPARATOR', 'Magento\Filesystem'),
-    array('PARAM_APP_URIS', 'Magento\Filesystem')
+    
+    array('MAX_QTY_VALUE', '\Magento\Catalog\Controller\Adminhtml\Product',
+        'Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter::MAX_QTY_VALUE'
+    ),
+    array('LINK_TYPE_GROUPED', '\Magento\Catalog\Model\Product\Link',
+        '\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED'
+    ),
+    array('TYPE_GROUPED', '\Magento\Catalog\Model\Product\Type',
+        '\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED'
+    ),
+
+    array('PARAM_APP_URIS', 'Magento\Filesystem'),
+
+    array('ROOT', '\Magento\Filesystem', '\Magento\App\Filesystem::ROOT_DIR'),
+    array('APP', '\Magento\Filesystem', '\Magento\App\Filesystem::APP_DIR'),
+    array('MODULES', '\Magento\Filesystem', '\Magento\App\Filesystem::MODULES_DIR'),
+    array('THEMES', '\Magento\Filesystem', '\Magento\App\Filesystem::THEMES_DIR'),
+    array('CONFIG', '\Magento\Filesystem', '\Magento\App\Filesystem::CONFIG_DIR'),
+    array('LIB', '\Magento\Filesystem', '\Magento\App\Filesystem::LIB_DIR'),
+    array('LOCALE', '\Magento\Filesystem', '\Magento\App\Filesystem::LOCALE_DIR'),
+    array('PUB', '\Magento\Filesystem', '\Magento\App\Filesystem::PUB_DIR'),
+    array('PUB_LIB', '\Magento\Filesystem', '\Magento\App\Filesystem::PUB_LIB_DIR'),
+    array('MEDIA', '\Magento\Filesystem', '\Magento\App\Filesystem::MEDIA_DIR'),
+    array('STATIC_VIEW', '\Magento\Filesystem', '\Magento\App\Filesystem::STATIC_VIEW_DIR'),
+    array('PUB_VIEW_CACHE', '\Magento\Filesystem', '\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR'),
+    array('VAR_DIR', '\Magento\Filesystem', '\Magento\App\Filesystem'),
+    array('TMP', '\Magento\Filesystem', '\Magento\App\Filesystem::TMP_DIR'),
+    array('CACHE', '\Magento\Filesystem', '\Magento\App\Filesystem::CACHE_DIR'),
+    array('LOG', '\Magento\Filesystem', '\Magento\App\Filesystem::LOG_DIR'),
+    array('SESSION', '\Magento\Filesystem', '\Magento\App\Filesystem::SESSION_DIR'),
+    array('DI', '\Magento\Filesystem', '\Magento\App\Filesystem::DI_DIR'),
+    array('GENERATION', '\Magento\Filesystem', '\Magento\App\Filesystem::GENERATION_DIR'),
+    array('UPLOAD', '\Magento\Filesystem', '\Magento\App\Filesystem::UPLOAD_DIR'),
+    array('SYS_TMP', '\Magento\Filesystem', '\Magento\App\Filesystem::SYS_TMP_DIR'),
 );
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 c1f0cb868f47c0a2602129f24cd3e8e1614127b4..a1b18f18361fa9d343fcc2647679116c47522569 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
@@ -73,9 +73,9 @@ return array(
     array('_getCacheKey', 'Magento\Catalog\Model\Layer\Filter\Price'),
     array('_getCacheLockId', 'Magento\Core\Model\Config'),
     array('_getCacheTags', 'Magento\Core\Model\App'),
+    array('_getCarrier', 'Magento\Shipping\Model\Config', 'Magento\Shipping\Model\CarrierFactory::create||get'),
     array('_getChildHtml'),
     array('_getConfig', 'Magento\Theme\Helper\Layout'),
-    array('_getCookie', 'Magento\PageCache\Helper\Data'),
     array('_getCollapseState', 'Magento\Backend\Block\System\Config\Form\Fieldset', '_isCollapseState'),
     array('_getCollectionNames', 'Magento\Backend\Controller\Report\Sales'),
     array('_getConnectionAdapterClassName', 'Magento\App\Resource'),
@@ -210,7 +210,7 @@ return array(
     array('addRegisterLink', 'Magento\Customer\Block\Account\Link'),
     array('addRenderer', 'Magento\Bundle\Block\Catalog\Product\View\Type\Bundle'),
     array('addReviewSummaryTemplate', 'Magento\Catalog\Block\Product\AbstractProduct'),
-    array('addRowItemRender', 'Magento\Checkout\Block\Multishipping\Overview'),
+    array('addRowItemRender', 'Magento\Multishipping\Block\Checkout\Overview'),
     array('addSaleableFilterToCollection'),
     array('addSearchQfFilter'),
     array('addTemplateData', 'Magento\Newsletter\Model\Queue'),
@@ -229,6 +229,8 @@ return array(
         '$collection->setVisibility(\Magento\Catalog\Model\Product\Visibility->getVisibleInSiteIds());'
     ),
     array('addWishListSortOrder', 'Magento\Wishlist\Model\Resource\Item\Collection'),
+    array('aggregateSalesReportShipmentData', '\Magento\Sales\Model\Observer',
+        '\Magento\Shipping\Model\Observer::aggregateSalesReportShipmentData'),
     array('appendBundleSelectionData', 'Magento\Bundle\Model\Observer'),
     array('applyAllDataUpdates', 'Magento\Core\Model\Resource\Setup'),
     array('applyAllUpdates', 'Magento\Core\Model\Resource\Setup'),
@@ -273,7 +275,7 @@ return array(
     ),
     array('cleanVarFolder', '', 'Magento_Io_File::rmdirRecursive()'),
     array('cleanVarSubFolders', '',
-        '\Magento\Filesystem::getDirectoryRead(\Magento\Filesystem::VAR_DIR)::search())'),
+        '\Magento\App\Filesystem::getDirectoryRead(\Magento\App\Filesystem::VAR_DIR)::search())'),
     array('cloneIndexTable', 'Magento\Index\Model\Resource\AbstractResource'),
     array('collectRoutes', 'Magento\Backend\App\Router\DefaultRouter'),
     array('collectRoutes', 'Magento\Core\App\Router\Base'),
@@ -331,7 +333,6 @@ return array(
     array('getButtonsHtml', 'Magento_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Search'),
     array('getCache', 'Magento\Core\Model\Config'),
     array('getCacheBetaTypes'),
-    array('getCacheControls', 'Magento\PageCache\Helper\Data', 'Magento\PageCache\Model\CacheControlFactory'),
     array('getChangeLocaleUrl', 'Magento\Backend\Block\Page\Footer'),
     array('getCheckoutMehod', 'Magento\Checkout\Model\Type\Onepage'),
     array('getChildGroup', '', 'Magento_Core_Block_AbstractBlock::getGroupChildNames()'),
@@ -400,6 +401,7 @@ return array(
     array('getIsEngineAvailable'),
     array('getIsGlobal', 'Magento\Eav\Model\Entity\Attribute\AbstractAttribute'),
     array('getIsInStock', 'Magento\Checkout\Block\Cart\Item\Renderer'),
+    array('getIsGrouped', 'Magento\Catalog\Block\Adminhtml\Product\Edit'),
     array('getItemRender', 'Magento\Checkout\Block\Cart\AbstractCart'),
     array('getItemRendererInfo', 'Magento\Checkout\Block\Cart\AbstractCart'),
     array('getKeyList', 'Magento\DB\Adapter\Pdo\Mysql'),
@@ -422,6 +424,8 @@ return array(
     array('getModuleConfigurationFiles', 'Magento\Core\Model\Config'),
     array('getModuleSetup', 'Magento\Core\Model\Config'),
     array('getNeedUsePriceExcludeTax', '', 'Magento_Tax_Model_Config::priceIncludesTax()'),
+    array('getNumberDetail', 'Magento\Sales\Model\Order\Shipment\Track',
+        'Magento\Shipping\Model\Order\Track::getNumberDetail()'),
     array('getOneBalanceTotal'),
     array('getOptimalCssUrls', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\View\Asset\Merged'),
     array('getOptimalJsUrls', 'Magento\Core\Model\Design\Package\Proxy', 'Magento\View\Asset\Merged'),
@@ -503,6 +507,7 @@ return array(
     array('getSecure', 'Magento\Core\Model\Url', 'isSecure'),
     array('getSelectionFinalPrice', 'Magento\Bundle\Model\Product\Price'),
     array('getShipId', 'Magento\Shipping\Block\Tracking\Popup'),
+    array('getShippingCarrier', 'Magento\Sales\Model\Order', 'Magento\Shipping\Model\CarrierFactory::create'),
     array('getShowTemplateHints', 'Magento\View\Element\Template'),
     array('getSortedChildBlocks', '', 'getChildNames() + $this->getLayout()->getBlock($name)'),
     array('getSortedChildren', '', 'getChildNames'),
@@ -589,7 +594,7 @@ return array(
     array('isAdmin', 'Magento\Core\Model\Store'),
     array('isAllowedGuestCheckout', 'Magento\Sales\Model\Quote'),
     array('isAutomaticCleaningAvailable', 'Magento\Cache\Backend\Eaccelerator'),
-    array('isCheckoutAvailable', 'Magento\Checkout\Model\Type\Multishipping'),
+    array('isCheckoutAvailable', 'Magento\Multishipping\Model\Checkout\Type\Multishipping'),
     array('isDirectOutput', 'Magento\Core\Model\Layout'),
     array('isDirectOutput', 'Magento\View\LayoutInterface'),
     array('isFulAmountCovered'),
@@ -745,6 +750,7 @@ return array(
     array('validateDataArray', 'Magento\Convert\Container\AbstractContainer'),
     array('validateFile', 'Magento\Core\Model\Design\Package'),
     array('validateOrder', 'Magento\Checkout\Model\Type\Onepage'),
+    array('viewTrackAction', 'Magento\Sales\Controller\Adminhtml\Order\Shipment'),
     array('_prepareOptionValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
     array('_getOptionValuesCollection', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
     array(' _prepareSystemAttributeOptionValues', 'Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\AbstractOptions'),
@@ -829,6 +835,8 @@ return array(
     array('prepareColumn', 'Magento\Eav\Model\Resource\Helper'),
     array('getInsertFromSelectUsingAnalytic', 'Magento\Eav\Model\Resource\Helper'),
     array('setOneRowLimit', 'Magento\Eav\Model\Resource\Helper'),
+    array('getCarrierByCode', 'Magento\Shipping\Model\Config', 'Magento\Shipping\Model\CarrierFactory::create||get'),
+    array('getCarrierInstance', 'Magento\Shipping\Model\Config', 'Magento\Shipping\Model\CarrierFactory::create||get'),
     array('getCastToIntExpression', 'Magento\Eav\Model\Resource\Helper'),
     array('_initMetaTags', 'Magento\Theme\Block\Html\Head'),
     array('addMetaTag', 'Magento\Theme\Block\Html\Head'),
@@ -1122,4 +1130,63 @@ return array(
     array('getDisplayMode', '\Magento\Catalog\Model\Session'),
     array('setEscapeMessageFlag', 'Magento\View\Block\Messages'),
     array('shouldEscapeMessage', 'Magento\View\Block\Messages'),
+    array('isPathInDirectory', 'Magento\Filesystem\Directory\ReadInterface'),
+    array('isSuper', '\Magento\Catalog\Model\Product'),
+    array('isSuperGroup', '\Magento\Catalog\Model\Product'),
+    array('isGrouped', '\Magento\Catalog\Model\Product'),
+    array('isSuperConfig', '\Magento\Catalog\Model\Product'),
+    array('getGroupedLinkCollection', '\Magento\Catalog\Model\Product'),
+    array('duplicate', '\Magento\Catalog\Model\Product', '\Magento\Catalog\Model\Product\Copier::copy'),
+    array('useGroupedLinks', '\Magento\Catalog\Model\Product\Link'),
+    array('saveGroupedLinks', '\Magento\Catalog\Model\Product\Link'),
+    array(
+        '_initProductSave', '\Magento\Catalog\Controller\Adminhtml\Product',
+        '\Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper::initialize'
+    ),
+    array('superGroupAction', '\Magento\Catalog\Controller\Adminhtml\Product'),
+    array('superGroupPopupAction', '\Magento\Catalog\Controller\Adminhtml\Product',
+        '\Magento\GroupedProduct\Controller\Adminhtml\Edit::popupAction'
+    ),
+    array(
+        'prepareProductSave', '\Magento\Bundle\Model\Observer',
+        '\Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle::afterInitialize'
+    ),
+    array('duplicateProduct', 'Magento\Bundle\Model\Observer',
+        'Magento\Bundle\Model\Product\CopyConstructor\Bundle::build'
+    ),
+    array(
+        'prepareProductSave', '\Magento\Downloadable\Model\Observer',
+        '\Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Downloadable::afterInitialize'
+    ),
+    array(
+        'duplicateProduct', '\Magento\Downloadable\Model\Observer',
+        '\Magento\Downloadable\Model\Product\CopyConstructor\Downloadable::build'
+    ),
+    array(
+        'catalogProductPrepareSave', '\Magento\PricePermissions\Model\Observer',
+        '\Magento\PricePermissions\Controller\Adminhtml\Product\Initialization\Helper\Plugin\PricePermissions::'
+            . 'afterInitialize'
+    ),
+    array(
+        'getGroupedOptions', '\Magento\Catalog\Helper\Product\Configuration',
+        '\Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions',
+    ),
+    array('copyInventoryData', 'Magento\CatalogInventory\Model\Observer',
+        '\Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory::build'
+    ),
+    ['getTrackingAjaxUrl', 'Magento\Shipping\Helper\Data'],
+    ['isFreeMethod', 'Magento\Shipping\Helper\Data'],
+    ['_initOrder', 'Magento\Shipping\Controller\Tracking'],
+    ['ajaxAction', 'Magento\Shipping\Controller\Tracking'],
+    ['_getTracksCollection', 'Magento\Shipping\Controller\Tracking'],
+    array('getAddToWishlistUrl', 'Magento\Catalog\Block\Product\AbstractProduct'),
+    array('getAddToWishlistUrl', 'Magento\Catalog\Helper\Product\Compare'),
+    array('getAddToWishlistUrl', 'Magento\Wishlist\Block\AbstractBlock'),
+    array('getAddUrlWithParams', 'Magento\Wishlist\Helper\Data'),
+    array('getMoveFromCartUrl', 'Magento\Wishlist\Helper\Data'),
+    array('getAddUrl', 'Magento\Wishlist\Helper\Data'),
+    array('getRemoveUrl', 'Magento\Wishlist\Helper\Data'),
+    array('getUpdateUrl', 'Magento\Wishlist\Helper\Data'),
+    array('getItemRemoveUrl', 'Magento\Wishlist\Block\AbstractBlock'),
+    array('_getUrlParams', 'Magento\Catalog\Helper\Product\Compare'),
 );
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php
index 037f90f4ad2f78a854f556443b61a9bda39d692c..bbdd9b45e7692daeb05142d161b1f709d2199e25 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php
@@ -73,7 +73,7 @@ return array(
     array('_moduleReader', 'Magento\Backend\Model\Menu\Config'),
     array('_option', 'Magento\Captcha\Helper\Data', '_dirs'),
     array('_options', 'Magento\Core\Model\Config', 'Magento\Filesystem'),
-    array('_optionsMapping', null, '\Magento\Filesystem::getPath($nodeKey)'),
+    array('_optionsMapping', null, '\Magento\App\Filesystem::getPath($nodeKey)'),
     array('_order', 'Magento\Checkout\Block\Onepage\Success'),
     array('_order_id'),
     array('_parent', 'Magento\Core\Block\AbstractBlock'),
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt
index b36ee6c2cb77bdf529ececd71820c6e7fb97b501..5d72f476bdc778ce1a809bbd392961e85d7c3d6b 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/blacklist/common.txt
@@ -14,6 +14,7 @@ app/code/Magento/Integration/view
 app/code/Magento/Theme/view
 app/code/Magento/User/view
 app/code/Magento/Webapi/view
+app/code/Magento/GroupedProduct/view
 dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php
 dev/tests/integration/framework/Magento/TestFramework/Db/Adapter/Mysql.php
 dev/tests/integration/framework/Magento/TestFramework/Db/ConnectionAdapter.php
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
index c0726a3247d5fc48f27d086667365198300136d0..f7aabbe67971c161b3f31a2075261966bd275a3c 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
@@ -16,7 +16,6 @@ lib/Magento/DB
 sql
 data
 Magento/Paypal
-Magento/Paygate
 Magento/Downloadable
 Magento/Core/Model/Resource/Helper
 Magento/Catalog/Block/Adminhtml
@@ -74,7 +73,8 @@ Magento/Reports/Model/Resource
 Magento/Review/Block
 Magento/Rss/Block/Catalog
 Magento/Rule
-Magento/Sales/Block/Adminhtml
+Magento/Sales/Block/Adminhtml/Order
+Magento/Shipping/Block/Adminhtml/View
 Magento/Sales/Model/Resource
 Magento/Sales/Model/Quote/Address/Total
 Magento/Sales/Model/Resource/Report/Order
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
index 1f9af53272746af19b78a92aaba65993f4e6750f..a6edf3e83f09e2c4cd0c2b90ba0313e4b3ebeac3 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
@@ -16,7 +16,6 @@ app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Category.php
 app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Weight.php
 app/code/Magento/Catalog/Block/Adminhtml/Product/Options/Ajax.php
 app/code/Magento/Catalog/Block/Product/Configurable
-app/code/Magento/Catalog/Block/Product/Grouped
 app/code/Magento/Catalog/Block/Product/TemplateSelector.php
 app/code/Magento/Catalog/Block/Product/View/BaseImage.php
 app/code/Magento/Catalog/Block/Product/View/Gallery.php
@@ -39,7 +38,6 @@ app/code/Magento/Cms/Controller/Router.php
 app/code/Magento/Cms/Model/Template/FilterProvider.php
 app/code/Magento/Core/data
 app/code/Magento/Core/Model/Config
-app/code/Magento/Core/Model/DataService
 app/code/Magento/Core/Model/Design.php
 app/code/Magento/Core/Model/Layout/Factory.php
 app/code/Magento/Core/Model/Layout/Update.php
@@ -97,7 +95,6 @@ app/code/Magento/Log/Model/Resource/Shell.php
 app/code/Magento/Log/Model/Shell.php
 app/code/Magento/Log/Model/Shell
 app/code/Magento/Theme/Block/Html/Head
-app/code/Magento/PageCache/Model/CacheControlFactory.php
 app/code/Magento/ProductAlert/Block/Product/View
 app/code/Magento/Reports/Block/Adminhtml/Customer
 app/code/Magento/Reports/Block/Adminhtml/Product
@@ -116,9 +113,16 @@ app/code/Magento/Sales/Model/Order/Pdf/Config
 app/code/Magento/Sales/Model/Order/Pdf/Config.php
 app/code/Magento/Sales/Model/Order/Pdf/Total/Factory.php
 app/code/Magento/Sales/Model/Observer
+app/code/Magento/Sales/Model/Quote/Address/*Interface.php
 app/code/Magento/SalesRule/Model/Plugin
+app/code/Magento/Shipping/Block/Adminhtml/Order/Tracking/Invoice.php
+app/code/Magento/Shipping/Model/Observer.php
+app/code/Magento/Shipping/Model/Order/Track.php
+app/code/Magento/Shipping/Model/CarrierFactory.php
+app/code/Magento/Shipping/Model/Resource/Order
 app/code/Magento/Theme
 app/code/Magento/Webapi
+app/code/Magento/GroupedProduct
 app/code/Magento/Wishlist/Block/Link.php
 dev/shell
 dev/tests/integration
diff --git a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
index bdd3dcad3f9e35f4afbe9eb2912b6cc341f120c5..49e9c21de1e4bc33ba1ee5819706a5899f0d4187 100644
--- a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
+++ b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
@@ -107,7 +107,7 @@ class Adminhtml extends \PHPUnit_Framework_TestCase
         $this->_eventManagerMock    = $this->_makeMock('Magento\Event\ManagerInterface');
         $this->_controllerMock      = $this->_makeMock('Magento\App\FrontController');
         $this->_loggerMock          = $this->_makeMock('Magento\Logger');
-        $this->_filesystemMock      = $this->_makeMock('Magento\Filesystem');
+        $this->_filesystemMock      = $this->_makeMock('Magento\App\Filesystem');
         $this->_cacheMock           = $this->_makeMock('Magento\App\CacheInterface');
         $this->_storeConfigMock     = $this->_makeMock('Magento\Core\Model\Store\Config');
         $this->_storeManagerMock    = $this->_makeMock('Magento\Core\Model\StoreManager');
diff --git a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php
index 8647fe25ac4746a92c59d58b4dd8c2cccc1a74e7..d91524f51c46246ccdf0cbcd02d06b0306d3e5c5 100644
--- a/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php
+++ b/dev/tests/unit/framework/Magento/TestFramework/Helper/ObjectManager.php
@@ -219,4 +219,25 @@ class ObjectManager
         }
         return $constructArguments;
     }
+
+    /**
+     * Get collection mock
+     *
+     * @param string $className
+     * @param array $data
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     * @throws \InvalidArgumentException
+     */
+    public function getCollectionMock($className, array $data)
+    {
+        if (!is_subclass_of($className, '\Magento\Data\Collection')) {
+            throw new \InvalidArgumentException($className . ' does not instance of \Magento\Data\Collection');
+        }
+        $mock = $this->_testObject->getMock($className, array(), array(), '', false, false);
+        $iterator = new \ArrayIterator($data);
+        $mock->expects($this->_testObject->any())
+            ->method('getIterator')
+            ->will($this->_testObject->returnValue($iterator));
+        return $mock;
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/Cache/Frontend/FactoryTest.php b/dev/tests/unit/testsuite/Magento/App/Cache/Frontend/FactoryTest.php
index a6928c983fda685f9b9e1c0341cb9c7dfdfeb05e..86be6faaa071ac6fbfd53b8e8f58643ab781cac6 100644
--- a/dev/tests/unit/testsuite/Magento/App/Cache/Frontend/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Cache/Frontend/FactoryTest.php
@@ -174,11 +174,11 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnCallback($processFrontendFunc));
 
         $map = array(
-            array(\Magento\Filesystem::CACHE, 'CACHE_DIR'),
-            array(\Magento\Filesystem::CONFIG, 'CONFIG_DIR'),
+            array(\Magento\App\Filesystem::CACHE_DIR, 'CACHE_DIR'),
+            array(\Magento\App\Filesystem::CONFIG_DIR, 'CONFIG_DIR'),
         );
 
-        $filesystem = $this->getMock('Magento\Filesystem', array('getPath'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getPath'), array(), '', false);
 
         $filesystem->expects($this->any())
             ->method('getPath')
diff --git a/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php
index 1f005a294c0a32a504252bbd3a691141f5b4be4a..6bc14536aefd53ec9e56a2c5c497d020b607bda0 100644
--- a/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Config/FileResolver/PrimaryTest.php
@@ -34,14 +34,14 @@ class PrimaryTest extends \PHPUnit_Framework_TestCase
     public function testGet(array $fileList, $scope, $filename)
     {
         $directory = $this->getMock('Magento\Filesystem\Directory\Read', array('search'), array(), '', false);
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryRead'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryRead'), array(), '', false);
         $iteratorFactory = $this->getMock(
             'Magento\Config\FileIteratorFactory', array('create'), array(), '', false
         );
 
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::CONFIG)
+            ->with(\Magento\App\Filesystem::CONFIG_DIR)
             ->will($this->returnValue($directory));
 
         $directory->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php b/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php
index 43dacaf62de69f1067ca4903786bc9cf9474b790..19ca14435fe4d584e651970b20162dcb429ac106 100644
--- a/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Config/LoaderTest.php
@@ -33,13 +33,13 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Filesystem\DirectoryList | \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem\DirectoryList | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $_dirs;
 
     public function setUp()
     {
-        $this->_dirs = $this->getMock('\Magento\Filesystem\DirectoryList', array('getDir'), array(), '', false);
+        $this->_dirs = $this->getMock('\Magento\App\Filesystem\DirectoryList', array('getDir'), array(), '', false);
     }
 
     public function testWithOneXmlFile()
diff --git a/dev/tests/unit/testsuite/Magento/App/Console/ResponseTest.php b/dev/tests/unit/testsuite/Magento/App/Console/ResponseTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..496392b5fd6efb04fc5e48fdd185fdc2bc56abca
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/Console/ResponseTest.php
@@ -0,0 +1,68 @@
+<?php
+/**
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Console;
+
+class ResponseTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\App\Console\Response
+     */
+    protected $model;
+
+    public function setUp()
+    {
+        $this->model = new \Magento\App\Console\Response();
+    }
+
+    public function testSendResponseDefaultBehaviour()
+    {
+        $this->model->terminateOnSend(false);
+        $this->assertEquals(0, $this->model->sendResponse());
+    }
+
+    /**
+     * @dataProvider setCodeProvider
+     */
+    public function testSetCode($code, $expectedCode)
+    {
+        $this->model->terminateOnSend(false);
+        $this->model->setCode($code);
+        $result = $this->model->sendResponse();
+        $this->assertEquals($expectedCode, $result);
+    }
+
+    public static function setCodeProvider()
+    {
+        $largeCode = 256;
+        $lowCode = 1;
+        $lowestCode = -255;
+        return array(
+            array($largeCode, 255),
+            array($lowCode, $lowCode),
+            array($lowestCode, $lowestCode),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/CronTest.php b/dev/tests/unit/testsuite/Magento/App/CronTest.php
index 41c49383eb3dde4f6ed76eafdd176e125085f4ba..c08e2d4fdf7a9bbd5e24549cb63f7a8c3bac7c6b 100644
--- a/dev/tests/unit/testsuite/Magento/App/CronTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/CronTest.php
@@ -45,13 +45,20 @@ class CronTest extends \PHPUnit_Framework_TestCase
      */
     protected $_stateMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_responseMock;
+
     protected function setUp()
     {
         $this->_eventManagerMock = $this->getMock('Magento\Event\ManagerInterface');
         $this->_stateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
+        $this->_responseMock = $this->getMock('Magento\App\Console\Response', array(), array(), '', false);
         $this->_model = new Cron(
             $this->_eventManagerMock,
-            $this->_stateMock
+            $this->_stateMock,
+            $this->_responseMock
         );
     }
 
@@ -59,6 +66,7 @@ class CronTest extends \PHPUnit_Framework_TestCase
     {
         $this->_stateMock->expects($this->once())->method('setAreaCode')->with('crontab');
         $this->_eventManagerMock->expects($this->once())->method('dispatch')->with('default');
-        $this->assertEquals(0, $this->_model->execute());
+        $this->_responseMock->expects($this->once())->method('setCode')->with(0);
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php b/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php
index 159c04b6fa6dc8306de96ad22c2de66dac435a51..e0ca6964362e2f2ff120edbf5c1632e689b3b142 100644
--- a/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/EntryPoint/EntryPointTest.php
@@ -35,6 +35,11 @@ class EntryPointTest extends  \PHPUnit_Framework_TestCase
      */
     protected $_objectManagerMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_responseMock;
+
     /**
      * @var string
      */
@@ -51,6 +56,7 @@ class EntryPointTest extends  \PHPUnit_Framework_TestCase
             'MAGE_MODE' => 'developer',
         );
         $this->_objectManagerMock = $this->getMock('Magento\ObjectManager');
+        $this->_responseMock = $this->getMock('Magento\App\Response\Http', array(), array(), '', false);
         $this->_rootDir = realpath(__DIR__ . '/../../../../../../../');
         $this->_model = new \Magento\App\EntryPoint\EntryPoint(
             $this->_rootDir,
@@ -63,11 +69,10 @@ class EntryPointTest extends  \PHPUnit_Framework_TestCase
     {
         $applicationName = '\Magento\App\TestApplication';
         $applicationMock = $this->getMock('\Magento\AppInterface');
-        $applicationMock->expects($this->once())->method('execute')->will($this->returnValue(0));
+        $applicationMock->expects($this->once())->method('execute')->will($this->returnValue($this->_responseMock));
         $this->_objectManagerMock->expects($this->once())->method('create')->with($applicationName, array())
             ->will($this->returnValue($applicationMock));
-
-        $this->assertEquals(0, $this->_model->run($applicationName));
+        $this->assertNull($this->_model->run($applicationName));
     }
 
     public function testRunCatchesExceptionThrownByApplication()
@@ -81,9 +86,6 @@ class EntryPointTest extends  \PHPUnit_Framework_TestCase
             ->method('create')
             ->with($applicationName, array())
             ->will($this->returnValue($applicationMock));
-        // clean output
-        ob_start();
-        $this->assertEquals(1, $this->_model->run($applicationName));
-        ob_end_clean();
+        $this->assertNull($this->_model->run($applicationName));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php b/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php
index fe63f5409343551453fccdedc7d34a4522dbceb5..2ab60a00d83439b7161fec8a6d4b3bcee182aa5b 100644
--- a/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Error/HandlerTest.php
@@ -37,7 +37,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
     /**
      * Filesystem mock
      *
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -58,7 +58,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->logger = $this->getMock('Magento\Logger', array(), array(), '', false);
-        $this->filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->appState = $this->getMock('Magento\App\State', array(), array(), '', false);
         $this->handler = new \Magento\App\Error\Handler($this->logger, $this->filesystem, $this->appState);
     }
@@ -93,7 +93,7 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(\Magento\App\State::MODE_DEFAULT));
         $this->filesystem->expects($this->atLeastOnce())
             ->method('getPath')
-            ->with(\Magento\Filesystem::PUB)
+            ->with(\Magento\App\Filesystem::PUB_DIR)
             ->will($this->returnValue(dirname(__DIR__) . '/../_files'));
 
         $exception = new \Exception('TestMessage');
diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryList/VerificationTest.php b/dev/tests/unit/testsuite/Magento/App/Filesystem/DirectoryList/VerificationTest.php
similarity index 66%
rename from dev/tests/unit/testsuite/Magento/Filesystem/DirectoryList/VerificationTest.php
rename to dev/tests/unit/testsuite/Magento/App/Filesystem/DirectoryList/VerificationTest.php
index f575216f10de3c78fd29c83b667b62aa00fac3ec..951dd109ae918097416344fbf9ca7c282296e1cc 100644
--- a/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryList/VerificationTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Filesystem/DirectoryList/VerificationTest.php
@@ -22,7 +22,7 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Filesystem\DirectoryList;
+namespace Magento\App\Filesystem\DirectoryList;
 
 use Magento\App\State;
 
@@ -52,36 +52,25 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
             'developer mode' => array(
                 State::MODE_DEVELOPER,
                 array(
-                    \Magento\Filesystem::MEDIA => array(true, true, 'base_dir/pub/media'),
-                    \Magento\Filesystem::STATIC_VIEW => array(true, true, 'base_dir/pub/static'),
-                    \Magento\Filesystem::VAR_DIR => array(true, true, 'base_dir/var'),
-                    \Magento\Filesystem::TMP => array(true, true, 'base_dir/var/tmp'),
-                    \Magento\Filesystem::CACHE => array(true, true, 'base_dir/var/cache'),
-                    \Magento\Filesystem::LOG => array(true, true, 'base_dir/var/log'),
-                    \Magento\Filesystem::SESSION => array(true, true, 'base_dir/var/session')
+                    \Magento\App\Filesystem::CACHE_DIR => array(true, true, 'base_dir/var/cache'),
+                    \Magento\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
+                    \Magento\App\Filesystem::SESSION_DIR => array(true, true, 'base_dir/var/session')
                 ),
             ),
             'with_not_existing_dirs' => array(
                 State::MODE_DEFAULT,
                 array(
-                    \Magento\Filesystem::MEDIA => array(false, true, 'base_dir/pub/media'),
-                    \Magento\Filesystem::STATIC_VIEW => array(true, true, 'base_dir/pub/static'),
-                    \Magento\Filesystem::VAR_DIR => array(false, true, 'base_dir/var'),
-                    \Magento\Filesystem::TMP => array(true, true, 'base_dir/var/tmp'),
-                    \Magento\Filesystem::CACHE => array(false, true, 'base_dir/var/cache'),
-                    \Magento\Filesystem::LOG => array(true, true, 'base_dir/var/log'),
-                    \Magento\Filesystem::SESSION => array(false, true, 'base_dir/var/session')
+                    \Magento\App\Filesystem::CACHE_DIR => array(false, true, 'base_dir/var/cache'),
+                    \Magento\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
+                    \Magento\App\Filesystem::SESSION_DIR => array(false, true, 'base_dir/var/session')
                 ),
             ),
             'production mode' => array(
                 State::MODE_PRODUCTION,
                 array(
-                    \Magento\Filesystem::MEDIA => array(true, true, 'base_dir/pub/media'),
-                    \Magento\Filesystem::VAR_DIR => array(true, true, 'base_dir/var'),
-                    \Magento\Filesystem::TMP => array(true, true, 'base_dir/var/tmp'),
-                    \Magento\Filesystem::CACHE => array(true, true, 'base_dir/var/cache'),
-                    \Magento\Filesystem::LOG => array(true, true, 'base_dir/var/log'),
-                    \Magento\Filesystem::SESSION => array(true, true, 'base_dir/var/session')
+                    \Magento\App\Filesystem::CACHE_DIR => array(true, true, 'base_dir/var/cache'),
+                    \Magento\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
+                    \Magento\App\Filesystem::SESSION_DIR => array(true, true, 'base_dir/var/session')
                 ),
             ),
         );
@@ -112,13 +101,9 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
             'developer mode' => array(
                 State::MODE_DEVELOPER,
                 array(
-                    \Magento\Filesystem::MEDIA => array(true, false, 'base_dir/pub/media'),
-                    \Magento\Filesystem::STATIC_VIEW => array(true, true, 'base_dir/pub/static'),
-                    \Magento\Filesystem::VAR_DIR => array(true, false, 'base_dir/var'),
-                    \Magento\Filesystem::TMP => array(true, true, 'base_dir/var/tmp'),
-                    \Magento\Filesystem::CACHE => array(true, false, 'base_dir/var/cache'),
-                    \Magento\Filesystem::LOG => array(true, true, 'base_dir/var/log'),
-                    \Magento\Filesystem::SESSION => array(true, false, 'base_dir/var/session')
+                    \Magento\App\Filesystem::CACHE_DIR => array(true, false, 'base_dir/var/cache'),
+                    \Magento\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
+                    \Magento\App\Filesystem::SESSION_DIR => array(true, false, 'base_dir/var/session')
                 ),
             )
         );
@@ -149,13 +134,9 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
             'developer mode' => array(
                 State::MODE_DEVELOPER,
                 array(
-                    \Magento\Filesystem::MEDIA => array(true, false, 'base_dir/pub/media', true),
-                    \Magento\Filesystem::STATIC_VIEW => array(true, true, 'base_dir/pub/static'),
-                    \Magento\Filesystem::VAR_DIR => array(true, false, 'base_dir/var'),
-                    \Magento\Filesystem::TMP => array(true, true, 'base_dir/var/tmp', true),
-                    \Magento\Filesystem::CACHE => array(true, false, 'base_dir/var/cache'),
-                    \Magento\Filesystem::LOG => array(true, true, 'base_dir/var/log'),
-                    \Magento\Filesystem::SESSION => array(true, false, 'base_dir/var/session', true)
+                    \Magento\App\Filesystem::CACHE_DIR => array(true, false, 'base_dir/var/cache'),
+                    \Magento\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
+                    \Magento\App\Filesystem::SESSION_DIR => array(true, false, 'base_dir/var/session', true)
                 ),
             )
         );
@@ -186,7 +167,13 @@ class VerificationTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFilesystemMock(array $dirsToVerify)
     {
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryWrite', '__wakeup'), array(), '', false);
+        $filesystem = $this->getMock(
+            'Magento\App\Filesystem',
+            array('getDirectoryWrite', '__wakeup'),
+            array(),
+            '',
+            false
+        );
         $valueMap = array();
         foreach ($dirsToVerify as $code => $config) {
             $createException = isset($config[3]) ? $config[3] : false;
diff --git a/dev/tests/unit/testsuite/Magento/App/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/App/FilesystemTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d4c4c67333dbcb3608b033f985d60c81b121abdd
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/App/FilesystemTest.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\App;
+
+class FilesystemTest extends \PHPUnit_Framework_TestCase
+{
+    /** @var Filesystem */
+    protected $_filesystem;
+
+    /** @var \Magento\Filesystem\Directory\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */
+    protected $_dirReadFactoryMock;
+
+    /** @var \Magento\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */
+    protected $_dirWriteFactoryMock;
+
+    /** @var \Magento\App\Filesystem\DirectoryList|\PHPUnit_Framework_MockObject_MockObject  */
+    protected $_directoryListMock;
+
+    /** @var \Magento\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject  */
+    protected $_fileReadFactoryMock;
+
+    public function setUp()
+    {
+        $this->_dirReadFactoryMock = $this->getMock('Magento\Filesystem\Directory\ReadFactory', [], [], '', false);
+        $this->_directoryListMock = $this->getMock('Magento\App\Filesystem\DirectoryList', [], [], '', false);
+        $this->_dirWriteFactoryMock = $this->getMock('Magento\Filesystem\Directory\WriteFactory', [], [], '', false);
+        $this->_fileReadFactoryMock = $this->getMock('Magento\Filesystem\File\ReadFactory', [], [], '', false);
+
+        $this->_filesystem = new Filesystem(
+            $this->_directoryListMock,
+            $this->_dirReadFactoryMock,
+            $this->_dirWriteFactoryMock,
+            $this->_fileReadFactoryMock
+        );
+    }
+
+    public function testGetPath()
+    {
+        $this->_setupDirectoryListMock(['path' => '\\some\\path']);
+        $this->assertEquals('/some/path', $this->_filesystem->getPath(Filesystem::ROOT_DIR));
+    }
+
+    protected function _setupDirectoryListMock(array $config)
+    {
+        $this->_directoryListMock
+            ->expects($this->any())
+            ->method('getConfig')
+            ->will($this->returnValue($config));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php b/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php
index f947592d33f4b93d2fa57b9518d539698971c226..bfccbc5fc7d30d1547683ac97862f370f2fcadda 100644
--- a/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/App/Response/Http/FileFactoryTest.php
@@ -48,7 +48,7 @@ class FileFactoryTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_fileSystemMock = $this->getMock(
-            'Magento\Filesystem', array('getDirectoryWrite'), array(), '', false
+            'Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false
         );
         $this->_dirMock = $this->getMockBuilder('\Magento\Filesystem\Directory\Write')
             ->disableOriginalConstructor()
diff --git a/dev/tests/unit/testsuite/Magento/Authorizenet/Helper/BackendTest.php b/dev/tests/unit/testsuite/Magento/Authorizenet/Helper/BackendTest.php
index 52a743518cf7e3044522c99f75c292b24a40e6a3..73e163bacc6965540dfe7f2f7f3d0ed7b6fe5843 100644
--- a/dev/tests/unit/testsuite/Magento/Authorizenet/Helper/BackendTest.php
+++ b/dev/tests/unit/testsuite/Magento/Authorizenet/Helper/BackendTest.php
@@ -61,7 +61,7 @@ class BackendTest extends \PHPUnit_Framework_TestCase
     {
         $this->_urlBuilder->expects($this->once())
             ->method('getUrl')
-            ->with($this->equalTo('*/authorizenet_directpost_payment/place'), $this->equalTo(array()))
+            ->with($this->equalTo('adminhtml/authorizenet_directpost_payment/place'), $this->equalTo(array()))
             ->will($this->returnValue('some value'));
         $this->assertEquals('some value', $this->_model->getPlaceOrderAdminUrl());
     }
diff --git a/dev/tests/unit/testsuite/Magento/Paygate/Model/Authorizenet/CardsTest.php b/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php
similarity index 94%
rename from dev/tests/unit/testsuite/Magento/Paygate/Model/Authorizenet/CardsTest.php
rename to dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php
index 3c23774f8ac1e53fd8a7bb0358db5303e85947f2..42697d1c1b69054344939d2e574d2381754f0244 100644
--- a/dev/tests/unit/testsuite/Magento/Paygate/Model/Authorizenet/CardsTest.php
+++ b/dev/tests/unit/testsuite/Magento/Authorizenet/Model/Authorizenet/CardsTest.php
@@ -19,25 +19,25 @@
  * needs please refer to http://www.magentocommerce.com for more information.
  *
  * @category    Magento
- * @package     Magento_Paygate
+ * @package     Magento_Authorizenet
  * @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\Paygate\Model\Authorizenet;
+namespace Magento\Authorizenet\Model\Authorizenet;
 
 class CardsTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Paygate\Model\Authorizenet\Card
+     * @var \Magento\Authorizenet\Model\Authorizenet\Card
      */
     protected $_object;
 
     protected function setUp()
     {
         $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_object = $objectManagerHelper->getObject('Magento\Paygate\Model\Authorizenet\Cards');
+        $this->_object = $objectManagerHelper->getObject('Magento\Authorizenet\Model\Authorizenet\Cards');
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/TabTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/TabTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..3375da446167c93ce1acc7271b610b5d4f4ffc5c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/TabTest.php
@@ -0,0 +1,77 @@
+<?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\Backend\Block\Widget;
+
+class TabTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $helper;
+
+    protected function setUp()
+    {
+        $this->helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+    }
+
+    /**
+     * @param string $method
+     * @param string $field
+     * @param mixed $value
+     * @param mixed $expected
+     * @dataProvider dataProvider
+     */
+    public function testGetters($method, $field, $value, $expected)
+    {
+        /** @var \Magento\Backend\Block\Widget\Tab $object */
+        $object = $this->helper->getObject(
+            '\Magento\Backend\Block\Widget\Tab',
+            array('data' => array($field => $value))
+        );
+        $this->assertEquals($expected, $object->$method());
+    }
+
+    public function dataProvider()
+    {
+        return array(
+            'getTabLabel' => array('getTabLabel', 'label', 'test label', 'test label'),
+            'getTabLabel (default)' => array('getTabLabel', 'empty', 'test label', null),
+
+            'getTabTitle' => array('getTabTitle', 'title', 'test title', 'test title'),
+            'getTabTitle (default)' => array('getTabTitle', 'empty', 'test title', null),
+
+            'canShowTab' => array('canShowTab', 'can_show', false, false),
+            'canShowTab (default)' => array('canShowTab', 'empty', false, true),
+
+            'isHidden' => array('isHidden', 'is_hidden', true, true),
+            'isHidden (default)' => array('isHidden', 'empty', true, false),
+
+            'getTabClass' => array('getTabClass', 'class', 'test classes', 'test classes'),
+            'getTabClass (default)' => array('getTabClass', 'empty', 'test classes', null),
+
+            'getTabUrl' => array('getTabUrl', 'url', 'test url', 'test url'),
+            'getTabUrl (default)' => array('getTabUrl', 'empty', 'test url', '#'),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php
index cf05297856fe7ced57e6f0b614e648afc9a1c359..277fe207ab522dd53f1a7685849a1bf40cbb8a9b 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Structure/Element/FieldTest.php
@@ -63,11 +63,6 @@ class FieldTest extends \PHPUnit_Framework_TestCase
      */
     protected $_blockFactoryMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_dsGraphMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -96,9 +91,6 @@ class FieldTest extends \PHPUnit_Framework_TestCase
         $this->_blockFactoryMock = $this->getMock(
             'Magento\View\Element\BlockFactory', array(), array(), '', false
         );
-        $this->_dsGraphMock = $this->getMock(
-            'Magento\Core\Model\DataService\Graph', array(), array(), '', false
-        );
         $this->_depMapperMock = $this->getMock(
             'Magento\Backend\Model\Config\Structure\Element\Dependency\Mapper', array(), array(), '', false
         );
@@ -109,7 +101,6 @@ class FieldTest extends \PHPUnit_Framework_TestCase
             $this->_sourceFactoryMock,
             $this->_commentFactoryMock,
             $this->_blockFactoryMock,
-            $this->_dsGraphMock,
             $this->_depMapperMock
         );
     }
@@ -402,53 +393,6 @@ class FieldTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($expected, $this->_model->getOptions());
     }
 
-    public function testGetOptionsWithServiceOptions()
-    {
-        $option = array(
-            array('customLabel' => 'test', 'customId' => 0),
-            array('customLabel' => 'test2', 'customId' => 1)
-        );
-        $this->_dsGraphMock->expects($this->once())
-            ->method('get')
-            ->with('serviceCallName')
-            ->will($this->returnValue($option));
-
-        $expected = array(
-            array('label' => __('test'), 'value' => 0),
-            array('label' => __('test2'), 'value' => 1)
-        );
-        $options = array(
-            'service_call'      => 'serviceCallName',
-            'idField'           => 'customId',
-            'labelField'        => 'customLabel',
-            'includeSelectLine' => 'false',
-        );
-        $this->_model->setData(array('source_service' => $options), 'scope');
-        $this->assertEquals($expected, $this->_model->getOptions());
-    }
-
-    public function testGetOptionsWithServiceOptionsButNoFieldNamesSpecified()
-    {
-        $option = array(
-            array('name' => 'test', 'id' => 0),
-            array('name' => 'test2', 'id' => 1)
-        );
-        $this->_dsGraphMock->expects($this->once())
-            ->method('get')
-            ->with('serviceCallName')
-            ->will($this->returnValue($option));
-
-        $expected = array(
-            array('label' => __('test'), 'value' => 0),
-            array('label' => __('test2'), 'value' => 1)
-        );
-        $options = array(
-            'service_call' => 'serviceCallName',
-        );
-        $this->_model->setData(array('source_service' => $options), 'scope');
-        $this->assertEquals($expected, $this->_model->getOptions());
-    }
-
     public function testGetDependenciesWithoutDependencies()
     {
         $this->_depMapperMock->expects($this->never())->method('getDependencies');
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/_files/invalidSystemXmlArray.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/_files/invalidSystemXmlArray.php
index d5e7c85f283848ad5bb2a1a0536ff9e1e92ecb49..7a2a91d116d94a2cedbb5df909a897bd45f4144f 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/_files/invalidSystemXmlArray.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/_files/invalidSystemXmlArray.php
@@ -120,20 +120,6 @@ return array
         . '<group id="group2"><label>Label_One</label></group></section></system></config>',
         array("Element 'section', attribute 'advanced': 'string' is not a valid value of the atomic type "
         . "'xs:boolean'.")),
-    'source_service_without_all_required_attribute' => array(
-        '<?xml version="1.0"?><config><system><section id="section1" advanced="false">'
-        . '<group id="group1"><label>Label</label><field id="field_id"><source_service service_call="name" '
-        . 'idField="field" labelField="label" includeEmptyValueOption="false"/><source_service labelField="label"/>'
-        . '</field></group><group id="group2"><label>Label_One</label></group></section></system></config>',
-        array("Element 'source_service': The attribute 'service_call' is required but missing.")),
-    'includeEmptyValueOption_attribute_with_invalid_value' => array(
-        '<?xml version="1.0"?><config><system><section id="section1" advanced="false">'
-        . '<group id="group1"><label>Label</label><field id="field_id"><source_service service_call="name" '
-        . 'includeEmptyValueOption="string"/><source_service service_call="label" includeEmptyValueOption="10"/>'
-        . '</field></group><group id="group2"><label>Label_One</label></group></section></system></config>',
-        array("Element 'source_service', attribute 'includeEmptyValueOption': 'string' is not a valid value of the "
-        . "atomic type 'xs:boolean'.", "Element 'source_service', attribute 'includeEmptyValueOption': '10' is not a "
-        . "valid value of the atomic type 'xs:boolean'.")),
     'options_node_without_any_options' => array(
         '<?xml version="1.0"?><config><system><section id="section1" advanced="false">'
         . '<group id="group1"><label>Label</label><field id="field_id"><options />'
diff --git a/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php b/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php
index 222a80df442d6d75e415b495df01bebf6cf9d489..406a8ec6a8a486f154404790b63c8d6f8b30b1c9 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/MediaTest.php
@@ -36,7 +36,7 @@ require_once(__DIR__ . '/_files/io.php');
 class MediaTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystemMock;
 
@@ -77,7 +77,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->will($this->returnValue(true));
 
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_backupFactoryMock = $this->getMock('Magento\Backup\Factory', array(), array(), '', false);
         $this->_backupFactoryMock->expects($this->once())
             ->method('create')
diff --git a/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php
index 0aa69fa2508ed14b4fcb0b31d97e7d5c1b14599c..8e7f7cd38199688f17b7d8e6837d1c4dd18b629c 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php
@@ -31,7 +31,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     public function testConstructor()
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $filesystem = $this->getMockBuilder('\Magento\Filesystem')
+        $filesystem = $this->getMockBuilder('\Magento\App\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $directoryWrite = $this->getMockBuilder('\Magento\Filesystem\Directory\WriteInterface')
diff --git a/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php b/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php
index 1aab9e76586e4cd3daf73a7d0359d88d657e68ab..cea80695858a1ffc7ae420471829099f033a2ab8 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/NomediaTest.php
@@ -35,7 +35,7 @@ require_once(__DIR__ . '/_files/io.php');
 class NomediaTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystemMock;
 
@@ -76,7 +76,7 @@ class NomediaTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->will($this->returnValue(true));
 
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_backupFactoryMock = $this->getMock('Magento\Backup\Factory', array(), array(), '', false);
         $this->_backupFactoryMock->expects($this->once())
             ->method('create')
diff --git a/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php b/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php
index 4d3714da467d7e35660c86059aef39372e3a1ec5..620a47f023f22d6a84c0e93cd109bf990a45b2d4 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/SnapshotTest.php
@@ -31,7 +31,7 @@ class SnapshotTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetDbBackupFilename()
     {
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $backupFactory = $this->getMock('Magento\Backup\Factory', array(), array(), '', false);
         $manager = $this->getMock(
             'Magento\Backup\Snapshot',
diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/BundleTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/BundleTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..a70d7604041d5fca0c97f81f814f96610776650c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Bundle/Controller/Adminhtml/Product/Initialization/Helper/Plugin/BundleTest.php
@@ -0,0 +1,135 @@
+<?php
+/**
+ * Test class for \Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle
+ *
+ * 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\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
+
+class BundleTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle
+     */
+    protected $model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    protected function setUp()
+    {
+        $this->requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
+        $methods = array(
+            'getCompositeReadonly', 'setBundleOptionsData',
+            'setBundleSelectionsData', 'getPriceType', 'setCanSaveCustomOptions',
+            'getProductOptions', 'setProductOptions', 'setCanSaveBundleSelections', '__wakeup'
+        );
+        $this->productMock = $this->getMock('\Magento\Catalog\Model\Product', $methods, array(), '', false);
+        $this->model = new \Magento\Bundle\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Bundle(
+            $this->requestMock
+        );
+    }
+
+    public function testAfterInitializeIfBundleAnsCustomOptionsAndBundleSelectionsExist()
+    {
+        $productOptionsBefore = array(
+            0 => array('key' => 'value'),
+            1 => array('is_delete' => false)
+        );
+        $productOptionsAfter = array(
+            0 => array('key' => 'value',
+                        'is_delete' => 1
+            ),
+            1 => array('is_delete' => 1)
+        );
+        $postValue = 'postValue';
+        $valueMap = array(
+            array('bundle_options', null, $postValue),
+            array('bundle_selections', null, $postValue),
+            array('affect_bundle_product_selections', null, 1),
+        );
+        $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap));
+        $this->productMock->expects($this->any())->method('getCompositeReadonly')->will($this->returnValue(false));
+        $this->productMock->expects($this->once())->method('setBundleOptionsData')->with($postValue);
+        $this->productMock->expects($this->once())->method('setBundleSelectionsData')->with($postValue);
+        $this->productMock->expects($this->once())->method('getPriceType')->will($this->returnValue(0));
+        $this->productMock->expects($this->any())->method('getOptionsReadonly')->will($this->returnValue(false));
+        $this->productMock->expects($this->once())->method('setCanSaveCustomOptions')->with(true);
+        $this ->productMock
+            ->expects($this->once())
+            ->method('getProductOptions')
+            ->will($this->returnValue($productOptionsBefore));
+        $this->productMock->expects($this->once())->method('setProductOptions')->with($productOptionsAfter);
+        $this->productMock->expects($this->once())->method('setCanSaveBundleSelections')->with(true);
+        $this->model->afterInitialize($this->productMock);
+    }
+
+    public function testAfterInitializeIfBundleSelectionsAndCustomOptionsExist()
+    {
+        $postValue = 'postValue';
+        $valueMap = array(
+            array('bundle_options', null, $postValue),
+            array('bundle_selections', null, false),
+            array('affect_bundle_product_selections', null, false),
+        );
+        $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap));
+        $this->productMock->expects($this->any())->method('getCompositeReadonly')->will($this->returnValue(false));
+        $this->productMock->expects($this->once())->method('setBundleOptionsData')->with($postValue);
+        $this->productMock->expects($this->never())->method('setBundleSelectionsData');
+        $this->productMock->expects($this->once())->method('getPriceType')->will($this->returnValue(2));
+        $this->productMock->expects($this->any())->method('getOptionsReadonly')->will($this->returnValue(true));
+        $this->productMock->expects($this->once())->method('setCanSaveBundleSelections')->with(false);
+        $this->model->afterInitialize($this->productMock);
+    }
+
+    public function testAfterInitializeIfCustomAndBundleOptionNotExist()
+    {
+        $postValue = 'postValue';
+        $valueMap = array(
+            array('bundle_options', null, false),
+            array('bundle_selections', null, $postValue),
+            array('affect_bundle_product_selections', null, 1),
+        );
+        $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap));
+        $this->productMock->expects($this->any())->method('getCompositeReadonly')->will($this->returnValue(false));
+        $this->productMock->expects($this->never())->method('setBundleOptionsData');
+        $this->productMock->expects($this->once())->method('setBundleSelectionsData')->with($postValue);
+        $this->productMock->expects($this->once())->method('getPriceType')->will($this->returnValue(0));
+        $this->productMock->expects($this->any())->method('getOptionsReadonly')->will($this->returnValue(false));
+        $this->productMock->expects($this->once())->method('setCanSaveCustomOptions')->with(true);
+        $this ->productMock
+            ->expects($this->once())
+            ->method('getProductOptions')
+            ->will($this->returnValue(false));
+        $this->productMock->expects($this->never())->method('setProductOptions');
+        $this->productMock->expects($this->once())->method('setCanSaveBundleSelections')->with(true);
+        $this->model->afterInitialize($this->productMock);
+    }
+} 
diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CopyConstructor/BundleTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CopyConstructor/BundleTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..d74fc325982af0e32637aed2dc92a48b45667ae2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/CopyConstructor/BundleTest.php
@@ -0,0 +1,160 @@
+<?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\Bundle\Model\Product\CopyConstructor;
+
+class BundleTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $product;
+
+    /**
+     * @var PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $duplicate;
+
+    /**
+     * @var \Magento\Bundle\Model\Product\CopyConstructor\Bundle
+     */
+    protected $model;
+
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectManager;
+
+    protected function setUp()
+    {
+        // Magento\Catalog\Model\Product $product, \Magento\Catalog\Model\Product $duplicate
+        $this->product = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+        $this->duplicate = $this->getMock(
+            'Magento\Catalog\Model\Product',
+            array('setBundleOptionsData', 'setBundleSelectionsData', '__wakeup'),
+            array(), '', false);
+        $this->model = new \Magento\Bundle\Model\Product\CopyConstructor\Bundle();
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+    }
+
+    public function testBuildNegative()
+    {
+        $this->product->expects($this->once())->method('getTypeId')->will($this->returnValue('other product'));
+        $this->product->expects($this->never())->method('getTypeInstance');
+        $this->model->build($this->product, $this->duplicate);
+    }
+
+    public function testBuildPositive()
+    {
+        //prepare mocks and data samples
+        $instance = $this->getMock('Magento\Bundle\Model\Product\Type',
+            array('setStoreFilter',  'getOptionsCollection', 'getSelectionsCollection', 'getOptionsIds'),
+            array(),
+            '',
+            false);
+        $option = $this->getMock(
+            'Magento\Bundle\Model\Option',
+            array('getSelections', '__wakeup', 'getData'),
+            array(),
+            '',
+            false
+        );
+        $options = array($option);
+        $optionCollection = $this->objectManager
+            ->getCollectionMock('Magento\Bundle\Model\Resource\Option\Collection', $options);
+        $optionRawData = array(
+            array(
+                'required' => true,
+                'position' => 100,
+                'type' => 'someType',
+                'title' => 'title',
+                'delete' => ''
+            )
+        );
+        $selectionRawData = array(
+            array(
+                array(
+                    'product_id' => 123,
+                    'position' => 500,
+                    'is_default' => false,
+                    'selection_price_type' => 'priceType',
+                    'selection_price_value' => 'priceVal',
+                    'selection_qty' => 21,
+                    'selection_can_change_qty' => 11,
+                    'delete' => ''
+                )
+            )
+        );
+
+        $selection = $this->getMock(
+            'Magento\Bundle\Model\Selection',
+            array(
+                'getProductId',
+                'getPosition',
+                'getIsDefault',
+                'getSelectionPriceType',
+                'getSelectionPriceValue',
+                'getSelectionQty',
+                'getSelectionCanChangeQty',
+                '__wakeup'
+            ),
+            array(),
+            '',
+            false
+        );
+        $selections = array($selection);
+        $selectionCollection = $this->getMock('Magento\Bundle\Model\Resource\Selection\Collection',
+            array(), array(), '', false);
+
+        // method flow
+        $this->product->expects($this->once())->method('getTypeId')->will($this->returnValue('bundle'));
+        $this->product->expects($this->any())->method('getTypeInstance')->will($this->returnValue($instance));
+        $instance->expects($this->once())->method('setStoreFilter')->with(null, $this->product);
+        $instance->expects($this->once())->method('getOptionsCollection')->with($this->product)
+            ->will($this->returnValue($optionCollection));
+        $instance->expects($this->once())->method('getSelectionsCollection')->with(null, $this->product)
+            ->will($this->returnValue($selectionCollection));
+        $optionCollection->expects($this->once())->method('appendSelections')->with($selectionCollection);
+        $option->expects($this->any())->method('getSelections')->will($this->returnValue($selections));
+
+        $option->expects($this->at(0))->method('getData')->with('required')->will($this->returnValue(true));
+        $option->expects($this->at(1))->method('getData')->with('position')->will($this->returnValue(100));
+        $option->expects($this->at(2))->method('getData')->with('type')->will($this->returnValue('someType'));
+        $option->expects($this->at(3))->method('getData')->with('title')->will($this->returnValue('title'));
+        $option->expects($this->at(4))->method('getData')->with('title')->will($this->returnValue('title'));
+
+        $selection->expects($this->once())->method('getProductId')->will($this->returnValue(123));
+        $selection->expects($this->once())->method('getPosition')->will($this->returnValue(500));
+        $selection->expects($this->once())->method('getIsDefault')->will($this->returnValue(false));
+        $selection->expects($this->once())->method('getSelectionPriceType')->will($this->returnValue('priceType'));
+        $selection->expects($this->once())->method('getSelectionPriceValue')->will($this->returnValue('priceVal'));
+        $selection->expects($this->once())->method('getSelectionQty')->will($this->returnValue(21));
+        $selection->expects($this->once())->method('getSelectionCanChangeQty')->will($this->returnValue(11));
+
+        $this->duplicate->expects($this->once())->method('setBundleOptionsData')->with($optionRawData);
+        $this->duplicate->expects($this->once())->method('setBundleSelectionsData')->with($selectionRawData);
+
+        $this->model->build($this->product, $this->duplicate);
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php
index dd4bbf5f4e084452b1f87e9e8f5f77e21947ac40..7e7623a55e196deaa16111df914d947b6874d85a 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php
@@ -48,7 +48,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
             ->with('admin/captcha/qwe')
             ->will($this->returnValue('1'));
 
-        $filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
 
         $filesystemMock->expects($this->any())->method('getDirectoryWrite')->will($this->returnValue($directoryMock));
diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
index a959ba76a48507950a415f216f9e34f45076bad7..4010ce04559bcb54ac0aa55b18c1e24f1e3759eb 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
@@ -36,7 +36,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
     }
 
     protected function _getHelper($store, $config, $factory)
@@ -105,7 +105,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
     {
         $this->_filesystem->expects($this->once())
             ->method('getPath')
-            ->with(\Magento\Filesystem::LIB)
+            ->with(\Magento\App\Filesystem::LIB_DIR)
             ->will($this->returnValue(TESTS_TEMP_DIR . '/lib'));
 
         $factoryMock = $this->getMock('Magento\Captcha\Model\CaptchaFactory', array(), array(), '', false);
@@ -132,7 +132,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
         $this->_filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::MEDIA)
+            ->with(\Magento\App\Filesystem::MEDIA_DIR)
             ->will($this->returnValue($dirWriteMock));
 
         $dirWriteMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php
index 3e2b408ba838dec964b4bac5df84a9d9794f1e01..ef199f4aeec962ed2ef164dbc45b8e4a1149ebb9 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php
@@ -76,7 +76,7 @@ class CronTest extends \PHPUnit_Framework_TestCase
     {
         $this->_helper = $this->getMock('Magento\Captcha\Helper\Data', array(), array(), '', false);
         $this->_adminHelper = $this->getMock('Magento\Captcha\Helper\Adminhtml\Data', array(), array(), '', false);
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $this->_storeManager = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php
index ebfd8bf6e4ba2048cfc9f08f290f9d8732237849..5096ee0f3fcfc75260a909c86d3ae78c52dfec06 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Attribute/GridTest.php
@@ -36,7 +36,7 @@ class GridTest extends \PHPUnit_Framework_TestCase
             ->method('getAttributeId')
             ->will($this->returnValue(2));
 
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
 
         $urlBuilder = $this->getMock('Magento\UrlInterface', array(), array(), '', false);
         $urlBuilder->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..c36b3c84f13c1c57213d7565d4311c68d9d1180e
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/AlertsTest.php
@@ -0,0 +1,87 @@
+<?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\Catalog\Block\Adminhtml\Product\Edit\Tab;
+
+class AlertsTest extends \PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Alerts
+     */
+    protected $alerts;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeConfigMock;
+
+    protected function setUp()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->storeConfigMock = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
+
+        $this->alerts = $helper->getObject('Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Alerts', array(
+                'storeConfig' => $this->storeConfigMock
+            )
+        );
+    }
+
+    /**
+     * @param bool $priceAllow
+     * @param bool $stockAllow
+     * @param bool $canShowTab
+     *
+     * @dataProvider canShowTabDataProvider
+     */
+    public function testCanShowTab($priceAllow, $stockAllow, $canShowTab)
+    {
+        $valueMap = array(
+            array('catalog/productalert/allow_price', null, $priceAllow),
+            array('catalog/productalert/allow_stock', null, $stockAllow)
+        );
+        $this->storeConfigMock->expects($this->any())->method('getConfig')->will($this->returnValueMap($valueMap));
+        $this->assertEquals($canShowTab, $this->alerts->canShowTab());
+    }
+
+    public function canShowTabDataProvider()
+    {
+        return array(
+            'alert_price_and_stock_allow' => array(
+                true, true, true
+            ),
+            'alert_price_is_allowed_and_stock_is_unallowed' => array(
+                true, false, true
+            ),
+            'alert_price_is_unallowed_and_stock_is_allowed' => array(
+                false, true, true
+            ),
+            'alert_price_is_unallowed_and_stock_is_unallowed' => array(
+                false, false, false
+            )
+        );
+    }
+
+}
+
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..1a043e6a041ff7dfc4f2269146ba0d21ae93b785
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/ViewTest.php
@@ -0,0 +1,74 @@
+<?php
+/**
+ * Test class for \Magento\Catalog\Block\Product\View
+ *
+ * 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\Catalog\Block\Product;
+
+class ViewTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Catalog\Block\Product\View
+     */
+    protected $view;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productTypeConfig;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $registryMock;
+
+    protected function setUp()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->productTypeConfig = $this->getMock('Magento\Catalog\Model\ProductTypes\ConfigInterface');
+        $this->registryMock = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $this->view = $helper->getObject('Magento\Catalog\Block\Product\View', array(
+                'productTypeConfig' => $this->productTypeConfig,
+                'registry' => $this->registryMock
+            )
+        );
+    }
+
+    public function testShouldRenderQuantity()
+    {
+        $productMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+        $this->registryMock
+            ->expects($this->any())
+            ->method('registry')
+            ->with('product')
+            ->will($this->returnValue($productMock));
+        $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue('id'));
+        $this->productTypeConfig
+            ->expects($this->once())
+            ->method('isProductSet')
+            ->with('id')
+            ->will($this->returnValue(true));
+        $this->assertEquals(false, $this->view->shouldRenderQuantity());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..28cbe9ec8210a99d2b5e5968e88b80c448bde9d3
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php
@@ -0,0 +1,146 @@
+<?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\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
+
+
+class ConfigurableTest extends \PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var \Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Configurable
+     */
+    protected $plugin;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productTypeMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    protected function setUp()
+    {
+        $this->productTypeMock = $this->getMock(
+            'Magento\Catalog\Model\Product\Type\Configurable', array(), array(), '', false
+        );
+        $this->requestMock = $this->getMock('\Magento\App\Request\Http', array(), array(), '', false);
+        $methods = array('setNewVariationsAttributeSetId', 'setAssociatedProductIds',
+            'setCanSaveConfigurableAttributes', '__wakeup');
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product', $methods, array(), '', false);
+        $this->plugin = new \Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Configurable(
+            $this->productTypeMock,
+            $this->requestMock
+        );
+    }
+
+    public function testAfterInitializeIfAttributesNotEmptyAndActionNameNotGenerateVariations()
+    {
+        $associatedProductIds = array('key' => 'value');
+        $generatedProductIds = array('key_one' => 'value_one');
+        $expectedArray = array('key' => 'value', 'key_one' => 'value_one');
+        $attributes = array('key' => 'value');
+        $postValue = 'postValue';
+        $valueMap = array(
+            array('new-variations-attribute-set-id', null, $postValue),
+            array('associated_product_ids', array(), $associatedProductIds),
+            array('variations-matrix', array(), $postValue),
+            array('affect_configurable_product_attributes', null, $postValue)
+        );
+        $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap));
+        $this->requestMock
+            ->expects($this->once())
+            ->method('getParam')
+            ->with('attributes')
+            ->will($this->returnValue($attributes));
+        $this->productTypeMock
+            ->expects($this->once())
+            ->method('setUsedProductAttributeIds')
+            ->with($attributes, $this->productMock);
+        $this->productMock->expects($this->once())->method('setNewVariationsAttributeSetId')->with($postValue);
+        $this->requestMock->expects($this->once())->method('getActionName')->will($this->returnValue('action_name'));
+        $this->productTypeMock
+            ->expects($this->once())
+            ->method('generateSimpleProducts')
+            ->with($this->productMock, $postValue)->will($this->returnValue($generatedProductIds));
+        $this->productMock->expects($this->once())->method('setAssociatedProductIds')->with($expectedArray);
+        $this->productMock->expects($this->once())->method('setCanSaveConfigurableAttributes')->with(true);
+        $this->plugin->afterInitialize($this->productMock);
+    }
+
+    public function testAfterInitializeIfAttributesNotEmptyAndActionNameGenerateVariations()
+    {
+        $associatedProductIds = array('key' => 'value');
+        $attributes = array('key' => 'value');
+        $postValue = 'postValue';
+        $valueMap = array(
+            array('new-variations-attribute-set-id', null, $postValue),
+            array('associated_product_ids', array(), $associatedProductIds),
+            array('variations-matrix', array(), $postValue),
+            array('affect_configurable_product_attributes', null, $postValue)
+        );
+        $this->requestMock->expects($this->any())->method('getPost')->will($this->returnValueMap($valueMap));
+        $this->requestMock
+            ->expects($this->once())
+            ->method('getParam')
+            ->with('attributes')
+            ->will($this->returnValue($attributes));
+        $this->productTypeMock
+            ->expects($this->once())
+            ->method('setUsedProductAttributeIds')
+            ->with($attributes, $this->productMock);
+        $this->productMock->expects($this->once())->method('setNewVariationsAttributeSetId')->with($postValue);
+        $this->requestMock
+            ->expects($this->once())
+            ->method('getActionName')
+            ->will($this->returnValue('generateVariations'));
+        $this->productTypeMock
+            ->expects($this->never())
+            ->method('generateSimpleProducts');
+        $this->productMock->expects($this->once())->method('setAssociatedProductIds')->with($associatedProductIds);
+        $this->productMock->expects($this->once())->method('setCanSaveConfigurableAttributes')->with(true);
+        $this->plugin->afterInitialize($this->productMock);
+    }
+
+    public function testAfterInitializeIfAttributesEmpty()
+    {
+        $this->requestMock
+            ->expects($this->once())
+            ->method('getParam')
+            ->with('attributes')
+            ->will($this->returnValue(array()));
+        $this->productTypeMock->expects($this->never())->method('setUsedProductAttributeIds');
+        $this->requestMock->expects($this->never())->method('getPost');
+        $this->productTypeMock->expects($this->never())->method('generateSimpleProducts');
+        $this->plugin->afterInitialize($this->productMock);
+    }
+}
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
new file mode 100644
index 0000000000000000000000000000000000000000..76d30e38a0d010f27e53066a3a088cbaa931362d
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php
@@ -0,0 +1,218 @@
+<?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\Catalog\Controller\Adminhtml\Product\Initialization;
+
+class HelperTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $jsHelperMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeManagerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $stockFilterMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productLinksMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $websiteMock;
+
+    /**
+     * @var int
+     */
+    protected $websiteId = 1;
+
+    /**
+     * @var \Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper
+     */
+    protected $helper;
+
+    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');
+
+        $this->stockFilterMock = $this->getMock(
+            'Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter', array(), array(), '', false
+        );
+        $this->productLinksMock = $this->getMock(
+            'Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks',
+            array(), array(), '', false
+        );
+
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product',
+            array('setData', 'addData', 'getId', 'setWebsiteIds', 'isLockedAttribute',
+                'lockAttribute', 'unlockAttribute', 'getOptionsReadOnly',
+                'setProductOptions', 'setCanSaveCustomOptions', '__sleep', '__wakeup'),
+            array(), '', false);
+
+        $this->websiteMock->expects($this->once())
+            ->method('getId')
+            ->will($this->returnValue($this->websiteId));
+
+        $this->storeMock->expects($this->once())
+            ->method('getWebsite')
+            ->will($this->returnValue($this->websiteMock));
+
+        $this->storeManagerMock->expects($this->once())
+            ->method('getStore')
+            ->with(true)
+            ->will($this->returnValue($this->storeMock));
+
+        $this->helper = new Helper(
+            $this->requestMock,
+            $this->jsHelperMock,
+            $this->storeManagerMock,
+            $this->stockFilterMock,
+            $this->productLinksMock
+        );
+    }
+
+    /**
+     * @covers Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper::initialize
+     */
+    public function testInitialize()
+    {
+        $productData = array(
+            'stock_data' => array('stock_data'),
+            'url_key_create_redirect' => true,
+            'options' => array('option1', 'option2')
+        );
+
+        $useDefaults = array('attributeCode1', 'attributeCode2');
+
+        $this->requestMock->expects($this->at(0))
+            ->method('getPost')
+            ->with('product')
+            ->will($this->returnValue($productData));
+
+        $this->requestMock->expects($this->at(1))
+            ->method('getPost')
+            ->with('use_default')
+            ->will($this->returnValue($useDefaults));
+
+        $this->requestMock->expects($this->at(2))
+            ->method('getPost')
+            ->with('affect_product_custom_options')
+            ->will($this->returnValue(true));
+
+        $this->stockFilterMock->expects($this->once())
+            ->method('filter')
+            ->with(array('stock_data'))
+            ->will($this->returnValue(array('stock_data')));
+
+        $this->storeManagerMock->expects($this->once())
+            ->method('hasSingleStore')
+            ->will($this->returnValue(true));
+
+        $this->productLinksMock->expects($this->once())
+            ->method('initializeLinks')
+            ->with($this->productMock)
+            ->will($this->returnValue($this->productMock));
+
+        $this->productMock->expects($this->once())
+            ->method('isLockedAttribute')
+            ->with('media')
+            ->will($this->returnValue(true));
+
+        $this->productMock->expects($this->once())
+            ->method('unlockAttribute')
+            ->with('media');
+
+        $this->productMock->expects($this->once())
+            ->method('lockAttribute')
+            ->with('media');
+
+        $productData['category_ids'] = array();
+        $productData['website_ids'] = array();
+        $this->productMock->expects($this->once())
+            ->method('addData')
+            ->with($productData);
+
+        $this->productMock->expects($this->once())
+            ->method('getId')
+            ->will($this->returnValue(true));
+
+        $this->productMock->expects($this->once())
+            ->method('setWebsiteIds')
+            ->with(array($this->websiteId));
+
+        $this->productMock->expects($this->at(6))
+            ->method('setData')
+            ->with('save_rewrites_history', true);
+
+        $this->productMock->expects($this->at(7))
+            ->method('setData')
+            ->with('attributeCode1', false);
+
+        $this->productMock->expects($this->at(8))
+            ->method('setData')
+            ->with('attributeCode2', false);
+
+        $this->productMock->expects($this->any())
+            ->method('getOptionsReadOnly')
+            ->will($this->returnValue(false));
+
+        $this->productMock->expects($this->once())
+            ->method('setProductOptions')
+            ->with($productData['options']);
+
+        $this->productMock->expects($this->once())
+            ->method('setCanSaveCustomOptions')
+            ->with(true);
+
+        $this->assertEquals($this->productMock, $this->helper->initialize($this->productMock));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4e75748d9e4807a4ef2ab43bf2322c2313202a46
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php
@@ -0,0 +1,133 @@
+<?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\Catalog\Controller\Adminhtml\Product\Initialization;
+
+class StockDataFilterTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeManagerMock;
+
+    /**
+     * @var \Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter
+     */
+    protected $stockDataFilter;
+
+    protected function setUp()
+    {
+        $this->storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false);
+
+        $this->storeMock->expects($this->any())
+            ->method('getConfig')
+            ->with(\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_MANAGE_STOCK)
+            ->will($this->returnValue(1));
+
+        $this->storeManagerMock = $this->getMock('Magento\Core\Model\StoreManagerInterface');
+
+        $this->storeManagerMock->expects($this->any())
+            ->method('getStore')
+            ->will($this->returnValue($this->storeMock));
+
+        $this->stockDataFilter = new StockDataFilter($this->storeManagerMock);
+    }
+
+    /**
+     * @param array $inputStockData
+     * @param array $outputStockData
+     *
+     * @covers Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter::filter
+     * @dataProvider filterDataProvider
+     */
+    public function testFilter(array $inputStockData, array $outputStockData)
+    {
+        $this->assertEquals($outputStockData, $this->stockDataFilter->filter($inputStockData));
+    }
+
+    /**
+     * Data provider for testFilter
+     *
+     * @return array
+     */
+    public function filterDataProvider()
+    {
+        return array(
+            'case1' => array(
+                'inputStockData' => array(),
+                'outputStockData' => array(
+                    'use_config_manage_stock' => 0,
+                    'is_decimal_divided' => 0
+                ),
+            ),
+            'case2' => array(
+                'inputStockData' => array(
+                    'use_config_manage_stock' => 1,
+                ),
+                'outputStockData' => array(
+                    'use_config_manage_stock' => 1,
+                    'manage_stock' => 1,
+                    'is_decimal_divided' => 0
+                ),
+            ),
+            'case3' => array(
+                'inputStockData' => array(
+                    'qty' =>
+                        \Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter::MAX_QTY_VALUE + 1,
+                ),
+                'outputStockData' => array(
+                    'qty' =>
+                        \Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter::MAX_QTY_VALUE,
+                    'is_decimal_divided' => 0,
+                    'use_config_manage_stock' => 0,
+                ),
+            ),
+            'case4' => array(
+                'inputStockData' => array(
+                    'min_qty' => -1,
+                ),
+                'outputStockData' => array(
+                    'min_qty' => 0,
+                    'is_decimal_divided' => 0,
+                    'use_config_manage_stock' => 0
+                ),
+            ),
+            'case5' => array(
+                'inputStockData' => array(
+                    'is_qty_decimal' => 0,
+                ),
+                'outputStockData' => array(
+                    'is_qty_decimal' => 0,
+                    'is_decimal_divided' => 0,
+                    'use_config_manage_stock' => 0
+                ),
+            ),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php
index 47850b3602b14f7830880f3994e58aec8ae3c234..497ec5264624618f3281e3f8f4b437c88550309a 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Attribute/Backend/MediaTest.php
@@ -61,7 +61,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $directory = $this->getMockBuilder('Magento\Filesystem\Directory\Write')
             ->disableOriginalConstructor()
             ->getMock();
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $filesystem = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $filesystem->expects($this->once())->method('getDirectoryWrite')->will($this->returnValue($directory));
         $this->_model = $this->_objectHelper->getObject('Magento\Catalog\Model\Product\Attribute\Backend\Media', array(
             'eventManager' => $eventManager,
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopierTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopierTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e5832b11fb631afd632a8e9dbebe6fe012bc9c3a
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopierTest.php
@@ -0,0 +1,106 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product;
+
+class CopierTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var Copier
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $copyConstructorMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productFactoryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    
+    protected function setUp()
+    {
+        $this->copyConstructorMock = $this->getMock('\Magento\Catalog\Model\Product\CopyConstructorInterface');
+        $this->productFactoryMock = $this->getMock(
+            '\Magento\Catalog\Model\ProductFactory', array('create'), array(), '', false
+        );
+        $this->productMock = $this->getMock('\Magento\Catalog\Model\Product', array(), array(), '', false);
+        $this->productMock->expects($this->any())->method('getId')->will($this->returnValue('1'));
+        $this->productMock->expects($this->any())->method('getData')->will($this->returnValue('product data'));
+
+        $this->_model = new Copier($this->copyConstructorMock, $this->productFactoryMock);
+    }
+
+    public function testCopy()
+    {
+        $this->productMock->expects($this->atLeastOnce())->method('getWebsiteIds');
+        $this->productMock->expects($this->atLeastOnce())->method('getCategoryIds');
+
+        $resourceMock = $this->getMock('\Magento\Catalog\Model\Resource\Product', array(), array(), '', false);
+        $optionMock = $this->getMock('\Magento\Catalog\Model\Product\Option', array(), array(), '', false);
+        $this->productMock->expects($this->once())
+            ->method('getResource')->will($this->returnValue($resourceMock));
+        $this->productMock->expects($this->once())
+            ->method('getOptionInstance')->will($this->returnValue($optionMock));
+
+        $duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('__wakeup', 'setData', 'setIsDuplicate', 'setOriginalId', 'setStatus', 'setCreatedAt', 'setUpdatedAt',
+                'setId', 'setStoreId', 'getId', 'save'
+            ),
+            array(),
+            '',
+            false
+        );
+        $this->productFactoryMock->expects($this->once())->method('create')->will($this->returnValue($duplicateMock));
+
+        $duplicateMock->expects($this->once())->method('setIsDuplicate')->with(true);
+        $duplicateMock->expects($this->once())->method('setOriginalId')->with(1);
+        $duplicateMock->expects($this->once())->method('setStatus')
+            ->with(\Magento\Catalog\Model\Product\Status::STATUS_DISABLED);
+        $duplicateMock->expects($this->once())->method('setCreatedAt')->with(null);
+        $duplicateMock->expects($this->once())->method('setUpdatedAt')->with(null);
+        $duplicateMock->expects($this->once())->method('setId')->with(null);
+        $duplicateMock->expects($this->once())->method('setStoreId')->with(\Magento\Core\Model\Store::DEFAULT_STORE_ID);
+        $duplicateMock->expects($this->once())->method('setData')->with('product data');
+
+
+
+        $this->copyConstructorMock->expects($this->once())->method('build')->with($this->productMock, $duplicateMock);
+
+        $duplicateMock->expects($this->once())->method('save');
+        $duplicateMock->expects($this->any())->method('getId')->will($this->returnValue(2));
+
+        $optionMock->expects($this->once())->method('duplicate')->with(1, 2);
+        $resourceMock->expects($this->once())->method('duplicate')->with(1, 2);
+        $this->assertEquals($duplicateMock, $this->_model->copy($this->productMock));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/CompositeTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..b61317e597004825be08e396366ebe4178ebf2cc
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/CompositeTest.php
@@ -0,0 +1,52 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product\CopyConstructor;
+
+class CompositeTest extends \PHPUnit_Framework_TestCase
+{
+    public function testBuild()
+    {
+        $factoryMock = $this->getMock(
+            '\Magento\Catalog\Model\Product\CopyConstructorFactory', array(), array(), '', false
+        );
+
+        $constructorMock = $this->getMock('\Magento\Catalog\Model\Product\CopyConstructorInterface');
+
+        $factoryMock->expects($this->exactly(2))
+            ->method('create')
+            ->with('constructorInstance')
+            ->will($this->returnValue($constructorMock));
+
+        $productMock = $this->getMock('\Magento\Catalog\Model\Product', array(), array(), '', false);
+        $duplicateMock = $this->getMock('\Magento\Catalog\Model\Product', array(), array(), '', false);
+
+        $constructorMock->expects($this->exactly(2))->method('build')->with($productMock, $duplicateMock);
+
+        $model = new \Magento\Catalog\Model\Product\CopyConstructor\Composite(
+            $factoryMock, array('constructorInstance', 'constructorInstance')
+        );
+
+        $model->build($productMock, $duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/CrossSellTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/CrossSellTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..fa146ddaec2c5db237b984736cb0c744788ba7eb
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/CrossSellTest.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product\CopyConstructor;
+
+class CrossSellTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Catalog\Model\Product\CopyConstructor\CrossSell
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_duplicateMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkCollectionMock;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\Catalog\Model\Product\CopyConstructor\CrossSell();
+
+        $this->_productMock   = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array(),
+            array(),
+            '',
+            false
+        );
+
+        $this->_duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('setCrossSellLinkData', '__wakeup'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_linkMock = $this->getMock(
+            '\Magento\Catalog\Model\Product\Link',
+            array('__wakeup', 'getAttributes', 'getCrossSellLinkCollection', 'useCrossSellLinks'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_productMock->expects($this->any())
+            ->method('getLinkInstance')
+            ->will($this->returnValue($this->_linkMock));
+    }
+
+    public function testBuild()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $expectedData = array(
+            '100500' => array('some' => 'data')
+        );
+
+        $attributes = array(
+            'attributeOne' => array('code' => 'one'),
+            'attributeTwo' => array('code' => 'two'),
+        );
+
+        $this->_linkMock->expects($this->once())->method('useCrossSellLinks');
+
+        $this->_linkMock->expects($this->once())->method('getAttributes')->will($this->returnValue($attributes));
+
+        $productLinkMock = $this->getMock(
+            '\Magento\Catalog\Model\Resource\Product\Link',
+            array('__wakeup', 'getLinkedProductId', 'toArray'),
+            array(),
+            '',
+            false
+        );
+
+        $productLinkMock->expects($this->once())->method('getLinkedProductId')->will($this->returnValue('100500'));
+        $productLinkMock->expects($this->once())
+            ->method('toArray')
+            ->with(array('one', 'two'))
+            ->will($this->returnValue(array('some' => 'data')));
+
+        $collectionMock = $helper->getCollectionMock(
+            '\Magento\Catalog\Model\Resource\Product\Link\Collection',
+            array($productLinkMock)
+        );
+        $this->_productMock->expects($this->once())
+            ->method('getCrossSellLinkCollection')
+            ->will($this->returnValue($collectionMock));
+
+        $this->_duplicateMock->expects($this->once())
+            ->method('setCrossSellLinkData')
+            ->with($expectedData);
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/RelatedTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/RelatedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..54489439a7725a797bfed37ad412c653e2da88fb
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/RelatedTest.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product\CopyConstructor;
+
+class RelatedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \\Magento\Catalog\Model\Product\CopyConstructor\Related
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_duplicateMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkCollectionMock;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\Catalog\Model\Product\CopyConstructor\Related();
+
+        $this->_productMock   = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array(),
+            array(),
+            '',
+            false
+        );
+
+        $this->_duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('setRelatedLinkData', '__wakeup'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_linkMock = $this->getMock(
+            '\Magento\Catalog\Model\Product\Link',
+            array('__wakeup', 'getAttributes', 'getRelatedLinkCollection', 'useRelatedLinks'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_productMock->expects($this->any())
+            ->method('getLinkInstance')
+            ->will($this->returnValue($this->_linkMock));
+    }
+
+    public function testBuild()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $expectedData = array(
+            '100500' => array('some' => 'data')
+        );
+
+        $attributes = array(
+            'attributeOne' => array('code' => 'one'),
+            'attributeTwo' => array('code' => 'two'),
+        );
+
+        $this->_linkMock->expects($this->once())->method('useRelatedLinks');
+
+        $this->_linkMock->expects($this->once())->method('getAttributes')->will($this->returnValue($attributes));
+
+        $productLinkMock = $this->getMock(
+            '\Magento\Catalog\Model\Resource\Product\Link',
+            array('__wakeup', 'getLinkedProductId', 'toArray'),
+            array(),
+            '',
+            false
+        );
+
+        $productLinkMock->expects($this->once())->method('getLinkedProductId')->will($this->returnValue('100500'));
+        $productLinkMock->expects($this->once())
+            ->method('toArray')
+            ->with(array('one', 'two'))
+            ->will($this->returnValue(array('some' => 'data')));
+
+        $collectionMock = $helper->getCollectionMock(
+            '\Magento\Catalog\Model\Resource\Product\Link\Collection',
+            array($productLinkMock)
+        );
+        $this->_productMock->expects($this->once())
+            ->method('getRelatedLinkCollection')
+            ->will($this->returnValue($collectionMock));
+
+        $this->_duplicateMock->expects($this->once())
+            ->method('setRelatedLinkData')
+            ->with($expectedData);
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/UpSellTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/UpSellTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6bfdc1dad7eb25e7017645d2f938888cf00d64a2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructor/UpSellTest.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product\CopyConstructor;
+
+class UpSellTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Catalog\Model\Product\CopyConstructor\UpSell
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_duplicateMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkCollectionMock;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\Catalog\Model\Product\CopyConstructor\UpSell();
+
+        $this->_productMock   = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array(),
+            array(),
+            '',
+            false
+        );
+
+        $this->_duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('setUpSellLinkData', '__wakeup'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_linkMock = $this->getMock(
+            '\Magento\Catalog\Model\Product\Link',
+            array('__wakeup', 'getAttributes', 'getUpSellLinkCollection', 'useUpSellLinks'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_productMock->expects($this->any())
+            ->method('getLinkInstance')
+            ->will($this->returnValue($this->_linkMock));
+    }
+
+    public function testBuild()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $expectedData = array(
+            '100500' => array('some' => 'data')
+        );
+
+        $attributes = array(
+            'attributeOne' => array('code' => 'one'),
+            'attributeTwo' => array('code' => 'two'),
+        );
+
+        $this->_linkMock->expects($this->once())->method('useUpSellLinks');
+
+        $this->_linkMock->expects($this->once())->method('getAttributes')->will($this->returnValue($attributes));
+
+        $productLinkMock = $this->getMock(
+            '\Magento\Catalog\Model\Resource\Product\Link',
+            array('__wakeup', 'getLinkedProductId', 'toArray'),
+            array(),
+            '',
+            false
+        );
+
+        $productLinkMock->expects($this->once())->method('getLinkedProductId')->will($this->returnValue('100500'));
+        $productLinkMock->expects($this->once())
+            ->method('toArray')
+            ->with(array('one', 'two'))
+            ->will($this->returnValue(array('some' => 'data')));
+
+        $collectionMock = $helper->getCollectionMock(
+            '\Magento\Catalog\Model\Resource\Product\Link\Collection',
+            array($productLinkMock)
+        );
+        $this->_productMock->expects($this->once())
+            ->method('getUpSellLinkCollection')
+            ->will($this->returnValue($collectionMock));
+
+        $this->_duplicateMock->expects($this->once())
+            ->method('setUpSellLinkData')
+            ->with($expectedData);
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..5f07852ba208497dfac567b490ae7553de8cb3ae
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/CopyConstructorFactoryTest.php
@@ -0,0 +1,64 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Catalog\Model\Product;
+
+class CopyConstructorFactoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var CopyConstructorFactory
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_objectManagerMock;
+    
+    protected function setUp()
+    {
+        $this->_objectManagerMock = $this->getMock('\Magento\ObjectManager');
+        $this->_model = new CopyConstructorFactory($this->_objectManagerMock);
+    }
+
+    public function testCreateWithInvalidType()
+    {
+        $this->setExpectedException(
+            '\InvalidArgumentException',
+            '\Magento\Object does not implement \Magento\Catalog\Model\Product\CopyConstructorInterface'
+        );
+        $this->_objectManagerMock->expects($this->never())->method('create');
+        $this->_model->create('\Magento\Object');
+    }
+
+    public function testCreateWithValidType()
+    {
+        $this->_objectManagerMock->expects($this->once())
+            ->method('create')->with('\Magento\Catalog\Model\Product\CopyConstructor\Composite')
+            ->will($this->returnValue('object'));
+        $this->assertEquals(
+            'object',
+            $this->_model->create('\Magento\Catalog\Model\Product\CopyConstructor\Composite')
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php
index cfed1bb3dc94b5571743ad68b57ca4e5f5e19f81..ebcd919f9f7f78e50e1da7123876c1e98701c9a7 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/ConfigurableTest.php
@@ -50,7 +50,7 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $filesystem = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php
deleted file mode 100644
index 93923ad06237309e12ffca1e62a622b6dbc6a932..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/GroupedTest.php
+++ /dev/null
@@ -1,62 +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_Catalog
- * @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\Catalog\Model\Product\Type;
-
-class GroupedTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Catalog\Model\Product\Type\Grouped
-     */
-    protected $_model;
-
-    protected function setUp()
-    {
-        $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
-        $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
-        $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
-        $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
-        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
-        $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
-        $this->_model = $objectHelper->getObject('Magento\Catalog\Model\Product\Type\Grouped', array(
-            'eventManager' => $eventManager,
-            'coreData' => $coreDataMock,
-            'fileStorageDb' => $fileStorageDbMock,
-            'filesystem' => $filesystem,
-            'coreRegistry' => $coreRegistry,
-            'logger' => $logger,
-            'productFactory' => $productFactoryMock,
-        ));
-    }
-
-    public function testHasWeightFalse()
-    {
-        $this->assertFalse($this->_model->hasWeight(), 'This product has weight, but it should not');
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php
index ede43a03000dfdfcc58f77d63e148ca6fc152e5d..ea510e84e8cabcc3a1b2516b40839ed6811efce0 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/SimpleTest.php
@@ -40,7 +40,7 @@ class SimpleTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
         $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $filesystem = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php
index d216cdb8dc5d0f548015eb2508e10afaf68a5a97..f56b1cbda15bddf3352c13bb528495979bf49698 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/Type/VirtualTest.php
@@ -41,7 +41,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase
         $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $coreRegistryMock = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $filesystem = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
         $this->_model = $objectHelper->getObject('Magento\Catalog\Model\Product\Type\Virtual', array(
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php
index 63b84e1615c2ae03d3e94ea9d8e80155f34a907e..8dde9c01b1af872d77540f382a017601f8fb2481 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ProductTypes/ConfigTest.php
@@ -28,23 +28,23 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_readerMock;
+    protected $readerMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_cacheMock;
+    protected $cacheMock;
 
     /**
      * @var \Magento\Catalog\Model\ProductTypes\Config
      */
-    protected $_model;
+    protected $model;
 
     protected function setUp()
     {
-        $this->_readerMock = $this->getMock(
+        $this->readerMock = $this->getMock(
             'Magento\Catalog\Model\ProductTypes\Config\Reader', array(), array(), '', false);
-        $this->_cacheMock = $this->getMock('Magento\Config\CacheInterface');
+        $this->cacheMock = $this->getMock('Magento\Config\CacheInterface');
     }
 
     /**
@@ -55,10 +55,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetType($value, $expected)
     {
-        $this->_cacheMock->expects($this->any())->method('load')->will($this->returnValue(serialize($value)));
-        $this->_model = new \Magento\Catalog\Model\ProductTypes\Config($this->_readerMock,
-            $this->_cacheMock, 'cache_id');
-        $this->assertEquals($expected, $this->_model->getType('global'));
+        $this->cacheMock->expects($this->any())->method('load')->will($this->returnValue(serialize($value)));
+        $this->model = new \Magento\Catalog\Model\ProductTypes\Config($this->readerMock,
+            $this->cacheMock, 'cache_id');
+        $this->assertEquals($expected, $this->model->getType('global'));
     }
 
     public function getTypeDataProvider()
@@ -72,12 +72,26 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     public function testGetAll()
     {
         $expected = array('Expected Data');
-        $this->_cacheMock->expects($this->once())->method('load')->will($this->returnValue(serialize($expected)));
-        $this->_model = new \Magento\Catalog\Model\ProductTypes\Config(
-            $this->_readerMock,
-            $this->_cacheMock,
+        $this->cacheMock->expects($this->once())->method('load')->will($this->returnValue(serialize($expected)));
+        $this->model = new \Magento\Catalog\Model\ProductTypes\Config(
+            $this->readerMock,
+            $this->cacheMock,
             'cache_id'
         );
-        $this->assertEquals($expected, $this->_model->getAll());
+        $this->assertEquals($expected, $this->model->getAll());
     }
+
+    public function testIsProductSet()
+    {
+        $this->cacheMock->expects($this->once())->method('load')->will($this->returnValue(serialize(array())));
+        $this->model = new \Magento\Catalog\Model\ProductTypes\Config(
+            $this->readerMock,
+            $this->cacheMock,
+            'cache_id'
+        );
+
+        $this->assertEquals(false, $this->model->isProductSet('typeId'));
+
+    }
+
 }
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..eb009daa6ae974fe38b10a50eaed5d8854cd1d2d
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Product/LinkTest.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\Catalog\Model\Resource\Product;
+
+class LinkTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Catalog\Model\Resource\Product\Link
+     */
+    protected $model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $resource;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $readAdapter;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $writeAdapter;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $dbSelect;
+
+    protected function setUp()
+    {
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->resource = $this->getMock('Magento\App\Resource', array(), array(), '', false);
+        $this->readAdapter = $this->getMock('\Magento\DB\Adapter\AdapterInterface', array(), array(), '', false);
+        $this->writeAdapter = $this->getMock('\Magento\DB\Adapter\AdapterInterface', array(), array(), '', false);
+        $this->model = $objectManager->getObject(
+            'Magento\Catalog\Model\Resource\Product\Link',
+            array('resource' => $this->resource)
+        );
+    }
+
+    protected function prepareReadAdapter()
+    {
+        $this->dbSelect = $this->getMock('Magento\DB\Select', array(), array(), '', false);
+
+        // method flow
+        $this->resource->expects($this->at(0))->method('getConnection')
+            ->with('core_write')->will($this->returnValue($this->writeAdapter));
+        $this->resource->expects($this->at(1))->method('getConnection')
+            ->with('core_read')->will($this->returnValue($this->readAdapter));
+
+        $this->readAdapter->expects($this->once())->method('select')->will($this->returnValue($this->dbSelect));
+    }
+    
+    public function testGetAttributesByType()
+    {
+        $typeId = 4;
+        $result = array(100, 200, 300, 400);
+
+        $this->prepareReadAdapter();
+        $this->dbSelect->expects($this->once())->method('from')->will($this->returnValue($this->dbSelect));
+        $this->dbSelect->expects($this->atLeastOnce())->method('where')
+            ->with('link_type_id = ?', $typeId)
+            ->will($this->returnValue($this->dbSelect));
+        $this->readAdapter->expects($this->once())
+            ->method('fetchAll')
+            ->will($this->returnValue($result));
+        $this->assertEquals($result, $this->model->getAttributesByType($typeId));
+    }
+
+    public function testGetAttributeTypeTable()
+    {
+        $inputTable = 'megatable';
+        $resultTable = 'advancedTable';
+
+        $this->resource->expects($this->once())->method('getTableName')
+            ->with('catalog_product_link_attribute_' . $inputTable)->will($this->returnValue($resultTable));
+        $this->assertEquals($resultTable, $this->model->getAttributeTypeTable($inputTable));
+    }
+
+    public function testGetChildrenIds()
+    {
+        //prepare mocks and data
+        $parentId = 100;
+        $typeId = 4;
+        $bind = array(
+            ':product_id'    => $parentId,
+            ':link_type_id'  => $typeId
+        );
+
+        $fetchedData = array(
+            array('linked_product_id' => 100),
+            array('linked_product_id' => 500),
+        );
+
+        $result = array(
+            $typeId => array(
+                100 => 100,
+                500 => 500,
+            )
+        );
+
+        // method flow
+        $this->prepareReadAdapter();
+        $this->dbSelect->expects($this->once())->method('from')->will($this->returnValue($this->dbSelect));
+        $this->dbSelect->expects($this->atLeastOnce())->method('where')->will($this->returnValue($this->dbSelect));
+        $this->readAdapter->expects($this->once())
+            ->method('fetchAll')
+            ->with($this->dbSelect, $bind)
+            ->will($this->returnValue($fetchedData));
+
+        $this->assertEquals($result, $this->model->getChildrenIds($parentId, $typeId));
+    }
+
+    public function testGetParentIdsByChild()
+    {
+        $childId = 234;
+        $typeId = 4;
+        $fetchedData = array(
+            array('product_id' => 55),
+            array('product_id' => 66),
+        );
+        $result = array(55, 66);
+
+        // method flow
+        $this->prepareReadAdapter();
+        $this->dbSelect->expects($this->once())->method('from')->will($this->returnValue($this->dbSelect));
+        $this->dbSelect->expects($this->any())->method('where')
+            ->will($this->returnValue($this->dbSelect));
+
+        $this->readAdapter->expects($this->once())
+            ->method('fetchAll')
+            ->with($this->dbSelect)
+            ->will($this->returnValue($fetchedData));
+
+        $this->assertEquals($result, $this->model->getParentIdsByChild($childId, $typeId));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Product/CopyConstructor/CatalogInventoryTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Product/CopyConstructor/CatalogInventoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..44bb6890cbaa124c5f17b7eb1eefd457d39f89db
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Product/CopyConstructor/CatalogInventoryTest.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\CatalogInventory\Model\Product\CopyConstructor;
+
+class CatalogInventoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_duplicateMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_stockItemMock;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\CatalogInventory\Model\Product\CopyConstructor\CatalogInventory();
+
+        $this->_productMock   = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('__wakeup', 'getStockItem'), array(), '', false
+        );
+
+        $this->_duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('setStockData', 'unsStockItem', '__wakeup'), array(), '', false
+        );
+
+        $this->_stockItemMock = $this->getMock(
+            'Magento\CatalogInventory\Model\Stock\Item', array(), array(), '', false
+        );
+    }
+
+    public function testBuildWithoutCurrentProductStockItem()
+    {
+        $expectedData = array(
+            'use_config_min_qty'          => 1,
+            'use_config_min_sale_qty'     => 1,
+            'use_config_max_sale_qty'     => 1,
+            'use_config_backorders'       => 1,
+            'use_config_notify_stock_qty' => 1
+        );
+        $this->_duplicateMock->expects($this->once())->method('unsStockItem');
+        $this->_productMock->expects($this->once())->method('getStockItem')->will($this->returnValue(null));
+
+        $this->_duplicateMock->expects($this->once())->method('setStockData')->with($expectedData);
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+
+    public function testBuildWithCurrentProductStockItem()
+    {
+        $expectedData = array(
+            'use_config_min_qty'          => 1,
+            'use_config_min_sale_qty'     => 1,
+            'use_config_max_sale_qty'     => 1,
+            'use_config_backorders'       => 1,
+            'use_config_notify_stock_qty' => 1,
+            'use_config_enable_qty_inc'   => 'use_config_enable_qty_inc',
+            'enable_qty_increments'       => 'enable_qty_increments',
+            'use_config_qty_increments'   => 'use_config_qty_increments',
+            'qty_increments'              => 'qty_increments',
+        );
+        $this->_duplicateMock->expects($this->once())->method('unsStockItem');
+        $this->_productMock->expects($this->once())
+            ->method('getStockItem')->will($this->returnValue($this->_stockItemMock));
+
+        $this->_stockItemMock->expects($this->any())->method('getData')->will($this->returnArgument(0));
+
+        $this->_duplicateMock->expects($this->once())->method('setStockData')->with($expectedData);
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php
index 00591459664974f84930cfe289f85915edf91886..1c2b769315dd235ebf43d9196260987ce110083e 100644
--- a/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/SessionTest.php
@@ -46,7 +46,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->will($this->returnValue($orderMock));
 
-        $messageCollFactory = $this->getMockBuilder('Magento\Message\CollectionFactory')
+        $messageCollectionFactory = $this->getMockBuilder('Magento\Message\CollectionFactory')
             ->disableOriginalConstructor()
             ->getMock();
         $quoteFactory = $this->getMockBuilder('Magento\Sales\Model\QuoteFactory')
@@ -65,7 +65,7 @@ class SessionTest extends \PHPUnit_Framework_TestCase
             array(
                 'request' => $this->getMock('Magento\App\RequestInterface', array(), array(), '', false),
                 'orderFactory' => $orderFactory,
-                'messageCollFactory' => $messageCollFactory,
+                'messageCollectionFactory' => $messageCollectionFactory,
                 'quoteFactory' => $quoteFactory,
                 'storage' => new \Magento\Session\Storage
             )
diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
index a86a17152b183f207054c995bec9484e5c62130b..ea791957dee9a538b5a536cd9e7cb529c35bd948 100644
--- a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php
@@ -29,6 +29,12 @@ namespace Magento\Cms\Model\Wysiwyg\Images;
  */
 class StorageTest extends \PHPUnit_Framework_TestCase
 {
+    /**
+     * Directory paths samples
+     */
+    const STORAGE_ROOT_DIR            = '/storage/root/dir';
+    const INVALID_DIRECTORY_OVER_ROOT = '/storage/some/another/dir';
+
     /**
      * @var \Magento\Cms\Model\Wysiwyg\Images\Storage
      */
@@ -94,14 +100,49 @@ class StorageTest extends \PHPUnit_Framework_TestCase
      */
     protected $_backendUrlMock;
 
+    /**
+     * @var \Magento\Filesystem\Directory\Write|PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_directoryMock;
+
+    /**
+     * @var \Magento\Filesystem\DriverInterface|PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_driverMock;
+
     protected function setUp()
     {
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
+        $this->_driverMock = $this->getMockForAbstractClass(
+            'Magento\Filesystem\DriverInterface', array(), '', false, false, true, array('getRealPath')
+        );
+        $this->_driverMock->expects($this->any())->method('getRealPath')
+           ->will($this->returnArgument(0));
+
+        $this->_directoryMock = $this->getMock(
+            'Magento\Filesystem\Directory\Write', array('delete', 'getDriver'), array(), '', false
+        );
+        $this->_directoryMock->expects($this->any())->method('getDriver')
+            ->will($this->returnValue($this->_driverMock));
+
+        $this->_filesystemMock = $this->getMock(
+            'Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false
+        );
+        $this->_filesystemMock->expects($this->any())
+            ->method('getDirectoryWrite')
+            ->with(\Magento\App\Filesystem::MEDIA_DIR)
+            ->will($this->returnValue($this->_directoryMock));
+
         $this->_adapterFactoryMock = $this->getMock(
             'Magento\Image\AdapterFactory', array(), array(), '', false
         );
         $this->_viewUrlMock = $this->getMock('Magento\View\Url', array(), array(), '', false);
-        $this->_imageHelperMock = $this->getMock('Magento\Cms\Helper\Wysiwyg\Images', array(), array(), '', false);
+        $this->_imageHelperMock = $this->getMock(
+            'Magento\Cms\Helper\Wysiwyg\Images', array('getStorageRoot'), array(), '', false
+        );
+        $this->_imageHelperMock->expects($this->any())->method('getStorageRoot')
+            ->will($this->returnValue(self::STORAGE_ROOT_DIR));
+
         $this->_resizeParameters = array('width' => 100, 'height' => 50);
 
         $this->_storageCollectionFactoryMock = $this->getMock(
@@ -148,4 +189,28 @@ class StorageTest extends \PHPUnit_Framework_TestCase
     {
         $this->assertEquals(50, $this->_model->getResizeHeight());
     }
+
+    /**
+     * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory
+     */
+    public function testDeleteDirectoryOverRoot()
+    {
+        $this->setExpectedException(
+            '\Magento\Core\Exception',
+            sprintf('Directory %s is not under storage root path.', self::INVALID_DIRECTORY_OVER_ROOT)
+        );
+        $this->_model->deleteDirectory(self::INVALID_DIRECTORY_OVER_ROOT);
+    }
+
+    /**
+     * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory
+     */
+    public function testDeleteRootDirectory()
+    {
+        $this->setExpectedException(
+            '\Magento\Core\Exception',
+            sprintf('We cannot delete root directory %s.', self::STORAGE_ROOT_DIR)
+        );
+        $this->_model->deleteDirectory(self::STORAGE_ROOT_DIR);
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php
index aca7b35e73f5504e4136f6a107be94d371256b74..93d06afe5684d3a8ab58bce3931fe43109b1ab02 100644
--- a/dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Code/GeneratorTest.php
@@ -68,7 +68,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase
     protected $_ioObjectMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Filesystem
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Filesystem
      */
     protected $_filesystemMock;
 
@@ -84,7 +84,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase
         $this->_ioObjectMock = $this->getMockBuilder('\Magento\Code\Generator\Io')
             ->disableOriginalConstructor()
             ->getMock();
-        $this->_filesystemMock = $this->getMockBuilder('\Magento\Filesystem')
+        $this->_filesystemMock = $this->getMockBuilder('\Magento\App\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
     }
diff --git a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php b/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php
index e87b01b30458dc4bd81874e82e60b1d47f7d904b..c8d7b0b3e4cdcc27370f2d3a7fee285b10c692f5 100644
--- a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/GenerateTest.php
@@ -24,7 +24,7 @@
 
 namespace Magento\Code\Minifier\Strategy;
 
-use Magento\Filesystem,
+use Magento\App\Filesystem,
     Magento\Filesystem\Directory\Write,
     Magento\Filesystem\Directory\Read;
 
@@ -64,17 +64,17 @@ class GenerateTest extends \PHPUnit_Framework_TestCase
             array(), array(), '', false
         );
         $this->filesystem = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryWrite', 'getDirectoryRead', '__wakeup'),
             array(), '', false
         );
         $this->filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue($this->rootDirectory));
         $this->filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::PUB_VIEW_CACHE)
+            ->with(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR)
             ->will($this->returnValue($this->pubViewCacheDir));
         $this->adapter = $this->getMockForAbstractClass('Magento\Code\Minifier\AdapterInterface', array(), '', false);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php b/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php
index e4fd0b4f99129f511b19c1485e6f1836e7edf8d3..736b4b7489be7d50a1d47eda03dd4157f9b0e6e4 100644
--- a/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php
+++ b/dev/tests/unit/testsuite/Magento/Code/Minifier/Strategy/LiteTest.php
@@ -24,7 +24,7 @@
 
 namespace Magento\Code\Minifier\Strategy;
 
-use Magento\Filesystem,
+use Magento\App\Filesystem,
     Magento\Filesystem\Directory\Read,
     Magento\Filesystem\Directory\Write;
 
@@ -64,17 +64,17 @@ class LiteTest extends \PHPUnit_Framework_TestCase
             array(), array(), '', false
         );
         $this->filesystem = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryWrite', 'getDirectoryRead', '__wakeup'),
             array(), '', false
         );
         $this->filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue($this->rootDirectory));
         $this->filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::PUB_VIEW_CACHE)
+            ->with(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR)
             ->will($this->returnValue($this->pubViewCacheDir));
         $this->adapter = $this->getMockForAbstractClass('Magento\Code\Minifier\AdapterInterface', array(), '', false);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Code/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Code/MinifierTest.php
index f5281bde15ffd214ef6460208b9061cff77dc6fb..9dff1a7bf547a919875d3b456577750aa329ab33 100644
--- a/dev/tests/unit/testsuite/Magento/Code/MinifierTest.php
+++ b/dev/tests/unit/testsuite/Magento/Code/MinifierTest.php
@@ -32,7 +32,7 @@ class MinifierTest extends \PHPUnit_Framework_TestCase
     protected $strategy;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -63,7 +63,7 @@ class MinifierTest extends \PHPUnit_Framework_TestCase
     {
         $this->strategy = $this->getMockForAbstractClass('Magento\Code\Minifier\StrategyInterface');
         $this->filesystem = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryRead', '__wakeup'),
             array(),
             '',
@@ -82,11 +82,11 @@ class MinifierTest extends \PHPUnit_Framework_TestCase
         );
         $this->filesystem->expects($this->at(0))
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue($this->rootDirectory));
         $this->filesystem->expects($this->at(1))
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::PUB_VIEW_CACHE)
+            ->with(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR)
             ->will($this->returnValue($this->pubViewCacheDir));
         $this->minifier = new Minifier($this->strategy, $this->filesystem, $this->minifyDir);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php
index cc54d51a7c228bdf012a26121f4d0f5eead58819..4819d66bebe9beff93a3e392e3d513778b78446d 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/FrontController/Plugin/DispatchExceptionHandlerTest.php
@@ -43,7 +43,7 @@ class DispatchExceptionHandlerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_storeManagerMock = $this->getMock('\Magento\Core\Model\StoreManager', array(), array(), '', false);
-        $this->_filesystemMock = $this->getMock('\Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('\Magento\App\Filesystem', array(), array(), '', false);
         $this->_model = new DispatchExceptionHandler(
             $this->_storeManagerMock,
             $this->_filesystemMock
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
index 232c3257d7cd6beaa7a6c113d37cad403a0e71cc..64e24261e47ba03e6fed7a02b0c2c5ed87732146 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
@@ -76,7 +76,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
     protected $_responseMock;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystemMock;
 
@@ -96,21 +96,21 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_configMock = $this->getMock('Magento\Core\Model\File\Storage\Config', array(), array(), '', false);
         $this->_sync= $this->getMock('Magento\Core\Model\File\Storage\Synchronization', array(), array(), '', false);
         $this->_dirVerificationMock = $this->getMock(
-            'Magento\Filesystem\DirectoryList\Verification', array(), array(), '', false
+            'Magento\App\Filesystem\DirectoryList\Verification', array(), array(), '', false
         );
 
-        $this->filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->directoryReadMock = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false);
 
         $this->filesystemMock->expects($this->any())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::MEDIA)
+            ->with(\Magento\App\Filesystem::MEDIA_DIR)
             ->will($this->returnValue($this->directoryReadMock));
 
         $this->_responseMock = $this->getMock('Magento\Core\Model\File\Storage\Response', array(), array(), '', false);
 
         $map = array(
-            array('Magento\Filesystem\DirectoryList\Verification', $this->_dirVerificationMock),
+            array('Magento\App\Filesystem\DirectoryList\Verification', $this->_dirVerificationMock),
             array('Magento\App\State', $this->_appState),
             array('Magento\Core\Model\File\Storage\Request', $this->_requestMock),
             array('Magento\Core\Model\File\Storage\Synchronization', $this->_sync),
@@ -138,9 +138,9 @@ class MediaTest extends \PHPUnit_Framework_TestCase
     public function testProcessRequestDoesNothingIfApplicationIsNotInstalled()
     {
         $this->_appState->expects($this->once())->method('isInstalled')->will($this->returnValue(false));
-        $this->_responseMock->expects($this->once())->method('sendNotFound');
+        $this->_responseMock->expects($this->once())->method('setHttpResponseCode')->with(404);
         $this->_requestMock->expects($this->never())->method('getPathInfo');
-        $this->assertEquals(-1, $this->_model->execute());
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 
     public function testProcessRequestCreatesConfigFileMediaDirectoryIsNotProvided()
@@ -162,8 +162,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
             ->with('Magento\Core\Model\File\Storage\Config')
             ->will($this->returnValue($this->_configMock));
         $this->_configMock->expects($this->once())->method('save');
-        $this->assertEquals(-1, $this->_model->execute());
-
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 
     public function testProcessRequestReturnsNotFoundResponseIfResourceIsNotAllowed()
@@ -184,13 +183,13 @@ class MediaTest extends \PHPUnit_Framework_TestCase
             $this->filesystemMock
         );
         $this->_appState->expects($this->once())->method('isInstalled')->will($this->returnValue(true));
-        $this->_responseMock->expects($this->once())->method('sendNotFound');
+        $this->_responseMock->expects($this->once())->method('setHttpResponseCode')->with(404);
         $this->_requestMock->expects($this->once())->method('getPathInfo');
         $this->_objectManagerMock->expects($this->once())->method('create')
             ->with('Magento\Core\Model\File\Storage\Config')
             ->will($this->returnValue($this->_configMock));
         $this->_configMock->expects($this->once())->method('getAllowedResources')->will($this->returnValue(false));
-        $this->assertEquals(-1, $this->_model->execute());
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
 
     }
 
@@ -199,9 +198,9 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_appState->expects($this->once())->method('isInstalled')->will($this->returnValue(true));
         $this->_configMock->expects($this->never())->method('save');
         $this->_requestMock->expects($this->once())->method('getPathInfo');
-        $this->_responseMock->expects($this->once())->method('sendNotFound');
+        $this->_responseMock->expects($this->once())->method('setHttpResponseCode')->with(404);
         $this->_requestMock->expects($this->never())->method('getFilePath');
-        $this->assertEquals(-1, $this->_model->execute());
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 
     public function testProcessRequestReturnsFileIfItsProperlySynchronized()
@@ -226,12 +225,9 @@ class MediaTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(true));
         $this->_responseMock
             ->expects($this->once())
-            ->method('sendFile')
+            ->method('setFilePath')
             ->with($filePath);
-        $this->_responseMock
-            ->expects($this->never())
-            ->method('sendNotFound');
-        $this->assertEquals(0, $this->_model->execute());
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 
     public function testProcessRequestReturnsNotFoundIfFileIsNotSynchronized()
@@ -242,8 +238,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_sync->expects($this->once())->method('synchronize');
         $this->_requestMock->expects($this->any())
             ->method('getFilePath')->will($this->returnValue('non_existing_file_name'));
-        $this->_responseMock->expects($this->never())->method('sendFile');
-        $this->_responseMock->expects($this->once())->method('sendNotFound');
-        $this->assertEquals(-1, $this->_model->execute());
+        $this->_responseMock->expects($this->once())->method('setHttpResponseCode')->with(404);
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..92333a3ab20c4f159e79735a185c717367c7e210
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Core/Helper/PostDataTest.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @category    Magento
+ * @package     Magento_Core
+ * @subpackage  unit_tests
+ * @copyright   Copyright (c) 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 PostDataTest extends \PHPUnit_Framework_TestCase
+{
+    public function testGetPostData()
+    {
+        $url = '/controller/sample/action/url/';
+        $formKey = 'formKey16bit';
+        $product = ['product' => new \Magento\Object(['id' => 1])];
+        $expected = json_encode([
+            'action' => $url,
+            'data' => [
+                'product' => new \Magento\Object(['id' => 1]),
+                'form_key' => $formKey,
+                \Magento\App\Action\Action::PARAM_NAME_URL_ENCODED =>
+                    strtr(base64_encode($url . 'for_uenc'), '+/=', '-_,')
+            ]
+        ]);
+
+        $contextMock = $this->getMock('Magento\App\Helper\Context', ['getUrlBuilder'], [], '', false);
+        $urlBuilderMock = $this->getMockForAbstractClass(
+            'Magento\UrlInterface',
+            [],
+            '',
+            true,
+            true,
+            true,
+            ['getCurrentUrl']
+        );
+        $formKeyMock = $this->getMock('Magento\Data\Form\FormKey', ['getFormKey'], [], '', false);
+
+        $contextMock->expects($this->once())
+            ->method('getUrlBuilder')
+            ->will($this->returnValue($urlBuilderMock));
+        $formKeyMock->expects($this->once())
+            ->method('getFormKey')
+            ->will($this->returnValue($formKey));
+        $urlBuilderMock->expects($this->once())
+            ->method('getCurrentUrl')
+            ->will($this->returnValue($url . 'for_uenc'));
+
+        $model = new \Magento\Core\Helper\PostData($contextMock, $formKeyMock);
+
+        $actual = $model->getPostData($url, $product);
+        $this->assertEquals($expected, $actual);
+    }
+} 
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php
index a1bcf48c7e1414e05cb1b634a1eb823438414a44..d8e03a009aa2bf4d61539a861be704843835e650 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Helper/ThemeTest.php
@@ -481,22 +481,22 @@ class ThemeTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @return \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @return \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected function _getFilesystem()
     {
-        /** @var $filesystem \Magento\Filesystem */
-        $filesystem = $this->getMock('Magento\Filesystem',
+        /** @var $filesystem \Magento\App\Filesystem */
+        $filesystem = $this->getMock('Magento\App\Filesystem',
             array('getPath', '__wakeup', 'getDirectoryRead'), array(), '', false
         );
         $filesystem->expects($this->any())
             ->method('getPath')
             ->will($this->returnValueMap(array(
-                array(\Magento\Filesystem::ROOT, self::ROOT),
-                array(\Magento\Filesystem::APP, self::APP),
-                array(\Magento\Filesystem::MODULES, self::MODULES),
-                array(\Magento\Filesystem::THEMES, self::THEMES),
-                array(\Magento\Filesystem::PUB_LIB, self::PUB_LIB),
+                array(\Magento\App\Filesystem::ROOT_DIR, self::ROOT),
+                array(\Magento\App\Filesystem::APP_DIR, self::APP),
+                array(\Magento\App\Filesystem::MODULES_DIR, self::MODULES),
+                array(\Magento\App\Filesystem::THEMES_DIR, self::THEMES),
+                array(\Magento\App\Filesystem::PUB_LIB_DIR, self::PUB_LIB),
             )));
 
         return $filesystem;
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php
index 92c0f28a66dfb747436611c11e07fac3548e9797..fbe3c2ef34ce01830635a8104b08f911ee7fa722 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/FileResolverTest.php
@@ -35,7 +35,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
     /**
      * Filesystem
      *
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -60,7 +60,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryRead'), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryRead'), array(), '', false);
         $this->moduleReader = $this->getMock(
             'Magento\Module\Dir\Reader',
             array(),
@@ -99,7 +99,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($fileList));
         $this->filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::CONFIG)
+            ->with(\Magento\App\Filesystem::CONFIG_DIR)
             ->will($this->returnValue($directory));
         $this->iteratorFactory->expects($this->once())
             ->method('create')
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php
index a373dabd13cd84d63fb35303e487adfd7b224c3a..462e317dfe8a35795a3967fffdb50ada370ad5e1 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Config/Initial/ReaderTest.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Core\Model\Config\Initial;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php
deleted file mode 100644
index 560753abb72e4581796df6fa349208c3dd75e97d..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Config/ReaderTest.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Config\Reader
- *
- * 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\Core\Model\DataService\Config;
-
-class ReaderTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var \Magento\Core\Model\DataService\Config\Reader */
-    private $_configReader;
-
-    /** @var \PHPUnit_Framework_MockObject_MockObject  */
-    private $_modulesReaderMock;
-
-    /**
-     * Prepare object manager with mocks of objects required by config reader.
-     */
-    protected function setUp()
-    {
-        $path = array(__DIR__, '..', '_files', 'service_calls.xml');
-        $path = realpath(implode('/', $path));
-        $this->_modulesReaderMock = $this->getMockBuilder('Magento\Module\Dir\Reader')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $directoryMock = $this->getMockBuilder('\Magento\Filesystem\Directory\Read')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $directoryMock->expects($this->any())
-            ->method('readFile')
-            ->will($this->returnValue(file_get_contents($path)));
-
-        $this->_configReader = new \Magento\Core\Model\DataService\Config\Reader(
-            new \Magento\Config\FileIterator($directoryMock, array($path)),
-            $this->_modulesReaderMock
-        );
-    }
-
-    /**
-     * Verify correct schema file is returned.
-     */
-    public function testGetSchemaFile()
-    {
-        $etcDir = 'app/code/Magento/Core/etc';
-        $expectedPath = $etcDir . '/service_calls.xsd';
-        $this->_modulesReaderMock->expects($this->any())->method('getModuleDir')
-            ->with('etc', 'Magento_Core')
-            ->will($this->returnValue($etcDir));
-        $result = $this->_configReader->getSchemaFile();
-        $this->assertNotNull($result);
-        $this->assertEquals($expectedPath, $result, 'returned schema file is wrong');
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php
deleted file mode 100644
index 0fdd68c517e9abede524dcd83a282d327f7c5d08..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/ConfigTest.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Config
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 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\DataService;
-
-class ConfigTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\DataService\Config
-     */
-    protected $_dataServiceConfig;
-
-    /** @var \Magento\Core\Model\DataService\Config\Reader\Factory */
-    private $_readersFactoryMock;
-
-    protected function setUp()
-    {
-        $reader = $this->getMockBuilder('Magento\Core\Model\DataService\Config\Reader')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $configXml = file_get_contents(__DIR__ . '/_files/service_calls.xml');
-        $config = new \Magento\Config\Dom($configXml);
-        $reader->expects($this->any())
-            ->method('getServiceCallConfig')
-            ->will($this->returnValue($config->getDom()));
-
-        $this->_readersFactoryMock = $this->getMockBuilder('Magento\Core\Model\DataService\Config\Reader\Factory')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $this->_readersFactoryMock->expects($this->any())
-            ->method('createReader')
-            ->will($this->returnValue($reader));
-
-        /** @var \Magento\Module\Dir\Reader $modulesReaderMock */
-        $modulesReaderMock = $this->getMockBuilder('Magento\Module\Dir\Reader')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $modulesReaderMock->expects($this->any())
-            ->method('getConfigurationFiles')
-            ->will($this->returnValue(array()));
-
-        $this->_dataServiceConfig = new \Magento\Core\Model\DataService\Config(
-            $this->_readersFactoryMock, $modulesReaderMock);
-    }
-
-    public function testGetClassByAlias()
-    {
-        // result should match the config.xml file
-        $result = $this->_dataServiceConfig->getClassByAlias('alias');
-        $this->assertNotNull($result);
-        $this->assertEquals('some_class_name', $result['class']);
-        $this->assertEquals('some_method_name', $result['retrieveMethod']);
-        $this->assertEquals('foo', $result['methodArguments']['some_arg_name']);
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Service call with name
-     */
-    public function testGetClassByAliasNotFound()
-    {
-        $this->_dataServiceConfig->getClassByAlias('none');
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage
-     */
-    public function testGetClassByAliasInvalidCall()
-    {
-        $this->_dataServiceConfig->getClassByAlias('missing_service');
-    }
-
-    /**
-     * @expectedException \LogicException
-     * @expectedExceptionMessage
-     */
-    public function testGetClassByAliasMethodNotFound()
-    {
-        $this->_dataServiceConfig->getClassByAlias('missing_retrieval_method');
-    }
-
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/GraphTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/GraphTest.php
deleted file mode 100644
index 5e2a0dccb692ab80f561847b4cf1573eb81c5204..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/GraphTest.php
+++ /dev/null
@@ -1,163 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Invoker
- *
- * 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\Core\Model\DataService;
-
-class GraphTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * Fake info for service and classes.
-     */
-    const TEST_CLASS_NAME = 'TEST_CLASS_NAME';
-
-    const TEST_DATA_SERVICE_NAME = 'TEST_DATA_SERVICE_NAME';
-
-    const TEST_NAMESPACE = 'TEST_NAMESPACE';
-
-    const TEST_NAMESPACE_ALIAS = 'TEST_NAMESPACE_ALIAS';
-
-    /**
-     * @var \Magento\Core\Model\DataService\Graph
-     */
-    protected $_graph;
-
-    /**
-     * @var object $_dataServiceMock
-     */
-    protected $_dataServiceMock;
-
-    /**
-     * @var  \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_invokerMock;
-
-    /**
-     * @var  \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_repositoryMock;
-
-    protected function setUp()
-    {
-        $this->_invokerMock = $this->getMock('Magento\Core\Model\DataService\Invoker', array(), array(), "", false);
-        $this->_repositoryMock = $this->getMock(
-            'Magento\Core\Model\DataService\Repository', array(), array(), "", false
-        );
-        $this->_graph = new \Magento\Core\Model\DataService\Graph($this->_invokerMock, $this->_repositoryMock);
-        $this->_dataServiceMock = (object)array();
-    }
-
-    public function testInit()
-    {
-        $this->_repositoryMock->expects($this->once())->method('setAlias')->with(
-            self::TEST_NAMESPACE,
-            self::TEST_DATA_SERVICE_NAME,
-            self::TEST_NAMESPACE_ALIAS
-        );
-        $namespaceConfig
-            = array('namespaces' => array(self::TEST_NAMESPACE =>
-                                          \Magento\Core\Model\DataService\GraphTest::TEST_NAMESPACE_ALIAS));
-        $this->_repositoryMock->expects($this->once())->method("get")->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue(null));
-        $this->_invokerMock->expects($this->once())->method('getServiceData')->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue($this->_dataServiceMock));
-        $this->_repositoryMock->expects($this->once())->method("add")->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME),
-            $this->equalTo($this->_dataServiceMock)
-        );
-        $this->_graph->init(
-            array(self::TEST_DATA_SERVICE_NAME => $namespaceConfig)
-        );
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Data reference configuration doesn't have a block to link to
-     */
-    public function testInitMissingNamespaces()
-    {
-        $namespaceConfig = array();
-        $this->_repositoryMock->expects($this->any())->method("get")->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue(null));
-        $this->_invokerMock->expects($this->any())->method('getServiceData')->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue($this->_dataServiceMock));
-        $this->_repositoryMock->expects($this->any())->method("add")->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME),
-            $this->equalTo($this->_dataServiceMock)
-        );
-        $this->_graph->init(
-            array(self::TEST_DATA_SERVICE_NAME => $namespaceConfig)
-        );
-    }
-
-    public function testGet()
-    {
-        $this->_dataServiceMock = (object)array();
-        $this->_repositoryMock->expects($this->once())->method("get")->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue($this->_dataServiceMock));
-        $this->assertEquals(
-            $this->_dataServiceMock,
-            $this->_graph->get(self::TEST_DATA_SERVICE_NAME)
-        );
-    }
-
-    public function testGetChild()
-    {
-        $this->_dataServiceMock = (object)array();
-        $this->_repositoryMock->expects($this->once())->method("get")->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue($this->_dataServiceMock));
-        $this->assertEquals(
-            $this->_dataServiceMock,
-            $this->_graph->getChildNode(self::TEST_DATA_SERVICE_NAME)
-        );
-    }
-
-    public function testGetByNamespace()
-    {
-        $this->_repositoryMock->expects($this->once())->method('getByNamespace')->with(
-            self::TEST_NAMESPACE
-        )->will($this->returnValue(self::TEST_DATA_SERVICE_NAME));
-        $this->assertEquals(
-            self::TEST_DATA_SERVICE_NAME,
-            $this->_graph->getByNamespace(self::TEST_NAMESPACE)
-        );
-    }
-
-    public function testGetArgumentValue()
-    {
-        $this->_invokerMock->expects($this->once())->method('getArgumentValue')->with(
-            $this->equalTo(self::TEST_DATA_SERVICE_NAME)
-        )->will($this->returnValue($this->_dataServiceMock));
-
-        $argValue = $this->_graph->getArgumentValue(self::TEST_DATA_SERVICE_NAME);
-
-        $this->assertEquals($this->_dataServiceMock, $argValue);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/InvokerTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/InvokerTest.php
deleted file mode 100644
index d2d741be3eecb54d7f8f5baaa6ead860430b2ebd..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/InvokerTest.php
+++ /dev/null
@@ -1,218 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Invoker
- *
- * 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\Core\Model\DataService;
-
-class InvokerTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * Fake info for service and classes.
-     */
-    const TEST_CLASS_NAME = 'TEST_CLASS_NAME';
-
-    const TEST_DATA_SERVICE_NAME = 'TEST_DATA_SERVICE_NAME';
-
-    const TEST_NAMESPACE = 'TEST_NAMESPACE';
-
-    const TEST_NAMESPACE_ALIAS = 'TEST_NAMESPACE_ALIAS';
-
-    /**
-     * @var \Magento\Core\Model\DataService\Invoker
-     */
-    protected $_invoker;
-
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_configMock;
-
-    /**
-     * @var  \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_objectManagerMock;
-
-    /**
-     * @var  \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_compositeMock;
-
-    /**
-     * Empty data service array
-     *
-     * @var array
-     */
-    protected $_dataServiceMock;
-
-    /**
-     * @var  \PHPUnit_Framework_MockObject_MockObject
-     */
-    private $_navigator;
-
-    /**
-     * Get the data service mock
-     *
-     * @return array
-     */
-    public function retrieveMethod()
-    {
-        return $this->_dataServiceMock;
-    }
-
-    protected function setUp()
-    {
-        $this->_configMock = $this->getMockBuilder('Magento\Core\Model\DataService\ConfigInterface')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_objectManagerMock = $this->getMockBuilder('Magento\ObjectManager')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_compositeMock = $this->getMockBuilder('Magento\Core\Model\DataService\Path\Composite')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_navigator = $this->getMockBuilder('Magento\Core\Model\DataService\Path\Navigator')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $this->_invoker = new \Magento\Core\Model\DataService\Invoker(
-            $this->_configMock,
-            $this->_objectManagerMock,
-            $this->_compositeMock,
-            $this->_navigator
-        );
-        $this->_dataServiceMock = array();
-    }
-
-    public function testGetServiceData()
-    {
-        $classInformation = array(
-            'class'          => self::TEST_CLASS_NAME,
-            'retrieveMethod' => 'retrieveMethod', 'methodArguments' => array());
-        $this->_configMock
-            ->expects($this->once())
-            ->method("getClassByAlias")
-            ->with($this->equalTo(self::TEST_DATA_SERVICE_NAME))
-            ->will($this->returnValue($classInformation));
-        $this->_objectManagerMock
-            ->expects($this->once())
-            ->method("get")
-            ->with($this->equalTo(self::TEST_CLASS_NAME))
-            ->will($this->returnValue($this));
-
-        $this->assertSame(
-            $this->_dataServiceMock,
-            $this->_invoker->getServiceData(self::TEST_DATA_SERVICE_NAME)
-        );
-    }
-
-    public function testGetServiceDataWithArguments()
-    {
-        $classInformation = array(
-            'class'          => self::TEST_CLASS_NAME,
-            'retrieveMethod' => 'retrieveMethod', 'methodArguments' => array('something'));
-        $this->_configMock
-            ->expects($this->once())
-            ->method("getClassByAlias")
-            ->with($this->equalTo(self::TEST_DATA_SERVICE_NAME))
-            ->will($this->returnValue($classInformation));
-        $this->_objectManagerMock
-            ->expects($this->once())
-            ->method("get")
-            ->with($this->equalTo(self::TEST_CLASS_NAME))
-            ->will($this->returnValue($this));
-
-        $this->assertSame(
-            $this->_dataServiceMock,
-            $this->_invoker->getServiceData(self::TEST_DATA_SERVICE_NAME)
-        );
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage return an array
-     */
-    public function testGetServiceDataFailsIfNotArray()
-    {
-        // This line makes sure we don't return an array
-        $this->_dataServiceMock = (object)array();
-        $classInformation = array(
-            'class'          => self::TEST_CLASS_NAME,
-            'retrieveMethod' => 'retrieveMethod', 'methodArguments' => array());
-        $this->_configMock
-            ->expects($this->once())
-            ->method("getClassByAlias")
-            ->with($this->equalTo(self::TEST_DATA_SERVICE_NAME))
-            ->will($this->returnValue($classInformation));
-        $this->_objectManagerMock
-            ->expects($this->once())
-            ->method("get")
-            ->with($this->equalTo(self::TEST_CLASS_NAME))
-            ->will($this->returnValue($this));
-
-        $this->_invoker->getServiceData(self::TEST_DATA_SERVICE_NAME);
-    }
-
-    public function testGetArgumentValueNoReplace()
-    {
-        $expectedValue = 'simple_value';
-        $this->_navigator->expects($this->never())
-            ->method('search');
-
-        $argumentValue = $this->_invoker->getArgumentValue($expectedValue);
-
-        $this->assertEquals($expectedValue, $argumentValue);
-    }
-
-    public function testGetArgumentValueFullReplace()
-    {
-        $expectedValue = 'replacementValue';
-        $this->_navigator->expects($this->once())
-            ->method('search')
-            ->with($this->_compositeMock, array('first', 'second'))
-            ->will($this->returnValue($expectedValue));
-
-        $argumentValue = $this->_invoker->getArgumentValue('{{first.second}}');
-
-        $this->assertEquals($expectedValue, $argumentValue);
-    }
-
-    public function testGetArgumentValueTwoReplace()
-    {
-        $replaceFirstSecond = 'replacementValue';
-        $replaceAnother = 'anotherValue';
-        $inputValue = 'prefix-{{first.second}}-middle-{{another}}-postfix';
-        $expectedValue = 'prefix-replacementValue-middle-anotherValue-postfix';
-        $this->_navigator->expects($this->at(0))
-            ->method('search')
-            ->with($this->_compositeMock, array('first', 'second'))
-            ->will($this->returnValue($replaceFirstSecond));
-        $this->_navigator->expects($this->at(1))
-            ->method('search')
-            ->with($this->_compositeMock, array('another'))
-            ->will($this->returnValue($replaceAnother));
-
-        $argumentValue = $this->_invoker->getArgumentValue($inputValue);
-
-        $this->assertEquals($expectedValue, $argumentValue);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/CompositeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/CompositeTest.php
deleted file mode 100644
index 9525cab5c5589c97c1a0bf012179e7d8a4468d66..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/CompositeTest.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Path\Composite
- *
- * 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\Core\Model\DataService\Path;
-
-class CompositeTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * Names to use for testing path composite
-     */
-    const ITEM_ONE = 'ITEM_ONE';
-    const ITEM_TWO = 'ITEM_TWO';
-    const ITEM_THREE = 'ITEM_THREE';
-
-    /** @var \Magento\Core\Model\DataService\Path\Composite */
-    protected $_composite;
-
-    /**
-     * object map for mock object manager
-     * @var array
-     */
-    protected $_map;
-
-    protected function setUp()
-    {
-        /** @var $objectManagerMock \Magento\ObjectManager */
-        $objectManagerMock = $this->getMockBuilder('Magento\ObjectManager')->disableOriginalConstructor()->getMock();
-        $this->_map = array(
-            array(self::ITEM_ONE, (object)array('name' => self::ITEM_ONE)),
-            array(self::ITEM_TWO, (object)array('name' => self::ITEM_TWO)),
-            array(self::ITEM_THREE, (object)array('name' => self::ITEM_THREE))
-        );
-        $objectManagerMock->expects($this->any())->method('get')->will($this->returnValueMap($this->_map));
-        $vector = array((self::ITEM_ONE)   => (self::ITEM_ONE),
-                        (self::ITEM_TWO)   => (self::ITEM_TWO),
-                        (self::ITEM_THREE) => (self::ITEM_THREE));
-        $this->_composite
-            = new \Magento\Core\Model\DataService\Path\Composite($objectManagerMock, $vector);
-    }
-
-    /**
-     * @dataProvider childrenProvider
-     */
-    public function testGetChildNode($elementName, $expectedResult)
-    {
-        $child = $this->_composite->getChildNode($elementName);
-
-        $this->assertEquals($expectedResult, $child);
-    }
-
-    public function childrenProvider()
-    {
-        return array(
-            // elementName, expectedResult
-            array(self::ITEM_ONE, (object)array('name' => self::ITEM_ONE)),
-            array(self::ITEM_TWO, (object)array('name' => self::ITEM_TWO)),
-            array(self::ITEM_THREE, (object)array('name' => self::ITEM_THREE)),
-            array('none', null),
-        );
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/NavigatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/NavigatorTest.php
deleted file mode 100644
index 0f9b59ddded926c3981ed1841b18655bcf3d3aee..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/NavigatorTest.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Path\Navigator
- *
- * 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\Core\Model\DataService\Path;
-
-class NavigatorTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var \PHPUnit_Framework_MockObject_MockObject  \Magento\Core\Model\DataService\Path\NodeInterface */
-    private $_rootNode;
-
-    /**
-     * @var \Magento\Core\Model\DataService\Path\Navigator
-     */
-    private $_navigator;
-
-    protected function setUp()
-    {
-        $this->_navigator = new \Magento\Core\Model\DataService\Path\Navigator();
-    }
-
-    public function testSearch()
-    {
-        $this->_rootNode = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-        $branch = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-        $leaf = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-        $this->_rootNode->expects($this->any())
-            ->method('getChildNode')
-            ->with('branch')
-            ->will($this->returnValue($branch));
-        $branch->expects($this->any())
-            ->method('getChildNode')
-            ->with('leaf')
-            ->will($this->returnValue($leaf));
-
-        $nodeFound = $this->_navigator->search($this->_rootNode, explode('.', 'branch.leaf'));
-
-        $this->assertEquals($leaf, $nodeFound);
-    }
-
-    public function testSearchOfArray()
-    {
-        $this->_rootNode = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-        $branch = array();
-        $leaf = 'a leaf node can be anything';
-        $branch['leaf'] = $leaf;
-        $this->_rootNode->expects($this->any())
-            ->method('getChildNode')
-            ->with('branch')
-            ->will($this->returnValue($branch));
-
-        $nodeFound = $this->_navigator->search($this->_rootNode, explode('.', 'branch.leaf'));
-
-        $this->assertEquals($leaf, $nodeFound);
-    }
-
-    public function testSearchOfEmptyArray()
-    {
-        $this->_rootNode = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-        $branch = array();
-        $this->_rootNode->expects($this->any())
-            ->method('getChildNode')
-            ->with('branch')
-            ->will($this->returnValue($branch));
-
-        $nodeFound = $this->_navigator->search($this->_rootNode, explode('.', 'branch.leaf'));
-
-        $this->assertEquals(null, $nodeFound);
-    }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage invalid.leaf
-     */
-    public function testSearchWithInvalidPath()
-    {
-        $this->_rootNode = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-        $leaf = $this->getMockBuilder('Magento\Core\Model\DataService\Path\NodeInterface')
-            ->disableOriginalConstructor()->getMock();
-
-        $nodeFound = $this->_navigator->search($this->_rootNode, explode('.', 'invalid.leaf'));
-
-        $this->assertEquals($leaf, $nodeFound);
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/RequestTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/RequestTest.php
deleted file mode 100644
index 4e7f38902bb882761bb74b31eeba61f0da748c18..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/Path/RequestTest.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Path\Request
- *
- * 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\Core\Model\DataService\Path;
-
-class RequestTest extends \PHPUnit_Framework_TestCase
-{
-
-    /**
-     * Test data for params
-     */
-    const SOME_INTERESTING_PARAMS = 'Some interesting params.';
-
-    public function testGetChild()
-    {
-        $requestMock = $this->getMockBuilder('Magento\App\Request\Http')
-            ->disableOriginalConstructor()
-            ->getMock();
-        $requestMock->expects($this->once())
-            ->method('getParams')
-            ->will($this->returnValue(self::SOME_INTERESTING_PARAMS));
-        $requestVisitor = new \Magento\Core\Model\DataService\Path\Request($requestMock);
-        $this->assertEquals(self::SOME_INTERESTING_PARAMS, $requestVisitor->getChildNode('params'));
-    }
-
-    public function testNotFound()
-    {
-        $requestMock = $this->getMockBuilder('Magento\App\Request\Http')
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $requestVisitor = new \Magento\Core\Model\DataService\Path\Request($requestMock);
-        $this->assertEquals(null, $requestVisitor->getChildNode('foo'));
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/RepositoryTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/RepositoryTest.php
deleted file mode 100644
index 7eda760efa2f6d86c2670cdcb4f590d76a826da4..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/RepositoryTest.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-/**
- * \Magento\Core\Model\DataService\Repository
- *
- * 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\Core\Model\DataService;
-
-class RepositoryTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Core\Model\DataService\Repository
-     */
-    protected $_repository;
-
-    protected function setUp()
-    {
-        $this->_repository = new \Magento\Core\Model\DataService\Repository();
-    }
-
-    public function testAddGet()
-    {
-        $data = array();
-        $serviceName = 'service_name';
-        $this->assertEquals($data, $this->_repository->add($serviceName, $data)->get($serviceName));
-    }
-
-    public function testGet()
-    {
-        $this->assertEquals(null, $this->_repository->get('unknown_service_name'));
-    }
-
-    public function testGetByNamespace()
-    {
-        $result = $this->_repository->getByNamespace('unknown_namespace');
-        $this->assertEquals(array(), $result);
-    }
-
-    public function testAddGetNamespace()
-    {
-        $data = array();
-        $alias = 'alias';
-        $namespace = 'namespace';
-        $serviceName = 'service_name';
-        $namespaceResults = $this->_repository->add($serviceName, $data)
-            ->setAlias($namespace, $serviceName, $alias)
-            ->getByNamespace($namespace);
-        $this->assertEquals($data, $namespaceResults[$alias]);
-    }
-
-    public function testAddGetNamespaceAgain()
-    {
-        $data = array();
-        $alias = 'alias';
-        $namespace = 'namespace';
-        $serviceName = 'service_name';
-        $namespaceResults = $this->_repository->add($serviceName, $data)
-            ->setAlias($namespace, $serviceName, 'something_different')
-            ->setAlias($namespace, $serviceName, $alias)
-            ->getByNamespace($namespace);
-        $this->assertEquals($data, $namespaceResults[$alias]);
-    }
-
-    public function testGetChild()
-    {
-        $data = array();
-        $serviceName = 'service_name';
-        $this->_repository->add($serviceName, $data);
-        $this->assertEquals($data, $this->_repository->getChildNode($serviceName));
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/_files/second_service_calls.xml b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/_files/second_service_calls.xml
deleted file mode 100644
index 3588ee030780c7713e9afa922a2b9a16fc884ee3..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/_files/second_service_calls.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<service_calls>
-    <service_call name='another_alias' service='another_class_name' method='another_method_name'>
-        <arg name="another_arg_name">foo</arg>
-    </service_call>
-</service_calls>
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/_files/service_calls.xml b/dev/tests/unit/testsuite/Magento/Core/Model/DataService/_files/service_calls.xml
deleted file mode 100644
index 47239b1c204d165249b3eced6284eb48b3e01223..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Core/Model/DataService/_files/service_calls.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0"?>
-<!--
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Academic Free License (AFL 3.0)
- * that is bundled with this package in the file LICENSE_AFL.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/afl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
- */
--->
-<service_calls>
-    <service_call name='alias' service='some_class_name' method='some_method_name'>
-        <arg name="some_arg_name">foo</arg>
-    </service_call>
-
-    <service_call name='missing_service'  method='some_method_name'>
-        <arg name="some_arg_name">foo</arg>
-    </service_call>
-
-    <service_call name='missing_retrieval_method'>
-        <arg name="some_arg_name">foo</arg>
-    </service_call>
-</service_calls>
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php
index 6f33b8b68fb3076b0d14f59fb3f5f00ad6630909..1a6f2d3266c107fd1e6b411496a1bf0a61421e09 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/ConfigTest.php
@@ -59,10 +59,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->method('openFile')
             ->with('cacheFile')
             ->will($this->returnValue($file));
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryWrite'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::PUB)
+            ->with(\Magento\App\Filesystem::PUB_DIR)
             ->will($this->returnValue($directory));
         $model = new \Magento\Core\Model\File\Storage\Config(
             $fileStorageMock,
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php
index a7a6758bc97ca683b879530ef1dd743d8b4d148e..e89664af9f9fa11c98ef380e3cc653a81c5c3815 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/File/Storage/SynchronizationTest.php
@@ -76,10 +76,10 @@ class SynchronizationTest extends \PHPUnit_Framework_TestCase
             ->method('openFile')
             ->with($filePath)
             ->will($this->returnValue($file));
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryWrite'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::PUB)
+            ->with(\Magento\App\Filesystem::PUB_DIR)
             ->will($this->returnValue($directory));
 
         $model = new Synchronization($storageFactoryMock, $filesystem);
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php
index a490e838f5e08265fd35cd4b3abc9f1e9bbb2d6d..1075daaefa6a07e21e41c417120cc3ae0a670cd4 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php
@@ -106,7 +106,7 @@ class MergeTest extends \PHPUnit_Framework_TestCase
 
         $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
 
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false, false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false, false);
         $directory = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false, false);
         $directory->expects($this->any())->method('getRelativePath')->will($this->returnArgument(0));
 
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Locale/Hierarchy/Config/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Locale/Hierarchy/Config/FileResolverTest.php
index 2cb091b5adc358c5804b3e2dbd0b243c74601cdd..9ab6a9e3bc19cae12f00f9c82f2d4f4394e5c1df 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Locale/Hierarchy/Config/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Locale/Hierarchy/Config/FileResolverTest.php
@@ -42,7 +42,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryRead'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryRead'), array(), '', false);
         $this->_directoryMock = $this->getMock(
             '\Magento\Filesystem\Directory\Read',
             array('isExist', 'search'),
@@ -52,7 +52,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::APP)
+            ->with(\Magento\App\Filesystem::APP_DIR)
             ->will($this->returnValue($this->_directoryMock));
         $this->_directoryMock->expects($this->once())
             ->method('isExist')
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
index d6c5a3a468bc41db0601d50cfa75409a70e8703d..c995bd10d9356253eafa33b8d496985d2a3b04d4 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Db/AbstractTest.php
@@ -75,7 +75,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetConnectionInMemoryCaching()
     {
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $string = $this->getMock('Magento\Stdlib\String', array(), array(), '', false);
         $dateTime = $this->getMock('Magento\Stdlib\DateTime', null, array(), '', true);
         $connection = new \Magento\DB\Adapter\Pdo\Mysql($filesystem, $string, $dateTime, array(
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php
index 48130a2d4450048861b2e8805edb1491d9ba5718..e86ed68a6dfb9e10d366e833ea5ba8d2624843d9 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/File/Storage/FileTest.php
@@ -38,7 +38,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
     protected $loggerMock;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystemMock;
 
@@ -55,7 +55,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
         $this->loggerMock =
             $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->filesystemMock =
-            $this->getMock('Magento\Filesystem', array('getDirectoryRead'), array(), '', false);
+            $this->getMock('Magento\App\Filesystem', array('getDirectoryRead'), array(), '', false);
         $this->directoryReadMock =
             $this->getMock('Magento\Filesystem\Directory\Read',
                 array('isDirectory', 'readRecursively'), array(), '', false);
@@ -78,7 +78,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
     {
         $this->filesystemMock->expects($this->once())
             ->method('getDirectoryRead')
-            ->with($this->equalTo(\Magento\FileSystem::MEDIA))
+            ->with($this->equalTo(\Magento\App\Filesystem::MEDIA_DIR))
             ->will($this->returnValue($this->directoryReadMock));
 
         $this->directoryReadMock->expects($this->any())
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 13039f98717e9043eb17ef0b7afdcba667a51dc8..357f5f052a90b9e44a19ab42841a017eff90d97b 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
@@ -157,7 +157,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(array()));
 
         $contextMock = $this->getMock('Magento\Core\Model\Resource\Setup\Context', array(), array(), '', false);
-        $filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $contextMock->expects($this->any())
             ->method('getFilesystem')
             ->will($this->returnValue($filesystemMock));
@@ -188,7 +188,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
             $contextMock,
             'core_setup',
             $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false),
-            $this->getMock('Magento\Filesystem', array(), array(), '', false),
+            $this->getMock('Magento\App\Filesystem', array(), array(), '', false),
             ''
         );
 
@@ -241,7 +241,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
 
         $setupModel = new \Magento\Core\Model\Resource\Setup\Migration(
             $this->getMock('Magento\App\Resource', array(), array(), '', false, false),
-            $this->getMock('Magento\Filesystem', array(), array(), '', false),
+            $this->getMock('Magento\App\Filesystem', array(), array(), '', false),
             $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false),
             $this->getMock('Magento\Logger', array(), array(), '', false),
             $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false),
@@ -310,11 +310,11 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Filesystem
+     * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Filesystem
      */
     protected function _getFilesystemMock()
     {
-        $mock = $this->getMockBuilder('Magento\Filesystem')
+        $mock = $this->getMockBuilder('Magento\App\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         return $mock;
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Session/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Session/ConfigTest.php
index a667650fa95b43a033a66aca2bea1131cbe717cb..c0e5b03936b31f10ccef48dad349eaad979ceaac 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Session/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Session/ConfigTest.php
@@ -60,7 +60,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected $_appState;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -83,7 +83,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
             ->method('getHttpHost')->will($this->returnValue('init.host'));
         $this->_appState = $this->getMock('\Magento\App\State', array('isInstalled'), array(), '', false, false);
         $this->_appState->expects($this->atLeastOnce())->method('isInstalled')->will($this->returnValue(true));
-        $this->_filesystem = $this->getMock('\Magento\Filesystem', array(), array(), '', false, false);
+        $this->_filesystem = $this->getMock('\Magento\App\Filesystem', array(), array(), '', false, false);
 
         $this->config = new \Magento\Core\Model\Session\Config(
             $this->_configMock,
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php
index 0311e6b8c8a62d1a78f2a87af928b71d7b33e27e..5cf989426df4d2d5ce89a58819fe7c71ae2891d0 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php
@@ -54,11 +54,11 @@ class PathTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_viewUrlMock = $this->getMock('Magento\View\Url', array(), array(), '', false);
         $this->_storeManagerMock = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
 
-        $this->_filesystem->expects($this->any())->method('getPath')->with(\Magento\Filesystem::MEDIA)
+        $this->_filesystem->expects($this->any())->method('getPath')->with(\Magento\App\Filesystem::MEDIA_DIR)
             ->will($this->returnValue('/media'));
 
         $this->_model = new Path(
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php
index d492be2bff4acb0aba0074985788805a0b7299a7..3a71d7ea142291d0df9be030f098b0266920a40f 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php
@@ -29,9 +29,9 @@ namespace Magento\DesignEditor\Block\Adminhtml;
 class ThemeTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @cover \Magento\DesignEditor\Block\Adminhtml\Theme::addButton
-     * @cover \Magento\DesignEditor\Block\Adminhtml\Theme::clearButtons
-     * @cover \Magento\DesignEditor\Block\Adminhtml\Theme::getButtonsHtml
+     * @covers \Magento\DesignEditor\Block\Adminhtml\Theme::addButton
+     * @covers \Magento\DesignEditor\Block\Adminhtml\Theme::clearButtons
+     * @covers \Magento\DesignEditor\Block\Adminhtml\Theme::getButtonsHtml
      */
     public function testButtons()
     {
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php
index fae070343b4f84fd6d37defb138ebb6aec34b548..dbe92360472b4f62818c7dde8c73165cd0dd770d 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php
@@ -34,7 +34,7 @@ class BackgroundImageTest
     extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @cover \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss
+     * @covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss
      * @dataProvider backgroundImageData
      */
     public function testToCss($expectedResult, $data)
@@ -48,7 +48,7 @@ class BackgroundImageTest
     }
 
     /**
-     * @cover \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss
+     * @covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss
      * @dataProvider backgroundImageDataClearDefault
      */
     public function testToCssClearDefault($expectedResult, $data)
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php
index 53514b263b3d0ec267b62a462498c388af2dcc3d..34559a7112bbe9eb711691a0f9d14f35b8b12cbd 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php
@@ -34,7 +34,7 @@ class DefaultTest
     extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @cover \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\DefaultRenderer::toCss
+     * @covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\DefaultRenderer::toCss
      * @dataProvider colorPickerData
      */
     public function testToCss($expectedResult, $data)
diff --git a/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php
index d3dbb23f7e6b2c65b14742e4a22988f0aed40aac..f0e8c86a87a387723c23532036195e5288bf29d0 100644
--- a/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Directory/Helper/DataTest.php
@@ -63,9 +63,14 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
         $this->_regionCollection = $this->getMock('Magento\Directory\Model\Resource\Region\Collection', array(),
             array(), '', false);
-        $regCollFactory = $this->getMock('Magento\Directory\Model\Resource\Region\CollectionFactory', array('create'),
-            array(), '', false);
-        $regCollFactory->expects($this->any())
+        $regCollectionFactory = $this->getMock(
+            'Magento\Directory\Model\Resource\Region\CollectionFactory',
+            array('create'),
+            array(),
+            '',
+            false
+        );
+        $regCollectionFactory->expects($this->any())
             ->method('create')
             ->will($this->returnValue($this->_regionCollection));
 
@@ -83,7 +88,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
             'context' => $context,
             'configCacheType' => $configCacheType,
             'countryCollection' => $this->_countryCollection,
-            'regCollFactory' => $regCollFactory,
+            'regCollectionFactory' => $regCollectionFactory,
             'coreHelper' => $this->_coreHelper,
             'storeManager' => $storeManager,
             'currencyFactory' => $currencyFactory,
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..91b1960d5d0621d18c2cc58eec8fe6a273fcc6cf
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Controller/Adminhtml/Product/Initialization/Helper/Plugin/DownloadableTest.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin;
+
+class DownloadableTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Downloadable
+     */
+    protected $downloadablePlugin;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    protected function setUp()
+    {
+        $this->requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product',
+            array('setDownloadableData', '__wakeup'), array(), '', false);
+        $this->downloadablePlugin =
+            new \Magento\Downloadable\Controller\Adminhtml\Product\Initialization\Helper\Plugin\Downloadable(
+                $this->requestMock
+            );
+    }
+
+    public function testAfterInitializeIfDownloadableExist()
+    {
+        $this->requestMock
+            ->expects($this->once())
+            ->method('getPost')
+            ->with('downloadable')
+            ->will($this->returnValue('downloadable'));
+        $this->productMock->expects($this->once())->method('setDownloadableData')->with('downloadable');
+        $this->downloadablePlugin->afterInitialize($this->productMock);
+    }
+
+    public function testAfterInitializeIfDownloadableNotExist()
+    {
+        $this->requestMock
+            ->expects($this->once())
+            ->method('getPost')
+            ->with('downloadable')
+            ->will($this->returnValue(false));
+        $this->productMock->expects($this->never())->method('setDownloadableData');
+        $this->downloadablePlugin->afterInitialize($this->productMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php
index e30fd331e9cc3a22bb9986de0c1f3e2073b78f54..0914244383f7046be4b01db24fccf4395559e06c 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php
@@ -24,7 +24,7 @@
 namespace Magento\Downloadable\Helper;
 
 use Magento\Downloadable\Helper\Download as DownloadHelper;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\Filesystem\File\ReadInterface as FileReadInterface;
 use Magento\Filesystem\Directory\ReadInterface as DirReadInterface;
 use Magento\Downloadable\Helper\File as DownloadableFile;
@@ -67,7 +67,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
         self::$functionExists = true;
         self::$mimeContentType = self::MIME_TYPE;
 
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', [], [], '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', [], [], '', false);
         $this->_handleMock = $this->getMock('Magento\Filesystem\File\ReadInterface', [], [], '', false);
         $this->_workingDirectoryMock = $this->getMock('Magento\Filesystem\Directory\ReadInterface', [], [], '', false);
         $this->_downloadableFileMock = $this->getMock('Magento\Downloadable\Helper\File', [], [], '', false);
@@ -208,7 +208,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
         $this->_filesystemMock
             ->expects($this->any())
             ->method('getDirectoryRead')
-            ->with(Filesystem::MEDIA)
+            ->with(Filesystem::MEDIA_DIR)
             ->will($this->returnValue($this->_workingDirectoryMock));
 
         $this->_helper->setResource($path, DownloadHelper::LINK_TYPE_FILE);
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/ObserverTest.php
deleted file mode 100644
index 43c007ef29fd62c81dee16b1b4cbe99d021de48d..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/ObserverTest.php
+++ /dev/null
@@ -1,283 +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_Downloadable
- * @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\Downloadable\Model;
-
-class ObserverTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Event\Observer
-     */
-    protected $_observer;
-
-    /**
-     * @var \Magento\Downloadable\Model\Observer
-     */
-    protected $_model;
-
-    /**
-     * @var \Magento\Core\Helper\Data
-     */
-    protected $_helperJsonEncode;
-
-    protected function setUp()
-    {
-        $this->_helperJsonEncode = $this->getMockBuilder('Magento\Core\Helper\Data')
-            ->setMethods(array('jsonEncode'))
-            ->disableOriginalConstructor()
-            ->getMock();
-        $itemsFactory = $this->getMock('Magento\Downloadable\Model\Resource\Link\Purchased\Item\CollectionFactory',
-            array(), array(), '', false
-        );
-        $this->_model = new \Magento\Downloadable\Model\Observer(
-            $this->_helperJsonEncode,
-            $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false),
-            $this->getMock('Magento\Downloadable\Model\Link\PurchasedFactory', array(), array(), '', false),
-            $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false),
-            $this->getMock('Magento\Downloadable\Model\Link\Purchased\ItemFactory', array(), array(), '', false),
-            $this->getMock('Magento\Checkout\Model\Session', array(), array(), '', false),
-            $itemsFactory,
-            $this->getMock('\Magento\Object\Copy', array(), array(), '', false)
-        );
-    }
-
-    protected function tearDown()
-    {
-        $this->_helperJsonEncode = null;
-        $this->_model = null;
-        $this->_observer = null;
-    }
-
-    /**
-     * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Catalog\Model\Product
-     */
-    protected function getProductMock()
-    {
-        return $this->getMock(
-            'Magento\Catalog\Model\Product',
-            array('getTypeId', 'getTypeInstance', '__wakeup'),
-            array(),
-            '',
-            false
-        );
-    }
-
-    public function testDuplicateProductNotDownloadable()
-    {
-        $currentProduct = $this->getProductMock();
-
-        $currentProduct->expects($this->once())
-            ->method('getTypeId')
-            ->will($this->returnValue(\Magento\Catalog\Model\Product\Type::TYPE_SIMPLE));
-        $currentProduct->expects($this->never())
-            ->method('getTypeInstance');
-
-        $this->_setObserverExpectedMethods($currentProduct, new \Magento\Object());
-
-        $this->_model->duplicateProduct($this->_observer);
-    }
-
-    public function testDuplicateProductEmptyLinks()
-    {
-        $currentProduct = $this->getProductMock();
-        $currentProduct->expects($this->once())
-            ->method('getTypeId')
-            ->will($this->returnValue(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE));
-        $newProduct = $this->getProductMock();
-
-        $typeInstance = $this->getMock('Magento\Downloadable\Model\Product\Type',
-            array('getLinks', 'getSamples'), array(), '', false);
-        $typeInstance->expects($this->once())
-            ->method('getLinks')
-            ->will($this->returnValue(array()));
-        $typeInstance->expects($this->once())
-            ->method('getSamples')
-            ->will($this->returnValue(new \Magento\Object()));
-
-        $currentProduct->expects($this->once())
-            ->method('getTypeInstance')
-            ->will($this->returnValue($typeInstance));
-
-        $this->_setObserverExpectedMethods($currentProduct, $newProduct);
-
-        $this->assertNull($newProduct->getDownloadableData());
-        $this->_model->duplicateProduct($this->_observer);
-        $this->assertEmpty($newProduct->getDownloadableData());
-    }
-
-    public function testDuplicateProductTypeFile()
-    {
-        $currentProduct = $this->getProductMock();
-        $currentProduct->expects($this->once())
-            ->method('getTypeId')
-            ->will($this->returnValue(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE));
-
-        $newProduct = $this->getProductMock();
-
-        $links = $this->_getLinks();
-
-        $samples = $this->_getSamples();
-
-        $getLinks = new \Magento\Object($links);
-
-        $getSamples = new \Magento\Object($samples);
-
-        $typeInstance = $this->getMock('Magento\Downloadable\Model\Product\Type',
-            array('getLinks', 'getSamples'), array(), '', false);
-        $typeInstance->expects($this->atLeastOnce())
-            ->method('getLinks')
-            ->will($this->returnValue(array($getLinks)));
-        $typeInstance->expects($this->atLeastOnce())
-            ->method('getSamples')
-            ->will($this->returnValue(array($getSamples)));
-
-        $currentProduct->expects($this->atLeastOnce())
-            ->method('getTypeInstance')
-            ->will($this->returnValue($typeInstance));
-
-        $this->_setObserverExpectedMethods($currentProduct, $newProduct);
-
-        $callbackJsonEncode = function ($arg) {
-            return json_encode($arg);
-        };
-        $this->_helperJsonEncode->expects($this->atLeastOnce())
-            ->method('jsonEncode')
-            ->will($this->returnCallback($callbackJsonEncode));
-
-        $this->assertNull($newProduct->getDownloadableData($newProduct));
-        $this->_model->duplicateProduct($this->_observer);
-
-        $newDownloadableData = $newProduct->getDownloadableData();
-        $fileData = json_decode($newDownloadableData['link'][0]['file'], true);
-
-        $this->assertEquals($links['price'], $newDownloadableData['link'][0]['price']);
-        $this->assertEquals($links['link_file'][0], $fileData[0]['file'][0]);
-        $this->assertEquals($samples['title'], $newDownloadableData['sample'][0]['title']);
-        $this->assertEquals(false, $newDownloadableData['link'][0]['is_delete']);
-        $this->assertEquals($links['number_of_downloads'], $newDownloadableData['link'][0]['number_of_downloads']);
-    }
-
-    /**
-     * Get downloadable data without is_delete flag
-     *
-     * @return array
-     */
-    protected function _getDownloadableData()
-    {
-        return array(
-            'sample' => array(array('id' => 1, 'is_delete' => '')),
-            'link' => array(array('id' => 2, 'is_delete' => ''))
-        );
-    }
-
-    /**
-     * Get downloadable data with set is_delete flag
-     *
-     * @return array
-     */
-    protected function _getDownloadableDataForDelete()
-    {
-        return array(
-            'sample' => array(array('id' => 1, 'is_delete' => '1')),
-            'link' => array(array('id' => 2, 'is_delete' => '1'))
-        );
-    }
-
-    /**
-     * Set products to observer
-     *
-     * @param array $currentProduct
-     * @param array $newProduct
-     */
-    protected function _setObserverExpectedMethods($currentProduct, $newProduct)
-    {
-        $this->_observer = $this->getMock('Magento\Event\Observer',
-            array('getCurrentProduct', 'getNewProduct'), array(), '', false);
-        $this->_observer->expects($this->once())
-            ->method('getCurrentProduct')
-            ->will($this->returnValue($currentProduct));
-        $this->_observer->expects($this->once())
-            ->method('getNewProduct')
-            ->will($this->returnValue($newProduct));
-    }
-
-    /**
-     * Get Downloadable Link Data
-     *
-     * @return array
-     */
-    protected function _getLinks()
-    {
-        return array(
-            'link_id' => '36',
-            'product_id' => '141',
-            'sort_order' => '0',
-            'number_of_downloads' => '0',
-            'is_shareable' => '2',
-            'link_url' => null,
-            'link_file' => array(array(
-                'file'        => '/l/i/lighthouse_3.jpg',
-                'name'        => 'lighthouse_3.jpg',
-                'size'        => 56665,
-                'status'      => 'new',
-                )),
-            'link_type' => 'file',
-            'sample_url' => null,
-            'sample_file' => array(array(
-                'file'        => '/a/b/lighthouse_3.jpg',
-                'name'        => 'lighthouse_3.jpg',
-                'size'        => 56665,
-                'status'      => 'new',
-                )),
-            'sample_type' => 'file',
-            'title' =>'Link Title',
-            'price' =>'15.00',
-        );
-    }
-
-    /**
-     * Get Downloadable Sample Data
-     *
-     * @return array
-     */
-    protected function _getSamples()
-    {
-        return array(
-            'sample_id' => '42',
-            'sample_url' => null,
-            'sample_file' => array(array(
-                'file'        => '/b/r/lighthouse_3.jpg',
-                'name'        => 'lighthouse_3.jpg',
-                'size'        => 56665,
-                'status'      => 'new',
-                )),
-            'sample_type' => 'file',
-            'sort_order' => '0',
-            'title' => 'Sample Title',
-        );
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/CopyConstructor/DownloadableTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/CopyConstructor/DownloadableTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4e2b5af94b38aaab5487e98c050682e93bc5f7be
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/CopyConstructor/DownloadableTest.php
@@ -0,0 +1,152 @@
+<?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\Downloadable\Model\Product\CopyConstructor;
+
+class DownloadableTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Downloadable\Model\Product\CopyConstructor\Downloadable
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_duplicateMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_sampleMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkCollectionMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_encoderMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productTypeMock;
+
+    protected function setUp()
+    {
+        $this->_encoderMock = $this->getMock('\Magento\Core\Helper\Data', array(), array(), '', false);
+        $this->_model = new \Magento\Downloadable\Model\Product\CopyConstructor\Downloadable($this->_encoderMock);
+
+        $this->_productMock   = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array(), array(), '', false
+        );
+
+        $this->_duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('setDownloadableData', '__wakeup'), array(), '', false
+        );
+
+        $this->_linkMock = $this->getMock('\Magento\Downloadable\Model\Link',
+            array(), array(), '', false
+        );
+
+        $this->_sampleMock = $this->getMock('\Magento\Downloadable\Model\Sample',
+            array(), array(), '', false
+        );
+
+        $this->_productTypeMock = $this->getMock('\Magento\Downloadable\Model\Product\Type',
+            array(), array(), '', false
+        );
+
+        $this->_encoderMock->expects($this->any())->method('jsonEncode')->will($this->returnArgument(0));
+    }
+
+    public function testBuildWithNonDownloadableProductType()
+    {
+        $this->_productMock->expects($this->once())->method('getTypeId')->will($this->returnValue('some value'));
+
+        $this->_duplicateMock->expects($this->never())->method('setDownloadableData');
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+
+    public function testBuild()
+    {
+        $expectedData = include __DIR__ . '/_files/expected_data.php';
+
+        $this->_productMock->expects($this->once())
+            ->method('getTypeId')
+            ->will($this->returnValue(\Magento\Downloadable\Model\Product\Type::TYPE_DOWNLOADABLE));
+
+        $this->_productMock->expects($this->once())
+            ->method('getTypeInstance')->will($this->returnValue($this->_productTypeMock));
+
+        $this->_productTypeMock->expects($this->once())->method('getLinks')
+            ->with($this->_productMock)->will($this->returnValue(array($this->_linkMock)));
+
+        $this->_productTypeMock->expects($this->once())->method('getSamples')
+            ->with($this->_productMock)->will($this->returnValue(array($this->_sampleMock)));
+
+        $linkData = array(
+            'title'               => 'title',
+            'is_shareable'        => 'is_shareable',
+            'sample_type'         => 'sample_type',
+            'sample_url'          => 'sample_url',
+            'sample_file'         => 'sample_file',
+            'link_file'           => 'link_file',
+            'link_type'           => 'link_type',
+            'link_url'            => 'link_url',
+            'sort_order'          => 'sort_order',
+            'price'               => 'price',
+            'number_of_downloads' => 'number_of_downloads',
+        );
+
+        $sampleData = array(
+            'title'       => 'title',
+            'sample_type' => 'sample_type',
+            'sample_file' => 'sample_file',
+            'sample_url'  => 'sample_url',
+            'sort_order'  => 'sort_order',
+        );
+
+        $this->_linkMock->expects($this->once())->method('getData')->will($this->returnValue($linkData));
+        $this->_sampleMock->expects($this->once())->method('getData')->will($this->returnValue($sampleData));
+
+        $this->_duplicateMock->expects($this->once())->method('setDownloadableData')->with($expectedData);
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/CopyConstructor/_files/expected_data.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/CopyConstructor/_files/expected_data.php
new file mode 100644
index 0000000000000000000000000000000000000000..0c0b62a3d2098d817baf7771c508964606fe0cde
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/CopyConstructor/_files/expected_data.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)
+ */
+return array(
+    'link' =>
+        array(
+            array(
+                'is_delete' => false,
+                'link_id' => null,
+                'title' => 'title',
+                'is_shareable' => 'is_shareable',
+                'sample' => array(
+                    'type' => 'sample_type',
+                    'url' => 'sample_url',
+                    'file' =>
+                        array(
+                            array(
+                                'file' => 'sample_file',
+                                'name' => 'sample_file',
+                                'size' => 0,
+                                'status' => null,
+                            ),
+                        ),
+                ),
+                'file' =>
+                    array(
+                        array(
+                            'file' => 'link_file',
+                            'name' => 'link_file',
+                            'size' => 0,
+                            'status' => null,
+                        ),
+                    ),
+                'type' => 'link_type',
+                'link_url' => 'link_url',
+                'sort_order' => 'sort_order',
+                'number_of_downloads' => 'number_of_downloads',
+                'price' => 'price',
+            ),
+        ),
+    'sample' =>
+        array(
+            array(
+                'is_delete' => false,
+                'sample_id' => NULL,
+                'title' => 'title',
+                'type' => 'sample_type',
+                'file' =>
+                    array(
+                        array(
+                            'file' => 'sample_file',
+                            'name' => 'sample_file',
+                            'size' => 0,
+                            'status' => NULL,
+                        ),
+                    ),
+                'sample_url' => 'sample_url',
+                'sort_order' => 'sort_order',
+            ),
+        ),
+);
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
index 27d35c1252097be12c453fdec4239d5d9eb293dc..f461449d92fefb4194b0a7af2fecab67670434d9 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
@@ -43,7 +43,7 @@ class TypeTest extends \PHPUnit_Framework_TestCase
         $coreData = $this->getMockBuilder('Magento\Core\Helper\Data')->disableOriginalConstructor()->getMock();
         $fileStorageDb = $this->getMockBuilder('Magento\Core\Helper\File\Storage\Database')
             ->disableOriginalConstructor()->getMock();
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $filesystem = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php
index 5a57ec4abfa5607318280145a7a25b01b826d674..ffa08a36453eef13c7f9668f8db07f37a7204e23 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Sales/Order/Pdf/Items/CreditmemoTest.php
@@ -57,7 +57,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase
             'emailInfoFactory' => $this->getMock(
                 'Magento\Email\Model\InfoFactory', array(), array(), '', false
             ),
-            'orderItemCollFactory' => $this->getMock(
+            'orderItemCollectionFactory' => $this->getMock(
                 'Magento\Sales\Model\Resource\Order\Item\CollectionFactory', array(), array(), '', false
             ),
             'serviceOrderFactory' => $this->getMock(
@@ -69,7 +69,7 @@ class CreditmemoTest extends \PHPUnit_Framework_TestCase
             'orderHistoryFactory' => $this->getMock(
                 'Magento\Sales\Model\Order\Status\HistoryFactory', array(), array(), '', false
             ),
-            'orderTaxCollFactory' => $this->getMock(
+            'orderTaxCollectionFactory' => $this->getMock(
                 'Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory', array(), array(), '', false
             ),
         );
diff --git a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php
index 755275cb5d6a9d6d5094e399d55d19b0ece82934..ced72f5ce98437a4d2ee129fbfdb44c387fb7b63 100644
--- a/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php
+++ b/dev/tests/unit/testsuite/Magento/Email/Block/Adminhtml/Template/EditTest.php
@@ -97,7 +97,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
             'Magento\Email\Model\Template\Config', array(), array(), '', false
         );
 
-        $this->filesystemMock = $this->getMock('\Magento\Filesystem',
+        $this->filesystemMock = $this->getMock('\Magento\App\Filesystem',
             array('getFilesystem', '__wakeup', 'getPath', 'getDirectoryRead'), array(), '', false);
 
         $viewFilesystem = $this->getMock('\Magento\View\Filesystem',
@@ -209,9 +209,9 @@ class EditTest extends \PHPUnit_Framework_TestCase
     public function testGetDefaultTemplatesAsOptionsArray()
     {
         $dirValueMap = array(
-            array(\Magento\Filesystem::ROOT, 'var/www/magento\rootdir/'),
-            array(\Magento\Filesystem::APP, 'var/www/magento\rootdir\app/'),
-            array(\Magento\Filesystem::THEMES, 'var\www/magento\rootdir\app/themes/')
+            array(\Magento\App\Filesystem::ROOT_DIR, 'var/www/magento\rootdir/'),
+            array(\Magento\App\Filesystem::APP_DIR, 'var/www/magento\rootdir\app/'),
+            array(\Magento\App\Filesystem::THEMES_DIR, 'var\www/magento\rootdir\app/themes/')
         );
 
         $this->directoryMock = $this->getMock('\Magento\Filesystem\Directory\Read', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php b/dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php
index 7c7774feac9e84ffebd86fc83d18f816b9d39dce..7a7fe7b7073753ff97b639cb80049479f5425d3b 100644
--- a/dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php
+++ b/dev/tests/unit/testsuite/Magento/Filesystem/Directory/WriteTest.php
@@ -68,6 +68,15 @@ class WriteTest extends \PHPUnit_Framework_TestCase
         $this->write = null;
     }
 
+    public function testGetDriver()
+    {
+        $this->assertInstanceOf(
+            'Magento\Filesystem\DriverInterface',
+            $this->write->getDriver(),
+            'getDriver method expected to return instance of Magento\Filesystem\DriverInterface'
+        );
+    }
+
     public function testCreate()
     {
         $this->driver->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php
index 9322b0418ec383c78ee454cd33713f0cc2740a4e..eb7fa71c79cdd6a913a20438c396696f354087a9 100644
--- a/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php
+++ b/dev/tests/unit/testsuite/Magento/Filesystem/DirectoryListTest.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Filesystem;
 
-use Magento\Filesystem;
+use Magento\Filesystem,
+    Magento\App\Filesystem as AppFilesystem;
 
 class DirectoryListTest extends \PHPUnit_Framework_TestCase
 {
@@ -45,6 +46,16 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase
         }
     }
 
+    /**
+     * @expectedException \Magento\Filesystem\FilesystemException
+     */
+    public function testAddDefinedDirectory()
+    {
+        $directories = array(AppFilesystem::PUB_LIB_DIR => array('path' => ''));
+        $directoryList = new DirectoryList(__DIR__, $directories);
+        $directoryList->addDirectory(AppFilesystem::PUB_LIB_DIR, array('path' => ''));
+    }
+
     /**
      * Data provider for testAddDirectoryGetConfig
      */
@@ -54,10 +65,10 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase
             'pub_lib' => array(
                 __DIR__,
                 array(
-                    Filesystem::PUB_LIB => array('path' => 'pub/lib_basic')
+                    'custom1_' . AppFilesystem::PUB_LIB_DIR => array('path' => 'pub/lib_basic')
                 ),
                 array(
-                    Filesystem::PUB_LIB => array(
+                    'custom2_' . AppFilesystem::PUB_LIB_DIR => array(
                         'path' => 'pub/lib',
                         'uri' => 'pub/lib',
                         'permissions' => 0777,
@@ -66,7 +77,7 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase
                     )
                 ),
                 array(
-                    Filesystem::PUB_LIB => array(
+                    'custom2_' . AppFilesystem::PUB_LIB_DIR => array(
                         'path' => str_replace('\\', '/', __DIR__ . '/pub/lib'),
                         'uri' => 'pub/lib',
                         'permissions' => 0777,
@@ -100,15 +111,15 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase
     public function invalidUriDataProvider()
     {
         return array(
-            array(Filesystem::MEDIA, '/'),
-            array(Filesystem::MEDIA, '//'),
-            array(Filesystem::MEDIA, '/value'),
-            array(Filesystem::MEDIA, 'value/'),
-            array(Filesystem::MEDIA, '/value/'),
-            array(Filesystem::MEDIA, 'one\\two'),
-            array(Filesystem::MEDIA, '../dir'),
-            array(Filesystem::MEDIA, './dir'),
-            array(Filesystem::MEDIA, 'one/../two'),
+            array(AppFilesystem::MEDIA_DIR, '/'),
+            array(AppFilesystem::MEDIA_DIR, '//'),
+            array(AppFilesystem::MEDIA_DIR, '/value'),
+            array(AppFilesystem::MEDIA_DIR, 'value/'),
+            array(AppFilesystem::MEDIA_DIR, '/value/'),
+            array(AppFilesystem::MEDIA_DIR, 'one\\two'),
+            array(AppFilesystem::MEDIA_DIR, '../dir'),
+            array(AppFilesystem::MEDIA_DIR, './dir'),
+            array(AppFilesystem::MEDIA_DIR, 'one/../two'),
         );
     }
 
@@ -118,14 +129,14 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase
     public function testGetUri()
     {
         $dir = new DirectoryList(__DIR__, array(
-            Filesystem::PUB   => array('uri' => ''),
-            Filesystem::MEDIA => array('uri' => 'test'),
+            AppFilesystem::PUB_DIR   => array('uri' => ''),
+            AppFilesystem::MEDIA_DIR => array('uri' => 'test'),
             'custom' => array('uri' => 'test2')
         ));
 
         $this->assertEquals('test2', $dir->getConfig('custom')['uri']);
-        $this->assertEquals('', $dir->getConfig(Filesystem::PUB)['uri']);
-        $this->assertEquals('test', $dir->getConfig(Filesystem::MEDIA)['uri']);
+        $this->assertEquals('', $dir->getConfig(AppFilesystem::PUB_DIR)['uri']);
+        $this->assertEquals('test', $dir->getConfig(AppFilesystem::MEDIA_DIR)['uri']);
     }
 
     /**
@@ -136,29 +147,13 @@ class DirectoryListTest extends \PHPUnit_Framework_TestCase
         $newRoot = __DIR__ . '/root';
         $newMedia = __DIR__ . '/media';
         $dir = new DirectoryList(__DIR__, array(
-            Filesystem::ROOT => array('path' => $newRoot),
-            Filesystem::MEDIA => array('path' => $newMedia),
+            AppFilesystem::ROOT_DIR => array('path' => $newRoot),
+            AppFilesystem::MEDIA_DIR => array('path' => $newMedia),
             'custom' => array('path' => 'test2')
         ));
 
         $this->assertEquals('test2', $dir->getDir('custom'));
-        $this->assertEquals(str_replace('\\', '/', $newRoot), $dir->getConfig(Filesystem::ROOT)['path']);
-        $this->assertEquals(str_replace('\\', '/', $newMedia), $dir->getConfig(Filesystem::MEDIA)['path']);
-    }
-
-    /**
-     * Test that dirs are not affected by custom URIs
-     */
-    public function testGetDirIndependentOfUris()
-    {
-        $fixtureUris = array(
-            Filesystem::PUB   => array('uri' => ''),
-            Filesystem::MEDIA => array('uri' => 'test')
-        );
-        $default = new DirectoryList(__DIR__);
-        $custom = new DirectoryList(__DIR__, $fixtureUris);
-        foreach (array_keys($fixtureUris) as $dirCode ) {
-            $this->assertEquals($default->getConfig($dirCode)['path'], $custom->getConfig($dirCode)['path']);
-        }
+        $this->assertEquals(str_replace('\\', '/', $newRoot), $dir->getConfig(AppFilesystem::ROOT_DIR)['path']);
+        $this->assertEquals(str_replace('\\', '/', $newMedia), $dir->getConfig(AppFilesystem::MEDIA_DIR)['path']);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php b/dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php
index c0ca60889c5b21c968375bcd4dd39f4165ec0b87..39fb53cdf9eac83f4efb120518aeac24b7cf35c7 100644
--- a/dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php
+++ b/dev/tests/unit/testsuite/Magento/Filesystem/Driver/HttpTest.php
@@ -128,13 +128,11 @@ class HttpTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($content, (new Http())->fileGetContents(''));
     }
 
-    /**
-     * @expectedException \Magento\Filesystem\FilesystemException
-     */
     public function testFileGetContentsNoContent()
     {
+        $content = '';
         self::$fileGetContents = '';
-        (new Http())->fileGetContents('');
+        $this->assertEquals($content, (new Http())->fileGetContents(''));
     }
 
     public function testFilePutContents()
diff --git a/dev/tests/unit/testsuite/Magento/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/FilesystemTest.php
index 368d4ee1fb42b0576718b789b7700a2e574a9fb1..f662329737b8322d4bbb078b39f896547222f8b7 100644
--- a/dev/tests/unit/testsuite/Magento/FilesystemTest.php
+++ b/dev/tests/unit/testsuite/Magento/FilesystemTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento;
 
+use Magento\App\Filesystem as AppFilesystem;
+
 class FilesystemTest extends \PHPUnit_Framework_TestCase
 {
     /** @var Filesystem */
@@ -34,7 +36,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */
     protected $_dirWriteFactoryMock;
 
-    /** @var \Magento\Filesystem\DirectoryList|\PHPUnit_Framework_MockObject_MockObject  */
+    /** @var \Magento\App\Filesystem\DirectoryList|\PHPUnit_Framework_MockObject_MockObject  */
     protected $_directoryListMock;
 
     /** @var \Magento\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject  */
@@ -43,7 +45,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $this->_dirReadFactoryMock = $this->getMock('Magento\Filesystem\Directory\ReadFactory', [], [], '', false);
-        $this->_directoryListMock = $this->getMock('Magento\Filesystem\DirectoryList', [], [], '', false);
+        $this->_directoryListMock = $this->getMock('Magento\App\Filesystem\DirectoryList', [], [], '', false);
         $this->_dirWriteFactoryMock = $this->getMock('Magento\Filesystem\Directory\WriteFactory', [], [], '', false);
         $this->_fileReadFactoryMock = $this->getMock('Magento\Filesystem\File\ReadFactory', [], [], '', false);
 
@@ -61,7 +63,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
         /** @var \Magento\Filesystem\Directory\ReadInterface $dirReadMock */
         $dirReadMock = $this->getMock('Magento\Filesystem\Directory\ReadInterface');
         $this->_dirReadFactoryMock->expects($this->once())->method('create')->will($this->returnValue($dirReadMock));
-        $this->assertEquals($dirReadMock, $this->_filesystem->getDirectoryRead(Filesystem::ROOT));
+        $this->assertEquals($dirReadMock, $this->_filesystem->getDirectoryRead(AppFilesystem::ROOT_DIR));
     }
 
     /**
@@ -70,7 +72,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
     public function testGetDirectoryWriteReadOnly()
     {
         $this->_setupDirectoryListMock(['read_only' => true]);
-        $this->_filesystem->getDirectoryWrite(Filesystem::ROOT);
+        $this->_filesystem->getDirectoryWrite(AppFilesystem::ROOT_DIR);
     }
 
     public function testGetDirectoryWrite()
@@ -79,7 +81,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
         /** @var \Magento\Filesystem\Directory\WriteInterface $dirWriteMock */
         $dirWriteMock = $this->getMock('Magento\Filesystem\Directory\WriteInterface');
         $this->_dirWriteFactoryMock->expects($this->once())->method('create')->will($this->returnValue($dirWriteMock));
-        $this->assertEquals($dirWriteMock, $this->_filesystem->getDirectoryWrite(Filesystem::ROOT));
+        $this->assertEquals($dirWriteMock, $this->_filesystem->getDirectoryWrite(AppFilesystem::ROOT_DIR));
     }
 
     public function testGetRemoteResource()
@@ -95,17 +97,11 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($fileReadMock, $this->_filesystem->getRemoteResource('http://example.com'));
     }
 
-    public function testGetPath()
-    {
-        $this->_setupDirectoryListMock(['path' => '\\some\\path']);
-        $this->assertEquals('/some/path', $this->_filesystem->getPath(Filesystem::ROOT));
-    }
-
     public function testGetUri()
     {
         $uri = 'http://example.com';
         $this->_setupDirectoryListMock(['uri' => $uri]);
-        $this->assertEquals($uri, $this->_filesystem->getUri(Filesystem::ROOT));
+        $this->assertEquals($uri, $this->_filesystem->getUri(AppFilesystem::ROOT_DIR));
     }
 
     protected function _setupDirectoryListMock(array $config)
diff --git a/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ServiceTest.php b/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ServiceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..7ec929447d02177789f20085bb763eb0289f15a9
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GoogleShopping/Model/ServiceTest.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\GoogleShopping\Model;
+
+
+class ServiceTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $_helper;
+
+    /**
+     * @var \Magento\GoogleShopping\Model\Service
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_contentMock;
+
+    protected function setUp()
+    {
+        $this->_helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->_contentMock = $this->getMockBuilder('Magento\Gdata\Gshopping\Content')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $contentFactoryMock = $this->getMockBuilder('Magento\Gdata\Gshopping\ContentFactory')
+            ->disableOriginalConstructor()
+            ->setMethods(array('create'))
+            ->getMock();
+        $contentFactoryMock->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($this->_contentMock));
+
+        $coreRegistryMock = $this->getMockBuilder('Magento\Core\Model\Registry')
+            ->disableOriginalConstructor()
+            ->setMethods(array('registry'))
+            ->getMock();
+        $coreRegistryMock->expects($this->any())
+            ->method('registry')
+            ->will($this->returnValue(1));
+
+        $arguments = array(
+            'contentFactory' => $contentFactoryMock,
+            'coreRegistry' => $coreRegistryMock
+        );
+        $this->_model = $this->_helper->getObject('\Magento\GoogleShopping\Model\Service', $arguments);
+    }
+
+    public function testGetService()
+    {
+        $this->assertEquals('Magento\Gdata\Gshopping\Content', get_parent_class($this->_model->getService()));
+    }
+
+    public function testSetService()
+    {
+        $this->_model->setService($this->_contentMock);
+        $this->assertSame($this->_contentMock, $this->_model->getService());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..174dfe2b40c23e137d35450cbdc9f52abae89d07
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php
@@ -0,0 +1,315 @@
+<?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\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped
+     */
+    protected $block;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeManagerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $registryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $coreHelperMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    protected function setUp()
+    {
+        $this->registryMock = $this->getMock('\Magento\Core\Model\Registry', array(), array(), '', false);
+        $this->productMock = $this->getMock('\Magento\Catalog\Model\Product', array(), array(), '', false);
+        $this->coreHelperMock = $this->getMock('\Magento\Core\Helper\Data', array(), array(), '', false);
+        $this->storeManagerMock = $this->getMock(
+            '\Magento\Core\Model\StoreManagerInterface', array(), array(), '', false
+
+        );
+
+        $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->block = $objectHelper->getObject(
+            'Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped',
+            array(
+                'registry' => $this->registryMock,
+                'storeManager' => $this->storeManagerMock,
+                'coreHelper' => $this->coreHelperMock,
+                'data' => array(
+                    'product' => $this->productMock
+                )
+            )
+        );
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getProduct
+     */
+    public function testGetProductPositive()
+    {
+        $instanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+        $storeMock = $this->getMock('\Magento\Core\Model\Store', array(), array(), '', false);
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($instanceMock));
+
+        $instanceMock->expects($this->once())
+            ->method('getStoreFilter')
+            ->will($this->returnValue($storeMock));
+
+        $instanceMock->expects($this->never())
+            ->method('setStoreFilter');
+
+        $this->assertEquals($this->productMock, $this->block->getProduct());
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getProduct
+     */
+    public function testGetProductNegative()
+    {
+        $storeId = 2;
+        $instanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+        $storeMock = $this->getMock('\Magento\Core\Model\Store', array(), array(), '', false);
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($instanceMock));
+
+        $instanceMock->expects($this->once())
+            ->method('getStoreFilter')
+            ->with($this->productMock)
+            ->will($this->returnValue(null));
+
+        $this->productMock->expects($this->once())
+            ->method('getStoreId')
+            ->will($this->returnValue($storeId));
+
+        $this->storeManagerMock->expects($this->any())
+            ->method('getStore')
+            ->with($storeId)
+            ->will($this->returnValue($storeMock));
+
+        $instanceMock->expects($this->once())
+            ->method('setStoreFilter')
+            ->with($storeMock, $this->productMock);
+
+        $this->assertEquals($this->productMock, $this->block->getProduct());
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getAssociatedProducts
+     */
+    public function testGetAssociatedProducts()
+    {
+        $storeId = 2;
+
+        $instanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($instanceMock));
+
+        $associatedProduct = clone($this->productMock);
+
+        $associatedProduct->expects($this->once())
+            ->method('setStoreId')
+            ->with($storeId);
+
+        $instanceMock->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue(array($associatedProduct)));
+
+        $this->productMock->expects($this->any())
+            ->method('getStoreId')
+            ->will($this->returnValue($storeId));
+
+        $this->assertEquals(array($associatedProduct), $this->block->getAssociatedProducts());
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::setPreconfiguredValue
+     */
+    public function testSetPreconfiguredValue()
+    {
+        $storeId = 2;
+
+        $objectMock = $this->getMock('\Magento\Object', array('getSuperGroup'), array(), '', false);
+        $instanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $objectMock->expects($this->once())
+            ->method('getSuperGroup')
+            ->will($this->returnValue(array()));
+
+        $this->productMock->expects($this->once())
+            ->method('getPreconfiguredValues')
+            ->will($this->returnValue($objectMock));
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($instanceMock));
+
+        $associatedProduct = clone($this->productMock);
+
+        $associatedProduct->expects($this->once())
+            ->method('setStoreId')
+            ->with($storeId);
+
+        $instanceMock->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue(array($associatedProduct)));
+
+        $this->productMock->expects($this->any())
+            ->method('getStoreId')
+            ->will($this->returnValue($storeId));
+
+        $this->assertEquals($this->block, $this->block->setPreconfiguredValue());
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCanShowProductPrice
+     */
+    public function testGetCanShowProductPrice()
+    {
+        $this->assertEquals(true, $this->block->getCanShowProductPrice($this->productMock));
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getIsLastFieldset
+     */
+    public function testGetIsLastFieldsetPositive()
+    {
+        $this->block->setData('is_last_fieldset', true);
+
+        $this->productMock->expects($this->never())
+            ->method('getOptions');
+
+        $this->assertEquals(true, $this->block->getIsLastFieldset());
+    }
+
+    /**
+     * @param array|bool $options
+     * @param bool $expectedResult
+     *
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getIsLastFieldset
+     * @dataProvider getIsLastFieldsetDataProvider
+     */
+    public function testGetIsLastFieldsetNegative($options, $expectedResult)
+    {
+        $instanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $this->block->setData('is_last_fieldset', false);
+
+        $this->productMock->expects($this->once())
+            ->method('getOptions')
+            ->will($this->returnValue($options));
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($instanceMock));
+
+        $instanceMock->expects($this->once())
+            ->method('getStoreFilter')
+            ->will($this->returnValue(true));
+
+        $this->assertEquals($expectedResult, $this->block->getIsLastFieldset());
+    }
+
+    /**
+     * Data provider for testGetIsLastFieldsetNegative
+     *
+     * @return array
+     */
+    public function getIsLastFieldsetDataProvider()
+    {
+        return array(
+            'case1' => array(
+                'options' => false,
+                'expectedResult' => true
+            ),
+            'case2' => array(
+                'options' => array('option'),
+                'expectedResult' => false
+            )
+        );
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCurrencyPrice
+     */
+    public function testGetCurrencyPrice()
+    {
+        $storeId = 2;
+        $price = 1.22;
+        $expectedPrice = 1;
+
+        $instanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($instanceMock));
+
+        $instanceMock->expects($this->once())
+            ->method('getStoreFilter')
+            ->will($this->returnValue(true));
+
+        $this->productMock->expects($this->once())
+            ->method('getStore')
+            ->will($this->returnValue($storeId));
+
+        $this->coreHelperMock->expects($this->once())
+            ->method('currencyByStore')
+            ->with($price, $storeId, false)
+            ->will($this->returnValue($expectedPrice));
+
+        $this->assertEquals($expectedPrice, $this->block->getCurrencyPrice($price));
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..b721ea04d0b0e7ce88bf21f51df3f7066cd03fcb
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php
@@ -0,0 +1,154 @@
+<?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\GroupedProduct\Block\Product\Grouped\AssociatedProducts;
+
+class ListAssociatedProductsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $contextMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $registryMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $typeInstanceMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeManagerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeMock;
+
+    /**
+     * @var \Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts
+     */
+    protected $block;
+
+    protected function setUp()
+    {
+        $this->contextMock = $this->getMock('Magento\Backend\Block\Template\Context', array(), array(), '', false);
+        $this->registryMock = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+        $this->storeMock = $this->getMock('Magento\Core\Model\Store', array(), array(), '', false);
+        $this->storeManagerMock = $this->getMock('Magento\Core\Model\StoreManager', array(), array(), '', false);
+        $this->typeInstanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $this->contextMock->expects($this->any())
+            ->method('getStoreManager')
+            ->will($this->returnValue($this->storeManagerMock));
+
+        $this->block = new ListAssociatedProducts($this->contextMock, $this->registryMock);
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts
+     *     ::getAssociatedProducts
+     */
+    public function testGetAssociatedProducts()
+    {
+        $this->storeMock->expects($this->any())
+            ->method('formatPrice')
+            ->with('1.00', false)
+            ->will($this->returnValue('1'));
+
+        $this->storeManagerMock->expects($this->any())
+            ->method('getStore')
+            ->will($this->returnValue($this->storeMock));
+
+        $this->productMock->expects($this->once())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($this->typeInstanceMock));
+
+        $this->registryMock->expects($this->once())
+            ->method('registry')
+            ->with('current_product')
+            ->will($this->returnValue($this->productMock));
+
+        $this->typeInstanceMock->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue(array($this->generateAssociatedProduct(1), $this->generateAssociatedProduct(2))));
+
+        $expectedResult = array(
+            '0' => array(
+                'id' => 'id1',
+                'sku' => 'sku1',
+                'name' => 'name1',
+                'qty' => 1,
+                'position' => 1,
+                'price' => '1'
+            ),
+            '1' => array(
+                'id' => 'id2',
+                'sku' => 'sku2',
+                'name' => 'name2',
+                'qty' => 2,
+                'position' => 2,
+                'price' => '1'
+            )
+        );
+
+        $this->assertEquals($expectedResult, $this->block->getAssociatedProducts());
+    }
+
+    /**
+     * Generate associated product mock
+     *
+     * @param int $productKey
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected function generateAssociatedProduct($productKey = 0)
+    {
+        $associatedProduct = $this->getMock('Magento\Object',
+            array('getQty', 'getPosition', 'getId', 'getSku', 'getName', 'getPrice'), array(), '', false
+        );
+
+        $associatedProduct->expects($this->once())->method('getId')->will($this->returnValue('id' . $productKey));
+        $associatedProduct->expects($this->once())->method('getSku')->will($this->returnValue('sku' . $productKey));
+        $associatedProduct->expects($this->once())->method('getName')->will($this->returnValue('name' . $productKey));
+        $associatedProduct->expects($this->once())->method('getQty')->will($this->returnValue($productKey));
+        $associatedProduct->expects($this->once())->method('getPosition')->will($this->returnValue($productKey));
+        $associatedProduct->expects($this->once())->method('getPrice')->will($this->returnValue('1.00'));
+
+        return $associatedProduct;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6cc201d240d70f49f9d9b349febfee8288fb1110
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.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\GroupedProduct\Block\Product\Grouped;
+
+class AssociatedProductsTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $contextMock;
+
+    /**
+     * @var \Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts
+     */
+    protected $block;
+
+    protected function setUp()
+    {
+        $this->contextMock = $this->getMock('\Magento\Backend\Block\Template\Context', array(), array(), '', false);
+        $this->block = new AssociatedProducts($this->contextMock);
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts::getParentTab
+     */
+    public function testGetParentTab()
+    {
+        $this->assertEquals('product-details', $this->block->getParentTab());
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts::getTabLabel
+     */
+    public function testGetTabLabel()
+    {
+        $this->assertEquals('Grouped Products', $this->block->getTabLabel());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/View/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/View/Type/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..8a71935a662f47de654082584352b816bc834bb9
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/View/Type/GroupedTest.php
@@ -0,0 +1,194 @@
+<?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\GroupedProduct\Block\Product\View\Type;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\GroupedProduct\Block\Product\View\Type\Grouped
+     */
+    protected $groupedView;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $typeInstanceMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $configuredValueMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $blockMock;
+
+    /**
+     * @var string
+     */
+    protected $defaultTemplate  = 'product/view/tierprices.phtml';
+
+    protected function setUp()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $methodsProduct = array(
+            'getId', 'setQty', 'getTypeInstance', 'getPreconfiguredValues', 'getTypeId', '__wakeup'
+        );
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product', $methodsProduct, array(), '', false);
+        $this->typeInstanceMock =
+            $this->getMock('Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false);
+        $this->productMock
+            ->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($this->typeInstanceMock));
+        $this->configuredValueMock = $this->getMock('Magento\Object', array('getSuperGroup'), array(), '', false);
+        // mocks for getTierPriceHtml method
+        $methods = array('setTemplate', 'setProduct', 'setListClass',
+            'setShowDetailedPrice', 'setCanDisplayQty','toHtml');
+        $this->blockMock = $this->getMock('Magento\Catalog\Block\Product\Price', $methods, array(), '', false);
+        $layout = $this->getMock('Magento\View\LayoutInterface');
+        $layout->expects($this->any())->method('createBlock')->will($this->returnValue($this->blockMock));
+        $this->groupedView = $helper->getObject('Magento\GroupedProduct\Block\Product\View\Type\Grouped', array(
+                'data' => array('product' => $this->productMock,
+                                'tier_price_template' => $this->defaultTemplate),
+                'priceBlockTypes' => array('product_id' => array('block' => $this->blockMock)),
+                'layout' => $layout
+            )
+        );
+    }
+
+    public function testGetAssociatedProducts()
+    {
+
+        $this->typeInstanceMock
+            ->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue('expected'));
+
+        $this->assertEquals('expected', $this->groupedView->getAssociatedProducts());
+    }
+
+    /**
+     * @param string $id
+     * @dataProvider setPreconfiguredValueDataProvider
+     */
+    public function testSetPreconfiguredValue($id)
+    {
+        $configValue = array('id_one' => 2);
+        $associatedProduct = array('key' => $this->productMock);
+        $this->configuredValueMock
+            ->expects($this->once())
+            ->method('getSuperGroup')
+            ->will($this->returnValue($configValue));
+        $this->productMock
+            ->expects($this->once())
+            ->method('getPreconfiguredValues')
+            ->will($this->returnValue($this->configuredValueMock));
+
+        $this->typeInstanceMock
+            ->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue($associatedProduct));
+
+
+        $this->productMock->expects($this->any())->method('getId')->will($this->returnValue($id));
+        $this->productMock->expects($this->any())->method('setQty')->with(2);
+        $this->groupedView->setPreconfiguredValue();
+    }
+
+    public function setPreconfiguredValueDataProvider()
+    {
+        return array(
+            'item_id_exist_in_config' => array('id_one'),
+            'item_id_not_exist_in_config' => array('id_two')
+        );
+    }
+
+    public function testSetPreconfiguredValueIfSuperGroupNotExist()
+    {
+        $this->productMock
+            ->expects($this->once())
+            ->method('getPreconfiguredValues')
+            ->will($this->returnValue($this->configuredValueMock));
+        $this->configuredValueMock
+            ->expects($this->once())
+            ->method('getSuperGroup')
+            ->will($this->returnValue(false));
+        $this->typeInstanceMock->expects($this->never())->method('getAssociatedProducts');
+        $this->groupedView->setPreconfiguredValue();
+    }
+
+    /**
+     * @param null|PHPUnit_Framework_MockObject_MockObject $price
+     * @dataProvider getTierPriceHtmlDataProvider
+     */
+    public function testGetTierPriceHtml($price)
+    {
+        $this->productMock->expects($this->any())->method('getTypeId')->will($this->returnValue('product_id'));
+        $this->blockMock->expects($this->once())
+            ->method('setTemplate')->with($this->defaultTemplate)->will($this->returnValue($this->blockMock));
+        $this->blockMock
+            ->expects($this->once())
+            ->method('setProduct')
+            ->with($this->productMock)
+            ->will($this->returnValue($this->blockMock));
+        $this->blockMock
+            ->expects($this->once())
+            ->method('setListClass')
+            ->with('tier prices grouped items')
+            ->will($this->returnValue($this->blockMock));
+        $this->blockMock
+            ->expects($this->once())
+            ->method('setShowDetailedPrice')
+            ->with(false)
+            ->will($this->returnValue($this->blockMock));
+        $this->blockMock
+            ->expects($this->once())
+            ->method('setCanDisplayQty')
+            ->with(false)
+            ->will($this->returnValue($this->blockMock));
+        $this->blockMock
+            ->expects($this->once())
+            ->method('toHtml')
+            ->will($this->returnValue('expected'));
+        $this->assertEquals('expected', $this->groupedView->getTierPriceHtml($price));
+    }
+
+    public function getTierPriceHtmlDataProvider()
+    {
+        return array(
+            'if_use_default_value_for_method' => array(null),
+            'if_pice_exist' => array($this->productMock)
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Controller/Adminhtml/EditTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Controller/Adminhtml/EditTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..f769660df1e94179ab0e67338a8a9cf7b14b712e
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Controller/Adminhtml/EditTest.php
@@ -0,0 +1,135 @@
+<?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\GroupedProduct\Controller\Adminhtml;
+
+class EditTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * @var \Magento\GroupedProduct\Controller\Adminhtml\Edit
+     */
+    protected $controller;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $request;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $factory;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $registry;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $view;
+
+    protected function setUp()
+    {
+        $this->request = $this->getMock('Magento\App\RequestInterface', array(), array(), '', false);
+        $this->factory = $this->getMock('Magento\Catalog\Model\ProductFactory', array('create'), array(), '', false);
+        $this->registry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $this->view = $this->getMock('Magento\App\ViewInterface', array(), array(), '', false);
+
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->controller = $this->objectManager->getObject(
+            '\Magento\GroupedProduct\Controller\Adminhtml\Edit',
+            array(
+                'request' => $this->request,
+                'factory' => $this->factory,
+                'registry' => $this->registry,
+                'view' => $this->view,
+            )
+        );
+    }
+
+    public function testPopupActionNoProductId()
+    {
+        $storeId = 12;
+        $typeId = 4;
+        $productId = null;
+        $setId = 0;
+        $product = $this->getMock('Magento\Catalog\Model\Product',
+            array('setStoreId', 'setTypeId', 'setData', '__wakeup'),
+            array(), '', false);
+
+        $this->request->expects($this->at(0))->method('getParam')->with('id')->will($this->returnValue($productId));
+        $this->factory->expects($this->once())->method('create')->will($this->returnValue($product));
+        $this->request->expects($this->at(1))->method('getParam')
+            ->with('store', 0)->will($this->returnValue($storeId));
+
+        $product->expects($this->once())->method('setStoreId')->with($storeId);
+        $this->request->expects($this->at(2))->method('getParam')
+            ->with('type')->will($this->returnValue($typeId));
+        $product->expects($this->once())->method('setTypeId')->with($typeId);
+        $product->expects($this->once())->method('setData')->with('_edit_mode', true);
+        $this->request->expects($this->at(3))->method('getParam')->with('set')->will($this->returnValue($setId));
+        $this->registry->expects($this->once())->method('register')->with('current_product', $product);
+
+        $this->view->expects($this->once())->method('loadLayout')->with(false);
+        $this->view->expects($this->once())->method('renderLayout');
+
+        $this->controller->popupAction();
+    }
+
+    public function testPopupActionWithProductIdNoSetId()
+    {
+        $storeId = 12;
+        $typeId = 4;
+        $setId = 0;
+        $productId = 399;
+        $product = $this->getMock('Magento\Catalog\Model\Product',
+            array('setStoreId', 'setTypeId', 'setData', 'load', '__wakeup'),
+            array(), '', false);
+
+        $this->request->expects($this->at(0))->method('getParam')->with('id')->will($this->returnValue($productId));
+        $this->factory->expects($this->once())->method('create')->will($this->returnValue($product));
+        $this->request->expects($this->at(1))->method('getParam')
+            ->with('store', 0)->will($this->returnValue($storeId));
+        $product->expects($this->once())->method('setStoreId')->with($storeId);
+        $this->request->expects($this->at(2))->method('getParam')
+            ->with('type')->will($this->returnValue($typeId));
+        $product->expects($this->never())->method('setTypeId');
+        $product->expects($this->once())->method('setData')->with('_edit_mode', true);
+        $product->expects($this->once())->method('load')->with($productId);
+        $this->request->expects($this->at(3))->method('getParam')->with('set')->will($this->returnValue($setId));
+        $this->registry->expects($this->once())->method('register')->with('current_product', $product);
+
+        $this->view->expects($this->once())->method('loadLayout')->with(false);
+        $this->view->expects($this->once())->method('renderLayout');
+
+        $this->controller->popupAction();
+    }
+}
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..fb8b489fb4aeedcc9b8b82b594781cf8e6d1dd5c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Controller/Adminhtml/Product/Initialization/Helper/ProductLinks/Plugin/GroupedTest.php
@@ -0,0 +1,89 @@
+<?php
+/**
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\GroupedProduct\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks\Plugin;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\GroupedProduct\Controller\Adminhtml\Product\Initialization\Helper\ProductLinks\Plugin\Grouped
+     */
+    protected $model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $requestMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    protected function setUp()
+    {
+        $this->requestMock = $this->getMock('Magento\App\Request\Http', array(), array(), '', false);
+        $this->productMock= $this->getMock('Magento\Catalog\Model\Product',
+            array('getGroupedReadonly', 'setGroupedLinkData', '__wakeup'), array(), '', false);
+
+        $this->model = new Grouped($this->requestMock);
+    }
+
+    public function testAfterInitializeLinksRequestDoesNotHaveGrouped()
+    {
+        $this->requestMock->expects($this->once())->method('getPost')->with('links')->will($this->returnValue(array()));
+        $this->productMock->expects($this->never())->method('getGroupedReadonly');
+        $this->productMock->expects($this->never())->method('setGroupedLinkData');
+        $this->model->afterInitializeLinks($this->productMock);
+    }
+
+    public function testAfterInitializeLinksRequestHasGrouped()
+    {
+        $this->requestMock->expects($this->once())
+            ->method('getPost')
+            ->with('links')
+            ->will($this->returnValue(array('grouped' => 'value')));
+
+        $this->productMock->expects($this->once())
+            ->method('getGroupedReadonly')
+            ->will($this->returnValue(false));
+        $this->productMock->expects($this->once())->method('setGroupedLinkData')->with(array('value'));
+        $this->model->afterInitializeLinks($this->productMock);
+    }
+
+    public function testAfterInitializeLinksProductIsReadonly()
+    {
+        $this->requestMock->expects($this->once())
+            ->method('getPost')
+            ->with('links')
+            ->will($this->returnValue(array('grouped' => 'value')));
+
+        $this->productMock->expects($this->once())
+            ->method('getGroupedReadonly')
+            ->will($this->returnValue(true));
+        $this->productMock->expects($this->never())->method('setGroupedLinkData');
+        $this->model->afterInitializeLinks($this->productMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..3f046d0e3299c36338070545ae0da24d5b3a2588
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php
@@ -0,0 +1,188 @@
+<?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\GroupedProduct\Helper\Product\Configuration\Plugin;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped
+     */
+    protected $groupedConfigPlugin;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $invocationChainMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $itemMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $typeInstanceMock;
+
+    /**
+     * @var array
+     */
+    protected $inputArguments;
+
+    protected function setUp()
+    {
+        $this->groupedConfigPlugin = new Grouped();
+
+        $this->invocationChainMock = $this->getMock('Magento\Code\Plugin\InvocationChain', array(), array(), '', false);
+        $this->itemMock = $this->getMock('Magento\Catalog\Model\Product\Configuration\Item\ItemInterface');
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+        $this->typeInstanceMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $this->itemMock->expects($this->any())
+            ->method('getProduct')
+            ->will($this->returnValue($this->productMock));
+
+        $this->productMock->expects($this->any())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($this->typeInstanceMock));
+
+        $this->inputArguments = array('item' => $this->itemMock);
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions
+     */
+    public function testAroundGetOptionsGroupedProductWithAssociated()
+    {
+        $associatedProductId = 'associatedId';
+        $associatedProdName = 'associatedProductName';
+
+        $associatedProdMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+
+        $associatedProdMock->expects($this->once())
+            ->method('getId')
+            ->will($this->returnValue($associatedProductId));
+
+        $associatedProdMock->expects($this->once())
+            ->method('getName')
+            ->will($this->returnValue($associatedProdName));
+
+        $this->typeInstanceMock->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue(array($associatedProdMock)));
+
+        $this->productMock->expects($this->once())
+            ->method('getTypeId')
+            ->will($this->returnValue(\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE));
+
+        $quantityItemMock = $this->getMock(
+            'Magento\Catalog\Model\Product\Configuration\Item\ItemInterface',
+            array('getValue', 'getProduct', 'getOptionByCode', 'getFileDownloadParams')
+        );
+
+        $quantityItemMock->expects($this->any())
+            ->method('getValue')
+            ->will($this->returnValue(1));
+
+        $this->itemMock->expects($this->once())
+            ->method('getOptionByCode')
+            ->with('associated_product_' . $associatedProductId)
+            ->will($this->returnValue($quantityItemMock));
+
+        $this->invocationChainMock->expects($this->once())
+            ->method('proceed')
+            ->with($this->inputArguments)
+            ->will($this->returnValue(array(array('label' => 'productName', 'value' => 2))));
+
+        $result = $this->groupedConfigPlugin->aroundGetOptions($this->inputArguments, $this->invocationChainMock);
+        $expectedResult = array(
+            array(
+                'label' => 'associatedProductName',
+                'value' => 1
+            ),
+            array(
+                'label' => 'productName',
+                'value' => 2
+            )
+        );
+        $this->assertEquals($expectedResult, $result);
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions
+     */
+    public function testAroundGetOptionsGroupedProductWithoutAssociated()
+    {
+        $this->typeInstanceMock->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue(false));
+
+        $this->productMock->expects($this->once())
+            ->method('getTypeId')
+            ->will($this->returnValue(\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE));
+
+        $chainCallResult = array(array('label' => 'label', 'value' => 'value'));
+
+        $this->invocationChainMock->expects($this->once())
+            ->method('proceed')
+            ->with($this->inputArguments)
+            ->will($this->returnValue($chainCallResult));
+
+        $result = $this->groupedConfigPlugin->aroundGetOptions($this->inputArguments, $this->invocationChainMock);
+        $this->assertEquals($chainCallResult, $result);
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions
+     */
+    public function testAroundGetOptionsAnotherProductType()
+    {
+        $chainCallResult = array('result');
+
+        $this->productMock->expects($this->once())
+            ->method('getTypeId')
+            ->will($this->returnValue('other_product_type'));
+
+        $this->invocationChainMock->expects($this->once())
+            ->method('proceed')
+            ->with($this->inputArguments)
+            ->will($this->returnValue($chainCallResult));
+
+        $this->productMock->expects($this->never())
+            ->method('getTypeInstance');
+
+        $result = $this->groupedConfigPlugin->aroundGetOptions($this->inputArguments, $this->invocationChainMock);
+        $this->assertEquals($chainCallResult, $result);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/CopyConstructor/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/CopyConstructor/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..1c278958e61df8d55409e43fa916a8696c9fa7d4
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/CopyConstructor/GroupedTest.php
@@ -0,0 +1,149 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\GroupedProduct\Model\Product\CopyConstructor;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\GroupedProduct\Model\Product\CopyConstructor\Grouped
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_productMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_duplicateMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_linkCollectionMock;
+
+    protected function setUp()
+    {
+        $this->_model = new \Magento\GroupedProduct\Model\Product\CopyConstructor\Grouped();
+
+        $this->_productMock   = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('getTypeId', '__wakeup', 'getLinkInstance'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_duplicateMock = $this->getMock(
+            '\Magento\Catalog\Model\Product',
+            array('setGroupedLinkData', '__wakeup'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_linkMock = $this->getMock(
+            '\Magento\Catalog\Model\Product\Link',
+            array('setLinkTypeId', '__wakeup', 'getAttributes', 'getLinkCollection'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_productMock->expects($this->any())
+            ->method('getLinkInstance')
+            ->will($this->returnValue($this->_linkMock));
+    }
+
+    public function testBuildWithNonGroupedProductType()
+    {
+        $this->_productMock->expects($this->once())->method('getTypeId')->will($this->returnValue('some value'));
+
+        $this->_duplicateMock->expects($this->never())->method('setGroupedLinkData');
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+
+    public function testBuild()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $expectedData = array(
+            '100500' => array('some' => 'data')
+        );
+
+        $this->_productMock->expects($this->once())
+            ->method('getTypeId')
+            ->will($this->returnValue(\Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE));
+
+        $attributes = array(
+            'attributeOne' => array('code' => 'one'),
+            'attributeTwo' => array('code' => 'two'),
+        );
+
+        $this->_linkMock->expects($this->once())->method('getAttributes')->will($this->returnValue($attributes));
+
+        $productLinkMock = $this->getMock(
+            '\Magento\Catalog\Model\Resource\Product\Link',
+            array('__wakeup', 'getLinkedProductId', 'toArray'),
+            array(),
+            '',
+            false
+        );
+        $this->_linkMock->expects($this->atLeastOnce())->method('setLinkTypeId')
+            ->with(\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
+
+        $productLinkMock->expects($this->once())->method('getLinkedProductId')->will($this->returnValue('100500'));
+        $productLinkMock->expects($this->once())
+            ->method('toArray')
+            ->with(array('one', 'two'))
+            ->will($this->returnValue(array('some' => 'data')));
+
+        $collectionMock = $helper->getCollectionMock(
+            '\Magento\Catalog\Model\Resource\Product\Link\Collection',
+            array($productLinkMock)
+        );
+        $collectionMock->expects($this->once())->method('setProduct')->with($this->_productMock);
+        $collectionMock->expects($this->once())->method('addLinkTypeIdFilter');
+        $collectionMock->expects($this->once())->method('addProductIdFilter');
+        $collectionMock->expects($this->once())->method('joinAttributes');
+
+        $this->_linkMock->expects($this->once())
+            ->method('getLinkCollection')
+            ->will($this->returnValue($collectionMock));
+
+        $this->_duplicateMock->expects($this->once())
+            ->method('setGroupedLinkData')
+            ->with($expectedData);
+
+        $this->_model->build($this->_productMock, $this->_duplicateMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..2f555f06546875cf797022aef8cc26771a1df90c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php
@@ -0,0 +1,194 @@
+<?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\GroupedProduct\Model\Product\Type\Grouped;
+
+class PriceTest extends \PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var \Magento\GroupedProduct\Model\Product\Type\Grouped\Price
+     */
+    protected $finalPriceModel;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productMock;
+
+    protected function setUp()
+    {
+        $this->productMock = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->finalPriceModel = $helper->getObject('Magento\GroupedProduct\Model\Product\Type\Grouped\Price', array());
+    }
+
+    /**
+     * @covers Magento\GroupedProduct\Model\Product\Type\Grouped\Price::getFinalPrice
+     */
+    public function testGetFinalPriceIfQtyIsNullAndFinalPriceExist()
+    {
+        $finalPrice = 15;
+
+        $this->productMock->expects($this->any())
+            ->method('getCalculatedFinalPrice')
+            ->will($this->returnValue($finalPrice));
+
+        $this->productMock->expects($this->never())
+            ->method('hasCustomOptions');
+        
+        $this->assertEquals($finalPrice, $this->finalPriceModel->getFinalPrice(null, $this->productMock));
+    }
+
+    /**
+     * @param array $associatedProducts
+     * @param array $options
+     * @param $expectedPriceCall
+     * @param $expectedFinalPrice
+     *
+     * @dataProvider getFinalPriceDataProvider
+     * @covers Magento\GroupedProduct\Model\Product\Type\Grouped\Price::getFinalPrice
+     */
+    public function testGetFinalPrice(
+        array $associatedProducts, array $options, $expectedPriceCall, $expectedFinalPrice
+    ) {
+        $rawFinalPrice = 10;
+        $rawPriceCheckStep = 10;
+
+        $this->productMock->expects($this->any())
+            ->method('getCalculatedFinalPrice')
+            ->will($this->returnValue($rawFinalPrice));
+
+        //mock for parent::getFinal price call
+        $this->productMock->expects($this->any())
+            ->method('getPrice')
+            ->will($this->returnValue($rawFinalPrice));
+
+        $this->productMock->expects($this->at($rawPriceCheckStep))
+            ->method('setFinalPrice')
+            ->with($rawFinalPrice)
+            ->will($this->returnValue($this->productMock));
+
+        $this->productMock->expects($this->at($expectedPriceCall))
+            ->method('setFinalPrice')
+            ->with($expectedFinalPrice);
+
+        $this->productMock->expects($this->any())
+            ->method('getData')
+            ->with('final_price')
+            ->will($this->returnValue($rawFinalPrice));
+
+        //test method
+        $this->productMock->expects($this->once())
+            ->method('hasCustomOptions')
+            ->will($this->returnValue(true));
+
+        $productTypeMock = $this->getMock(
+            'Magento\GroupedProduct\Model\Product\Type\Grouped', array(), array(), '', false
+        );
+
+        $this->productMock->expects($this->once())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($productTypeMock));
+
+        $this->productMock->expects($this->any())
+            ->method('getStore')
+            ->will($this->returnValue('store1'));
+
+        $productTypeMock->expects($this->once())
+            ->method('setStoreFilter')
+            ->with('store1', $this->productMock)
+            ->will($this->returnValue($productTypeMock));
+
+        $productTypeMock->expects($this->once())
+            ->method('getAssociatedProducts')
+            ->with($this->productMock)
+            ->will($this->returnValue($associatedProducts));
+
+        $this->productMock->expects($this->any())
+            ->method('getCustomOption')
+            ->will($this->returnValueMap($options));
+
+        $this->assertEquals($rawFinalPrice, $this->finalPriceModel->getFinalPrice(1, $this->productMock));
+    }
+
+    /**
+     * Data provider for testGetFinalPrice
+     *
+     * @return array
+     */
+    public function getFinalPriceDataProvider()
+    {
+        $optionMock = $this->getMock(
+            'Magento\Catalog\Model\Product\Option', array('getValue', '__wakeup'), array(), '', false
+        );
+        /* quantity of options */
+        $optionMock->expects($this->any())->method('getValue')->will($this->returnValue(5));
+
+        return array(
+            'custom_option_null' => array(
+                'associatedProducts' => array(),
+                'options' => array(
+                    array(),
+                    array()
+                ),
+                'expectedPriceCall' => 14, /* product call number to check final price formed correctly */
+                'expectedFinalPrice' => 10 /* 10(product price) + 2(options count) * 5(qty) * 5(option price) */
+            ),
+            'custom_option_exist' => array(
+                'associatedProducts' => $this->generateAssociatedProducts(),
+                'options' => array(
+                    array('associated_product_1', false),
+                    array('associated_product_2', $optionMock),
+                    array('associated_product_3', $optionMock)
+                ),
+                'expectedPriceCall' => 17, /* product call number to check final price formed correctly */
+                'expectedFinalPrice' => 35 /* 10(product price) + 2(options count) * 5(qty) * 5(option price) */
+            )
+        );
+    }
+
+    /**
+     * Generate associated product for every custom option
+     *
+     * @return array
+     */
+    protected function generateAssociatedProducts()
+    {
+        $childProductMock = $this->getMock(
+            'Magento\Catalog\Model\Product', array('getId', 'getFinalPrice', '__wakeup'), array(), '', false
+        );
+        /* price for option taking into account quantity discounts */
+        $childProductMock->expects($this->any())->method('getFinalPrice')->with(5)->will($this->returnValue(5));
+
+        for ($i = 0; $i <= 2; $i ++) {
+            $childProduct = clone($childProductMock);
+            $childProduct->expects($this->once())->method('getId')->will($this->returnValue($i));
+            $associatedProducts[] = $childProduct;
+        }
+
+        return $associatedProducts;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..dada066bdde59f433294a576056cdd047d136c91
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php
@@ -0,0 +1,261 @@
+<?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_GroupedProduct
+ * @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\GroupedProduct\Model\Product\Type;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\GroupedProduct\Model\Product\Type\Grouped
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $catalogProductLink;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $product;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $productStatusMock;
+
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $objectHelper;
+
+    protected function setUp()
+    {
+        $this->objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $eventManager = $this->getMock('Magento\Event\ManagerInterface', array(), array(), '', false);
+        $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
+        $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
+        $coreRegistry = $this->getMock('Magento\Core\Model\Registry', array(), array(), '', false);
+        $this->product = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+        $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
+        $productFactoryMock = $this->getMock('Magento\Catalog\Model\ProductFactory', array(), array(), '', false);
+        $this->catalogProductLink = $this->getMock('\Magento\GroupedProduct\Model\Resource\Product\Link',
+            array(), array(), '', false);
+        $this->productStatusMock = $this->getMock('\Magento\Catalog\Model\Product\Status',
+            array(), array(), '', false);
+        $this->_model = $this->objectHelper->getObject('Magento\GroupedProduct\Model\Product\Type\Grouped', array(
+            'eventManager' => $eventManager,
+            'coreData' => $coreDataMock,
+            'fileStorageDb' => $fileStorageDbMock,
+            'filesystem' => $filesystem,
+            'coreRegistry' => $coreRegistry,
+            'logger' => $logger,
+            'productFactory' => $productFactoryMock,
+            'catalogProductLink' => $this->catalogProductLink,
+            'catalogProductStatus' => $this->productStatusMock,
+        ));
+    }
+
+    public function testHasWeightFalse()
+    {
+        $this->assertFalse($this->_model->hasWeight(), 'This product has weight, but it should not');
+    }
+
+    public function testGetChildrenIds()
+    {
+        $parentId = 12345;
+        $childrenIds = array(100, 200, 300);
+        $this->catalogProductLink->expects($this->once())->method('getChildrenIds')
+            ->with($parentId, \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED)
+            ->will($this->returnValue($childrenIds));
+        $this->assertEquals($childrenIds, $this->_model->getChildrenIds($parentId));
+    }
+
+    public function testGetParentIdsByChild()
+    {
+        $childId = 12345;
+        $parentIds = array(100, 200, 300);
+        $this->catalogProductLink->expects($this->once())->method('getParentIdsByChild')
+            ->with($childId, \Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED)
+            ->will($this->returnValue($parentIds));
+        $this->assertEquals($parentIds, $this->_model->getParentIdsByChild($childId));
+    }
+
+    public function testGetAssociatedProducts()
+    {
+        $cached = true;
+        $associatedProducts = array(5, 7, 11, 13, 17);
+        $this->product->expects($this->once())->method('hasData')->will($this->returnValue($cached));
+        $this->product->expects($this->once())->method('getData')->will($this->returnValue($associatedProducts));
+        $this->assertEquals($associatedProducts, $this->_model->getAssociatedProducts($this->product));
+    }
+
+    /**
+     * @param int $status
+     * @param array $filters
+     * @param array $result
+     * @dataProvider addStatusFilterDataProvider
+     */
+    public function testAddStatusFilter($status, $filters, $result)
+    {
+        $this->product->expects($this->once())->method('getData')->will($this->returnValue($filters));
+        $this->product->expects($this->once())->method('setData')
+            ->with('_cache_instance_status_filters', $result);
+        $this->assertEquals($this->_model, $this->_model->addStatusFilter($status, $this->product));
+    }
+
+    /**
+     * @return array
+     */
+    public function addStatusFilterDataProvider()
+    {
+        return array(
+            array(1, array(), array(1)),
+            array(1, false, array(1)),
+        );
+    }
+
+    public function testSetSaleableStatus()
+    {
+        $key =  '_cache_instance_status_filters';
+        $saleableIds = array(300, 800, 500);
+
+        $this->productStatusMock->expects($this->once())->method('getSaleableStatusIds')
+            ->will($this->returnValue($saleableIds));
+        $this->product->expects($this->once())->method('setData')->with($key, $saleableIds);
+        $this->assertEquals($this->_model, $this->_model->setSaleableStatus($this->product));
+    }
+
+    public function testGetStatusFiltersNoData()
+    {
+        $result = array(
+            \Magento\Catalog\Model\Product\Status::STATUS_ENABLED,
+            \Magento\Catalog\Model\Product\Status::STATUS_DISABLED
+        );
+        $this->product->expects($this->once())->method('hasData')->will($this->returnValue(false));
+        $this->assertEquals($result, $this->_model->getStatusFilters($this->product));
+    }
+
+    public function testGetStatusFiltersWithData()
+    {
+        $result = array(
+            \Magento\Catalog\Model\Product\Status::STATUS_ENABLED,
+            \Magento\Catalog\Model\Product\Status::STATUS_DISABLED
+        );
+        $this->product->expects($this->once())->method('hasData')->will($this->returnValue(true));
+        $this->product->expects($this->once())->method('getData')->will($this->returnValue($result));
+        $this->assertEquals($result, $this->_model->getStatusFilters($this->product));
+    }
+
+    public function testGetAssociatedProductIdsCached()
+    {
+        $key =  '_cache_instance_associated_product_ids';
+        $cachedData = array(300, 303, 306);
+
+        $this->product->expects($this->once())->method('hasData')->with($key)->will($this->returnValue(true));
+        $this->product->expects($this->never())->method('setData');
+        $this->product->expects($this->once())->method('getData')->with($key)->will($this->returnValue($cachedData));
+
+        $this->assertEquals($cachedData, $this->_model->getAssociatedProductIds($this->product));
+    }
+
+    public function testGetAssociatedProductIdsNonCached()
+    {
+        $args = $this->objectHelper->getConstructArguments(
+            '\Magento\GroupedProduct\Model\Product\Type\Grouped',
+            array()
+        );
+
+        /** @var \Magento\GroupedProduct\Model\Product\Type\Grouped $model */
+        $model = $this->getMock(
+            '\Magento\GroupedProduct\Model\Product\Type\Grouped',
+            array('getAssociatedProducts'),
+            $args
+        );
+
+        $associatedProduct = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
+        $model->expects($this->once())->method('getAssociatedProducts')
+            ->with($this->product)->will($this->returnValue(array($associatedProduct)));
+
+        $associatedId = 9384;
+        $key =  '_cache_instance_associated_product_ids';
+        $associatedIds = array($associatedId);
+        $associatedProduct->expects($this->once())->method('getId')->will($this->returnValue($associatedId));
+
+        $this->product->expects($this->once())->method('hasData')->with($key)->will($this->returnValue(false));
+        $this->product->expects($this->once())->method('setData')->with($key, $associatedIds);
+        $this->product->expects($this->once())->method('getData')->with($key)->will($this->returnValue($associatedIds));
+
+        $this->assertEquals($associatedIds, $model->getAssociatedProductIds($this->product));
+    }
+
+    public function testGetAssociatedProductCollection()
+    {
+        $link = $this->getMock('Magento\Catalog\Model\Product\Link', array(), array(), '', false);
+        $this->product->expects($this->once())->method('getLinkInstance')->will($this->returnValue($link));
+        $link->expects($this->any())->method('setLinkTypeId')
+            ->with(\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED);
+        $collection = $this->getMock(
+            'Magento\Catalog\Model\Resource\Product\Link\Product\Collection',
+            array('setFlag', 'setIsStrongMode', 'setProduct'),
+            array(),
+            '',
+            false
+        );
+        $link->expects($this->once())->method('getProductCollection')->will($this->returnValue($collection));
+        $collection->expects($this->any())->method('setFlag')->will($this->returnValue($collection));
+        $collection->expects($this->once())->method('setIsStrongMode')
+                ->will($this->returnValue($collection));
+        $this->assertEquals($collection, $this->_model->getAssociatedProductCollection($this->product));
+    }
+
+    /**
+     * @param array $superGroup
+     * @param array $result
+     * @dataProvider processBuyRequestDataProvider
+     */
+    public function testProcessBuyRequest($superGroup, $result)
+    {
+        $buyRequest = $this->getMock('\Magento\Object', array('getSuperGroup'), array(), '', false);
+        $buyRequest->expects($this->any())->method('getSuperGroup')->will($this->returnValue($superGroup));
+
+        $this->assertEquals($result, $this->_model->processBuyRequest($this->product, $buyRequest));
+    }
+
+    /**
+     * @return array
+     */
+    public function processBuyRequestDataProvider()
+    {
+        return array(
+            'positive' => array(array(1, 2, 3), array('super_group' => array(1, 2, 3))),
+            'negative' => array(false, array('super_group' => array())),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/GroupedTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..05cb2cdf712024d9b09b6463aab347168ec8864c
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/ProductTypes/Config/Converter/Plugin/GroupedTest.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\GroupedProduct\Model\ProductTypes\Config\Converter\Plugin;
+
+class GroupedTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @param array $config
+     * @param array $result
+     * @dataProvider afterConvertDataProvider
+     */
+    public function testAfterConvert($config, $result)
+    {
+        $model = new \Magento\GroupedProduct\Model\ProductTypes\Config\Converter\Plugin\Grouped();
+        $this->assertEquals($result, $model->afterConvert($config));
+    }
+
+    /**
+     * @return array
+     */
+    public function afterConvertDataProvider()
+    {
+        $index = \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE;
+        $emptyConfig = array(1, 2, 3);
+        $config = array($index => array(1));
+        $result = array($index => array(1, 'is_product_set' => true));
+
+        return array(
+            'empty config' => array($emptyConfig, $emptyConfig),
+            'with grouped' => array($config, $result),
+        );
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php
index e2aeb7de107871a7c9b742878d764f2c7c58e13a..a618a78aed31b57086f98764f4600956fe4717ad 100644
--- a/dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Image/Adapter/AbstractTest.php
@@ -52,7 +52,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
     {
         $this->directoryWriteMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $this->filesystemMock = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryWrite', 'createDirectory'),
             array(),
             '',
diff --git a/dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php b/dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php
index 166cd59a800194193d2d7a6833a6878a3e9c4fc5..2affcc7695a658d3b9d63ead6e55305bd5ddc67a 100644
--- a/dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php
+++ b/dev/tests/unit/testsuite/Magento/Image/Adapter/ImageMagickTest.php
@@ -33,7 +33,7 @@ class ImageMagickTest extends \PHPUnit_Framework_TestCase
      */
     public function testWatermark($imagePath, $expectedMessage)
     {
-        $filesystem = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $filesystem = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $this->setExpectedException('LogicException', $expectedMessage);
         $object = new \Magento\Image\Adapter\ImageMagick($filesystem);
         $object->watermark($imagePath);
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
index 19671dccf070ee9932fe05020e03082a58bcc7fe..95a201da4fb87824bab1a7539bdcacd2b77d9417 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
@@ -76,7 +76,7 @@ class ExportTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($this->_exportFileExtension));
 
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $adapterFactory = $this->getMock('Magento\Core\Model\Log\AdapterFactory', array(), array(), '', false);
         $entityFactory = $this->getMock(
             'Magento\ImportExport\Model\Export\Entity\Factory', array(), array(), '', false);;
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Source/CsvTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Source/CsvTest.php
index be46d1298e284e742bf4dba67834a5866538daef..48880f943ca8dd8646ceb1be5b063fde9cac9948 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Source/CsvTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Source/CsvTest.php
@@ -27,7 +27,7 @@ namespace Magento\ImportExport\Model\Import\Source;
 class CsvTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -41,7 +41,7 @@ class CsvTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php b/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php
index bd4262adf32f12c3cc3307b4bc261109737b8674..7cef4fbaca664d2394ffb809947f26dcc6612d86 100644
--- a/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Index/App/IndexerTest.php
@@ -43,9 +43,14 @@ class IndexerTest extends \PHPUnit_Framework_TestCase
      */
     protected $_filesystem;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_responseMock;
+
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryWrite'), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false);
         $directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $directoryMock->expects($this->any())
             ->method('getRelativePath')
@@ -53,12 +58,19 @@ class IndexerTest extends \PHPUnit_Framework_TestCase
         $this->_filesystem->expects($this->once())
             ->method('getDirectoryWrite')
             ->will($this->returnValue($directoryMock));
-        $this->_indexFactoryMock = $this->getMock('Magento\Index\Model\IndexerFactory',
-            array('create'), array(), '', false);
+        $this->_indexFactoryMock = $this->getMock(
+            'Magento\Index\Model\IndexerFactory',
+            array('create'),
+            array(),
+            '',
+            false
+        );
+        $this->_responseMock = $this->getMock('Magento\App\Console\Response', array(), array(), '', false);
         $this->_entryPoint = new \Magento\Index\App\Indexer(
             'reportDir',
             $this->_filesystem,
-            $this->_indexFactoryMock
+            $this->_indexFactoryMock,
+            $this->_responseMock
         );
     }
 
@@ -89,7 +101,7 @@ class IndexerTest extends \PHPUnit_Framework_TestCase
             $indexerInterface->expects($this->once())->method('isVisible')->will($this->returnValue(false));
             $process->expects($this->never())->method('reindexEverything');
         }
-        $this->assertEquals('0', $this->_entryPoint->execute());
+        $this->assertEquals($this->_responseMock, $this->_entryPoint->execute());
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php b/dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php
index 3157f239e7cc9af4d23f8896b7033d61bb0d59cc..b48c46c8b7efbd889272050e2b6ca31d99b7a2ec 100644
--- a/dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php
+++ b/dev/tests/unit/testsuite/Magento/Index/App/ShellTest.php
@@ -41,22 +41,17 @@ class ShellTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_shellErrorHandler;
+    protected $_responseMock;
 
     protected function setUp()
     {
         $this->_shellFactory = $this->getMock('Magento\Index\Model\ShellFactory', array('create'), array(), '', false);
-        $this->_shellErrorHandler = $this->getMock(
-            'Magento\Index\App\Shell\ErrorHandler',
-            array(),
-            array(),
-            '',
-            false
-        );
+        $this->_responseMock = $this->getMock('Magento\App\Console\Response', array(), array(), '', false);
         $this->_entryPoint = new \Magento\Index\App\Shell(
             'indexer.php',
             $this->_shellFactory,
-            $this->_shellErrorHandler
+            $this->_responseMock
+
         );
     }
 
@@ -70,12 +65,15 @@ class ShellTest extends \PHPUnit_Framework_TestCase
         $shell->expects($this->once())
             ->method('hasErrors')
             ->will($this->returnValue($shellHasErrors));
-        $shell->expects($this->once())
-            ->method('run');
+        $shell->expects($this->once())->method('run');
         if ($shellHasErrors) {
-            $this->_shellErrorHandler->expects($this->once())
-                ->method('terminate')
-                ->with(1);
+            $this->_responseMock->expects($this->once())
+                ->method('setCode')
+                ->with(-1);
+        } else {
+            $this->_responseMock->expects($this->once())
+                ->method('setCode')
+                ->with(0);
         }
         $this->_shellFactory->expects($this->any())
             ->method('create')
diff --git a/dev/tests/unit/testsuite/Magento/Index/Model/Lock/StorageTest.php b/dev/tests/unit/testsuite/Magento/Index/Model/Lock/StorageTest.php
index c81ac3b2e8a38b1c543d06da0389710ba85f4dfe..4d0e9662373ce011001b1e7a4ee9e6421bba15f5 100644
--- a/dev/tests/unit/testsuite/Magento/Index/Model/Lock/StorageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Index/Model/Lock/StorageTest.php
@@ -56,12 +56,12 @@ class StorageTest extends \PHPUnit_Framework_TestCase
             ->method('openFile')
             ->will($this->returnValue($streamMock));
 
-        $filesystemMock = $this->getMockBuilder('Magento\Filesystem')
+        $filesystemMock = $this->getMockBuilder('Magento\App\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $filesystemMock->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::VAR_DIR)
+            ->with(\Magento\App\Filesystem::VAR_DIR)
             ->will($this->returnValue($directoryMock));
 
         $fileModel = $this->getMock('Magento\Index\Model\Process\File', array(), array($streamMock), '');
diff --git a/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php b/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php
index 3d97314e4a78a479388db03b902aefb8d894820c..2a4ef97e1608d522f443445216fda8380b004f4e 100644
--- a/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/App/Action/Plugin/DirTest.php
@@ -49,13 +49,13 @@ class DirTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->appStateMock = $this->getMock('Magento\App\State', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryWrite'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false);
         $this->varDirectory = $this->getMock(
             'Magento\Filesystem\Directory\Write', array('read', 'isDirectory', 'delete'), array(), '', false
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::VAR_DIR)
+            ->with(\Magento\App\Filesystem::VAR_DIR)
             ->will($this->returnValue($this->varDirectory));
         $logger = $this->getMock('Magento\Logger', array(), array(), '', false);
         $this->plugin = new \Magento\Install\App\Action\Plugin\Dir(
diff --git a/dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php b/dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php
index 8f0492ec5844b9db9e1c6bc63b6749dbd3193cb4..277336bae3ec7fb69ef6db33ce4fe888d9d9e2f5 100644
--- a/dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/App/ConsoleTest.php
@@ -37,7 +37,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
     protected $_installerMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Filesystem\DirectoryList\Verification
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Filesystem\DirectoryList\Verification
      */
     protected $_dirVerifierMock;
 
@@ -64,13 +64,18 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
      */
     protected $_objectManagerMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_responseMock;
+
     protected function setUp()
     {
         $this->_instFactoryMock = $this->getMock('\Magento\Install\Model\Installer\ConsoleFactory',
             array('create'), array(), '', false);
         $this->_installerMock = $this->getMock('Magento\Install\Model\Installer\Console', array(), array(), '', false);
         $this->_dirVerifierMock = $this->getMock(
-            'Magento\Filesystem\DirectoryList\Verification',
+            'Magento\App\Filesystem\DirectoryList\Verification',
             array(),
             array(),
             '',
@@ -100,10 +105,16 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false);
+        $filesystem = $this->getMock(
+            'Magento\App\Filesystem',
+            array('getDirectoryRead', '__wakeup'),
+            array(),
+            '',
+            false
+        );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue($directory));
         if (isset($params['config'])) {
             $directory->expects($this->once())
@@ -115,8 +126,16 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
                 ->with($params['config'])
                 ->will($this->returnValue(true));
         }
-        return new \Magento\Install\App\Console($this->_instFactoryMock, $this->_outputMock,
-            $this->_appStateMock, $this->_configLoaderMock, $this->_objectManagerMock, $filesystem, $params
+        $this->_responseMock = $this->getMock('Magento\App\Console\Response', array(), array(), '', false);
+        return new \Magento\Install\App\Console(
+            $this->_instFactoryMock,
+            $this->_outputMock,
+            $this->_appStateMock,
+            $this->_configLoaderMock,
+            $this->_objectManagerMock,
+            $filesystem,
+            $this->_responseMock,
+            $params
         );
     }
 
@@ -134,7 +153,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
             ->method($method)
             ->will($this->returnValue($testValue));
         $this->_outputMock->expects($this->once())->method('export')->with($testValue);
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 
     public function executeShowsRequestedDataProvider()
@@ -151,7 +170,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
     {
         $model = $this->_createModel(array());
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('successfully'));
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 
     public function testInstallReportsEncryptionKey()
@@ -159,7 +178,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $model = $this->_createModel(array());
         $this->_installerMock->expects($this->once())->method('install')->will($this->returnValue('enc_key'));
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('enc_key'));
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 
     public function testUninstallReportsSuccess()
@@ -167,7 +186,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $model = $this->_createModel(array('uninstall' => true));
         $this->_installerMock->expects($this->once())->method('uninstall')->will($this->returnValue(true));
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('Uninstalled'));
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 
     public function testUninstallReportsIgnoreIfApplicationIsNotInstalled()
@@ -175,7 +194,7 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $model = $this->_createModel(array('uninstall' => true));
         $this->_installerMock->expects($this->once())->method('uninstall')->will($this->returnValue(false));
         $this->_outputMock->expects($this->once())->method('success')->with($this->stringContains('non-installed'));
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 
     public function testExecuteReportsErrors()
@@ -184,13 +203,13 @@ class ConsoleTest extends \PHPUnit_Framework_TestCase
         $this->_installerMock->expects($this->once())->method('hasErrors')->will($this->returnValue(true));
         $this->_installerMock->expects($this->once())->method('getErrors')->will($this->returnValue(array('error1')));
         $this->_outputMock->expects($this->once())->method('error')->with($this->stringContains('error1'));
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 
     public function testExecuteLoadsExtraConfig()
     {
         $model = $this->_createModel(array('config' => realpath(__DIR__ . '/_files/config.php')));
         $this->_installerMock->expects($this->once())->method('uninstall')->will($this->returnValue(true));
-        $model->execute();
+        $this->assertEquals($this->_responseMock, $model->execute());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php b/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php
index 9b9dad14f9cb7789d94709b4acd6e334ddeef2e8..d0a35fd971004be4133173801ffd0c196cab7601 100644
--- a/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/Block/BeginTest.php
@@ -56,7 +56,7 @@ class BeginTest extends \PHPUnit_Framework_TestCase
             ->with($this->equalTo($fileName))
             ->will($this->returnValue($expectedTxt));
 
-        $fileSystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $fileSystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $fileSystem->expects($this->once())
             ->method('getDirectoryRead')
             ->will($this->returnValue($directoryMock));
@@ -76,7 +76,7 @@ class BeginTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetLicenseHtmlWhenFileIsEmpty($fileName)
     {
-        $fileSystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $fileSystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $fileSystem->expects($this->never())->method('read');
 
         $block = $this->_objectManager->getObject('Magento\Install\Block\Begin',
diff --git a/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php
index 12f750c617532cec0601414563c812216e3a2533..2016b62dfda178a8cfc0b2a7cd30d62f4d1fdb45 100644
--- a/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Install/Model/Installer/ConfigTest.php
@@ -40,7 +40,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystemMock;
 
@@ -58,10 +58,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     {
         $this->_directoryMock = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
 
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_filesystemMock->expects($this->any())
             ->method('getPath')
-            ->with(\Magento\Filesystem::CONFIG)
+            ->with(\Magento\App\Filesystem::CONFIG_DIR)
             ->will($this->returnValue(TESTS_TEMP_DIR));
         $this->_filesystemMock->expects($this->any())
             ->method('getDirectoryWrite')
diff --git a/dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php b/dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php
index a0324884c76392f0f299cd80e064244f1b79b54f..1c1d2f323930568c506a55f5c88b0001e9b718ef 100644
--- a/dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php
+++ b/dev/tests/unit/testsuite/Magento/Log/App/ShellTest.php
@@ -35,11 +35,22 @@ class ShellTest extends \PHPUnit_Framework_TestCase
      */
     protected $_shellFactoryMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_responseMock;
+
     protected function setUp()
     {
-        $this->_shellFactoryMock = $this->getMock('Magento\Log\Model\ShellFactory',
-            array('create'), array(), '', false);
-        $this->_model = new \Magento\Log\App\Shell('shell.php', $this->_shellFactoryMock);
+        $this->_shellFactoryMock = $this->getMock(
+            'Magento\Log\Model\ShellFactory',
+            array('create'),
+            array(),
+            '',
+            false
+        );
+        $this->_responseMock = $this->getMock('Magento\App\Console\Response', array(), array(), '', false);
+        $this->_model = new \Magento\Log\App\Shell('shell.php', $this->_shellFactoryMock, $this->_responseMock);
     }
 
     public function testProcessRequest()
@@ -50,6 +61,6 @@ class ShellTest extends \PHPUnit_Framework_TestCase
             ->with(array('entryPoint' => 'shell.php'))
             ->will($this->returnValue($shellMock));
         $shellMock->expects($this->once())->method('run');
-        $this->assertEquals('0', $this->_model->execute());
+        $this->assertEquals($this->_responseMock, $this->_model->execute());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php b/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php
index 9f424f67f775fd0fa6c09abd8bc58e87854845c1..c25cd53abd1b2db23a7320204a152f04c22e2775 100644
--- a/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Log/LoggerTest.php
@@ -23,13 +23,12 @@
  */
 namespace Magento\Log;
 
-use Magento\Filesystem,
-    Magento\Filesystem\Directory\Write;
+use Magento\Filesystem\Directory\Write;
 
 class LoggerTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Logger|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_model = null;
 
@@ -51,11 +50,11 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $logDir = TESTS_TEMP_DIR . '/var/log';
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $this->_filesystemMock->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::LOG)
+            ->with(\Magento\App\Filesystem::LOG_DIR)
             ->will($this->returnValue($this->_directory));
         $this->_directory->expects($this->any())
             ->method('create')
@@ -151,7 +150,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
     public function testLogDebug()
     {
         $message = uniqid();
-        /** @var $model \Magento\Logger|PHPUnit_Framework_MockObject_MockObject */
+        /** @var $model \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject */
         $model = $this->getMock('Magento\Logger', array('log'), array(), '', false);
         $model->expects($this->at(0))->method('log')
             ->with($message, \Zend_Log::DEBUG, \Magento\Logger::LOGGER_SYSTEM);
@@ -165,7 +164,7 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
     {
         $exception = new \Exception;
         $expected = "\n{$exception}";
-        /** @var $model \Magento\Logger|PHPUnit_Framework_MockObject_MockObject */
+        /** @var $model \Magento\Logger|\PHPUnit_Framework_MockObject_MockObject */
         $model = $this->getMock('Magento\Logger', array('log'), array(), '', false);
         $model->expects($this->at(0))->method('log')
             ->with($expected, \Zend_Log::ERR, \Magento\Logger::LOGGER_EXCEPTION);
diff --git a/dev/tests/unit/testsuite/Magento/Log/Model/ShellTest.php b/dev/tests/unit/testsuite/Magento/Log/Model/ShellTest.php
index aaa36f135307838340d74a42f50d2f063edd2de5..d8a036376c7bef081fce0ee21af5230783c4007b 100644
--- a/dev/tests/unit/testsuite/Magento/Log/Model/ShellTest.php
+++ b/dev/tests/unit/testsuite/Magento/Log/Model/ShellTest.php
@@ -43,7 +43,7 @@ class ShellTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_factoryMock = $this->getMock('Magento\Log\Model\Shell\Command\Factory', array(), array(), '', false);
-        $filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_model = $this->getMock('Magento\Log\Model\Shell',
             array('_applyPhpVariables'),
             array($filesystemMock, 'entryPoint.php', $this->_factoryMock)
diff --git a/dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php b/dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php
index ee0988deb5b9a5fbd9baeffe26af16698d8e6555..2ec9f1b4f1ad766730178d3672a3879d3a21a10b 100644
--- a/dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Message/AbstractMessageTest.php
@@ -43,8 +43,8 @@ class AbstractMessageTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\AbstractMessage::getText
-     * @cover \Magento\Message\AbstractMessage::setText
+     * @covers \Magento\Message\AbstractMessage::getText
+     * @covers \Magento\Message\AbstractMessage::setText
      * @dataProvider setTextGetTextProvider
      */
     public function testSetTextGetText($text)
@@ -65,8 +65,8 @@ class AbstractMessageTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\AbstractMessage::getIdentifier
-     * @cover \Magento\Message\AbstractMessage::setIdentifier
+     * @covers \Magento\Message\AbstractMessage::getIdentifier
+     * @covers \Magento\Message\AbstractMessage::setIdentifier
      * @dataProvider setIdentifierGetIdentifierProvider
      */
     public function testSetIdentifierGetIdentifier($identifier)
@@ -87,8 +87,8 @@ class AbstractMessageTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\AbstractMessage::getIsSticky
-     * @cover \Magento\Message\AbstractMessage::setIsSticky
+     * @covers \Magento\Message\AbstractMessage::getIsSticky
+     * @covers \Magento\Message\AbstractMessage::setIsSticky
      */
     public function testSetIsStickyGetIsSticky()
     {
@@ -98,7 +98,7 @@ class AbstractMessageTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\AbstractMessage::toString
+     * @covers \Magento\Message\AbstractMessage::toString
      */
     public function testToString()
     {
diff --git a/dev/tests/unit/testsuite/Magento/Message/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Message/CollectionTest.php
index 13096bcc7d9ccede6f5f86a130a8d0e715c4a672..ba047fb150d20465d0b844bc58a25fb251f06733 100644
--- a/dev/tests/unit/testsuite/Magento/Message/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Message/CollectionTest.php
@@ -46,8 +46,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::addMessage
-     * @cover \Magento\Message\Collection::getItemsByType
+     * @covers \Magento\Message\Collection::addMessage
+     * @covers \Magento\Message\Collection::getItemsByType
      */
     public function testAddMessage()
     {
@@ -68,9 +68,9 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::addMessage
-     * @cover \Magento\Message\Collection::getItems
-     * @cover \Magento\Message\Collection::getLastAddedMessage
+     * @covers \Magento\Message\Collection::addMessage
+     * @covers \Magento\Message\Collection::getItems
+     * @covers \Magento\Message\Collection::getLastAddedMessage
      */
     public function testGetItems()
     {
@@ -92,10 +92,10 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::addMessage
-     * @cover \Magento\Message\Collection::getItemsByType
-     * @cover \Magento\Message\Collection::getCount
-     * @cover \Magento\Message\Collection::getCountByType
+     * @covers \Magento\Message\Collection::addMessage
+     * @covers \Magento\Message\Collection::getItemsByType
+     * @covers \Magento\Message\Collection::getCount
+     * @covers \Magento\Message\Collection::getCountByType
      */
     public function testGetItemsByType()
     {
@@ -135,8 +135,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::addMessage
-     * @cover \Magento\Message\Collection::getErrors
+     * @covers \Magento\Message\Collection::addMessage
+     * @covers \Magento\Message\Collection::getErrors
      */
     public function testGetErrors()
     {
@@ -158,8 +158,8 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::getMessageByIdentifier
-     * @cover \Magento\Message\Collection::deleteMessageByIdentifier
+     * @covers \Magento\Message\Collection::getMessageByIdentifier
+     * @covers \Magento\Message\Collection::deleteMessageByIdentifier
      */
     public function testGetMessageByIdentifier()
     {
@@ -185,7 +185,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::clear
+     * @covers \Magento\Message\Collection::clear
      */
     public function testClear()
     {
@@ -206,7 +206,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @cover \Magento\Message\Collection::clear
+     * @covers \Magento\Message\Collection::clear
      */
     public function testClearWithSticky()
     {
diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php
index 61e9dd28bd0b1426ef700a3fdbd80e3a32f79353..41c579ef5efe6147d7efc6314ca9f921393ddbd6 100644
--- a/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Declaration/FileResolverTest.php
@@ -77,8 +77,8 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFileResolver($baseDir)
     {
-        $filesystem = new \Magento\Filesystem(
-            new \Magento\Filesystem\DirectoryList($baseDir),
+        $filesystem = new \Magento\App\Filesystem(
+            new \Magento\App\Filesystem\DirectoryList($baseDir),
             new \Magento\Filesystem\Directory\ReadFactory(),
             new \Magento\Filesystem\Directory\WriteFactory()
         );
diff --git a/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php
index 8d525fe39439c4f7ea282cf26a7257127b542961..160a87d626fa42e8898dbb7f3e02cc62d2638a63 100644
--- a/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Declaration/Reader/FilesystemTest.php
@@ -99,8 +99,8 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFileResolver($baseDir)
     {
-        $filesystem = new \Magento\Filesystem(
-            new \Magento\Filesystem\DirectoryList($baseDir),
+        $filesystem = new \Magento\App\Filesystem(
+            new \Magento\App\Filesystem\DirectoryList($baseDir),
             new \Magento\Filesystem\Directory\ReadFactory(),
             new \Magento\Filesystem\Directory\WriteFactory()
         );
diff --git a/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php
index 60a6471e709301cbeec31b6143d1c37f5dba0f8e..e267ee4f04f4515771708c310247c0b1a205807b 100644
--- a/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/Dir/ReaderTest.php
@@ -62,7 +62,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $this->_dirsMock = $this->getMock('Magento\Module\Dir', array(), array(), '', false, false);
         $this->_baseConfigMock = $this->getMock('Magento\Core\Model\Config\Base', array(), array(), '', false, false);
         $this->_moduleListMock = $this->getMock('Magento\Module\ModuleListInterface');
-        $filesystemMock = $this->getMock('\Magento\Filesystem', array(), array(), '', false, false);
+        $filesystemMock = $this->getMock('\Magento\App\Filesystem', array(), array(), '', false, false);
         $fileIteratorFactoryMock = $this->getMock('\Magento\Config\FileIteratorFactory', array(), array(),
             '', false, false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Module/DirTest.php b/dev/tests/unit/testsuite/Magento/Module/DirTest.php
index 3d0b358904e42ec7c2f2bd824cfa142296ae2d75..47df14dcf3d816543246808c091111978c6f446d 100644
--- a/dev/tests/unit/testsuite/Magento/Module/DirTest.php
+++ b/dev/tests/unit/testsuite/Magento/Module/DirTest.php
@@ -31,7 +31,7 @@ class DirTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystemMock;
 
@@ -47,7 +47,7 @@ class DirTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false, false);
+        $this->filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false, false);
         $this->directoryMock  = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false, false);
         $this->_stringMock    = $this->getMock('Magento\Stdlib\String', array(), array(), '', false, false);
 
diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Model/App/FrontController/HeaderPluginTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Model/App/FrontController/HeaderPluginTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..75075328a468fd57b10e3b6f82e5e4dbc845e747
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/App/FrontController/HeaderPluginTest.php
@@ -0,0 +1,103 @@
+<?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_PageCache
+ * @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\PageCache\Model\App\FrontController;
+
+class HeaderPluginTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\PageCache\Model\App\FrontController\HeaderPlugin
+     */
+    protected $plugin;
+
+    /**
+     * @var \Magento\Core\Model\Layout|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $layoutMock;
+
+    /**
+     * @var \Magento\Core\Model\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $configMock;
+
+    /**
+     * @var \Magento\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $responseMock;
+
+    /**
+     * SetUp
+     */
+    protected function setUp()
+    {
+        $this->layoutMock = $this->getMock('Magento\Core\Model\Layout', array(), array(), '', false);
+        $this->configMock = $this->getMock('Magento\Core\Model\ConfigInterface', array(), array(), '', false);
+        $this->responseMock = $this->getMock('Magento\App\Response\Http', array(), array(), '', false);
+        $this->plugin = new HeaderPlugin($this->layoutMock, $this->configMock);
+    }
+
+    /**
+     * data providers for response headers
+     */
+    public function headersCachableDataProvider()
+    {
+        return array(
+            array(false, false, '10', 'no-store, no-cache, must-revalidate, max-age=0', 'no-cache'),
+            array(true, false, '20', 'public, max-age=20', 'cache'),
+            array(true, true, '30', 'private, max-age=30', 'cache'),
+        );
+    }
+
+    /**
+     * test response headers after dispatch, without cache
+     *
+     * @dataProvider headersCachableDataProvider
+     */
+    public function testAfterDispatchCacheable($isCacheable, $isPrivate, $maxAge, $cacheControl, $pragma)
+    {
+        $this->layoutMock->expects($this->once())
+            ->method('isCacheable')
+            ->will($this->returnValue($isCacheable));
+        $this->layoutMock->expects($this->any())
+            ->method('isPrivate')
+            ->will($this->returnValue($isPrivate));
+        $this->configMock->expects($this->any())
+            ->method('getValue')
+            ->with('system/headers/max-age')
+            ->will($this->returnValue($maxAge));
+
+        $this->responseMock->expects($this->at(0))
+            ->method('setHeader')
+            ->with('pragma', $pragma);
+
+        $this->responseMock->expects($this->at(1))
+            ->method('setHeader')
+            ->with('cache-control', $cacheControl);
+
+        $this->plugin->afterDispatch($this->responseMock);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Model/Method/AgreementTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Model/Method/AgreementTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..ef9df2e4fcd915773cd535fcd3ac7d0b180b3e59
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Paypal/Model/Method/AgreementTest.php
@@ -0,0 +1,122 @@
+<?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_Paypal
+ * @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\Paypal\Model\Method;
+
+class AgreementTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    protected $_helper;
+
+    /**
+     * @var \Magento\Paypal\Model\Method\Agreement
+     */
+    protected $_model;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_apiNvpMock;
+
+    protected function setUp()
+    {
+        $this->_helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $paypalConfigMock = $this->getMockBuilder('\Magento\Paypal\Model\Config')
+            ->disableOriginalConstructor()
+            ->setMethods(array('__get'))
+            ->getMock();
+        $this->_apiNvpMock = $this->getMockBuilder('\Magento\Paypal\Model\Api\Nvp')
+            ->disableOriginalConstructor()
+            ->setMethods(array('callDoReferenceTransaction', 'callGetTransactionDetails'))
+            ->getMock();
+        $proMock = $this->getMockBuilder('\Magento\Paypal\Model\Pro')
+            ->setMethods(array('getApi', 'setMethod', 'getConfig', 'importPaymentInfo'))
+            ->disableOriginalConstructor()
+            ->getMock();
+        $proMock->expects($this->any())
+            ->method('getApi')
+            ->will($this->returnValue($this->_apiNvpMock));
+        $proMock->expects($this->any())
+            ->method('getConfig')
+            ->will($this->returnValue($paypalConfigMock));
+
+        $billingAgreementMock = $this->getMockBuilder('\Magento\Sales\Model\Billing\Agreement')
+            ->disableOriginalConstructor()
+            ->setMethods(array('load', '__wakeup'))
+            ->getMock();
+        $billingAgreementMock->expects($this->any())
+            ->method('load')
+            ->will($this->returnValue($billingAgreementMock));
+
+        $agreementFactoryMock = $this->getMockBuilder('\Magento\Sales\Model\Billing\AgreementFactory')
+            ->disableOriginalConstructor()
+            ->setMethods(array('create'))
+            ->getMock();
+        $agreementFactoryMock->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($billingAgreementMock));
+
+        $cartMock = $this->getMockBuilder('\Magento\Paypal\Model\Cart')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $cartFactoryMock = $this->getMockBuilder('\Magento\Paypal\Model\CartFactory')
+            ->disableOriginalConstructor()
+            ->setMethods(array('create'))
+            ->getMock();
+        $cartFactoryMock->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($cartMock));
+
+        $arguments = array(
+            'agreementFactory' => $agreementFactoryMock,
+            'cartFactory' => $cartFactoryMock,
+            'data' => array($proMock)
+        );
+
+        $this->_model = $this->_helper->getObject('Magento\Paypal\Model\Method\Agreement', $arguments);
+    }
+
+    public function testAuthorizeWithBaseCurrency()
+    {
+        $payment = $this->getMockBuilder('\Magento\Sales\Model\Order\Payment')
+            ->disableOriginalConstructor()
+            ->setMethods(array('__wakeup'))
+            ->getMock();
+        $order = $this->getMockBuilder('Magento\Sales\Model\Order')
+            ->disableOriginalConstructor()
+            ->setMethods(array('__wakeup'))
+            ->getMock();
+        $order->setBaseCurrencyCode('USD');
+        $payment->setOrder($order);
+
+        $this->_model->authorize($payment, 10.00);
+        $this->assertEquals($order->getBaseCurrencyCode(), $this->_apiNvpMock->getCurrencyCode());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php
index 6280ff74854771301538e6bcf3f43c4845331fe5..fd8e0a297aa66508462958b623d97cab6a8f53cd 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Invoice/Total/ShippingTest.php
@@ -52,13 +52,13 @@ class ShippingTest extends \PHPUnit_Framework_TestCase
             'calculatorFactory' => $this->getMock(
                 'Magento\Core\Model\CalculatorFactory', array(), array(), '', false
             ),
-            'invoiceItemCollFactory' => $this->getMock(
+            'invoiceItemCollectionFactory' => $this->getMock(
                 'Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory', array(), array(), '', false
             ),
             'invoiceCommentFactory' => $this->getMock(
                 'Magento\Sales\Model\Order\Invoice\CommentFactory', array(), array(), '', false
             ),
-            'commentCollFactory' => $this->getMock(
+            'commentCollectionFactory' => $this->getMock(
                 'Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory', array(), array(), '', false
             ),
             'templateMailerFactory' => $this->getMock(
@@ -98,7 +98,7 @@ class ShippingTest extends \PHPUnit_Framework_TestCase
             'emailInfoFactory' => $this->getMock(
                 'Magento\Email\Model\InfoFactory', array(), array(), '', false
             ),
-            'orderItemCollFactory' => $this->getMock(
+            'orderItemCollectionFactory' => $this->getMock(
                 'Magento\Sales\Model\Resource\Order\Item\CollectionFactory', array(), array(), '', false
             ),
             'serviceOrderFactory' => $this->getMock(
@@ -110,7 +110,7 @@ class ShippingTest extends \PHPUnit_Framework_TestCase
             'orderHistoryFactory' => $this->getMock(
                 'Magento\Sales\Model\Order\Status\HistoryFactory', array(), array(), '', false
             ),
-            'orderTaxCollFactory' => $this->getMock(
+            'orderTaxCollectionFactory' => $this->getMock(
                 'Magento\Tax\Model\Resource\Sales\Order\Tax\CollectionFactory', array(), array(), '', false
             ),
         );
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php
index 64510b540fb55348eb1201bc04a3fe9c93a2e224..5444d1003dc33fc1d6bb229b75b75f1d43f44fd2 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/InvoiceTest.php
@@ -66,13 +66,13 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
             'calculatorFactory' => $this->getMock(
                 'Magento\Core\Model\CalculatorFactory', array(), array(), '', false
             ),
-            'invoiceItemCollFactory' => $this->getMock(
+            'invoiceItemCollectionFactory' => $this->getMock(
                 'Magento\Sales\Model\Resource\Order\Invoice\Item\CollectionFactory', array(), array(), '', false
             ),
             'invoiceCommentFactory' => $this->getMock(
                 'Magento\Sales\Model\Order\Invoice\CommentFactory', array(), array(), '', false
             ),
-            'commentCollFactory' => $this->getMock(
+            'commentCollectionFactory' => $this->getMock(
                 'Magento\Sales\Model\Resource\Order\Invoice\Comment\CollectionFactory', array(), array(), '', false
             ),
             'templateMailerFactory' => $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php
index 4c0fed53ff2da9a7d19f878ad93ad9a4749cff45..de1b6ef5a598b4fc04323e8b2ef7385ee0be8d05 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/AbstractTest.php
@@ -46,8 +46,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $string = $this->getMock('Magento\Stdlib\String', array(), array(), '', false);
         $coreStoreConfig = $this->getMock('Magento\Core\Model\Store\Config', array(), array(), '', false);
         $translate = $this->getMock('Magento\Core\Model\Translate', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
-        $shippingConfig = $this->getMock('Magento\Shipping\Model\Config', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $pdfItemsFactory = $this->getMock('Magento\Sales\Model\Order\Pdf\ItemsFactory', array(), array(), '', false);
         $localeMock = $this->getMock('Magento\Core\Model\LocaleInterface', array(), array(), '', false, false);
 
@@ -108,7 +107,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         // Test model
         /** @var \Magento\Sales\Model\Order\Pdf\AbstractPdf $model */
         $model = $this->getMockForAbstractClass('Magento\Sales\Model\Order\Pdf\AbstractPdf',
-            array($paymentData, $string, $coreStoreConfig, $translate, $filesystem, $shippingConfig,
+            array($paymentData, $string, $coreStoreConfig, $translate, $filesystem,
                 $pdfConfig, $pdfTotalFactory, $pdfItemsFactory, $localeMock),
             '', true, false, true, array('drawLineBlocks')
         );
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php
index bb05bb4a70130938a4dfe352d3f3212bbdee5650..82c845ee6575c2086b44e28a280db1ec5295341b 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Order/Pdf/InvoiceTest.php
@@ -52,7 +52,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
                     }
                 )
             );
-        $filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false, false);
+        $filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false, false);
         $filesystemMock->expects($this->any())
             ->method('getDirectoryRead')
             ->will($this->returnValue($directoryMock));
@@ -60,8 +60,6 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
             ->method('getDirectoryWrite')
             ->will($this->returnValue($directoryMock));
 
-        $shippingConfigMock = $this->getMock('Magento\Shipping\Model\Config', array(), array(), '', false,
-            false);
         $this->_pdfConfigMock =
             $this->getMock('Magento\Sales\Model\Order\Pdf\Config', array(), array(), '', false, false);
         $totalFactoryMock = $this->getMock('Magento\Sales\Model\Order\Pdf\Total\Factory', array(), array(), '', false,
@@ -79,7 +77,6 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
             $storeConfigMock,
             $translateMock,
             $filesystemMock,
-            $shippingConfigMock,
             $this->_pdfConfigMock,
             $totalFactoryMock,
             $pdfItemsFactoryMock,
diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Block/Adminhtml/Order/TrackingTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Block/Adminhtml/Order/TrackingTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4f7f7f6221bdc05e3ac240e0e1cded2848994625
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Shipping/Block/Adminhtml/Order/TrackingTest.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Shipping\Block\Adminhtml\Order;
+
+class TrackingTest extends \PHPUnit_Framework_TestCase
+{
+    public function testLookup()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $shipment = new \Magento\Object(['store_id' => 1]);
+
+        $registry = $this->getMock('Magento\Core\Model\Registry', ['registry'], [], '', false);
+        $registry->expects($this->once())->method('registry')
+            ->with('current_shipment')->will($this->returnValue($shipment));
+
+        $carrier = $this->getMock('Magento\Shipping\Model\Carrier\Freeshipping',
+            ['isTrackingAvailable', 'getConfigData'], [], '', false);
+        $carrier->expects($this->once())->method('isTrackingAvailable')->will($this->returnValue(true));
+        $carrier->expects($this->once())->method('getConfigData')->with('title')
+            ->will($this->returnValue('configdata'));
+
+        $config = $this->getMock('Magento\Shipping\Model\Config', ['getAllCarriers'], [], '', false);
+        $config->expects($this->once())->method('getAllCarriers')
+            ->with(1)->will($this->returnValue(['free' => $carrier]));
+
+        /** @var \Magento\Shipping\Block\Adminhtml\Order\Tracking $model */
+        $model = $helper->getObject(
+            'Magento\Shipping\Block\Adminhtml\Order\Tracking',
+            [
+                'registry' => $registry,
+                'shippingConfig' => $config
+            ]
+        );
+
+        $this->assertEquals([
+            'custom' => 'Custom Value',
+            'free' => 'configdata'
+        ], $model->getCarriers());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Model/Order/TrackTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Model/Order/TrackTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..fc2fbbf67eebebeb92753516d7a49d24de8ebcc5
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Shipping/Model/Order/TrackTest.php
@@ -0,0 +1,62 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Shipping\Model\Order;
+
+class TrackTest extends \PHPUnit_Framework_TestCase
+{
+    public function testLookup()
+    {
+        $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $carrier = $this->getMock('Magento\Shipping\Model\Carrier\Freeshipping',
+            ['setStore', 'getTrackingInfo'], [], '', false);
+        $carrier->expects($this->once())->method('setStore')->with('');
+        $carrier->expects($this->once())->method('getTrackingInfo')
+            ->will($this->returnValue('trackingInfo'));
+
+        $carrierFactory = $this->getMock('\Magento\Shipping\Model\CarrierFactory', ['create'], [], '', false);
+        $carrierFactory->expects($this->once())->method('create')
+            ->will($this->returnValue($carrier));
+
+        $shipment = $this->getMock('Magento\Shipping\Model\Carrier\Freeshipping', ['load'], [], '', false);
+        $shipment->expects($this->any())->method('load')
+            ->will($this->returnValue($shipment));
+
+        $shipmentFactory = $this->getMock('\Magento\Sales\Model\Order\ShipmentFactory', ['create'], [], '', false);
+        $shipmentFactory->expects($this->any())->method('create')
+            ->will($this->returnValue($shipment));
+
+        /** @var \Magento\Shipping\Model\Order\Track $model */
+        $model = $helper->getObject(
+            'Magento\Shipping\Model\Order\Track',
+            [
+                'carrierFactory' => $carrierFactory,
+                'shipmentFactory' => $shipmentFactory
+            ]
+        );
+
+        $this->assertEquals('trackingInfo', $model->getNumberDetail());
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php b/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php
index da957722a12c180b4105651fc74850d152b6a1ba..a70f8292756f9bf85b3eb95b6b284936fc9bfb96 100644
--- a/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php
@@ -63,7 +63,7 @@ class SitemapTest extends \PHPUnit_Framework_TestCase
     protected $_sitemapCmsPageMock;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystemMock;
 
@@ -144,7 +144,7 @@ class SitemapTest extends \PHPUnit_Framework_TestCase
             ->method('openFile')
             ->will($this->returnValue($this->_fileMock));
 
-        $this->_filesystemMock = $this->getMockBuilder('Magento\Filesystem')
+        $this->_filesystemMock = $this->getMockBuilder('Magento\App\Filesystem')
             ->setMethods(array('getDirectoryWrite'))
             ->disableOriginalConstructor()
             ->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PluginScannerTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PluginScannerTest.php
index 23100676f4eb8dca06d6fd0c4b06eb5ebe320c59..1fff8a9bc0e0c012d0647d6c1afc162e9ce6e4fd 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PluginScannerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/Code/Scanner/PluginScannerTest.php
@@ -47,7 +47,6 @@ class PluginScannerTest extends \PHPUnit_Framework_TestCase
         $expected = array(
             'Magento\App\Cache\TagPlugin',
             'Magento\Core\Model\Action\Plugin',
-            'Custom_PageCache_Model_Action_Plugin',
         );
         $this->assertEquals($expected, $actual);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml
index 278ee39b915ce5a7fc686630f5ecdfed061ff4bf..2f95d74fced6f13ce4d9722770b60b941d2c2641 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/config.xml
@@ -36,7 +36,6 @@
             <Node2 type ="Magento\App\Action\Context">
                 <plugins>
                     <first><instance>Magento\Core\Model\Action\Plugin</instance></first>
-                    <second><instance>Custom_PageCache_Model_Action_Plugin</instance></second>
                 </plugins>
                 <parameters>
                     <layoutFactory>
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml
index b08bf6819766c9bc572c34ea4d959c86ea49e20b..42dda6ca76c8a9a3f39dbe71f67ac1534e652595 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/Di/_files/app/etc/di/config.xml
@@ -30,7 +30,6 @@
     <type name="Magento\App\Action\Context">
         <param name="layoutFactory"><instance type="customLayoutFactory" /></param>
         <plugin name="first" type="Magento\Core\Model\Action\Plugin" />
-        <plugin name="second" type="Custom_PageCache_Model_Action_Plugin" />
     </type>
     <virtualType name="customStoreManagerProxy" type="Magento\Core\Model\StoreManager\Proxy" />
     <virtualType name="customLayoutFactory" type="Magento\Core\Model\Layout\Factory" />
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php
index ce05dcec4bc8482970cf881c3aa93c3793c9d0df..fcdc99eda354add2b8ade2ab04f28a61ce23a21e 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/CopyRuleTest.php
@@ -51,7 +51,7 @@ class CopyRuleTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $filesystemMock = $this->getMock(
-            'Magento\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false
+            'Magento\App\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false
         );
         $this->_directoryMock = $this->getMock(
             '\Magento\Filesystem\Directory\Read',
diff --git a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php
index 3c7e29e11b9090b1e2854dc97d63ca8ccf77ca0e..37ac11f375c950ff3bd5c36b98a3844cb02422f1 100644
--- a/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php
+++ b/dev/tests/unit/testsuite/Magento/Test/Tools/View/Generator/ThemeDeploymentTest.php
@@ -42,7 +42,7 @@ class ThemeDeploymentTest extends \PHPUnit_Framework_TestCase
     protected $_tmpDir;
 
     /**
-     * @var \Magento\Filesystem | \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -54,10 +54,10 @@ class ThemeDeploymentTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $methods = array('getDirectoryWrite', 'getPath', '__wakeup');
-        $this->filesystem = $this->getMock('Magento\Filesystem', $methods, array(), '', false);
+        $this->filesystem = $this->getMock('Magento\App\Filesystem', $methods, array(), '', false);
         $this->filesystem->expects($this->any())
             ->method('getPath')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue(str_replace('\\', '/', BP)));
 
         $viewFilesystem = $this->getMock('Magento\View\Filesystem', array('normalizePath'), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/HeaderTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/HeaderTest.php
index 8cb5c42d3b5b5d5026a4004c31c80d84f73fa399..f28c551425d9dcb261ae4a6b3f95fbdc915a3a59 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/HeaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/HeaderTest.php
@@ -34,7 +34,7 @@ class HeaderTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetLogoSrc()
     {
-        $filesystem = $this->getMock('\Magento\Filesystem', array(), array(), '', false );
+        $filesystem = $this->getMock('\Magento\App\Filesystem', array(), array(), '', false );
         $mediaDirectory = $this->getMock('\Magento\Filesystem\Directory\Read', array(), array(), '', false );
         $storeConfig = $this->getMock('Magento\Core\Model\Store\Config', array('getConfig'), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php b/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php
index 48bd6522594e873cba978a61ebf44c7efcc4eadb..75e7e5282bfa715435f3a2f1da5f273f849957a2 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php
@@ -32,7 +32,7 @@ namespace Magento\Theme\Helper;
 class StorageTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -88,7 +88,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         $this->customizationPath = '/' . implode('/', array('var', 'theme'));
 
         $this->request          = $this->getMock('\Magento\App\Request\Http', array(), array(), '', false);
-        $this->filesystem       = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->filesystem       = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->session          = $this->getMock('Magento\Backend\Model\Session', array(), array(), '', false);
         $this->contextHelper    = $this->getMock('Magento\App\Helper\Context', array(), array(), '', false);
         $this->directoryWrite   = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php
index 7d167aeb7802e465f726de302695028c3e21ebc2..7a8cbc6624686904370fa662b16ef4be04356e63 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php
@@ -146,7 +146,7 @@ class CopyServiceTest extends \PHPUnit_Framework_TestCase
             'Magento\View\Design\Theme\FileFactory', array('create'), array(), '', false
         );
         $this->_filesystem = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryWrite'),
             array(),
             '',
@@ -160,7 +160,7 @@ class CopyServiceTest extends \PHPUnit_Framework_TestCase
         );
         $this->_filesystem->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::MEDIA)
+            ->with(\Magento\App\Filesystem::MEDIA_DIR)
             ->will($this->returnValue($this->_dirWriteMock));
 
         /* Init \Magento\Core\Model\Resource\Layout\Collection model  */
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Uploader/ServiceTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Uploader/ServiceTest.php
index 8de60869bbaa2b6e9c5b7fda26cdb372fc946cdc..a17f1623307ba76becefc4bed51bcf604304881e 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Model/Uploader/ServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Uploader/ServiceTest.php
@@ -51,7 +51,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
     protected $_fileSizeMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Filesystem
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\App\Filesystem
      */
     protected $_filesystemMock;
 
@@ -73,7 +73,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
         );
         $this->_uploaderFactory->expects($this->any())->method('create')->will($this->returnValue($this->_uploader));
         $this->_directoryMock = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false);
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_filesystemMock->expects($this->any())
             ->method('getDirectoryRead')
             ->will($this->returnValue($this->_directoryMock));
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
index 2a12634187446c1a38cb7ca6b9a690216f190bf6..5e7c2aa7f8eeb77ac01ef262c1c1812884cdd465 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
@@ -37,7 +37,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
     protected $_storageRoot;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -68,7 +68,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystem      = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem      = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_helperStorage   = $this->getMock('Magento\Theme\Helper\Storage', array(), array(), '', false);
         $this->_objectManager   = $this->getMock('Magento\ObjectManager', array(), array(), '', false);
         $this->_imageFactory    = $this->getMock('Magento\Image\AdapterFactory', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/Dhl/InternationalTest.php b/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/Dhl/InternationalTest.php
index 52b2a07f69bb9eca6a3011a707b00a6f048d399e..a54c6b50dc7a4a22274b51547c9d9fc190da34c2 100644
--- a/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/Dhl/InternationalTest.php
+++ b/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/Dhl/InternationalTest.php
@@ -81,11 +81,12 @@ class InternationalTest extends \PHPUnit_Framework_TestCase
         $rateFactory->expects($this->any())->method('create')->will($this->returnValue($rateResult));
 
         // rate method factory
-        $rateMethodFactory = $this->getMockBuilder('\Magento\Shipping\Model\Rate\Result\MethodFactory')
+        $rateMethodFactory = $this->getMockBuilder('\Magento\Sales\Model\Quote\Address\RateResult\MethodFactory')
             ->disableOriginalConstructor()
             ->setMethods(array('create'))
             ->getMock();
-        $rateMethod = $this->getMockBuilder('Magento\Shipping\Model\Rate\Result\Method')->disableOriginalConstructor()
+        $rateMethod = $this->getMockBuilder('Magento\Sales\Model\Quote\Address\RateResult\Method')
+            ->disableOriginalConstructor()
             ->setMethods(array('setPrice'))
             ->getMock();
         $rateMethod->expects($this->any())->method('setPrice')->will($this->returnSelf());
@@ -111,7 +112,7 @@ class InternationalTest extends \PHPUnit_Framework_TestCase
             ->getMock();
         $modulesDirectory->expects($this->any())->method('readFile')
             ->will($this->returnValue(file_get_contents(__DIR__ . '/_files/countries.xml')));
-        $filesystem = $this->getMockBuilder('\Magento\Filesystem')->disableOriginalConstructor()
+        $filesystem = $this->getMockBuilder('\Magento\App\Filesystem')->disableOriginalConstructor()
             ->setMethods(array('getDirectoryRead'))
             ->getMock();
         $filesystem->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($modulesDirectory));
@@ -124,7 +125,7 @@ class InternationalTest extends \PHPUnit_Framework_TestCase
         $website->expects($this->any())->method('getBaseCurrencyCode')->will($this->returnValue('USD'));
         $storeManager->expects($this->any())->method('getWebsite')->will($this->returnValue($website));
 
-        $arguments = array(
+        $this->_model = $this->_helper->getObject('Magento\Usa\Model\Shipping\Carrier\Dhl\International', array(
             'coreStoreConfig' => $coreStoreConfig,
             'xmlElFactory' => $xmlElFactory,
             'rateFactory' => $rateFactory,
@@ -133,8 +134,7 @@ class InternationalTest extends \PHPUnit_Framework_TestCase
             'filesystem' => $filesystem,
             'storeManager' => $storeManager,
             'data' => array('id' => 'dhlint', 'store' => '1')
-        );
-        $this->_model = $this->_helper->getObject('Magento\Usa\Model\Shipping\Carrier\Dhl\International', $arguments);
+        ));
     }
 
     /**
@@ -219,7 +219,7 @@ class InternationalTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(file_get_contents(__DIR__ . '/_files/success_dhlintl_response_rates.xml')));
         // for setRequest
         $request_params = include __DIR__ . '/_files/rates_request_data_dhlintl.php';
-        $request = $this->_helper->getObject('Magento\Shipping\Model\Rate\Request', $request_params);
+        $request = $this->_helper->getObject('Magento\Sales\Model\Quote\Address\RateRequest', $request_params);
         $this->assertNotEmpty($this->_model->collectRates($request)->getAllRates());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/DhlTest.php b/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/DhlTest.php
index e2dd6bd9ee94137924fe296c15cb0878cd0aea50..cbde90204ad3ea650bd076eeb0523f13492a1cc5 100644
--- a/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/DhlTest.php
+++ b/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/DhlTest.php
@@ -90,11 +90,11 @@ class DhlTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($rateResult));
 
         // rate method factory
-        $rateMethodFactory = $this->getMockBuilder('\Magento\Shipping\Model\Rate\Result\MethodFactory')
+        $rateMethodFactory = $this->getMockBuilder('\Magento\Sales\Model\Quote\Address\RateResult\MethodFactory')
             ->disableOriginalConstructor()
             ->setMethods(array('create'))
             ->getMock();
-        $rateMethod = $this->getMockBuilder('Magento\Shipping\Model\Rate\Result\Method')
+        $rateMethod = $this->getMockBuilder('Magento\Sales\Model\Quote\Address\RateResult\Method')
             ->disableOriginalConstructor()
             ->setMethods(array('setPrice'))
             ->getMock();
@@ -172,7 +172,7 @@ class DhlTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(file_get_contents(__DIR__ . '/_files/success_dhl_response_rates.xml')));
         // for setRequest
         $request_params = include __DIR__ . '/_files/rates_request_data_dhl.php';
-        $request = $this->_helper->getObject('Magento\Shipping\Model\Rate\Request', $request_params);
+        $request = $this->_helper->getObject('Magento\Sales\Model\Quote\Address\RateRequest', $request_params);
 
         $this->assertNotEmpty($this->_model->collectRates($request)->getAllRates());
     }
diff --git a/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/UspsTest.php b/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/UspsTest.php
index 7d01193aff8035576e221643c2e93a0056810e0e..82a5678a8d8f48d32d34770600d4224ca8a1faa4 100755
--- a/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/UspsTest.php
+++ b/dev/tests/unit/testsuite/Magento/Usa/Model/Shipping/Carrier/UspsTest.php
@@ -87,11 +87,11 @@ class UspsTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($rateResult));
 
         // rate method factory
-        $rateMethodFactory = $this->getMockBuilder('\Magento\Shipping\Model\Rate\Result\MethodFactory')
+        $rateMethodFactory = $this->getMockBuilder('\Magento\Sales\Model\Quote\Address\RateResult\MethodFactory')
             ->disableOriginalConstructor()
             ->setMethods(array('create'))
             ->getMock();
-        $rateMethod = $this->getMockBuilder('Magento\Shipping\Model\Rate\Result\Method')
+        $rateMethod = $this->getMockBuilder('Magento\Sales\Model\Quote\Address\RateResult\Method')
             ->disableOriginalConstructor()
             ->setMethods(array('setPrice'))
             ->getMock();
@@ -162,7 +162,7 @@ class UspsTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue(file_get_contents(__DIR__ . '/_files/success_usps_response_rates.xml')));
         // for setRequest
         $request_params = include __DIR__ . '/_files/rates_request_data.php';
-        $request = $this->_helper->getObject('Magento\Shipping\Model\Rate\Request', $request_params);
+        $request = $this->_helper->getObject('Magento\Sales\Model\Quote\Address\RateRequest', $request_params);
 
         $this->assertNotEmpty($this->_model->collectRates($request)->getAllRates());
     }
diff --git a/dev/tests/unit/testsuite/Magento/View/Asset/MergeServiceTest.php b/dev/tests/unit/testsuite/Magento/View/Asset/MergeServiceTest.php
index d3cafad33a57c437b74a34aefd2375f7a06d75a5..0d106a064bcc7791b559f824b51e9b652d901abc 100644
--- a/dev/tests/unit/testsuite/Magento/View/Asset/MergeServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Asset/MergeServiceTest.php
@@ -60,7 +60,7 @@ class MergeServiceTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManager = $this->getMockForAbstractClass('Magento\ObjectManager', array('create'));
         $this->_config = $this->getMock('Magento\View\Asset\ConfigInterface', array(), array(), '', false);
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('\Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $this->_state = $this->getMock('Magento\App\State', array(), array(), '', false);
         $this->_filesystem->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/ChecksumTest.php b/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/ChecksumTest.php
index b97a0557c09bc5b0aadcf4ebbe36df764161d28a..5d7a3c875681d1e62c25785900683eb2fd0f1565 100644
--- a/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/ChecksumTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/ChecksumTest.php
@@ -63,7 +63,7 @@ class ChecksumTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryWrite'), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryWrite'), array(), '', false);
         $this->_directory = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $this->_filesystem->expects($this->once())
             ->method('getDirectoryWrite')
diff --git a/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/DirectTest.php b/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/DirectTest.php
index 5c06c470959931e63e7bee8418400c57e3e35a59..b9f3d5ba773e90840c31d7e50a4fa3cd54ed9dde 100644
--- a/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/DirectTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/DirectTest.php
@@ -24,8 +24,7 @@
 
 namespace Magento\View\Asset\MergeStrategy;
 
-use Magento\Filesystem,
-    Magento\Filesystem\Directory\Write;
+use Magento\Filesystem\Directory\Write;
 
 class DirectTest extends \PHPUnit_Framework_TestCase
 {
@@ -52,11 +51,11 @@ class DirectTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_cssUrlResolver = $this->getMock('Magento\View\Url\CssResolver', array(), array(), '', false);
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('Magento\Filesystem\Directory\Write', array(), array(), '', false);
         $this->_filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::PUB)
+            ->with(\Magento\App\Filesystem::PUB_DIR)
             ->will($this->returnValue($this->_directory));
         $this->_directory->expects($this->any())
             ->method('getRelativePath')
diff --git a/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/FileExistsTest.php b/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/FileExistsTest.php
index 2fc1d57804d32f43a0ee7c38b9c9715632d201e8..aa493c862fd2c28f863fb8e2cdaafb87ee4a0c02 100644
--- a/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/FileExistsTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Asset/MergeStrategy/FileExistsTest.php
@@ -59,7 +59,7 @@ class FileExistsTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_filesystem = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryWrite', 'getDirectoryRead'),
             array(),
             '',
diff --git a/dev/tests/unit/testsuite/Magento/View/Asset/MergedTest.php b/dev/tests/unit/testsuite/Magento/View/Asset/MergedTest.php
index 645024f05313c9e2dedb1ea01890e51e8f6e04bc..66e08a86c2660113812880b82ab89e6f441f7bb7 100644
--- a/dev/tests/unit/testsuite/Magento/View/Asset/MergedTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Asset/MergedTest.php
@@ -82,7 +82,7 @@ class MergedTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_filesystem = $this->getMock(
-            'Magento\Filesystem', array(), array(), '', false);
+            'Magento\App\Filesystem', array(), array(), '', false);
         $this->_objectManager->expects($this->any())
             ->method('get')
             ->will($this->returnValue($this->_filesystem));
@@ -147,11 +147,11 @@ class MergedTest extends \PHPUnit_Framework_TestCase
 
         $this->_filesystem->expects($this->at(0))
             ->method('getPath')
-            ->with($this->equalTo(\Magento\Filesystem::PUB_LIB))
+            ->with($this->equalTo(\Magento\App\Filesystem::PUB_LIB_DIR))
             ->will($this->returnValue('pub/lib'));
         $this->_filesystem->expects($this->at(1))
             ->method('getPath')
-            ->with($this->equalTo(\Magento\Filesystem::STATIC_VIEW))
+            ->with($this->equalTo(\Magento\App\Filesystem::STATIC_VIEW_DIR))
             ->will($this->returnValue('pub/static'));
         $readDirectoryMock = $this->getMockBuilder('\Magento\Filesystem\Directory\Read')
             ->disableOriginalConstructor()
@@ -164,7 +164,7 @@ class MergedTest extends \PHPUnit_Framework_TestCase
 
         $this->_filesystem->expects($this->any())
             ->method('getDirectoryRead')
-            ->with($this->equalTo(\Magento\Filesystem::PUB_VIEW_CACHE))
+            ->with($this->equalTo(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR))
             ->will($this->returnValue($readDirectoryMock));
 
         $this->_mergeStrategy
diff --git a/dev/tests/unit/testsuite/Magento/View/Asset/MinifyServiceTest.php b/dev/tests/unit/testsuite/Magento/View/Asset/MinifyServiceTest.php
index 2bbea589edc525aa52ac218ec1a9a32c4518c348..4de53df8cb2eeb9acf8edb77d309feaa318d9767 100644
--- a/dev/tests/unit/testsuite/Magento/View/Asset/MinifyServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Asset/MinifyServiceTest.php
@@ -51,7 +51,7 @@ class MinifyServiceTest extends \PHPUnit_Framework_TestCase
         $this->_config = $this->getMock('Magento\View\Asset\ConfigInterface', array(), array(), '', false);
         $this->_objectManager = $this->getMock('Magento\ObjectManager');
         $this->_appState = $this->getMock('Magento\App\State', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $directory = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false);
         $filesystem->expects($this->any())
             ->method('getDirectoryRead')
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/Fallback/FactoryTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Fallback/FactoryTest.php
index 74ca9190cd122b2485ca68b544a1438f95c2bc23..2f5af33c4cf22e89567e1a07f4c792c3688a03dd 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/Fallback/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/Fallback/FactoryTest.php
@@ -44,12 +44,12 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $filesystemMock = $this->getMock(
-            '\Magento\Filesystem',
+            '\Magento\App\Filesystem',
             array('getPath', 'getDirectoryRead', '__wakeup'),
             array('dir' => array(
-                \Magento\Filesystem::THEMES => 'themes',
-                \Magento\Filesystem::MODULES => 'modules',
-                \Magento\Filesystem::PUB_LIB => 'pub_lib',
+                \Magento\App\Filesystem::THEMES_DIR => 'themes',
+                \Magento\App\Filesystem::MODULES_DIR => 'modules',
+                \Magento\App\Filesystem::PUB_LIB_DIR => 'pub_lib',
                 )
             ),
             '',
@@ -59,9 +59,9 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
             ->method('getPath')
             ->will($this->returnValueMap(
                 array(
-                    (\Magento\Filesystem::THEMES) => 'themes',
-                    (\Magento\Filesystem::MODULES) => 'modules',
-                    (\Magento\Filesystem::PUB_LIB) => 'pub_lib',
+                    (\Magento\App\Filesystem::THEMES_DIR) => 'themes',
+                    (\Magento\App\Filesystem::MODULES_DIR) => 'modules',
+                    (\Magento\App\Filesystem::PUB_LIB_DIR) => 'pub_lib',
                 ))
             );
 
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php b/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php
index 9ead3d7aa6dd037e47ce011d6b1eaf54ffe815d3..acea6869bcbd1f098687d0dfaf9e5eb716bc6295 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxyTest.php
@@ -27,7 +27,7 @@
 
 namespace Magento\View\Design\FileResolution\Strategy\Fallback;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\TestFramework\Helper\ProxyTesting;
 
 /**
@@ -286,14 +286,14 @@ class CachingProxyTest extends \PHPUnit_Framework_TestCase
             ->method('getRelativePath')
             ->will($this->returnArgument(0));
         $methods = array('getDirectoryRead', 'getDirectoryWrite', '__wakeup');
-        $filesystem = $this->getMock('Magento\Filesystem', $methods, array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', $methods, array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue($directoryRead));
         $filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::VAR_DIR)
+            ->with(\Magento\App\Filesystem::VAR_DIR)
             ->will($this->returnValue($this->directoryWrite));
         return $filesystem;
     }
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php b/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
index 59fd7c82d2cce14516a1d6777f8d9d1855c19600..2dad626d70e9b597372082279a726aabb7c589fc 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/Strategy/FallbackTest.php
@@ -75,7 +75,7 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
         $this->fallbackFactory = $this->getMock(
             'Magento\View\Design\Fallback\Factory',
             array('createLocaleFileRule', 'createFileRule', 'createViewFileRule'),
-            array($this->getMock('Magento\Filesystem', array(), array(), '', false))
+            array($this->getMock('Magento\App\Filesystem', array(), array(), '', false))
         );
         $this->fallbackFactory
             ->expects($this->any())->method('createLocaleFileRule')->will($this->returnValue($this->fallbackLocale));
@@ -225,7 +225,7 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
 
     /**
      * @param string $targetFile
-     * @return \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @return \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected function getFileSystemMock($targetFile)
     {
@@ -245,10 +245,16 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
                     }
                 )
             );
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false);
+        $filesystem = $this->getMock(
+            'Magento\App\Filesystem',
+            array('getDirectoryRead', '__wakeup'),
+            array(),
+            '',
+            false
+        );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue($directoryMock));
 
         return $filesystem;
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/StrategyPoolTest.php b/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/StrategyPoolTest.php
index d0e53c5af9c9489cd54d56ee3103c44f9ad70bcd..e3e2c950bb1a73ab7b73b42f8f4a6b4584703510 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/StrategyPoolTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/FileResolution/StrategyPoolTest.php
@@ -46,7 +46,7 @@ class StrategyPoolTest extends \PHPUnit_Framework_TestCase
     protected $appState;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -59,10 +59,10 @@ class StrategyPoolTest extends \PHPUnit_Framework_TestCase
     {
         $this->objectManager = $this->getMock('Magento\ObjectManager', array(), array(), '', false);
         $this->appState = $this->getMock('Magento\App\State', array(), array(), '', false);
-        $this->filesystem = $this->getMock('Magento\Filesystem', array('getPath'), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\App\Filesystem', array('getPath'), array(), '', false);
         $pathMap = array(
-            array(\Magento\Filesystem::VAR_DIR, 'base_dir/var'),
-            array(\Magento\Filesystem::ROOT, 'base_dir')
+            array(\Magento\App\Filesystem::VAR_DIR, 'base_dir/var'),
+            array(\Magento\App\Filesystem::ROOT_DIR, 'base_dir')
         );
         $this->filesystem->expects($this->any())
             ->method('getPath')
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/AbstractFileTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/AbstractFileTest.php
index d5fee8471eb4bb1ab3fd310a7c5bd74dcc8386ae..1491fbab0b57b84b5bd2085efd2940697033d9d9 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/AbstractFileTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/AbstractFileTest.php
@@ -68,7 +68,7 @@ class AbstractFileTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->_filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
 
         $this->_modelBuilder = $this->getMockBuilder('Magento\View\Design\Theme\Customization\AbstractFile')
             ->setMethods(array('getType', 'getContentType'))
@@ -263,7 +263,7 @@ class AbstractFileTest extends \PHPUnit_Framework_TestCase
         $directoryMock->expects($this->once())->method('delete')->will($this->returnValue(true));
 
         $this->_filesystem->expects($this->any())->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::ROOT)->will($this->returnValue($directoryMock));
+            ->with(\Magento\App\Filesystem::ROOT_DIR)->will($this->returnValue($directoryMock));
         /** @var $model \Magento\View\Design\Theme\Customization\AbstractFile */
         /** @var $file \Magento\Core\Model\Theme\File */
         $model->save($file);
@@ -290,7 +290,7 @@ class AbstractFileTest extends \PHPUnit_Framework_TestCase
         $directoryMock->expects($this->once())->method('delete')->will($this->returnValue(true));
 
         $this->_filesystem->expects($this->any())->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::ROOT)->will($this->returnValue($directoryMock));
+            ->with(\Magento\App\Filesystem::ROOT_DIR)->will($this->returnValue($directoryMock));
 
         $model->expects($this->once())->method('getFullPath')->with($file)->will($this->returnValue('test_path'));
         /** @var $model \Magento\View\Design\Theme\Customization\AbstractFile */
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/PathTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/PathTest.php
index 67e2590f08ac6e132ea41c7a7609a466b19c3e25..9d9a4158b3810705f18fd4d417fac1a0a9a6f7c0 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/PathTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Customization/PathTest.php
@@ -64,7 +64,7 @@ class PathTest extends \PHPUnit_Framework_TestCase
         $appStateProperty = new \ReflectionProperty('\Magento\Core\Model\Theme', '_appState');
         $appStateProperty->setAccessible(true);
         $appStateProperty->setValue($this->_theme, $this->_appState);
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('\Magento\Filesystem\Directory\Read', array(), array(), '', false);
         $filesystem->expects($this->any())
             ->method('getDirectoryRead')
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php
index c45dee725f6e928fd2e82464a1ed65115cec7e63..80d4694c2261b5d64a11f6435a5c779bd0e7e5ac 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/Image/UploaderTest.php
@@ -59,7 +59,7 @@ class UploaderTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystemMock = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $this->_transferAdapterMock = $this->getMock('Zend_File_Transfer_Adapter_Http', array(), array(), '', false);
         $this->_fileUploader = $this->getMock('Magento\File\Uploader', array(), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/View/Design/Theme/ImageTest.php b/dev/tests/unit/testsuite/Magento/View/Design/Theme/ImageTest.php
index 82f66325007cf859ff88d51c36dfb01d923eea4c..283a6c1cd9024fd19b40d7786842383e0a9cc978 100644
--- a/dev/tests/unit/testsuite/Magento/View/Design/Theme/ImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Design/Theme/ImageTest.php
@@ -38,7 +38,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystemMock;
 
@@ -69,11 +69,11 @@ class ImageTest extends \PHPUnit_Framework_TestCase
             array('isExist', 'copyFile', 'getRelativePath', 'delete'), array(), '', false, false
         );
         $this->_filesystemMock = $this->getMock(
-            'Magento\Filesystem', array('getDirectoryWrite', '__wakeup'), array(), '', false, false
+            'Magento\App\Filesystem', array('getDirectoryWrite', '__wakeup'), array(), '', false, false
         );
         $this->_filesystemMock->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Filesystem::MEDIA)
+            ->with(\Magento\App\Filesystem::MEDIA_DIR)
             ->will($this->returnValue($this->_directoryMock));
         $imageFactory = $this->getMock('Magento\Image\Factory', array(), array(), '', false, false);
         $this->_imageMock = $this->getMock('Magento\Image', array(), array(), '', false, false);
diff --git a/dev/tests/unit/testsuite/Magento/View/Element/AbstractBlockTest.php b/dev/tests/unit/testsuite/Magento/View/Element/AbstractBlockTest.php
index 01bb1159a79a82d25e33112e3bf453887a752911..6c2cfee1ef2dac23f7bb375923bc730b970097fd 100644
--- a/dev/tests/unit/testsuite/Magento/View/Element/AbstractBlockTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Element/AbstractBlockTest.php
@@ -99,4 +99,11 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('one', $block->getVar('v1'));
         $this->assertEquals('two', $block->getVar('v2', $module));
     }
+
+    public function testIsScopePrivate()
+    {
+        $contextMock = $this->getMock('Magento\View\Element\Context', [], [], '', false);
+        $block = $this->getMockForAbstractClass('Magento\View\Element\AbstractBlock', ['context' => $contextMock]);
+        $this->assertEquals(false, $block->isScopePrivate());
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/View/Element/TemplateTest.php b/dev/tests/unit/testsuite/Magento/View/Element/TemplateTest.php
index 3a1dde218d1cb7614ced07d9ef227970ed01fee3..ffec9a3374f43b802d7ed77a0e811de209abb535 100644
--- a/dev/tests/unit/testsuite/Magento/View/Element/TemplateTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Element/TemplateTest.php
@@ -35,7 +35,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     protected $_block;
 
     /**
-     * @var \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -53,7 +53,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     {
         $this->_viewFileSystem = $this->getMock('\Magento\View\FileSystem', array(), array(), '', false);
 
-        $this->_filesystem = $this->getMock('\Magento\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('\Magento\App\Filesystem', array(), array(), '', false);
 
         $this->_templateEngine =
             $this->getMock('Magento\View\TemplateEnginePool', array('render', 'get'), array(), '', false);
@@ -115,4 +115,36 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
         $this->_block->assign($vars);
         $this->assertEquals($output, $this->_block->fetchView('themedir/template.phtml'));
     }
+
+    public function testSetTemplateContext()
+    {
+        $directoryMock = $this->getMock('\Magento\Filesystem\Directory\Read', array(), array(), '', false);
+        $directoryMock->expects($this->any())
+            ->method('getRelativePath')
+            ->will($this->returnArgument(0));
+        $this->_filesystem
+            ->expects($this->once())
+            ->method('getDirectoryRead')
+            ->will($this->returnValue($directoryMock)
+        );
+        $this->_filesystem
+            ->expects($this->any())
+            ->method('getPath')
+            ->will($this->returnValue('themedir')
+        );
+        $directoryMock->expects($this->once())
+            ->method('isFile')
+            ->with('themedir/template.phtml')
+            ->will($this->returnValue(true)
+        );
+
+        $context = new \Magento\Object();
+        $this->_templateEngine
+            ->expects($this->once())
+            ->method('render')
+            ->with($context)
+        ;
+        $this->_block->setTemplateContext($context);
+        $this->_block->fetchView('themedir/template.phtml');
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/BaseTest.php b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/BaseTest.php
index 749689fcea16d75c5fca2af4aae269d24c454de1..335de65729330a4551eb5985789a809a9eb8cff8 100644
--- a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/BaseTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/BaseTest.php
@@ -24,8 +24,7 @@
 
 namespace Magento\View\Layout\File\Source;
 
-use Magento\Filesystem,
-    Magento\Filesystem\Directory\Read,
+use Magento\Filesystem\Directory\Read,
     Magento\View\Layout\File\Factory;
 
 class BaseTest extends \PHPUnit_Framework_TestCase
@@ -55,7 +54,7 @@ class BaseTest extends \PHPUnit_Framework_TestCase
             false
         );
         $filesystem = $this->getMock(
-            'Magento\Filesystem',
+            'Magento\App\Filesystem',
             array('getDirectoryRead', '__wakeup'),
             array(),
             '',
@@ -63,7 +62,7 @@ class BaseTest extends \PHPUnit_Framework_TestCase
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::MODULES)
+            ->with(\Magento\App\Filesystem::MODULES_DIR)
             ->will($this->returnValue($this->directory));
 
         $this->fileFactory = $this->getMock('Magento\View\Layout\File\Factory', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/BaseTest.php b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/BaseTest.php
index 2989832166e245c6649031ab8211567a47e57143..191dc8af4fe0c9eb63dad361925f147e74ff6af3 100644
--- a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/BaseTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/BaseTest.php
@@ -24,8 +24,7 @@
 
 namespace Magento\View\Layout\File\Source\Override;
 
-use Magento\Filesystem,
-    Magento\Filesystem\Directory\Read,
+use Magento\Filesystem\Directory\Read,
     Magento\View\Layout\File\Factory;
 
 class BaseTest extends \PHPUnit_Framework_TestCase
@@ -52,11 +51,11 @@ class BaseTest extends \PHPUnit_Framework_TestCase
             array('getAbsolutePath', 'search'), array(), '', false
         );
         $filesystem = $this->getMock(
-            'Magento\Filesystem', array('getDirectoryRead'), array(), '', false
+            'Magento\App\Filesystem', array('getDirectoryRead'), array(), '', false
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::THEMES)
+            ->with(\Magento\App\Filesystem::THEMES_DIR)
             ->will($this->returnValue($this->directory));
         $this->fileFactory = $this->getMock('Magento\View\Layout\File\Factory', array(), array(), '', false);
         $this->model = new \Magento\View\Layout\File\Source\Override\Base(
diff --git a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/ThemeTest.php b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/ThemeTest.php
index 41bcecc3cb925e14af6e8a9118bdd0d0ffc6c62b..c67b27eb64169f13b095702a9537dff80e8e3a6d 100644
--- a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/ThemeTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/Override/ThemeTest.php
@@ -43,14 +43,14 @@ class ThemeTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $filesystem = $this->getMock('Magento\Filesystem', array('getDirectoryRead'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getDirectoryRead'), array(), '', false);
         $this->_directory = $this->getMock('Magento\Filesystem\Directory\Read', array(), array(), '', false);
         $this->_directory->expects($this->any())
             ->method('getAbsolutePath')
             ->will($this->returnArgument(0));
 
         $filesystem->expects($this->any())->method('getDirectoryRead')
-            ->with($this->equalTo(\Magento\Filesystem::THEMES))
+            ->with($this->equalTo(\Magento\App\Filesystem::THEMES_DIR))
             ->will($this->returnValue($this->_directory));
         $this->_fileFactory = $this->getMock('Magento\View\Layout\File\Factory', array(), array(), '', false);
         $this->_model = new \Magento\View\Layout\File\Source\Override\Theme(
diff --git a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/ThemeTest.php b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/ThemeTest.php
index 021873e3a989e026c392d6c6eb3d16f92226eed7..b197f47a2c63aadc871a20d4ec97d179c1157b56 100644
--- a/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/ThemeTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Layout/File/Source/ThemeTest.php
@@ -24,8 +24,7 @@
 
 namespace Magento\View\Layout\File\Source;
 
-use Magento\Filesystem,
-    Magento\Filesystem\Directory\Read,
+use Magento\Filesystem\Directory\Read,
     Magento\View\Layout\File\Factory;
 
 class ThemeTest extends \PHPUnit_Framework_TestCase
@@ -52,11 +51,11 @@ class ThemeTest extends \PHPUnit_Framework_TestCase
             array('getAbsolutePath', 'search'), array(), '', false
         );
         $filesystem = $this->getMock(
-            'Magento\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false
+            'Magento\App\Filesystem', array('getDirectoryRead', '__wakeup'), array(), '', false
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Filesystem::THEMES)
+            ->with(\Magento\App\Filesystem::THEMES_DIR)
             ->will($this->returnValue($this->directory));
         $this->fileFactory = $this->getMock('Magento\View\Layout\File\Factory', array(), array(), '', false);
         $this->model = new \Magento\View\Layout\File\Source\Theme(
diff --git a/dev/tests/unit/testsuite/Magento/View/Url/CssResolverTest.php b/dev/tests/unit/testsuite/Magento/View/Url/CssResolverTest.php
index a23ba2be5761214ac64e521b0e217209ccf0da50..57150c70cd03628d46f988056e73b7c4b3787e5b 100644
--- a/dev/tests/unit/testsuite/Magento/View/Url/CssResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/Url/CssResolverTest.php
@@ -33,10 +33,10 @@ class CssResolverTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $filesystem = $this->getMock('Magento\Filesystem', array('getPath', '__wakeup'), array(), '', false);
+        $filesystem = $this->getMock('Magento\App\Filesystem', array('getPath', '__wakeup'), array(), '', false);
         $filesystem->expects($this->any())
             ->method('getPath')
-            ->with(\Magento\Filesystem::ROOT)
+            ->with(\Magento\App\Filesystem::ROOT_DIR)
             ->will($this->returnValue('/base_dir/'));
         $viewFilesystem = $this->getMock('Magento\View\Filesystem', array('normalizePath'), array(), '', false);
         $viewFilesystem->expects($this->any())
diff --git a/dev/tests/unit/testsuite/Magento/View/UrlTest.php b/dev/tests/unit/testsuite/Magento/View/UrlTest.php
index 321ed891cd0ac181271f275b605c85a84fc90799..551ef874365d4d2e7e45ab9d8fe6854470ca47eb 100644
--- a/dev/tests/unit/testsuite/Magento/View/UrlTest.php
+++ b/dev/tests/unit/testsuite/Magento/View/UrlTest.php
@@ -38,8 +38,8 @@ class UrlTest extends \PHPUnit_Framework_TestCase
         $expected = 'http://example.com/public_dir/a/t/m/file.js';
 
         // 1. Get fileSystem model
-        /** @var $filesystem \Magento\Filesystem|\PHPUnit_Framework_MockObject_MockObject */
-        $filesystem = $this->getMock('Magento\Filesystem', array(), array(), '', false);
+        /** @var $filesystem \Magento\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */
+        $filesystem = $this->getMock('Magento\App\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->never())
             ->method('isFile');
         $filesystem->expects($this->never())
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
index 6b2f0835a7ff156f3aecd9b1555772c8719cee41..f88ab45dd2b20c45a8b10e5bd969b311820cf5dd 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
@@ -54,7 +54,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $filesystemMock = $this->getMockBuilder('\Magento\Filesystem')
+        $filesystemMock = $this->getMockBuilder('\Magento\App\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
index 983b65e95adb54fa2a3b0081fe0b437f3d6af19d..82632a7763b7e85de4d121e27c4b506254f2c372 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
@@ -46,7 +46,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $objectManagerMock = $this->getMockBuilder('Magento\App\ObjectManager')
             ->disableOriginalConstructor()
             ->getMock();
-        $fileSystemMock = $this->getMockBuilder('Magento\Filesystem')->disableOriginalConstructor()->getMock();
+        $fileSystemMock = $this->getMockBuilder('Magento\App\Filesystem')->disableOriginalConstructor()->getMock();
         $this->_configMock = $this->getMockBuilder('Magento\Webapi\Model\Config')
             ->disableOriginalConstructor()->getMock();
         $this->_soapConfig = new \Magento\Webapi\Model\Soap\Config(
diff --git a/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php b/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
index e1dcb7a37e43d27858cce3b57c535a82589a3f3b..6daefdafe1bbfcec04f8d4a6e84677109e40945f 100644
--- a/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Widget/Model/Widget/InstanceTest.php
@@ -74,7 +74,7 @@ class InstanceTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $filesystemMock =$this->getMock('\Magento\Filesystem', array(), array(), '', false);
+        $filesystemMock =$this->getMock('\Magento\App\Filesystem', array(), array(), '', false);
         $this->_directoryMock = $this->getMock('\Magento\Filesystem\Directory\Read', array(), array(), '', false);
         $filesystemMock->expects($this->any())
             ->method('getDirectoryRead')
diff --git a/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log b/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log
index 563cc95a6b80ba6a4136c54933861d1a003a424c..f0405f4981b6b6a0e4aa8585927eea7c5ce6d3ec 100644
--- a/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log
+++ b/dev/tools/Magento/Tools/Migration/Acl/log/AclXPathToAclId.log
@@ -1 +1 @@
-{"config\/acl\/resources\/admin\/cms\/magento_banner":"Magento_Banner::magento_banner","config\/acl\/resources\/admin\/catalog\/events":"Magento_CatalogEvent::events","config\/acl\/resources\/admin\/system\/config\/magento_catalogpermissions":"Magento_CatalogPermissions::magento_catalogpermissions","config\/acl\/resources\/admin\/catalog\/magento_catalogpermissions":"Magento_CatalogPermissions::catalog_magento_catalogpermissions","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout":"Magento_AdvancedCheckout::magento_advancedcheckout","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/view":"Magento_AdvancedCheckout::view","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/update":"Magento_AdvancedCheckout::update","config\/acl\/resources\/admin\/cms\/page\/save_revision":"Magento_VersionsCms::save_revision","config\/acl\/resources\/admin\/cms\/page\/delete_revision":"Magento_VersionsCms::delete_revision","config\/acl\/resources\/admin\/cms\/page\/publish_revision":"Magento_VersionsCms::publish_revision","config\/acl\/resources\/admin\/cms\/hierarchy":"Magento_VersionsCms::hierarchy","config\/acl\/resources\/admin\/customer\/customersegment":"Magento_CustomerSegment::customersegment","config\/acl\/resources\/admin\/report\/customers\/segment":"Magento_CustomerSegment::segment","config\/acl\/resources\/admin\/customer\/attributes":"Magento_CustomerCustomAttributes::attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_attributes":"Magento_CustomerCustomAttributes::customer_attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_address_attributes":"Magento_CustomerCustomAttributes::customer_address_attributes","config\/acl\/resources\/admin\/system\/config\/giftcardaccount":"Magento_GiftCardAccount::giftcardaccount","config\/acl\/resources\/admin\/customer\/giftcardaccount":"Magento_GiftCardAccount::customer_giftcardaccount","config\/acl\/resources\/admin\/system\/config\/giftcard":"Magento_GiftCard::giftcard","config\/acl\/resources\/admin\/system\/config\/magento_giftregistry":"Magento_GiftRegistry::magento_giftregistry","config\/acl\/resources\/admin\/customer\/magento_giftregistry":"Magento_GiftRegistry::customer_magento_giftregistry","config\/acl\/resources\/admin\/sales\/magento_giftwrapping":"Magento_GiftWrapping::magento_giftwrapping","config\/acl\/resources\/admin\/system\/convert\/enterprise_scheduled_operation":"Magento_ScheduledImportExport::enterprise_scheduled_operation","config\/acl\/resources\/admin\/customer\/magento_invitation":"Magento_Invitation::magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation":"Magento_Invitation::report_magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation\/general":"Magento_Invitation::general","config\/acl\/resources\/admin\/report\/magento_invitation\/customer":"Magento_Invitation::magento_invitation_customer","config\/acl\/resources\/admin\/report\/magento_invitation\/order":"Magento_Invitation::order","config\/acl\/resources\/admin\/system\/config\/magento_invitation":"Magento_Invitation::config_magento_invitation","config\/acl\/resources\/admin\/system\/config\/logging":"Magento_Logging::logging","config\/acl\/resources\/admin\/system\/magento_logging":"Magento_Logging::magento_logging","config\/acl\/resources\/admin\/system\/magento_logging\/events":"Magento_Logging::magento_logging_events","config\/acl\/resources\/admin\/system\/magento_logging\/backups":"Magento_Logging::backups","config\/acl\/resources\/admin\/system\/crypt_key":"Magento_Pci::crypt_key","config\/acl\/resources\/admin\/system\/acl\/locks":"Magento_Pci::locks","config\/acl\/resources\/admin\/catalog\/products\/read_product_price":"Magento_PricePermissions::read_product_price","config\/acl\/resources\/admin\/catalog\/products\/read_product_price\/edit_product_price":"Magento_PricePermissions::edit_product_price","config\/acl\/resources\/admin\/catalog\/products\/edit_product_status":"Magento_PricePermissions::edit_product_status","config\/acl\/resources\/admin\/promo\/catalog\/edit":"Magento_PromotionPermissions::edit","config\/acl\/resources\/admin\/promo\/quote\/edit":"Magento_PromotionPermissions::quote_edit","config\/acl\/resources\/admin\/promo\/magento_reminder\/edit":"Magento_PromotionPermissions::magento_reminder_edit","config\/acl\/resources\/admin\/promo\/magento_reminder":"Magento_Reminder::magento_reminder","config\/acl\/resources\/admin\/system\/config\/promo":"Magento_SalesRule::config_promo","config\/acl\/resources\/admin\/customer\/manage\/reward_balance":"Magento_Reward::reward_balance","config\/acl\/resources\/admin\/sales\/order\/actions\/create\/reward_spend":"Magento_Reward::reward_spend","config\/acl\/resources\/admin\/customer\/rates":"Magento_Reward::rates","config\/acl\/resources\/admin\/system\/config\/magento_reward":"Magento_Reward::magento_reward","config\/acl\/resources\/admin\/sales\/magento_rma":"Magento_Rma::magento_rma","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_manage":"Magento_Rma::rma_manage","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_attribute":"Magento_Rma::rma_attribute","config\/acl\/resources\/admin\/sales\/archive":"Magento_SalesArchive::archive","config\/acl\/resources\/admin\/sales\/archive\/orders":"Magento_SalesArchive::orders","config\/acl\/resources\/admin\/sales\/archive\/orders\/add":"Magento_SalesArchive::add","config\/acl\/resources\/admin\/sales\/archive\/orders\/remove":"Magento_SalesArchive::remove","config\/acl\/resources\/admin\/sales\/archive\/invoices":"Magento_SalesArchive::invoices","config\/acl\/resources\/admin\/sales\/archive\/shipments":"Magento_SalesArchive::shipments","config\/acl\/resources\/admin\/sales\/archive\/creditmemos":"Magento_SalesArchive::creditmemos","config\/acl\/resources\/admin\/catalog\/targetrule":"Magento_TargetRule::targetrule","config\/acl\/resources\/admin\/report\/customers\/wishlist":"Magento_MultipleWishlist::wishlist","config\/acl\/resources\/admin\/system\/adminnotification":"Magento_AdminNotification::adminnotification","config\/acl\/resources\/admin\/system\/adminnotification\/show_toolbar":"Magento_AdminNotification::show_toolbar","config\/acl\/resources\/admin\/system\/adminnotification\/show_list":"Magento_AdminNotification::show_list","config\/acl\/resources\/admin\/system\/adminnotification\/mark_as_read":"Magento_AdminNotification::mark_as_read","config\/acl\/resources\/admin\/system\/adminnotification\/remove":"Magento_AdminNotification::adminnotification_remove","config\/acl\/resources\/all":"Magento_Adminhtml::all","config\/acl\/resources\/admin":"Magento_Adminhtml::admin","config\/acl\/resources\/admin\/dashboard":"Magento_Adminhtml::dashboard","config\/acl\/resources\/admin\/system":"Magento_Adminhtml::system","config\/acl\/resources\/admin\/system\/store":"Magento_Adminhtml::store","config\/acl\/resources\/admin\/system\/design":"Magento_Adminhtml::design","config\/acl\/resources\/admin\/system\/design\/schedule":"Magento_Adminhtml::schedule","config\/acl\/resources\/admin\/system\/config":"Magento_Adminhtml::config","config\/acl\/resources\/admin\/system\/config\/general":"Magento_Adminhtml::config_general","config\/acl\/resources\/admin\/system\/config\/web":"Magento_Adminhtml::web","config\/acl\/resources\/admin\/system\/config\/design":"Magento_Adminhtml::config_design","config\/acl\/resources\/admin\/system\/config\/system":"Magento_Adminhtml::config_system","config\/acl\/resources\/admin\/system\/config\/advanced":"Magento_Adminhtml::advanced","config\/acl\/resources\/admin\/system\/config\/trans_email":"Magento_Adminhtml::trans_email","config\/acl\/resources\/admin\/system\/config\/dev":"Magento_Adminhtml::dev","config\/acl\/resources\/admin\/system\/config\/currency":"Magento_Adminhtml::currency","config\/acl\/resources\/admin\/system\/config\/sendfriend":"Magento_Adminhtml::sendfriend","config\/acl\/resources\/admin\/system\/config\/admin":"Magento_Adminhtml::config_admin","config\/acl\/resources\/admin\/system\/currency":"Magento_CurrencySymbol::system_currency","config\/acl\/resources\/admin\/system\/email_template":"Magento_Email::template","config\/acl\/resources\/admin\/system\/variable":"Magento_Adminhtml::variable","config\/acl\/resources\/admin\/system\/myaccount":"Magento_Adminhtml::myaccount","config\/acl\/resources\/admin\/system\/tools":"Magento_Adminhtml::tools","config\/acl\/resources\/admin\/system\/convert":"Magento_Adminhtml::convert","config\/acl\/resources\/admin\/system\/cache":"Magento_Adminhtml::cache","config\/acl\/resources\/admin\/system\/extensions":"Magento_Adminhtml::extensions","config\/acl\/resources\/admin\/system\/extensions\/local":"Magento_Adminhtml::local","config\/acl\/resources\/admin\/system\/extensions\/custom":"Magento_Adminhtml::custom","config\/acl\/resources\/admin\/global_search":"Magento_Adminhtml::global_search","config\/acl\/resources\/admin\/system\/tools\/backup":"Magento_Backup::backup","config\/acl\/resources\/admin\/system\/tools\/backup\/rollback":"Magento_Backup::rollback","config\/acl\/resources\/admin\/system\/config\/cataloginventory":"Magento_CatalogInventory::cataloginventory","config\/acl\/resources\/admin\/promo":"Magento_CatalogRule::promo","config\/acl\/resources\/admin\/promo\/catalog":"Magento_CatalogRule::promo_catalog","config\/acl\/resources\/admin\/catalog\/search":"Magento_CatalogSearch::search","config\/acl\/resources\/admin\/system\/config\/catalog":"Magento_Catalog::config_catalog","config\/acl\/resources\/admin\/catalog":"Magento_Catalog::catalog","config\/acl\/resources\/admin\/catalog\/attributes":"Magento_Catalog::catalog_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/attributes":"Magento_Catalog::attributes_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/sets":"Magento_Catalog::sets","config\/acl\/resources\/admin\/catalog\/categories":"Magento_Catalog::categories","config\/acl\/resources\/admin\/catalog\/products":"Magento_Catalog::products","config\/acl\/resources\/admin\/catalog\/update_attributes":"Magento_Catalog::update_attributes","config\/acl\/resources\/admin\/catalog\/urlrewrite":"Magento_Catalog::urlrewrite","config\/acl\/resources\/admin\/sales\/checkoutagreement":"Magento_Checkout::checkoutagreement","config\/acl\/resources\/admin\/system\/config\/checkout":"Magento_Checkout::checkout","config\/acl\/resources\/admin\/cms":"Magento_Cms::cms","config\/acl\/resources\/admin\/cms\/block":"Magento_Cms::block","config\/acl\/resources\/admin\/cms\/page":"Magento_Cms::page","config\/acl\/resources\/admin\/cms\/page\/save":"Magento_Cms::save","config\/acl\/resources\/admin\/cms\/page\/delete":"Magento_Cms::page_delete","config\/acl\/resources\/admin\/cms\/media_gallery":"Magento_Cms::media_gallery","config\/acl\/resources\/admin\/system\/config\/cms":"Magento_Cms::config_cms","config\/acl\/resources\/admin\/system\/config\/contacts":"Magento_Contacts::contacts","config\/acl\/resources\/admin\/system\/currency\/rates":"Magento_CurrencySymbol::currency_rates","config\/acl\/resources\/admin\/system\/currency\/symbols":"Magento_CurrencySymbol::symbols","config\/acl\/resources\/admin\/customer":"Magento_Customer::customer","config\/acl\/resources\/admin\/customer\/group":"Magento_Customer::group","config\/acl\/resources\/admin\/customer\/manage":"Magento_Customer::manage","config\/acl\/resources\/admin\/customer\/online":"Magento_Customer::online","config\/acl\/resources\/admin\/system\/config\/customer":"Magento_Customer::config_customer","config\/acl\/resources\/admin\/system\/design\/editor":"Magento_DesignEditor::editor","config\/acl\/resources\/admin\/system\/config\/downloadable":"Magento_Downloadable::downloadable","config\/acl\/resources\/admin\/system\/config\/google":"Magento_GoogleCheckout::google","config\/acl\/resources\/admin\/catalog\/googleshopping":"Magento_GoogleShopping::googleshopping","config\/acl\/resources\/admin\/catalog\/googleshopping\/types":"Magento_GoogleShopping::types","config\/acl\/resources\/admin\/catalog\/googleshopping\/items":"Magento_GoogleShopping::items","config\/acl\/resources\/admin\/system\/convert\/import":"Magento_ImportExport::import","config\/acl\/resources\/admin\/system\/convert\/export":"Magento_ImportExport::export","config\/acl\/resources\/admin\/system\/index":"Magento_Index::index","config\/acl\/resources\/admin\/system\/config\/newsletter":"Magento_Newsletter::newsletter","config\/acl\/resources\/admin\/newsletter":"Magento_Newsletter::admin_newsletter","config\/acl\/resources\/admin\/newsletter\/problem":"Magento_Newsletter::problem","config\/acl\/resources\/admin\/newsletter\/queue":"Magento_Newsletter::queue","config\/acl\/resources\/admin\/newsletter\/subscriber":"Magento_Newsletter::subscriber","config\/acl\/resources\/admin\/newsletter\/template":"Magento_Newsletter::template","config\/acl\/resources\/admin\/system\/config\/oauth":"Magento_Oauth::oauth","config\/acl\/resources\/admin\/page_cache":"Magento_PageCache::page_cache","config\/acl\/resources\/admin\/system\/config\/payment":"Magento_Payment::payment","config\/acl\/resources\/admin\/system\/config\/payment_services":"Magento_Payment::payment_services","config\/acl\/resources\/admin\/system\/config\/paypal":"Magento_Paypal::paypal","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports":"Magento_Paypal::paypal_settlement_reports","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/view":"Magento_Paypal::paypal_settlement_reports_view","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/fetch":"Magento_Paypal::fetch","config\/acl\/resources\/admin\/system\/config\/persistent":"Magento_Persistent::persistent","config\/acl\/resources\/admin\/cms\/poll":"Magento_Poll::poll","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/ratings":"Magento_Rating::ratings","config\/acl\/resources\/admin\/report":"Magento_Reports::report","config\/acl\/resources\/admin\/report\/salesroot":"Magento_Reports::salesroot","config\/acl\/resources\/admin\/report\/salesroot\/sales":"Magento_Reports::salesroot_sales","config\/acl\/resources\/admin\/report\/salesroot\/tax":"Magento_Reports::tax","config\/acl\/resources\/admin\/report\/salesroot\/shipping":"Magento_Reports::shipping","config\/acl\/resources\/admin\/report\/salesroot\/invoiced":"Magento_Reports::invoiced","config\/acl\/resources\/admin\/report\/salesroot\/refunded":"Magento_Reports::refunded","config\/acl\/resources\/admin\/report\/salesroot\/coupons":"Magento_Reports::coupons","config\/acl\/resources\/admin\/report\/shopcart":"Magento_Reports::shopcart","config\/acl\/resources\/admin\/report\/shopcart\/product":"Magento_Reports::product","config\/acl\/resources\/admin\/report\/shopcart\/abandoned":"Magento_Reports::abandoned","config\/acl\/resources\/admin\/report\/products":"Magento_Reports::report_products","config\/acl\/resources\/admin\/report\/products\/bestsellers":"Magento_Reports::bestsellers","config\/acl\/resources\/admin\/report\/products\/sold":"Magento_Reports::sold","config\/acl\/resources\/admin\/report\/products\/viewed":"Magento_Reports::viewed","config\/acl\/resources\/admin\/report\/products\/lowstock":"Magento_Reports::lowstock","config\/acl\/resources\/admin\/report\/products\/downloads":"Magento_Reports::downloads","config\/acl\/resources\/admin\/report\/customers":"Magento_Reports::customers","config\/acl\/resources\/admin\/report\/customers\/accounts":"Magento_Reports::accounts","config\/acl\/resources\/admin\/report\/customers\/totals":"Magento_Reports::totals","config\/acl\/resources\/admin\/report\/customers\/orders":"Magento_Reports::customers_orders","config\/acl\/resources\/admin\/report\/review":"Magento_Reports::review","config\/acl\/resources\/admin\/report\/review\/customer":"Magento_Reports::review_customer","config\/acl\/resources\/admin\/report\/review\/product":"Magento_Reports::review_product","config\/acl\/resources\/admin\/report\/tags":"Magento_Reports::tags","config\/acl\/resources\/admin\/report\/tags\/customer":"Magento_Reports::tags_customer","config\/acl\/resources\/admin\/report\/tags\/popular":"Magento_Reports::popular","config\/acl\/resources\/admin\/report\/tags\/product":"Magento_Reports::tags_product","config\/acl\/resources\/admin\/report\/search":"Magento_Reports::report_search","config\/acl\/resources\/admin\/report\/statistics":"Magento_Reports::statistics","config\/acl\/resources\/admin\/system\/config\/reports":"Magento_Reports::reports","config\/acl\/resources\/admin\/catalog\/reviews_ratings":"Magento_Review::reviews_ratings","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews":"Magento_Review::reviews","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/all":"Magento_Review::reviews_all","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/pending":"Magento_Review::pending","config\/acl\/resources\/admin\/system\/config\/rss":"Magento_Rss::rss","config\/acl\/resources\/admin\/promo\/quote":"Magento_SalesRule::quote","config\/acl\/resources\/admin\/sales":"Magento_Sales::sales","config\/acl\/resources\/admin\/sales\/order":"Magento_Sales::sales_order","config\/acl\/resources\/admin\/sales\/order\/actions":"Magento_Sales::actions","config\/acl\/resources\/admin\/sales\/order\/actions\/create":"Magento_Sales::create","config\/acl\/resources\/admin\/sales\/order\/actions\/view":"Magento_Sales::actions_view","config\/acl\/resources\/admin\/sales\/order\/actions\/email":"Magento_Sales::email","config\/acl\/resources\/admin\/sales\/order\/actions\/reorder":"Magento_Sales::reorder","config\/acl\/resources\/admin\/sales\/order\/actions\/edit":"Magento_Sales::actions_edit","config\/acl\/resources\/admin\/sales\/order\/actions\/cancel":"Magento_Sales::cancel","config\/acl\/resources\/admin\/sales\/order\/actions\/review_payment":"Magento_Sales::review_payment","config\/acl\/resources\/admin\/sales\/order\/actions\/capture":"Magento_Sales::capture","config\/acl\/resources\/admin\/sales\/order\/actions\/invoice":"Magento_Sales::invoice","config\/acl\/resources\/admin\/sales\/order\/actions\/creditmemo":"Magento_Sales::creditmemo","config\/acl\/resources\/admin\/sales\/order\/actions\/hold":"Magento_Sales::hold","config\/acl\/resources\/admin\/sales\/order\/actions\/unhold":"Magento_Sales::unhold","config\/acl\/resources\/admin\/sales\/order\/actions\/ship":"Magento_Sales::ship","config\/acl\/resources\/admin\/sales\/order\/actions\/comment":"Magento_Sales::comment","config\/acl\/resources\/admin\/sales\/order\/actions\/emails":"Magento_Sales::emails","config\/acl\/resources\/admin\/sales\/invoice":"Magento_Sales::sales_invoice","config\/acl\/resources\/admin\/sales\/shipment":"Magento_Sales::shipment","config\/acl\/resources\/admin\/sales\/creditmemo":"Magento_Sales::sales_creditmemo","config\/acl\/resources\/admin\/sales\/transactions":"Magento_Sales::transactions","config\/acl\/resources\/admin\/sales\/transactions\/fetch":"Magento_Sales::transactions_fetch","config\/acl\/resources\/admin\/sales\/recurring_profile":"Magento_Sales::recurring_profile","config\/acl\/resources\/admin\/sales\/billing_agreement":"Magento_Sales::billing_agreement","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions":"Magento_Sales::billing_agreement_actions","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/view":"Magento_Sales::billing_agreement_actions_view","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/manage":"Magento_Sales::actions_manage","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/use":"Magento_Sales::use","config\/acl\/resources\/admin\/system\/order_statuses":"Magento_Sales::order_statuses","config\/acl\/resources\/admin\/system\/config\/sales":"Magento_Sales::config_sales","config\/acl\/resources\/admin\/system\/config\/sales_email":"Magento_Sales::sales_email","config\/acl\/resources\/admin\/system\/config\/sales_pdf":"Magento_Sales::sales_pdf","config\/acl\/resources\/admin\/system\/config\/shipping":"Magento_Shipping::config_shipping","config\/acl\/resources\/admin\/system\/config\/carriers":"Magento_Shipping::carriers","config\/acl\/resources\/admin\/catalog\/sitemap":"Magento_Sitemap::sitemap","config\/acl\/resources\/admin\/system\/config\/sitemap":"Magento_Sitemap::config_sitemap","config\/acl\/resources\/admin\/sales\/tax":"Magento_Tax::sales_tax","config\/acl\/resources\/admin\/sales\/tax\/classes_customer":"Magento_Tax::classes_customer","config\/acl\/resources\/admin\/sales\/tax\/classes_product":"Magento_Tax::classes_product","config\/acl\/resources\/admin\/sales\/tax\/import_export":"Magento_Tax::import_export","config\/acl\/resources\/admin\/sales\/tax\/rates":"Magento_Tax::tax_rates","config\/acl\/resources\/admin\/sales\/tax\/rules":"Magento_Tax::rules","config\/acl\/resources\/admin\/system\/config\/tax":"Magento_Tax::config_tax","config\/acl\/resources\/admin\/system\/acl":"Magento_User::acl","config\/acl\/resources\/admin\/system\/acl\/roles":"Magento_User::acl_roles","config\/acl\/resources\/admin\/system\/acl\/users":"Magento_User::acl_users","config\/acl\/resources\/admin\/cms\/widget_instance":"Magento_Widget::widget_instance","config\/acl\/resources\/admin\/system\/config\/wishlist":"Magento_Wishlist::config_wishlist"}
+{"config\/acl\/resources\/admin\/cms\/magento_banner":"Magento_Banner::magento_banner","config\/acl\/resources\/admin\/catalog\/events":"Magento_CatalogEvent::events","config\/acl\/resources\/admin\/system\/config\/magento_catalogpermissions":"Magento_CatalogPermissions::magento_catalogpermissions","config\/acl\/resources\/admin\/catalog\/magento_catalogpermissions":"Magento_CatalogPermissions::catalog_magento_catalogpermissions","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout":"Magento_AdvancedCheckout::magento_advancedcheckout","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/view":"Magento_AdvancedCheckout::view","config\/acl\/resources\/admin\/sales\/magento_advancedcheckout\/update":"Magento_AdvancedCheckout::update","config\/acl\/resources\/admin\/cms\/page\/save_revision":"Magento_VersionsCms::save_revision","config\/acl\/resources\/admin\/cms\/page\/delete_revision":"Magento_VersionsCms::delete_revision","config\/acl\/resources\/admin\/cms\/page\/publish_revision":"Magento_VersionsCms::publish_revision","config\/acl\/resources\/admin\/cms\/hierarchy":"Magento_VersionsCms::hierarchy","config\/acl\/resources\/admin\/customer\/customersegment":"Magento_CustomerSegment::customersegment","config\/acl\/resources\/admin\/report\/customers\/segment":"Magento_CustomerSegment::segment","config\/acl\/resources\/admin\/customer\/attributes":"Magento_CustomerCustomAttributes::attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_attributes":"Magento_CustomerCustomAttributes::customer_attributes","config\/acl\/resources\/admin\/customer\/attributes\/customer_address_attributes":"Magento_CustomerCustomAttributes::customer_address_attributes","config\/acl\/resources\/admin\/system\/config\/giftcardaccount":"Magento_GiftCardAccount::giftcardaccount","config\/acl\/resources\/admin\/customer\/giftcardaccount":"Magento_GiftCardAccount::customer_giftcardaccount","config\/acl\/resources\/admin\/system\/config\/giftcard":"Magento_GiftCard::giftcard","config\/acl\/resources\/admin\/system\/config\/magento_giftregistry":"Magento_GiftRegistry::magento_giftregistry","config\/acl\/resources\/admin\/customer\/magento_giftregistry":"Magento_GiftRegistry::customer_magento_giftregistry","config\/acl\/resources\/admin\/sales\/magento_giftwrapping":"Magento_GiftWrapping::magento_giftwrapping","config\/acl\/resources\/admin\/system\/convert\/enterprise_scheduled_operation":"Magento_ScheduledImportExport::enterprise_scheduled_operation","config\/acl\/resources\/admin\/customer\/magento_invitation":"Magento_Invitation::magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation":"Magento_Invitation::report_magento_invitation","config\/acl\/resources\/admin\/report\/magento_invitation\/general":"Magento_Invitation::general","config\/acl\/resources\/admin\/report\/magento_invitation\/customer":"Magento_Invitation::magento_invitation_customer","config\/acl\/resources\/admin\/report\/magento_invitation\/order":"Magento_Invitation::order","config\/acl\/resources\/admin\/system\/config\/magento_invitation":"Magento_Invitation::config_magento_invitation","config\/acl\/resources\/admin\/system\/config\/logging":"Magento_Logging::logging","config\/acl\/resources\/admin\/system\/magento_logging":"Magento_Logging::magento_logging","config\/acl\/resources\/admin\/system\/magento_logging\/events":"Magento_Logging::magento_logging_events","config\/acl\/resources\/admin\/system\/magento_logging\/backups":"Magento_Logging::backups","config\/acl\/resources\/admin\/system\/crypt_key":"Magento_Pci::crypt_key","config\/acl\/resources\/admin\/system\/acl\/locks":"Magento_Pci::locks","config\/acl\/resources\/admin\/catalog\/products\/read_product_price":"Magento_PricePermissions::read_product_price","config\/acl\/resources\/admin\/catalog\/products\/read_product_price\/edit_product_price":"Magento_PricePermissions::edit_product_price","config\/acl\/resources\/admin\/catalog\/products\/edit_product_status":"Magento_PricePermissions::edit_product_status","config\/acl\/resources\/admin\/promo\/catalog\/edit":"Magento_PromotionPermissions::edit","config\/acl\/resources\/admin\/promo\/quote\/edit":"Magento_PromotionPermissions::quote_edit","config\/acl\/resources\/admin\/promo\/magento_reminder\/edit":"Magento_PromotionPermissions::magento_reminder_edit","config\/acl\/resources\/admin\/promo\/magento_reminder":"Magento_Reminder::magento_reminder","config\/acl\/resources\/admin\/system\/config\/promo":"Magento_SalesRule::config_promo","config\/acl\/resources\/admin\/customer\/manage\/reward_balance":"Magento_Reward::reward_balance","config\/acl\/resources\/admin\/sales\/order\/actions\/create\/reward_spend":"Magento_Reward::reward_spend","config\/acl\/resources\/admin\/customer\/rates":"Magento_Reward::rates","config\/acl\/resources\/admin\/system\/config\/magento_reward":"Magento_Reward::magento_reward","config\/acl\/resources\/admin\/sales\/magento_rma":"Magento_Rma::magento_rma","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_manage":"Magento_Rma::rma_manage","config\/acl\/resources\/admin\/sales\/magento_rma\/rma_attribute":"Magento_Rma::rma_attribute","config\/acl\/resources\/admin\/sales\/archive":"Magento_SalesArchive::archive","config\/acl\/resources\/admin\/sales\/archive\/orders":"Magento_SalesArchive::orders","config\/acl\/resources\/admin\/sales\/archive\/orders\/add":"Magento_SalesArchive::add","config\/acl\/resources\/admin\/sales\/archive\/orders\/remove":"Magento_SalesArchive::remove","config\/acl\/resources\/admin\/sales\/archive\/invoices":"Magento_SalesArchive::invoices","config\/acl\/resources\/admin\/sales\/archive\/shipments":"Magento_SalesArchive::shipments","config\/acl\/resources\/admin\/sales\/archive\/creditmemos":"Magento_SalesArchive::creditmemos","config\/acl\/resources\/admin\/catalog\/targetrule":"Magento_TargetRule::targetrule","config\/acl\/resources\/admin\/report\/customers\/wishlist":"Magento_MultipleWishlist::wishlist","config\/acl\/resources\/admin\/system\/adminnotification":"Magento_AdminNotification::adminnotification","config\/acl\/resources\/admin\/system\/adminnotification\/show_toolbar":"Magento_AdminNotification::show_toolbar","config\/acl\/resources\/admin\/system\/adminnotification\/show_list":"Magento_AdminNotification::show_list","config\/acl\/resources\/admin\/system\/adminnotification\/mark_as_read":"Magento_AdminNotification::mark_as_read","config\/acl\/resources\/admin\/system\/adminnotification\/remove":"Magento_AdminNotification::adminnotification_remove","config\/acl\/resources\/all":"Magento_Adminhtml::all","config\/acl\/resources\/admin":"Magento_Adminhtml::admin","config\/acl\/resources\/admin\/dashboard":"Magento_Adminhtml::dashboard","config\/acl\/resources\/admin\/system":"Magento_Adminhtml::system","config\/acl\/resources\/admin\/system\/store":"Magento_Adminhtml::store","config\/acl\/resources\/admin\/system\/design":"Magento_Adminhtml::design","config\/acl\/resources\/admin\/system\/design\/schedule":"Magento_Adminhtml::schedule","config\/acl\/resources\/admin\/system\/config":"Magento_Adminhtml::config","config\/acl\/resources\/admin\/system\/config\/general":"Magento_Adminhtml::config_general","config\/acl\/resources\/admin\/system\/config\/web":"Magento_Adminhtml::web","config\/acl\/resources\/admin\/system\/config\/design":"Magento_Adminhtml::config_design","config\/acl\/resources\/admin\/system\/config\/system":"Magento_Adminhtml::config_system","config\/acl\/resources\/admin\/system\/config\/advanced":"Magento_Adminhtml::advanced","config\/acl\/resources\/admin\/system\/config\/trans_email":"Magento_Adminhtml::trans_email","config\/acl\/resources\/admin\/system\/config\/dev":"Magento_Adminhtml::dev","config\/acl\/resources\/admin\/system\/config\/currency":"Magento_Adminhtml::currency","config\/acl\/resources\/admin\/system\/config\/sendfriend":"Magento_Adminhtml::sendfriend","config\/acl\/resources\/admin\/system\/config\/admin":"Magento_Adminhtml::config_admin","config\/acl\/resources\/admin\/system\/currency":"Magento_CurrencySymbol::system_currency","config\/acl\/resources\/admin\/system\/email_template":"Magento_Email::template","config\/acl\/resources\/admin\/system\/variable":"Magento_Adminhtml::variable","config\/acl\/resources\/admin\/system\/myaccount":"Magento_Adminhtml::myaccount","config\/acl\/resources\/admin\/system\/tools":"Magento_Adminhtml::tools","config\/acl\/resources\/admin\/system\/convert":"Magento_Adminhtml::convert","config\/acl\/resources\/admin\/system\/cache":"Magento_Adminhtml::cache","config\/acl\/resources\/admin\/system\/extensions":"Magento_Adminhtml::extensions","config\/acl\/resources\/admin\/system\/extensions\/local":"Magento_Adminhtml::local","config\/acl\/resources\/admin\/system\/extensions\/custom":"Magento_Adminhtml::custom","config\/acl\/resources\/admin\/global_search":"Magento_Adminhtml::global_search","config\/acl\/resources\/admin\/system\/tools\/backup":"Magento_Backup::backup","config\/acl\/resources\/admin\/system\/tools\/backup\/rollback":"Magento_Backup::rollback","config\/acl\/resources\/admin\/system\/config\/cataloginventory":"Magento_CatalogInventory::cataloginventory","config\/acl\/resources\/admin\/promo":"Magento_CatalogRule::promo","config\/acl\/resources\/admin\/promo\/catalog":"Magento_CatalogRule::promo_catalog","config\/acl\/resources\/admin\/catalog\/search":"Magento_CatalogSearch::search","config\/acl\/resources\/admin\/system\/config\/catalog":"Magento_Catalog::config_catalog","config\/acl\/resources\/admin\/catalog":"Magento_Catalog::catalog","config\/acl\/resources\/admin\/catalog\/attributes":"Magento_Catalog::catalog_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/attributes":"Magento_Catalog::attributes_attributes","config\/acl\/resources\/admin\/catalog\/attributes\/sets":"Magento_Catalog::sets","config\/acl\/resources\/admin\/catalog\/categories":"Magento_Catalog::categories","config\/acl\/resources\/admin\/catalog\/products":"Magento_Catalog::products","config\/acl\/resources\/admin\/catalog\/update_attributes":"Magento_Catalog::update_attributes","config\/acl\/resources\/admin\/catalog\/urlrewrite":"Magento_Catalog::urlrewrite","config\/acl\/resources\/admin\/sales\/checkoutagreement":"Magento_Checkout::checkoutagreement","config\/acl\/resources\/admin\/system\/config\/checkout":"Magento_Checkout::checkout","config\/acl\/resources\/admin\/cms":"Magento_Cms::cms","config\/acl\/resources\/admin\/cms\/block":"Magento_Cms::block","config\/acl\/resources\/admin\/cms\/page":"Magento_Cms::page","config\/acl\/resources\/admin\/cms\/page\/save":"Magento_Cms::save","config\/acl\/resources\/admin\/cms\/page\/delete":"Magento_Cms::page_delete","config\/acl\/resources\/admin\/cms\/media_gallery":"Magento_Cms::media_gallery","config\/acl\/resources\/admin\/system\/config\/cms":"Magento_Cms::config_cms","config\/acl\/resources\/admin\/system\/config\/contacts":"Magento_Contacts::contacts","config\/acl\/resources\/admin\/system\/currency\/rates":"Magento_CurrencySymbol::currency_rates","config\/acl\/resources\/admin\/system\/currency\/symbols":"Magento_CurrencySymbol::symbols","config\/acl\/resources\/admin\/customer":"Magento_Customer::customer","config\/acl\/resources\/admin\/customer\/group":"Magento_Customer::group","config\/acl\/resources\/admin\/customer\/manage":"Magento_Customer::manage","config\/acl\/resources\/admin\/customer\/online":"Magento_Customer::online","config\/acl\/resources\/admin\/system\/config\/customer":"Magento_Customer::config_customer","config\/acl\/resources\/admin\/system\/design\/editor":"Magento_DesignEditor::editor","config\/acl\/resources\/admin\/system\/config\/downloadable":"Magento_Downloadable::downloadable","config\/acl\/resources\/admin\/system\/config\/google":"Magento_GoogleCheckout::google","config\/acl\/resources\/admin\/catalog\/googleshopping":"Magento_GoogleShopping::googleshopping","config\/acl\/resources\/admin\/catalog\/googleshopping\/types":"Magento_GoogleShopping::types","config\/acl\/resources\/admin\/catalog\/googleshopping\/items":"Magento_GoogleShopping::items","config\/acl\/resources\/admin\/system\/convert\/import":"Magento_ImportExport::import","config\/acl\/resources\/admin\/system\/convert\/export":"Magento_ImportExport::export","config\/acl\/resources\/admin\/system\/index":"Magento_Index::index","config\/acl\/resources\/admin\/system\/config\/newsletter":"Magento_Newsletter::newsletter","config\/acl\/resources\/admin\/newsletter":"Magento_Newsletter::admin_newsletter","config\/acl\/resources\/admin\/newsletter\/problem":"Magento_Newsletter::problem","config\/acl\/resources\/admin\/newsletter\/queue":"Magento_Newsletter::queue","config\/acl\/resources\/admin\/newsletter\/subscriber":"Magento_Newsletter::subscriber","config\/acl\/resources\/admin\/newsletter\/template":"Magento_Newsletter::template","config\/acl\/resources\/admin\/system\/config\/oauth":"Magento_Oauth::oauth","config\/acl\/resources\/admin\/system\/config\/payment":"Magento_Payment::payment","config\/acl\/resources\/admin\/system\/config\/payment_services":"Magento_Payment::payment_services","config\/acl\/resources\/admin\/system\/config\/paypal":"Magento_Paypal::paypal","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports":"Magento_Paypal::paypal_settlement_reports","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/view":"Magento_Paypal::paypal_settlement_reports_view","config\/acl\/resources\/admin\/report\/salesroot\/paypal_settlement_reports\/fetch":"Magento_Paypal::fetch","config\/acl\/resources\/admin\/system\/config\/persistent":"Magento_Persistent::persistent","config\/acl\/resources\/admin\/cms\/poll":"Magento_Poll::poll","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/ratings":"Magento_Rating::ratings","config\/acl\/resources\/admin\/report":"Magento_Reports::report","config\/acl\/resources\/admin\/report\/salesroot":"Magento_Reports::salesroot","config\/acl\/resources\/admin\/report\/salesroot\/sales":"Magento_Reports::salesroot_sales","config\/acl\/resources\/admin\/report\/salesroot\/tax":"Magento_Reports::tax","config\/acl\/resources\/admin\/report\/salesroot\/shipping":"Magento_Reports::shipping","config\/acl\/resources\/admin\/report\/salesroot\/invoiced":"Magento_Reports::invoiced","config\/acl\/resources\/admin\/report\/salesroot\/refunded":"Magento_Reports::refunded","config\/acl\/resources\/admin\/report\/salesroot\/coupons":"Magento_Reports::coupons","config\/acl\/resources\/admin\/report\/shopcart":"Magento_Reports::shopcart","config\/acl\/resources\/admin\/report\/shopcart\/product":"Magento_Reports::product","config\/acl\/resources\/admin\/report\/shopcart\/abandoned":"Magento_Reports::abandoned","config\/acl\/resources\/admin\/report\/products":"Magento_Reports::report_products","config\/acl\/resources\/admin\/report\/products\/bestsellers":"Magento_Reports::bestsellers","config\/acl\/resources\/admin\/report\/products\/sold":"Magento_Reports::sold","config\/acl\/resources\/admin\/report\/products\/viewed":"Magento_Reports::viewed","config\/acl\/resources\/admin\/report\/products\/lowstock":"Magento_Reports::lowstock","config\/acl\/resources\/admin\/report\/products\/downloads":"Magento_Reports::downloads","config\/acl\/resources\/admin\/report\/customers":"Magento_Reports::customers","config\/acl\/resources\/admin\/report\/customers\/accounts":"Magento_Reports::accounts","config\/acl\/resources\/admin\/report\/customers\/totals":"Magento_Reports::totals","config\/acl\/resources\/admin\/report\/customers\/orders":"Magento_Reports::customers_orders","config\/acl\/resources\/admin\/report\/review":"Magento_Reports::review","config\/acl\/resources\/admin\/report\/review\/customer":"Magento_Reports::review_customer","config\/acl\/resources\/admin\/report\/review\/product":"Magento_Reports::review_product","config\/acl\/resources\/admin\/report\/tags":"Magento_Reports::tags","config\/acl\/resources\/admin\/report\/tags\/customer":"Magento_Reports::tags_customer","config\/acl\/resources\/admin\/report\/tags\/popular":"Magento_Reports::popular","config\/acl\/resources\/admin\/report\/tags\/product":"Magento_Reports::tags_product","config\/acl\/resources\/admin\/report\/search":"Magento_Reports::report_search","config\/acl\/resources\/admin\/report\/statistics":"Magento_Reports::statistics","config\/acl\/resources\/admin\/system\/config\/reports":"Magento_Reports::reports","config\/acl\/resources\/admin\/catalog\/reviews_ratings":"Magento_Review::reviews_ratings","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews":"Magento_Review::reviews","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/all":"Magento_Review::reviews_all","config\/acl\/resources\/admin\/catalog\/reviews_ratings\/reviews\/pending":"Magento_Review::pending","config\/acl\/resources\/admin\/system\/config\/rss":"Magento_Rss::rss","config\/acl\/resources\/admin\/promo\/quote":"Magento_SalesRule::quote","config\/acl\/resources\/admin\/sales":"Magento_Sales::sales","config\/acl\/resources\/admin\/sales\/order":"Magento_Sales::sales_order","config\/acl\/resources\/admin\/sales\/order\/actions":"Magento_Sales::actions","config\/acl\/resources\/admin\/sales\/order\/actions\/create":"Magento_Sales::create","config\/acl\/resources\/admin\/sales\/order\/actions\/view":"Magento_Sales::actions_view","config\/acl\/resources\/admin\/sales\/order\/actions\/email":"Magento_Sales::email","config\/acl\/resources\/admin\/sales\/order\/actions\/reorder":"Magento_Sales::reorder","config\/acl\/resources\/admin\/sales\/order\/actions\/edit":"Magento_Sales::actions_edit","config\/acl\/resources\/admin\/sales\/order\/actions\/cancel":"Magento_Sales::cancel","config\/acl\/resources\/admin\/sales\/order\/actions\/review_payment":"Magento_Sales::review_payment","config\/acl\/resources\/admin\/sales\/order\/actions\/capture":"Magento_Sales::capture","config\/acl\/resources\/admin\/sales\/order\/actions\/invoice":"Magento_Sales::invoice","config\/acl\/resources\/admin\/sales\/order\/actions\/creditmemo":"Magento_Sales::creditmemo","config\/acl\/resources\/admin\/sales\/order\/actions\/hold":"Magento_Sales::hold","config\/acl\/resources\/admin\/sales\/order\/actions\/unhold":"Magento_Sales::unhold","config\/acl\/resources\/admin\/sales\/order\/actions\/ship":"Magento_Sales::ship","config\/acl\/resources\/admin\/sales\/order\/actions\/comment":"Magento_Sales::comment","config\/acl\/resources\/admin\/sales\/order\/actions\/emails":"Magento_Sales::emails","config\/acl\/resources\/admin\/sales\/invoice":"Magento_Sales::sales_invoice","config\/acl\/resources\/admin\/sales\/shipment":"Magento_Sales::shipment","config\/acl\/resources\/admin\/sales\/creditmemo":"Magento_Sales::sales_creditmemo","config\/acl\/resources\/admin\/sales\/transactions":"Magento_Sales::transactions","config\/acl\/resources\/admin\/sales\/transactions\/fetch":"Magento_Sales::transactions_fetch","config\/acl\/resources\/admin\/sales\/recurring_profile":"Magento_Sales::recurring_profile","config\/acl\/resources\/admin\/sales\/billing_agreement":"Magento_Sales::billing_agreement","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions":"Magento_Sales::billing_agreement_actions","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/view":"Magento_Sales::billing_agreement_actions_view","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/manage":"Magento_Sales::actions_manage","config\/acl\/resources\/admin\/sales\/billing_agreement\/actions\/use":"Magento_Sales::use","config\/acl\/resources\/admin\/system\/order_statuses":"Magento_Sales::order_statuses","config\/acl\/resources\/admin\/system\/config\/sales":"Magento_Sales::config_sales","config\/acl\/resources\/admin\/system\/config\/sales_email":"Magento_Sales::sales_email","config\/acl\/resources\/admin\/system\/config\/sales_pdf":"Magento_Sales::sales_pdf","config\/acl\/resources\/admin\/system\/config\/shipping":"Magento_Shipping::config_shipping","config\/acl\/resources\/admin\/system\/config\/carriers":"Magento_Shipping::carriers","config\/acl\/resources\/admin\/catalog\/sitemap":"Magento_Sitemap::sitemap","config\/acl\/resources\/admin\/system\/config\/sitemap":"Magento_Sitemap::config_sitemap","config\/acl\/resources\/admin\/sales\/tax":"Magento_Tax::sales_tax","config\/acl\/resources\/admin\/sales\/tax\/classes_customer":"Magento_Tax::classes_customer","config\/acl\/resources\/admin\/sales\/tax\/classes_product":"Magento_Tax::classes_product","config\/acl\/resources\/admin\/sales\/tax\/import_export":"Magento_Tax::import_export","config\/acl\/resources\/admin\/sales\/tax\/rates":"Magento_Tax::tax_rates","config\/acl\/resources\/admin\/sales\/tax\/rules":"Magento_Tax::rules","config\/acl\/resources\/admin\/system\/config\/tax":"Magento_Tax::config_tax","config\/acl\/resources\/admin\/system\/acl":"Magento_User::acl","config\/acl\/resources\/admin\/system\/acl\/roles":"Magento_User::acl_roles","config\/acl\/resources\/admin\/system\/acl\/users":"Magento_User::acl_users","config\/acl\/resources\/admin\/cms\/widget_instance":"Magento_Widget::widget_instance","config\/acl\/resources\/admin\/system\/config\/wishlist":"Magento_Wishlist::config_wishlist"}
diff --git a/dev/tools/Magento/Tools/Migration/factory_table_names/replace_ce.php b/dev/tools/Magento/Tools/Migration/factory_table_names/replace_ce.php
index a85082f646be01ede26f74cfc4136234a1e354bc..ad151d45e334fb75f813d34fee4e349751d447cc 100644
--- a/dev/tools/Magento/Tools/Migration/factory_table_names/replace_ce.php
+++ b/dev/tools/Magento/Tools/Migration/factory_table_names/replace_ce.php
@@ -278,7 +278,7 @@ return array(
     'oscommerce/oscommerce_type' => 'oscommerce_import_type',
     'paybox/api_debug' => 'paybox_api_debug',
     'paybox/question_number' => 'paybox_question_number',
-    'paygate/authorizenet_debug' => 'paygate_authorizenet_debug',
+    'paygate/authorizenet_debug' => 'authorizenet_debug',
     'paypal/api_debug' => 'paypal_api_debug',
     'paypal/cert' => 'paypal_cert',
     'paypal/payment_transaction' => 'paypal_payment_transaction',
diff --git a/dev/tools/Magento/Tools/View/Generator/Config.php b/dev/tools/Magento/Tools/View/Generator/Config.php
index 2d8a0ba37df76b71993f04873efc0e3b201f0d94..fc4475df53f62805bd3fc98c2bb5bffdce9bb8a1 100644
--- a/dev/tools/Magento/Tools/View/Generator/Config.php
+++ b/dev/tools/Magento/Tools/View/Generator/Config.php
@@ -47,13 +47,13 @@ class Config
     private $_isDryRun;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param array $cmdOptions
      * @throws \Magento\Exception
      */
-    public function __construct(\Magento\Filesystem $filesystem, $cmdOptions)
+    public function __construct(\Magento\App\Filesystem $filesystem, $cmdOptions)
     {
-        $rootDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $rootDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $sourceDir = isset($cmdOptions['source']) ? $cmdOptions['source'] : $rootDirectory->getAbsolutePath();
         if (!$rootDirectory->isDirectory($rootDirectory->getRelativePath($sourceDir))) {
             throw new \Magento\Exception('Source directory does not exist: ' . $sourceDir);
@@ -62,7 +62,7 @@ class Config
         if (isset($cmdOptions['destination'])) {
             $destinationDir = $cmdOptions['destination'];
         } else {
-            $destinationDir = $filesystem->getPath(\Magento\Filesystem::STATIC_VIEW);
+            $destinationDir = $filesystem->getPath(\Magento\App\Filesystem::STATIC_VIEW_DIR);
         }
         $destinationDirRelative = $rootDirectory->getRelativePath($destinationDir);
         if (!$rootDirectory->isDirectory($destinationDirRelative)) {
diff --git a/dev/tools/Magento/Tools/View/Generator/CopyRule.php b/dev/tools/Magento/Tools/View/Generator/CopyRule.php
index 4aea33b663a1b031a91336fb63304e0ea590f2d1..70ceb08f9ab31c0fc862378434cd9d13e178fa72 100644
--- a/dev/tools/Magento/Tools/View/Generator/CopyRule.php
+++ b/dev/tools/Magento/Tools/View/Generator/CopyRule.php
@@ -32,7 +32,7 @@ namespace Magento\Tools\View\Generator;
 class CopyRule
 {
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     private $_filesystem;
 
@@ -56,12 +56,12 @@ class CopyRule
     /**
      * Constructor
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Core\Model\Theme\Collection $themes
      * @param \Magento\View\Design\Fallback\Rule\RuleInterface $fallbackRule
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Core\Model\Theme\Collection $themes,
         \Magento\View\Design\Fallback\Rule\RuleInterface $fallbackRule
     ) {
@@ -145,7 +145,7 @@ class CopyRule
     private function _getMatchingDirs($dirPattern)
     {
         $dirPattern = preg_replace($this->_placeholderPcre, '*', $dirPattern, -1, $placeholderCount);
-        $directoryHandler = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $directoryHandler = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         if ($placeholderCount) {
             // autodetect pattern base directory because the filesystem interface requires it
             $firstPlaceholderPos = strpos($dirPattern, '*');
diff --git a/downloader/lib/Magento/Backup/Snapshot.php b/downloader/lib/Magento/Backup/Snapshot.php
index e3bfcb4b2eef0593f4c5c91dfb39fcbbcac09d84..7e560fa23728fca3e6ef9e9745f1e40a88092e0d 100755
--- a/downloader/lib/Magento/Backup/Snapshot.php
+++ b/downloader/lib/Magento/Backup/Snapshot.php
@@ -45,7 +45,7 @@ class Snapshot extends \Magento\Backup\Filesystem
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -55,11 +55,11 @@ class Snapshot extends \Magento\Backup\Filesystem
     protected $_backupFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param Factory $backupFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Backup\Factory $backupFactory
     ) {
         $this->_filesystem = $filesystem;
@@ -136,7 +136,7 @@ class Snapshot extends \Magento\Backup\Filesystem
         return $this->_backupFactory->create(\Magento\Backup\Factory::TYPE_DB)
             ->setBackupExtension('gz')
             ->setTime($this->getTime())
-            ->setBackupsDir($this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR))
+            ->setBackupsDir($this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR))
             ->setResourceModel($this->getResourceModel());
     }
 
diff --git a/index.php b/index.php
index a9e360a30c21aea96f0e537984b7713e67f67cce..8f165f8101c08c9b5d5de9b1375d577e12b59fcb 100644
--- a/index.php
+++ b/index.php
@@ -34,8 +34,5 @@
  */
 require __DIR__ . '/app/bootstrap.php';
 
-\Magento\Profiler::start('magento');
 $entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $_SERVER);
-$result = $entryPoint->run('Magento\App\Http');
-\Magento\Profiler::stop('magento');
-return $result;
+$entryPoint->run('Magento\App\Http');
diff --git a/lib/Magento/App/Cache/Frontend/Factory.php b/lib/Magento/App/Cache/Frontend/Factory.php
index 6565c3b48ad5ed76fca79835034b66869e489e0a..6360e37eb3ddeea83a7a2c1e452786811adb865b 100644
--- a/lib/Magento/App/Cache/Frontend/Factory.php
+++ b/lib/Magento/App/Cache/Frontend/Factory.php
@@ -42,7 +42,7 @@ class Factory
     private $_objectManager;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     private $_filesystem;
 
@@ -91,14 +91,14 @@ class Factory
 
     /**
      * @param \Magento\ObjectManager $objectManager
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\App\Resource $resource
      * @param array $enforcedOptions
      * @param array $decorators
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\App\Resource $resource,
         array $enforcedOptions = array(),
         array $decorators = array()
@@ -122,20 +122,20 @@ class Factory
 
         foreach (array('backend_options', 'slow_backend_options') as $section) {
             if (!empty($options[$section]['cache_dir'])) {
-                $directory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::VAR_DIR);
+                $directory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::VAR_DIR);
                 $directory->create($options[$section]['cache_dir']);
                 $options[$section]['cache_dir'] = $directory->getAbsolutePath($options[$section]['cache_dir']);
             }
         }
 
-        $this->_backendOptions['cache_dir'] = $this->_filesystem->getPath(\Magento\Filesystem::CACHE);
+        $this->_backendOptions['cache_dir'] = $this->_filesystem->getPath(\Magento\App\Filesystem::CACHE_DIR);
 
         $idPrefix = isset($options['id_prefix']) ? $options['id_prefix'] : '';
         if (!$idPrefix && isset($options['prefix'])) {
             $idPrefix = $options['prefix'];
         }
         if (empty($idPrefix)) {
-            $idPrefix = substr(md5($this->_filesystem->getPath(\Magento\Filesystem::CONFIG)), 0, 3) . '_';
+            $idPrefix = substr(md5($this->_filesystem->getPath(\Magento\App\Filesystem::CONFIG_DIR)), 0, 3) . '_';
         }
         $options['frontend_options']['cache_id_prefix'] = $idPrefix;
 
diff --git a/lib/Magento/App/Config/FileResolver/Primary.php b/lib/Magento/App/Config/FileResolver/Primary.php
index c366d4edbf2cbb7246ddeada94b8b6158fa2e66b..59885970779294a8dd45da69a72970dc2ca30102 100644
--- a/lib/Magento/App/Config/FileResolver/Primary.php
+++ b/lib/Magento/App/Config/FileResolver/Primary.php
@@ -49,14 +49,14 @@ class Primary implements \Magento\Config\FileResolverInterface
     protected $iteratorFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Config\FileIteratorFactory $iteratorFactory
     ) {
-        $this->configDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::CONFIG);
+        $this->configDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::CONFIG_DIR);
         $this->iteratorFactory = $iteratorFactory;
     }
     /**
diff --git a/lib/Magento/App/Config/Loader.php b/lib/Magento/App/Config/Loader.php
index 79e2f3da288a7a64accedecb6453ba4e76c29540..cc9b53bd766a400204e857edfa7662342e351896 100644
--- a/lib/Magento/App/Config/Loader.php
+++ b/lib/Magento/App/Config/Loader.php
@@ -59,12 +59,12 @@ class Loader
     protected $_idAttributes = array('/config/resource' => 'name', '/config/connection' => 'name');
 
     /**
-     * @param \Magento\Filesystem\DirectoryList $dirList
+     * @param \Magento\App\Filesystem\DirectoryList $dirList
      * @param string $customFile
      */
-    public function __construct(\Magento\Filesystem\DirectoryList $dirList, $customFile = null)
+    public function __construct(\Magento\App\Filesystem\DirectoryList $dirList, $customFile = null)
     {
-        $this->_dir = $dirList->getDir(\Magento\Filesystem::CONFIG);
+        $this->_dir = $dirList->getDir(\Magento\App\Filesystem::CONFIG_DIR);
         $this->_customFile = $customFile;
     }
 
diff --git a/lib/Magento/App/Console/Response.php b/lib/Magento/App/Console/Response.php
new file mode 100644
index 0000000000000000000000000000000000000000..29271978eeec9ca29cc306b233551a69e1435ca0
--- /dev/null
+++ b/lib/Magento/App/Console/Response.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\App\Console;
+
+/**
+ * @SuppressWarnings(PHPMD.ExitExpression)
+ */
+class Response implements \Magento\App\ResponseInterface
+{
+    /**
+     * Status code
+     * Possible values:
+     *  0 (successfully)
+     *  1-255 (error)
+     *  -1 (error)
+     *
+     * @var int
+     */
+    protected $code = 0;
+
+    /**
+     * Set whether to terminate process on send or not
+     *
+     * @var bool
+     */
+    protected $terminateOnSend = true;
+
+    /**
+     * Send response to client
+     */
+    public function sendResponse()
+    {
+        if ($this->terminateOnSend) {
+            exit($this->code);
+        }
+        return $this->code;
+    }
+
+    /**
+     * @param int $code
+     */
+    public function setCode($code)
+    {
+        if ($code > 255) {
+            $code = 255;
+        }
+        $this->code = $code;
+    }
+
+    /**
+     * Set whether to terminate process on send or not
+     *
+     * @param bool $terminate
+     */
+    public function terminateOnSend($terminate)
+    {
+        $this->terminateOnSend = $terminate;
+    }
+}
\ No newline at end of file
diff --git a/lib/Magento/App/Cron.php b/lib/Magento/App/Cron.php
index 12892b65c7f9e39c5aa8fc2c6518f2cc43305029..553b6b56be2c2017e358c9d66db6de122b7f47e3 100644
--- a/lib/Magento/App/Cron.php
+++ b/lib/Magento/App/Cron.php
@@ -25,8 +25,8 @@
  */
 namespace Magento\App;
 
-use \Magento\Config\ScopeInterface,
-    \Magento\App\ObjectManager\ConfigLoader,
+use Magento\App\Console\Response;
+use \Magento\App\ObjectManager\ConfigLoader,
     \Magento\Event\ManagerInterface;
 
 class Cron implements \Magento\AppInterface
@@ -41,27 +41,36 @@ class Cron implements \Magento\AppInterface
      */
     protected $_state;
 
+    /**
+     * @var Console\Response
+     */
+    protected $_response;
+
     /**
      * @param ManagerInterface $eventManager
      * @param State $state
+     * @param Response $response
      */
     public function __construct(
         ManagerInterface $eventManager,
-        State $state
+        State $state,
+        Response $response
     ) {
         $this->_eventManager = $eventManager;
         $this->_state = $state;
+        $this->_response = $response;
     }
 
     /**
-     * Execute application
+     * Run application
      *
-     * @return int
+     * @return ResponseInterface
      */
     public function execute()
     {
         $this->_state->setAreaCode('crontab');
         $this->_eventManager->dispatch('default');
-        return 0;
+        $this->_response->setCode(0);
+        return $this->_response;
     }
 }
diff --git a/lib/Magento/App/EntryPoint/EntryPoint.php b/lib/Magento/App/EntryPoint/EntryPoint.php
index 9eee10428da528b4977f4a202ddf867985d68f30..7b06d10e4f8eedd4286418e12c97fa4681c90911 100644
--- a/lib/Magento/App/EntryPoint/EntryPoint.php
+++ b/lib/Magento/App/EntryPoint/EntryPoint.php
@@ -28,7 +28,6 @@ namespace Magento\App\EntryPoint;
 use Magento\App\State,
     Magento\App\EntryPointInterface,
     Magento\ObjectManager;
-use Magento\Webapi\Exception;
 
 class EntryPoint implements EntryPointInterface
 {
@@ -70,16 +69,19 @@ class EntryPoint implements EntryPointInterface
      *
      * @param string $applicationName
      * @param array $arguments
-     * @return int
      */
     public function run($applicationName, array $arguments = array())
     {
         try {
+            \Magento\Profiler::start('magento');
             if (!$this->_locator) {
                 $locatorFactory = new \Magento\App\ObjectManagerFactory();
                 $this->_locator = $locatorFactory->create($this->_rootDir, $this->_parameters);
             }
-            return $this->_locator->create($applicationName, $arguments)->execute();
+            $application = $this->_locator->create($applicationName, $arguments);
+            $response = $application->execute();
+            \Magento\Profiler::stop('magento');
+            $response->sendResponse();
         } catch (\Exception $exception) {
             if (isset($this->_parameters[state::PARAM_MODE])
                 && $this->_parameters[State::PARAM_MODE] == State::MODE_DEVELOPER
@@ -98,7 +100,6 @@ class EntryPoint implements EntryPointInterface
                 }
                 print $message;
             }
-            return 1;
         }
     }
 }
diff --git a/lib/Magento/App/Error/Handler.php b/lib/Magento/App/Error/Handler.php
index 609bbbcc369322c2e58206903aee1fc523750007..fe9ec9bf17796a9a7723dcae2f0f29dbdb0607b2 100644
--- a/lib/Magento/App/Error/Handler.php
+++ b/lib/Magento/App/Error/Handler.php
@@ -35,7 +35,7 @@ class Handler extends \Magento\Error\Handler
     protected $_logger;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -46,12 +46,12 @@ class Handler extends \Magento\Error\Handler
 
     /**
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\App\State $appState
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\App\State $appState
     ) {
         $this->_logger = $logger;
@@ -80,7 +80,7 @@ class Handler extends \Magento\Error\Handler
                     $reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
                 }
             }
-            require_once($this->_filesystem->getPath(\Magento\Filesystem::PUB) . '/errors/report.php');
+            require_once($this->_filesystem->getPath(\Magento\App\Filesystem::PUB_DIR) . '/errors/report.php');
         }
     }
 
diff --git a/lib/Magento/App/Filesystem.php b/lib/Magento/App/Filesystem.php
new file mode 100644
index 0000000000000000000000000000000000000000..2867c408dfbdfca8bdcd0624f86d2d86734c0d90
--- /dev/null
+++ b/lib/Magento/App/Filesystem.php
@@ -0,0 +1,140 @@
+<?php
+/**
+ * Magento application filesystem facade
+ *
+ * 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;
+
+class Filesystem extends \Magento\Filesystem
+{
+    /**
+     * Custom application dirs
+     */
+    const PARAM_APP_DIRS = 'app_dirs';
+
+    /**
+     * Code base root
+     */
+    const ROOT_DIR = 'base';
+
+    /**
+     * Most of entire application
+     */
+    const APP_DIR = 'app';
+
+    /**
+     * Modules
+     */
+    const MODULES_DIR = 'code';
+
+    /**
+     * Themes
+     */
+    const THEMES_DIR = 'design';
+
+    /**
+     * Initial configuration of the application
+     */
+    const CONFIG_DIR = 'etc';
+
+    /**
+     * Libraries or third-party components
+     */
+    const LIB_DIR = 'lib';
+
+    /**
+     * Files with translation of system labels and messages from en_US to other languages
+     */
+    const LOCALE_DIR = 'i18n';
+
+    /**
+     * \Directory within document root of a web-server to access static view files publicly
+     */
+    const PUB_DIR = 'pub';
+
+    /**
+     * Libraries/components that need to be accessible publicly through web-server (such as various DHTML components)
+     */
+    const PUB_LIB_DIR = 'pub_lib';
+
+    /**
+     * Storage of files entered or generated by the end-user
+     */
+    const MEDIA_DIR = 'media';
+
+    /**
+     * Storage of static view files that are needed on HTML-pages, emails or similar content
+     */
+    const STATIC_VIEW_DIR = 'static';
+
+    /**
+     * Public view files, stored to avoid repetitive run-time calculation, and can be re-generated any time
+     */
+    const PUB_VIEW_CACHE_DIR = 'view_cache';
+
+    /**
+     * Various files generated by the system in runtime
+     */
+    const VAR_DIR = 'var';
+
+    /**
+     * Temporary files
+     */
+    const TMP_DIR = 'tmp';
+
+    /**
+     * File system caching directory (if file system caching is used)
+     */
+    const CACHE_DIR = 'cache';
+
+    /**
+     * Logs of system messages and errors
+     */
+    const LOG_DIR = 'log';
+
+    /**
+     * File system session directory (if file system session storage is used)
+     */
+    const SESSION_DIR = 'session';
+
+    /**
+     * Dependency injection related file directory
+     *
+     */
+    const DI_DIR = 'di';
+
+    /**
+     * Relative directory key for generated code
+     */
+    const GENERATION_DIR = 'generation';
+
+    /**
+     * Temporary directory for uploading files by end-user
+     */
+    const UPLOAD_DIR = 'upload';
+
+    /**
+     * System base temporary folder
+     */
+    const SYS_TMP_DIR = 'sys_tmp';
+}
diff --git a/lib/Magento/App/Filesystem/DirectoryList.php b/lib/Magento/App/Filesystem/DirectoryList.php
new file mode 100644
index 0000000000000000000000000000000000000000..b5d69b66193fa640c6124f41fa0a7874217bbbc1
--- /dev/null
+++ b/lib/Magento/App/Filesystem/DirectoryList.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\App\Filesystem;
+
+use Magento\App\Filesystem;
+
+/**
+ * Class DirectoryList
+ * @package Magento\App\Filesystem
+ */
+class DirectoryList extends \Magento\Filesystem\DirectoryList
+{
+    /**
+     * Directories configurations
+     *
+     * @var array
+     */
+    protected $directories = array(
+        Filesystem::ROOT_DIR => array(
+            'path' => ''
+        ),
+        Filesystem::APP_DIR => array(
+            'path' => 'app'
+        ),
+        Filesystem::MODULES_DIR => array(
+            'path' => 'app/code'
+        ),
+        Filesystem::CONFIG_DIR => array(
+            'path' => 'app/etc'
+        ),
+        Filesystem::LIB_DIR => array(
+            'path' => 'lib'
+        ),
+        Filesystem::VAR_DIR => array(
+            'path'              => 'var',
+            'read_only'         => false,
+            'allow_create_dirs' => true,
+            'permissions'       => 0777
+        ),
+        Filesystem::CACHE_DIR => array(
+            'path'              => 'var/cache',
+            'read_only'         => false,
+            'allow_create_dirs' => true,
+            'permissions'       => 0777
+        ),
+        Filesystem::LOG_DIR => array(
+            'path'              => 'var/log',
+            'read_only'         => false,
+            'allow_create_dirs' => true,
+            'permissions'       => 0777
+        ),
+        Filesystem::DI_DIR => array(
+            'path' => 'var/di'
+        ),
+        Filesystem::GENERATION_DIR => array(
+            'path' => 'var/generation'
+        ),
+        Filesystem::HTTP => array(
+            'path' => ''
+        ),
+        Filesystem::LOCALE_DIR => array(
+            'path' => ''
+        ),
+        Filesystem::SYS_TMP_DIR => array(
+            'path'              => '',
+            'read_only'         => false,
+            'allow_create_dirs' => true,
+            'permissions'       => 0777
+        ),
+        Filesystem::SESSION_DIR => array(
+            'path'              => 'var/session',
+            'read_only'         => false,
+            'allow_create_dirs' => true,
+            'permissions'       => 0777
+        )
+    );
+
+    /**
+     * @param string $root
+     * @param array $directories
+     */
+    public function __construct($root, array $directories = array())
+    {
+        $this->directories[Filesystem::SYS_TMP_DIR]['path'] = sys_get_temp_dir();
+        parent::__construct($root, $directories);
+    }
+}
diff --git a/lib/Magento/Filesystem/DirectoryList/Configuration.php b/lib/Magento/App/Filesystem/DirectoryList/Configuration.php
similarity index 92%
rename from lib/Magento/Filesystem/DirectoryList/Configuration.php
rename to lib/Magento/App/Filesystem/DirectoryList/Configuration.php
index ef74e92f97f010f97b09ebe588c3c352678f0572..10ab31caaa7d8b5a6fcf1dcdfa0787c3ed536213 100644
--- a/lib/Magento/Filesystem/DirectoryList/Configuration.php
+++ b/lib/Magento/App/Filesystem/DirectoryList/Configuration.php
@@ -22,10 +22,15 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Filesystem\DirectoryList;
+namespace Magento\App\Filesystem\DirectoryList;
 
-use Magento\Filesystem\DirectoryList;
+use Magento\App\Filesystem,
+    Magento\Filesystem\DirectoryList;
 
+/**
+ * Class Configuration
+ * @package Magento\App\Filesystem\DirectoryList
+ */
 class Configuration
 {
     /**
diff --git a/lib/Magento/Filesystem/DirectoryList/Verification.php b/lib/Magento/App/Filesystem/DirectoryList/Verification.php
similarity index 86%
rename from lib/Magento/Filesystem/DirectoryList/Verification.php
rename to lib/Magento/App/Filesystem/DirectoryList/Verification.php
index 21811df0dcf6b3ad84168c5ffdfe8787ad796fba..4ceae682f96cc1f50c843e2df94151fca834078e 100644
--- a/lib/Magento/Filesystem/DirectoryList/Verification.php
+++ b/lib/Magento/App/Filesystem/DirectoryList/Verification.php
@@ -23,11 +23,11 @@
  * @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\Filesystem\DirectoryList;
+namespace Magento\App\Filesystem\DirectoryList;
 
 use Magento\App\State,
-    Magento\Filesystem,
-    Magento\Filesystem\FilesystemException;
+    Magento\Filesystem\FilesystemException,
+    Magento\App\Filesystem;
 
 class Verification
 {
@@ -37,12 +37,9 @@ class Verification
      * @var array
      */
     protected static $productionDirs = array(
-        Filesystem::MEDIA,
-        Filesystem::VAR_DIR,
-        Filesystem::TMP,
-        Filesystem::CACHE,
-        Filesystem::LOG,
-        Filesystem::SESSION,
+        Filesystem::SESSION_DIR,
+        Filesystem::CACHE_DIR,
+        Filesystem::LOG_DIR,
     );
 
     /**
@@ -51,17 +48,13 @@ class Verification
      * @var array
      */
     protected static $nonProductionDirs = array(
-        Filesystem::MEDIA,
-        Filesystem::STATIC_VIEW,
-        Filesystem::VAR_DIR,
-        Filesystem::TMP,
-        Filesystem::CACHE,
-        Filesystem::LOG,
-        Filesystem::SESSION,
+        Filesystem::SESSION_DIR,
+        Filesystem::CACHE_DIR,
+        Filesystem::LOG_DIR,
     );
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -78,7 +71,8 @@ class Verification
      * @param Filesystem $filesystem
      * @param State $appState
      */
-    public function __construct(Filesystem $filesystem, State $appState) {
+    public function __construct(Filesystem $filesystem, State $appState)
+    {
         $this->filesystem = $filesystem;
         $this->dirsToVerify = $this->_getDirsToVerify($appState);
     }
diff --git a/lib/Magento/App/FrontController.php b/lib/Magento/App/FrontController.php
index bfd7aab5a600e446008926d376d4f3c6ef07b890..2104418dd767f0ff560a524061bec4d85ddedab5 100644
--- a/lib/Magento/App/FrontController.php
+++ b/lib/Magento/App/FrontController.php
@@ -73,6 +73,8 @@ class FrontController implements FrontControllerInterface
         if ($routingCycleCounter > 100) {
             throw new \LogicException('Front controller reached 100 router match iterations');
         }
+        $response->setHeader('cache-control', 'no-store, no-cache, must-revalidate, max-age=0', true);
+        $response->setHeader('pragma', 'no-cache', true);
         return $response;
     }
 }
diff --git a/lib/Magento/App/Http.php b/lib/Magento/App/Http.php
index 2e5e9c87e46130ab2d7dad7f75cc5fb68d2dfb21..e1be703a08d8c2987444dc97249e2f8dfe342cfc 100644
--- a/lib/Magento/App/Http.php
+++ b/lib/Magento/App/Http.php
@@ -25,10 +25,12 @@
  */
 namespace Magento\App;
 
-use Magento\Config\Scope,
-    Magento\App\ObjectManager\ConfigLoader,
+use Magento\App\ObjectManager\ConfigLoader,
     Magento\Event;
 
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class Http implements \Magento\AppInterface
 {
     /**
@@ -47,15 +49,10 @@ class Http implements \Magento\AppInterface
     protected $_areaList;
 
     /**
-     * @var RequestInterface
+     * @var Request\Http
      */
     protected $_request;
 
-    /**
-     * @var \Magento\Config\Scope
-     */
-    protected $_configScope;
-
     /**
      * @var ConfigLoader
      */
@@ -67,42 +64,49 @@ class Http implements \Magento\AppInterface
     protected $_state;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
+    /**
+     * @var Response\Http
+     */
+    protected $_response;
+
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param Event\Manager $eventManager
      * @param AreaList $areaList
-     * @param RequestInterface $request
-     * @param Scope $configScope
+     * @param Request\Http $request
+     * @param Response\Http $response
      * @param ConfigLoader $configLoader
      * @param State $state
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
         Event\Manager $eventManager,
         AreaList $areaList,
-        RequestInterface $request,
-        Scope $configScope,
+        \Magento\App\Request\Http $request,
+        \Magento\App\Response\Http $response,
         ConfigLoader $configLoader,
         State $state,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_objectManager = $objectManager;
         $this->_eventManager = $eventManager;
         $this->_areaList = $areaList;
         $this->_request = $request;
-        $this->_configScope = $configScope;
+        $this->_response = $response;
         $this->_configLoader = $configLoader;
         $this->_state = $state;
         $this->_filesystem = $filesystem;
     }
 
     /**
-     * Execute application
+     * Run application
+     *
+     * @return ResponseInterface
      */
     public function execute()
     {
@@ -110,24 +114,20 @@ class Http implements \Magento\AppInterface
             $areaCode = $this->_areaList->getCodeByFrontName($this->_request->getFrontName());
             $this->_state->setAreaCode($areaCode);
             $this->_objectManager->configure($this->_configLoader->load($areaCode));
-            $response = $this->_objectManager->get('Magento\App\FrontControllerInterface')->dispatch($this->_request);
+            $this->_response = $this->_objectManager
+                ->get('Magento\App\FrontControllerInterface')
+                ->dispatch($this->_request);
             // This event gives possibility to launch something before sending output (allow cookie setting)
-            $eventParams = array('request' => $this->_request, 'response' => $response);
+            $eventParams = array('request' => $this->_request, 'response' => $this->_response);
             $this->_eventManager->dispatch('controller_front_send_response_before', $eventParams);
-            \Magento\Profiler::start('send_response');
-            $response->sendResponse();
-            \Magento\Profiler::stop('send_response');
-            $this->_eventManager->dispatch('controller_front_send_response_after', $eventParams);
-            return 0;
-        } catch(\Exception $exception) {
-            echo $exception->getMessage() . "\n";
+        } catch (\Exception $exception) {
+            $message = $exception->getMessage() . "\n";
             try {
                 if ($this->_state->getMode() == State::MODE_DEVELOPER) {
-                    header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
-                    print '<pre>';
-                    print $exception->getMessage() . "\n\n";
-                    print $exception->getTraceAsString();
-                    print '</pre>';
+                    $message .= '<pre>';
+                    $message .= $exception->getMessage() . "\n\n";
+                    $message .= $exception->getTraceAsString();
+                    $message .= '</pre>';
                 } else {
                     $reportData = array($exception->getMessage(), $exception->getTraceAsString());
                     // retrieve server data
@@ -139,14 +139,17 @@ class Http implements \Magento\AppInterface
                             $reportData['script_name'] = $_SERVER['SCRIPT_NAME'];
                         }
                     }
-                    require_once ($this->_filesystem->getPath(\Magento\Filesystem::PUB) . '/errors/report.php');
+                    require_once($this->_filesystem->getPath(\Magento\App\Filesystem::PUB_DIR) . '/errors/report.php');
+                    $processor = new \Error_Processor($this->_response);
+                    $processor->saveReport($reportData);
+                    $this->_response = $processor->processReport();
                 }
             } catch (\Exception $exception) {
-                $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP 1.1';
-                header($protocol . ' 500 Internal Server Error', true, 500);
-                print "Unknown error happened.";
+                $message .= "Unknown error happened.";
             }
-            return -1;
+            $this->_response->setHttpResponseCode(500);
+            $this->_response->setBody($message);
         }
+        return $this->_response;
     }
 }
diff --git a/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php b/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
index 7afe8ed2e3bbd55bc8f9b033a66cff4d51091296..e3f7c36b74ab4b327278723a2ff00d3e5bc9f1d5 100644
--- a/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
+++ b/lib/Magento/App/ObjectManager/ConfigLoader/Primary.php
@@ -35,16 +35,16 @@ class Primary
     protected $_appMode;
 
     /**
-     * @var \Magento\Filesystem\DirectoryList
+     * @var \Magento\App\Filesystem\DirectoryList
      */
     protected $_directoryList;
 
     /**
-     * @param string $configDirectoryPath
+     * @param \Magento\App\Filesystem\DirectoryList $directoryList
      * @param string $appMode
      */
     public function __construct(
-        \Magento\Filesystem\DirectoryList $directoryList,
+        \Magento\App\Filesystem\DirectoryList $directoryList,
         $appMode = \Magento\App\State::MODE_DEFAULT
     ) {
         $this->_directoryList = $directoryList;
@@ -60,7 +60,7 @@ class Primary
     {
         $reader = new \Magento\ObjectManager\Config\Reader\Dom(
             new \Magento\App\Config\FileResolver\Primary(
-                new \Magento\Filesystem(
+                new \Magento\App\Filesystem(
                     $this->_directoryList,
                     new \Magento\Filesystem\Directory\ReadFactory(),
                     new \Magento\Filesystem\Directory\WriteFactory()
diff --git a/lib/Magento/App/ObjectManagerFactory.php b/lib/Magento/App/ObjectManagerFactory.php
index be3d3d2ad544a297de7871d7e1617d083d53929f..336e9d9981a5197fa48ef24f74084578953a9d3e 100644
--- a/lib/Magento/App/ObjectManagerFactory.php
+++ b/lib/Magento/App/ObjectManagerFactory.php
@@ -28,7 +28,7 @@ namespace Magento\App;
 
 use Magento\App\Config,
     Magento\Profiler,
-    Magento\Filesystem;
+    Magento\App\Filesystem;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -64,19 +64,19 @@ class ObjectManagerFactory
      */
     public function create($rootDir, array $arguments)
     {
-        $directories = new \Magento\Filesystem\DirectoryList(
-            $rootDir,
-            isset($arguments[\Magento\Filesystem::PARAM_APP_DIRS])
-                ? $arguments[\Magento\Filesystem::PARAM_APP_DIRS]
-                : array()
-        );
+        $directories = isset($arguments[\Magento\App\Filesystem::PARAM_APP_DIRS])
+            ? $arguments[\Magento\App\Filesystem::PARAM_APP_DIRS]
+            : array();
+        $directoryList = new \Magento\App\Filesystem\DirectoryList($rootDir, $directories);
 
-        \Magento\Autoload\IncludePath::addIncludePath(array($directories->getDir(\Magento\Filesystem::GENERATION)));
+        \Magento\Autoload\IncludePath::addIncludePath(
+            array($directoryList->getDir(\Magento\App\Filesystem::GENERATION_DIR))
+        );
 
         $options = new Config(
             $arguments,
             new Config\Loader(
-                $directories,
+                $directoryList,
                 isset($arguments[Config\Loader::PARAM_CUSTOM_FILE])
                     ? $arguments[Config\Loader::PARAM_CUSTOM_FILE]
                     : null
@@ -85,8 +85,8 @@ class ObjectManagerFactory
 
         $definitionFactory = new \Magento\ObjectManager\DefinitionFactory(
             new \Magento\Filesystem\Driver\File(),
-            $directories->getDir(\Magento\Filesystem::DI),
-            $directories->getDir(\Magento\Filesystem::GENERATION),
+            $directoryList->getDir(\Magento\App\Filesystem::DI_DIR),
+            $directoryList->getDir(\Magento\App\Filesystem::GENERATION_DIR),
             $options->get('definition.format', 'serialized')
         );
 
@@ -97,7 +97,7 @@ class ObjectManagerFactory
         $diConfig = new $configClass($relations, $definitions);
         $appMode = $options->get(State::PARAM_MODE, State::MODE_DEFAULT);
 
-        $configData = $this->_loadPrimaryConfig($directories, $appMode);
+        $configData = $this->_loadPrimaryConfig($directoryList, $appMode);
 
         if ($configData) {
             $diConfig->extend($configData);
@@ -106,28 +106,29 @@ class ObjectManagerFactory
         $factory = new \Magento\ObjectManager\Factory\Factory($diConfig, null, $definitions, $options->get());
 
         $className = $this->_locatorClassName;
-        /** @var \Magento\ObjectManager $locator */
-        $locator = new $className($factory, $diConfig, array(
+        /** @var \Magento\ObjectManager $objectManager */
+        $objectManager = new $className($factory, $diConfig, array(
             'Magento\App\Config' => $options,
-            'Magento\Filesystem\DirectoryList' => $directories
+            'Magento\App\Filesystem\DirectoryList' => $directoryList,
+            'Magento\Filesystem\DirectoryList' => $directoryList
         ));
 
-        \Magento\App\ObjectManager::setInstance($locator);
+        \Magento\App\ObjectManager::setInstance($objectManager);
 
-        /** @var \Magento\Filesystem\DirectoryList\Verification $verification */
-        $verification = $locator->get('Magento\Filesystem\DirectoryList\Verification');
+        /** @var \Magento\App\Filesystem\DirectoryList\Verification $verification */
+        $verification = $objectManager->get('Magento\App\Filesystem\DirectoryList\Verification');
         $verification->createAndVerifyDirectories();
 
-        $diConfig->setCache($locator->get('Magento\App\ObjectManager\ConfigCache'));
-        $locator->configure(
-            $locator->get('Magento\App\ObjectManager\ConfigLoader')->load('global')
+        $diConfig->setCache($objectManager->get('Magento\App\ObjectManager\ConfigCache'));
+        $objectManager->configure(
+            $objectManager->get('Magento\App\ObjectManager\ConfigLoader')->load('global')
         );
-        $locator->get('Magento\Config\ScopeInterface')->setCurrentScope('global');
-        $locator->get('Magento\App\Resource')->setCache($locator->get('Magento\App\CacheInterface'));
+        $objectManager->get('Magento\Config\ScopeInterface')->setCurrentScope('global');
+        $objectManager->get('Magento\App\Resource')->setCache($objectManager->get('Magento\App\CacheInterface'));
 
         $relations = $definitionFactory->createRelations();
 
-        $interceptionConfig = $locator->create('Magento\Interception\Config\Config', array(
+        $interceptionConfig = $objectManager->create('Magento\Interception\Config\Config', array(
             'relations' => $relations,
             'omConfig' => $diConfig,
             'classDefinitions' => $definitions instanceof \Magento\ObjectManager\Definition\Compiled
@@ -135,19 +136,28 @@ class ObjectManagerFactory
                 : null,
         ));
 
-        $pluginList = $this->_createPluginList($locator, $relations, $definitionFactory, $diConfig, $definitions);
+        $pluginList = $this->_createPluginList($objectManager, $relations, $definitionFactory, $diConfig, $definitions);
 
-        $factory = $locator->create('Magento\Interception\FactoryDecorator', array(
+        $factory = $objectManager->create('Magento\Interception\FactoryDecorator', array(
             'factory' => $factory,
             'config' => $interceptionConfig,
             'pluginList' => $pluginList
         ));
-        $locator->setFactory($factory);
+        $objectManager->setFactory($factory);
 
-        $directoryListConfig = $locator->get('Magento\Filesystem\DirectoryList\Configuration');
-        $directoryListConfig->configure($directories);
+        $this->configureDirectories($objectManager);
+
+        return $objectManager;
+    }
 
-        return $locator;
+    /**
+     * @param \Magento\ObjectManager $objectManager
+     */
+    protected function configureDirectories(\Magento\ObjectManager $objectManager)
+    {
+        $directoryList = $objectManager->get('Magento\App\Filesystem\DirectoryList');
+        $directoryListConfig = $objectManager->get('Magento\App\Filesystem\DirectoryList\Configuration');
+        $directoryListConfig->configure($directoryList);
     }
 
     /**
@@ -173,7 +183,7 @@ class ObjectManagerFactory
     /**
      * Crete plugin list object
      *
-     * @param \Magento\ObjectManager $locator
+     * @param \Magento\ObjectManager $objectManager
      * @param \Magento\ObjectManager\Relations $relations
      * @param \Magento\ObjectManager\DefinitionFactory $definitionFactory
      * @param \Magento\ObjectManager\Config\Config $diConfig
@@ -181,13 +191,13 @@ class ObjectManagerFactory
      * @return \Magento\Interception\PluginList\PluginList
      */
     protected function _createPluginList(
-        \Magento\ObjectManager $locator,
+        \Magento\ObjectManager $objectManager,
         \Magento\ObjectManager\Relations $relations,
         \Magento\ObjectManager\DefinitionFactory $definitionFactory,
         \Magento\ObjectManager\Config\Config $diConfig,
         \Magento\ObjectManager\Definition $definitions
     ) {
-        return $locator->create('Magento\Interception\PluginList\PluginList', array(
+        return $objectManager->create('Magento\Interception\PluginList\PluginList', array(
             'relations' => $relations,
             'definitions' => $definitionFactory->createPluginDefinition(),
             'omConfig' => $diConfig,
@@ -196,4 +206,4 @@ class ObjectManagerFactory
                     : null,
         ));
     }
-}
\ No newline at end of file
+}
diff --git a/lib/Magento/App/Response/Http/FileFactory.php b/lib/Magento/App/Response/Http/FileFactory.php
index f48a1538713ccaeb9de06e4c8aaa50c76ec64fac..4cc9bf0ef15792634c7d01c1af4acd4fce6cbda9 100644
--- a/lib/Magento/App/Response/Http/FileFactory.php
+++ b/lib/Magento/App/Response/Http/FileFactory.php
@@ -33,17 +33,17 @@ class FileFactory
     protected $_response;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\App\ResponseInterface $response
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\App\ResponseInterface $response,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_response = $response;
         $this->_filesystem = $filesystem;
@@ -69,7 +69,7 @@ class FileFactory
     public function create(
         $fileName,
         $content,
-        $baseDir = \Magento\Filesystem::ROOT,
+        $baseDir = \Magento\App\Filesystem::ROOT_DIR,
         $contentType = 'application/octet-stream',
         $contentLength = null
     ) {
diff --git a/lib/Magento/AppInterface.php b/lib/Magento/AppInterface.php
index d9f01793f154e400bd0a3d28ff9d198aad62d2f2..4917d90d3bf56dd308c3a4280bf925c83b6dd4c6 100644
--- a/lib/Magento/AppInterface.php
+++ b/lib/Magento/AppInterface.php
@@ -28,7 +28,7 @@ namespace Magento;
 interface AppInterface
 {
     /**
-     * @return int
+     * @return \Magento\App\ResponseInterface
      */
     public function execute();
 } 
\ No newline at end of file
diff --git a/lib/Magento/Backup/Snapshot.php b/lib/Magento/Backup/Snapshot.php
index a7aa03205454e037234283b483d9ee15093559cb..839b2160c6ea78d8cf5df54c2b114cb7f16ff92d 100644
--- a/lib/Magento/Backup/Snapshot.php
+++ b/lib/Magento/Backup/Snapshot.php
@@ -45,7 +45,7 @@ class Snapshot extends \Magento\Backup\Filesystem
     /**
      * Filesystem facade
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -55,11 +55,11 @@ class Snapshot extends \Magento\Backup\Filesystem
     protected $_backupFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Backup\Factory $backupFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Backup\Factory $backupFactory
     ) {
         $this->_filesystem = $filesystem;
@@ -136,7 +136,7 @@ class Snapshot extends \Magento\Backup\Filesystem
         return $this->_backupFactory->create(\Magento\Backup\Factory::TYPE_DB)
             ->setBackupExtension('gz')
             ->setTime($this->getTime())
-            ->setBackupsDir($this->_filesystem->getPath(\Magento\Filesystem::VAR_DIR))
+            ->setBackupsDir($this->_filesystem->getPath(\Magento\App\Filesystem::VAR_DIR))
             ->setResourceModel($this->getResourceModel());
     }
 
diff --git a/lib/Magento/Code/Generator.php b/lib/Magento/Code/Generator.php
index 874b5d45854ba5605e37f7207f3e427001bc92c0..232b3f2cf46d50706a3158b42b4466cfa045337a 100644
--- a/lib/Magento/Code/Generator.php
+++ b/lib/Magento/Code/Generator.php
@@ -60,13 +60,13 @@ class Generator
      * @param Generator\EntityAbstract $generator
      * @param \Magento\Autoload\IncludePath $autoloader
      * @param Generator\Io $ioObject
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Code\Generator\EntityAbstract $generator = null,
         \Magento\Autoload\IncludePath $autoloader = null,
         \Magento\Code\Generator\Io $ioObject = null,
-        \Magento\Filesystem $filesystem = null
+        \Magento\App\Filesystem $filesystem = null
     ) {
         //todo: remove $filesystem from constructor
         $this->_generator   = $generator;
diff --git a/lib/Magento/Code/Minifier.php b/lib/Magento/Code/Minifier.php
index c6f806e1e1781481611ff195e84f94625882fea2..d8952e980129b72ec586a44beb863b76657c88d8 100644
--- a/lib/Magento/Code/Minifier.php
+++ b/lib/Magento/Code/Minifier.php
@@ -50,17 +50,17 @@ class Minifier
 
     /**
      * @param \Magento\Code\Minifier\StrategyInterface $strategy
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $directoryName
      */
     public function __construct(
         \Magento\Code\Minifier\StrategyInterface $strategy,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $directoryName
     ) {
         $this->_strategy = $strategy;
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
-        $this->pubViewCacheDir = $filesystem->getDirectoryRead(\Magento\Filesystem::PUB_VIEW_CACHE);
+        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
+        $this->pubViewCacheDir = $filesystem->getDirectoryRead(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR);
         $this->directoryName = $directoryName;
     }
 
diff --git a/lib/Magento/Code/Minifier/Strategy/Generate.php b/lib/Magento/Code/Minifier/Strategy/Generate.php
index 06fbac88270c27698a37aeab166c11921d09b318..1529cdc461ad95e2a421d6217a6401d695876aa1 100644
--- a/lib/Magento/Code/Minifier/Strategy/Generate.php
+++ b/lib/Magento/Code/Minifier/Strategy/Generate.php
@@ -49,15 +49,15 @@ class Generate implements \Magento\Code\Minifier\StrategyInterface
 
     /**
      * @param \Magento\Code\Minifier\AdapterInterface $adapter
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Code\Minifier\AdapterInterface $adapter,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->adapter = $adapter;
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
-        $this->pubViewCacheDir = $filesystem->getDirectoryWrite(\Magento\Filesystem::PUB_VIEW_CACHE);
+        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
+        $this->pubViewCacheDir = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR);
     }
 
     /**
diff --git a/lib/Magento/Code/Minifier/Strategy/Lite.php b/lib/Magento/Code/Minifier/Strategy/Lite.php
index be1fa9a9ab2805d1ba39803933fd54fb44c9fdd3..6cbc0064ab9f075eca3aa3cf0377dbaca8d246ad 100644
--- a/lib/Magento/Code/Minifier/Strategy/Lite.php
+++ b/lib/Magento/Code/Minifier/Strategy/Lite.php
@@ -52,15 +52,15 @@ class Lite implements \Magento\Code\Minifier\StrategyInterface
 
     /**
      * @param \Magento\Code\Minifier\AdapterInterface $adapter
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Code\Minifier\AdapterInterface $adapter,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->adapter = $adapter;
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
-        $this->pubViewCacheDir = $filesystem->getDirectoryWrite(\Magento\Filesystem::PUB_VIEW_CACHE);
+        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
+        $this->pubViewCacheDir = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR);
     }
 
     /**
diff --git a/lib/Magento/DB/Adapter/Pdo/Mysql.php b/lib/Magento/DB/Adapter/Pdo/Mysql.php
index e31c0846b1b16fa42d874d73142b1f4d75f9c615..7a1fd5b68ea7f01e0bb1b84cba6e285a784c5976 100644
--- a/lib/Magento/DB/Adapter/Pdo/Mysql.php
+++ b/lib/Magento/DB/Adapter/Pdo/Mysql.php
@@ -143,7 +143,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
     /**
      * Filesystem class
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -228,13 +228,13 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
     protected $dateTime;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      * @param \Magento\Stdlib\DateTime $dateTime
      * @param array $config
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Stdlib\String $string,
         \Magento\Stdlib\DateTime $dateTime,
         array $config = array()
@@ -1419,7 +1419,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements \Magento\DB\Adapter\Ad
     {
         $str = '## ' . date('Y-m-d H:i:s') . "\r\n" . $str;
 
-        $stream = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT)->openFile($this->_debugFile, 'a');
+        $stream = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR)->openFile($this->_debugFile, 'a');
         $stream->lock();
         $stream->write($str);
         $stream->unlock();
diff --git a/lib/Magento/Data/Form/Element/AbstractElement.php b/lib/Magento/Data/Form/Element/AbstractElement.php
index 44fd432d17cc7ce85e658cf9efb33ba46e2ca270..ee560a7f4521df3eed7c0de5645643db691ae3c4 100644
--- a/lib/Magento/Data/Form/Element/AbstractElement.php
+++ b/lib/Magento/Data/Form/Element/AbstractElement.php
@@ -55,6 +55,13 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
      */
     protected $_escaper;
 
+    /**
+     * Lock html attribute
+     *
+     * @var string
+     */
+    private $lockHtmlAttribute = 'data-locked';
+
     /**
      * @param \Magento\Data\Form\Element\Factory $factoryElement
      * @param \Magento\Data\Form\Element\CollectionFactory $factoryCollection
@@ -317,6 +324,9 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
 
     public function serialize($attributes = array(), $valueSeparator='=', $fieldSeparator=' ', $quote='"')
     {
+        if ($this->isLocked() && !empty($attributes)) {
+            $attributes[] = $this->lockHtmlAttribute;
+        }
         if (in_array('disabled', $attributes) && !empty($this->_data['disabled'])) {
             $this->_data['disabled'] = 'disabled';
         } else {
@@ -378,4 +388,22 @@ abstract class AbstractElement extends \Magento\Data\Form\AbstractForm
 
         return $this;
     }
+
+    /**
+     * Lock element
+     */
+    public function lock()
+    {
+        $this->setData($this->lockHtmlAttribute, 1);
+    }
+
+    /**
+     * Is element locked
+     *
+     * @return bool
+     */
+    public function isLocked()
+    {
+        return $this->getData($this->lockHtmlAttribute) == 1;
+    }
 }
diff --git a/lib/Magento/Filesystem.php b/lib/Magento/Filesystem.php
index 22e1428128b12f048b79bac059217a97d3558de3..7633443a2cc9f2d2afbb7969c543749b13bda5cb 100644
--- a/lib/Magento/Filesystem.php
+++ b/lib/Magento/Filesystem.php
@@ -53,117 +53,6 @@ class Filesystem
     const HTTPS = 'https';
     /**#@-*/
 
-    /**
-     * Custom application dirs
-     */
-    const PARAM_APP_DIRS = 'app_dirs';
-
-    /**
-     * Code base root
-     */
-    const ROOT = 'base';
-
-    /**
-     * Most of entire application
-     */
-    const APP = 'app';
-
-    /**
-     * Modules
-     */
-    const MODULES = 'code';
-
-    /**
-     * Themes
-     */
-    const THEMES = 'design';
-
-    /**
-     * Initial configuration of the application
-     */
-    const CONFIG = 'etc';
-
-    /**
-     * Libraries or third-party components
-     */
-    const LIB = 'lib';
-
-    /**
-     * Files with translation of system labels and messages from en_US to other languages
-     */
-    const LOCALE = 'i18n';
-
-    /**
-     * \Directory within document root of a web-server to access static view files publicly
-     */
-    const PUB = 'pub';
-
-    /**
-     * Libraries/components that need to be accessible publicly through web-server (such as various DHTML components)
-     */
-    const PUB_LIB = 'pub_lib';
-
-    /**
-     * Storage of files entered or generated by the end-user
-     */
-    const MEDIA = 'media';
-
-    /**
-     * Storage of static view files that are needed on HTML-pages, emails or similar content
-     */
-    const STATIC_VIEW = 'static';
-
-    /**
-     * Public view files, stored to avoid repetitive run-time calculation, and can be re-generated any time
-     */
-    const PUB_VIEW_CACHE = 'view_cache';
-
-    /**
-     * Various files generated by the system in runtime
-     */
-    const VAR_DIR = 'var';
-
-    /**
-     * Temporary files
-     */
-    const TMP = 'tmp';
-
-    /**
-     * File system caching directory (if file system caching is used)
-     */
-    const CACHE = 'cache';
-
-    /**
-     * Logs of system messages and errors
-     */
-    const LOG = 'log';
-
-    /**
-     * File system session directory (if file system session storage is used)
-     */
-    const SESSION = 'session';
-
-    /**
-     * Dependency injection related file directory
-     *
-     */
-    const DI = 'di';
-
-    /**
-     * Relative directory key for generated code
-     */
-    const GENERATION = 'generation';
-
-    /**
-     * Temporary directory for uploading files by end-user
-     */
-    const UPLOAD = 'upload';
-
-    /**
-     * System base temporary folder
-     */
-    const SYS_TMP = 'sys_tmp';
-
     /**
      * @var \Magento\Filesystem\DirectoryList
      */
@@ -289,28 +178,27 @@ class Filesystem
     }
 
     /**
-     * Retrieve absolute path for for given code
+     * Retrieve uri for given code
      *
      * @param string $code
      * @return string
      */
-    public function getPath($code = self::ROOT)
+    public function getUri($code)
     {
         $config = $this->directoryList->getConfig($code);
-        $path = isset($config['path']) ? $config['path'] : '';
-        return str_replace('\\', '/', $path);
+        return isset($config['uri']) ? $config['uri'] : '';
     }
 
     /**
-     * Retrieve uri for given code
+     * Retrieve absolute path for for given code
      *
      * @param string $code
      * @return string
      */
-    public function getUri($code)
+    public function getPath($code = '')
     {
         $config = $this->directoryList->getConfig($code);
-        return isset($config['uri']) ? $config['uri'] : '';
+        $path = isset($config['path']) ? $config['path'] : '';
+        return str_replace('\\', '/', $path);
     }
-
 }
diff --git a/lib/Magento/Filesystem/Directory/Read.php b/lib/Magento/Filesystem/Directory/Read.php
index a25c94211814365168f0ea98b10e3657f4620c3f..cab5a0265a22cca9b4da4f2f5aa1a477e34e7fb5 100644
--- a/lib/Magento/Filesystem/Directory/Read.php
+++ b/lib/Magento/Filesystem/Directory/Read.php
@@ -260,17 +260,4 @@ class Read implements ReadInterface
     {
         return $this->driver->isDirectory($this->driver->getAbsolutePath($this->path, $path));
     }
-
-    /**
-     * Checks is directory contains path
-     * Utility method.
-     *
-     * @param string $path
-     * @param string $directory
-     * @return bool
-     */
-    public function isPathInDirectory($path, $directory)
-    {
-        return $this->driver->isPathInDirectory($path, $directory);
-    }
 }
diff --git a/lib/Magento/Filesystem/Directory/ReadInterface.php b/lib/Magento/Filesystem/Directory/ReadInterface.php
index 97d30e885e5a9489140850fcffe7c5a2116281ac..0d7d024f9c03a22e31d9f8705d7478596ad39d0e 100644
--- a/lib/Magento/Filesystem/Directory/ReadInterface.php
+++ b/lib/Magento/Filesystem/Directory/ReadInterface.php
@@ -116,13 +116,4 @@ interface ReadInterface
      * @throws \Magento\Filesystem\FilesystemException
      */
     public function readFile($path, $flag = null, $context = null);
-
-    /**
-     * Checks is directory contains path
-     *
-     * @param string $path
-     * @param string $directory
-     * @return bool
-     */
-    public function isPathInDirectory($path, $directory);
 }
diff --git a/lib/Magento/Filesystem/Directory/Write.php b/lib/Magento/Filesystem/Directory/Write.php
index 75141df2a4a88a8f667ca7d5c98fce771d7413d0..7166c67d161ba4ce2cb925dd790b00f576b11a0f 100644
--- a/lib/Magento/Filesystem/Directory/Write.php
+++ b/lib/Magento/Filesystem/Directory/Write.php
@@ -141,13 +141,7 @@ class Write extends Read implements WriteInterface
         }
         $absolutePath = $this->driver->getAbsolutePath($this->path, $path);
         $absoluteNewPath = $targetDirectory->driver->getAbsolutePath($this->path, $newPath);
-        $result = $this->driver->rename($absolutePath, $absoluteNewPath);
-        if (!$result) {
-            throw new FilesystemException(
-                sprintf('The "%s" path cannot be renamed into "%s"', $absolutePath, $absoluteNewPath)
-            );
-        }
-        return $result;
+        return $this->driver->rename($absolutePath, $absoluteNewPath, $targetDirectory->driver);
     }
 
     /**
@@ -170,13 +164,7 @@ class Write extends Read implements WriteInterface
         $absolutePath = $this->driver->getAbsolutePath($this->path, $path);
         $absoluteDestination = $targetDirectory->getAbsolutePath($destination);
 
-        $result = $this->driver->copy($absolutePath, $absoluteDestination);
-        if (!$result) {
-            throw new FilesystemException(
-                sprintf('The "%s" path cannot be renamed into "%s"', $absolutePath, $absoluteDestination)
-            );
-        }
-        return $result;
+        return $this->driver->copy($absolutePath, $absoluteDestination, $targetDirectory->driver);
     }
 
     /**
@@ -273,4 +261,14 @@ class Write extends Read implements WriteInterface
     {
         return $this->openFile($path, $mode, $protocol)->write($content);
     }
+
+    /**
+     * Get driver
+     *
+     * @return \Magento\Filesystem\DriverInterface
+     */
+    public function getDriver()
+    {
+        return $this->driver;
+    }
 }
diff --git a/lib/Magento/Filesystem/Directory/WriteInterface.php b/lib/Magento/Filesystem/Directory/WriteInterface.php
index a12c766a719b9977c1785d73e80f504b3ebe7c3f..2b9787095c26798d3ee724007d0ddaf16d6d2ebc 100644
--- a/lib/Magento/Filesystem/Directory/WriteInterface.php
+++ b/lib/Magento/Filesystem/Directory/WriteInterface.php
@@ -113,4 +113,11 @@ interface WriteInterface extends ReadInterface
      * @throws \Magento\Filesystem\FilesystemException
      */
     public function writeFile($path, $content, $mode = null);
+
+    /**
+     * Get driver
+     *
+     * @return \Magento\Filesystem\DriverInterface
+     */
+    public function getDriver();
 }
\ No newline at end of file
diff --git a/lib/Magento/Filesystem/DirectoryList.php b/lib/Magento/Filesystem/DirectoryList.php
index 81153839f20a57d95127a6cd3d25408970ab39d4..36475275bb49ba53f6d12b4108b6c544ca2baab6 100644
--- a/lib/Magento/Filesystem/DirectoryList.php
+++ b/lib/Magento/Filesystem/DirectoryList.php
@@ -44,29 +44,7 @@ class DirectoryList
      *
      * @var array
      */
-    protected $directories = array(
-        Filesystem::ROOT           => array('path' => ''),
-        Filesystem::APP            => array('path' => 'app'),
-        Filesystem::MODULES        => array('path' => 'app/code'),
-        Filesystem::THEMES         => array('path' => 'app/design'),
-        Filesystem::CONFIG         => array('path' => 'app/etc'),
-        Filesystem::LIB            => array('path' => 'lib'),
-        Filesystem::VAR_DIR        => array('path' => 'var'),
-        Filesystem::TMP            => array('path' => 'var/tmp'),
-        Filesystem::CACHE          => array('path' => 'var/cache'),
-        Filesystem::LOG            => array('path' => 'var/log'),
-        Filesystem::SESSION        => array('path' => 'var/session'),
-        Filesystem::DI             => array('path' => 'var/di'),
-        Filesystem::GENERATION     => array('path' => 'var/generation'),
-        Filesystem::HTTP           => array('path' => null),
-        Filesystem::PUB            => array('path' => 'pub'),
-        Filesystem::PUB_LIB        => array('path' => 'pub/lib'),
-        Filesystem::MEDIA          => array('path' => 'pub/media'),
-        Filesystem::UPLOAD         => array('path' => 'pub/media/upload'),
-        Filesystem::STATIC_VIEW    => array('path' => 'pub/static'),
-        Filesystem::PUB_VIEW_CACHE => array('path' => 'pub/cache'),
-        Filesystem::LOCALE         => array('path' => '')
-    );
+    protected $directories = array();
 
     /**
      * @var array
@@ -81,48 +59,45 @@ class DirectoryList
     {
         $this->root = str_replace('\\', '/', $root);
 
-        foreach ($this->directories as $code => $configuration) {
-            if (!$this->isAbsolute($configuration['path'])) {
-                $this->directories[$code]['path'] = $this->makeAbsolute($configuration['path']);
+        foreach ($this->directories as $code => $directoryConfig) {
+            if (!$this->isAbsolute($directoryConfig['path'])) {
+                $this->directories[$code]['path'] = $this->makeAbsolute($directoryConfig['path']);
             }
         }
 
-        foreach ($directories as $code => $configuration) {
+        foreach ($directories as $code => $directoryConfig) {
             $baseConfiguration = isset($this->directories[$code]) ? $this->directories[$code] : array();
-            $this->directories[$code] = array_merge($baseConfiguration, $configuration);
+            $this->directories[$code] = array_merge($baseConfiguration, $directoryConfig);
 
-            if (isset($configuration['path'])) {
-                $this->setPath($code, $configuration['path']);
+            if (isset($directoryConfig['path'])) {
+                $this->setPath($code, $directoryConfig['path']);
             }
-            if (isset($configuration['uri'])) {
-                $this->setUri($code, $configuration['uri']);
+            if (isset($directoryConfig['uri'])) {
+                $this->setUri($code, $directoryConfig['uri']);
             }
         }
-
-        $this->directories[Filesystem::SYS_TMP] = array(
-            'path'              => sys_get_temp_dir(),
-            'read_only'         => false,
-            'allow_create_dirs' => true,
-            'permissions'       => 0777
-        );
     }
 
     /**
      * Add directory configuration
      *
      * @param string $code
-     * @param array $configuration
+     * @param array $directoryConfig
+     * @throws \Magento\Filesystem\FilesystemException
      */
-    public function addDirectory($code, array $configuration)
+    public function addDirectory($code, array $directoryConfig)
     {
-        if (!isset($configuration['path'])) {
-            $configuration['path'] = null;
+        if (isset($this->directories[$code])) {
+            throw new \Magento\Filesystem\FilesystemException("Configuration for '{$code}' already defined");
+        }
+        if (!isset($directoryConfig['path'])) {
+            $directoryConfig['path'] = null;
         }
-        if (!$this->isAbsolute($configuration['path'])) {
-            $configuration['path'] = $this->makeAbsolute($configuration['path']);
+        if (!$this->isAbsolute($directoryConfig['path'])) {
+            $directoryConfig['path'] = $this->makeAbsolute($directoryConfig['path']);
         }
 
-        $this->directories[$code] = $configuration;
+        $this->directories[$code] = $directoryConfig;
     }
 
     /**
@@ -223,7 +198,7 @@ class DirectoryList
      * @param string $code One of self const
      * @return string|bool
      */
-    public function getDir($code = Filesystem::ROOT)
+    public function getDir($code)
     {
         return isset($this->directories[$code]['path']) ? $this->directories[$code]['path'] : false;
     }
diff --git a/lib/Magento/Filesystem/Driver/File.php b/lib/Magento/Filesystem/Driver/File.php
index 1531793298cffe5475b31b8c2d2a656315607fb4..f9bcee09bfcd24ab16417c8f09de712a5a48dce1 100644
--- a/lib/Magento/Filesystem/Driver/File.php
+++ b/lib/Magento/Filesystem/Driver/File.php
@@ -25,9 +25,10 @@
  */
 namespace Magento\Filesystem\Driver;
 
-use Magento\Filesystem\FilesystemException;
+use Magento\Filesystem\FilesystemException,
+    Magento\Filesystem\DriverInterface;
 
-class File implements \Magento\Filesystem\DriverInterface
+class File implements DriverInterface
 {
     /**
      * @var string
@@ -161,7 +162,7 @@ class File implements \Magento\Filesystem\DriverInterface
     {
         clearstatcache();
         $result = @file_get_contents($this->getScheme() . $path, $flag, $context);
-        if (!$result) {
+        if (false === $result) {
             throw new FilesystemException(
                 sprintf('Cannot read contents from file "%s" %s',
                     $path,
@@ -276,12 +277,22 @@ class File implements \Magento\Filesystem\DriverInterface
      *
      * @param string $oldPath
      * @param string $newPath
+     * @param DriverInterface|null $targetDriver
      * @return bool
      * @throws FilesystemException
      */
-    public function rename($oldPath, $newPath)
+    public function rename($oldPath, $newPath, DriverInterface $targetDriver = null)
     {
-        $result = @rename($this->getScheme() . $oldPath, $newPath);
+        $result = false;
+        $targetDriver = $targetDriver ?: $this;
+        if (get_class($targetDriver) == get_class($this)) {
+            $result = @rename($this->getScheme() . $oldPath, $newPath);
+        } else {
+            $content = $this->fileGetContents($oldPath);
+            if (false !== $targetDriver->filePutContents($newPath, $content)) {
+                $result = $this->deleteFile($newPath);
+            }
+        }
         if (!$result) {
             throw new FilesystemException(
                 sprintf('The "%s" path cannot be renamed into "%s" %s',
@@ -298,12 +309,19 @@ class File implements \Magento\Filesystem\DriverInterface
      *
      * @param string $source
      * @param string $destination
+     * @param DriverInterface|null $targetDriver
      * @return bool
      * @throws FilesystemException
      */
-    public function copy($source, $destination)
+    public function copy($source, $destination, DriverInterface $targetDriver = null)
     {
-        $result = @copy($this->getScheme() . $source, $destination);
+        $targetDriver = $targetDriver ?: $this;
+        if (get_class($targetDriver) == get_class($this)) {
+            $result = @copy($this->getScheme() . $source, $destination);
+        } else {
+            $content = $this->fileGetContents($source);
+            $result = $targetDriver->filePutContents($destination, $content);
+        }
         if (!$result) {
             throw new FilesystemException(
                 sprintf('The file or directory "%s" cannot be copied to "%s" %s',
@@ -466,7 +484,7 @@ class File implements \Magento\Filesystem\DriverInterface
     public function fileReadLine($resource, $length, $ending = null)
     {
         $result = @stream_get_line($resource, $length, $ending);
-        if (!$result) {
+        if (false === $result) {
             throw new FilesystemException(
                 sprintf('File cannot be read %s',
                     $this->getWarningMessage()
@@ -599,7 +617,7 @@ class File implements \Magento\Filesystem\DriverInterface
     public function fileWrite($resource, $data)
     {
         $result = @fwrite($resource, $data);
-        if (!$result) {
+        if (false === $result) {
             throw new FilesystemException(
                 sprintf('Error occurred during execution of fileWrite %s',
                     $this->getWarningMessage()
@@ -740,19 +758,6 @@ class File implements \Magento\Filesystem\DriverInterface
         return $scheme ? $scheme . '://' : '';
     }
 
-    /**
-     * Checks is directory contains path
-     * Utility method.
-     *
-     * @param string $path
-     * @param string $directory
-     * @return bool
-     */
-    public function isPathInDirectory($path, $directory)
-    {
-        return 0 === strpos($this->fixSeparator($path), $this->fixSeparator($directory));
-    }
-
     /**
      * Read directory recursively
      *
@@ -778,4 +783,16 @@ class File implements \Magento\Filesystem\DriverInterface
         }
         return $result;
     }
+
+    /**
+     * Get real path
+     *
+     * @param string $path
+     *
+     * @return string|bool
+     */
+    public function getRealPath($path)
+    {
+        return realpath($path);
+    }
 }
diff --git a/lib/Magento/Filesystem/Driver/Http.php b/lib/Magento/Filesystem/Driver/Http.php
index 63af0dfd004590d4d29a7ea167c48946d12f401a..956fa256d50083d4a20e221d1682d7063d5cf893 100644
--- a/lib/Magento/Filesystem/Driver/Http.php
+++ b/lib/Magento/Filesystem/Driver/Http.php
@@ -103,7 +103,7 @@ class Http extends File
     {
         clearstatcache();
         $result = @file_get_contents($this->getScheme() . $path, $flags, $context);
-        if (!$result) {
+        if (false === $result) {
             throw new FilesystemException(
                 sprintf(
                     'Cannot read contents from file "%s" %s',
diff --git a/lib/Magento/Filesystem/DriverInterface.php b/lib/Magento/Filesystem/DriverInterface.php
index 1a9b2772e1592ff2ef0d4c6e594bb3bf8cb41698..6021751d5d1e5e9cb3a1113d0ace49e5eb6c51d7 100644
--- a/lib/Magento/Filesystem/DriverInterface.php
+++ b/lib/Magento/Filesystem/DriverInterface.php
@@ -146,20 +146,22 @@ interface DriverInterface
      *
      * @param string $oldPath
      * @param string $newPath
+     * @param DriverInterface|null $targetDriver
      * @return bool
      * @throws FilesystemException
      */
-    public function rename($oldPath, $newPath);
+    public function rename($oldPath, $newPath, DriverInterface $targetDriver = null);
 
     /**
      * Copy source into destination
      *
      * @param string $source
      * @param string $destination
+     * @param DriverInterface|null $targetDriver
      * @return bool
      * @throws FilesystemException
      */
-    public function copy($source, $destination);
+    public function copy($source, $destination, DriverInterface $targetDriver = null);
 
     /**
      * Delete file
@@ -350,16 +352,15 @@ interface DriverInterface
     public function getAbsolutePath($basePath, $path, $scheme = null);
 
     /**
-     * @param string $basePath
-     * @param null $path
+     * @param $path
      * @return mixed
      */
-    public function getRelativePath($basePath, $path = null);
+    public function getRealPath($path);
 
     /**
-     * @param $path
-     * @param $directory
+     * @param string $basePath
+     * @param null $path
      * @return mixed
      */
-    public function isPathInDirectory($path, $directory);
+    public function getRelativePath($basePath, $path = null);
 }
diff --git a/lib/Magento/Image/Adapter/AbstractAdapter.php b/lib/Magento/Image/Adapter/AbstractAdapter.php
index 230bc6a55a481d4d4d8307aea1cc474cd439a211..e5cfc35ed483e2f5dc10aef784eaa3a140294fc6 100644
--- a/lib/Magento/Image/Adapter/AbstractAdapter.php
+++ b/lib/Magento/Image/Adapter/AbstractAdapter.php
@@ -80,7 +80,7 @@ abstract class AbstractAdapter implements AdapterInterface
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -141,12 +141,12 @@ abstract class AbstractAdapter implements AdapterInterface
     /**
      * Initialize default values
      *
-     * @param \Magento\Filesystem $filesystem,
+     * @param \Magento\App\Filesystem $filesystem,
      * @param array $data
      */
-    public function __construct(\Magento\Filesystem $filesystem, array $data = array()) {
+    public function __construct(\Magento\App\Filesystem $filesystem, array $data = array()) {
         $this->_filesystem      = $filesystem;
-        $this->directoryWrite   = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $this->directoryWrite   = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
diff --git a/lib/Magento/Logger.php b/lib/Magento/Logger.php
index e40c592fadd5dc876d98885dd3211eddbe04d31a..dc7932ca19daee626573a5b5c630c3033b3b9ee4 100644
--- a/lib/Magento/Logger.php
+++ b/lib/Magento/Logger.php
@@ -42,15 +42,15 @@ class Logger
     protected $_loggers = array();
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $defaultFile
      */
-    public function __construct(\Magento\Filesystem $filesystem, $defaultFile = '')
+    public function __construct(\Magento\App\Filesystem $filesystem, $defaultFile = '')
     {
         $this->_filesystem = $filesystem;
         $this->addStreamLog(self::LOGGER_SYSTEM, $defaultFile)
@@ -72,7 +72,7 @@ class Logger
     {
         $file = $fileOrWrapper ?: "{$loggerKey}.log";
         if (!preg_match('#^[a-z][a-z0-9+.-]*\://#i', $file)) {
-            $logDir = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::LOG);
+            $logDir = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::LOG_DIR);
             $logDir->create();
             $file = $logDir->getAbsolutePath($file);
         }
diff --git a/lib/Magento/Module/Declaration/FileIterator.php b/lib/Magento/Module/Declaration/FileIterator.php
index d8c5fff27e91a2a6eda491926b7b560115385ede..73143c246f07e743ff1bff7109d85285e3bd34d4 100644
--- a/lib/Magento/Module/Declaration/FileIterator.php
+++ b/lib/Magento/Module/Declaration/FileIterator.php
@@ -27,10 +27,10 @@ class FileIterator extends \Magento\Config\FileIterator
 {
 
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         array $paths
     ) {
-        parent::__construct($filesystem->getDirectoryRead(\Magento\Filesystem::APP), $paths);
+        parent::__construct($filesystem->getDirectoryRead(\Magento\App\Filesystem::APP_DIR), $paths);
     }
 
 }
diff --git a/lib/Magento/Module/Declaration/FileResolver.php b/lib/Magento/Module/Declaration/FileResolver.php
index 65f88b5fe514b67c99d39238d1bc3eb58c92490b..9edb5e9470861d1e35766d005ae3b5a250b59f64 100644
--- a/lib/Magento/Module/Declaration/FileResolver.php
+++ b/lib/Magento/Module/Declaration/FileResolver.php
@@ -56,17 +56,17 @@ class FileResolver implements \Magento\Config\FileResolverInterface
     protected $iteratorFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Config\FileIteratorFactory $iteratorFactory
     ) {
         $this->iteratorFactory      = $iteratorFactory;
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::MODULES);
-        $this->configDirectory  = $filesystem->getDirectoryRead(\Magento\Filesystem::CONFIG);
-        $this->rootDirectory     = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::MODULES_DIR);
+        $this->configDirectory  = $filesystem->getDirectoryRead(\Magento\App\Filesystem::CONFIG_DIR);
+        $this->rootDirectory     = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
     }
 
     /**
diff --git a/lib/Magento/Module/Dir.php b/lib/Magento/Module/Dir.php
index 587636e4730114cf1673218804d2ed691e4abcd0..a19bfc0b7a0659e6d675398abf99a51ab061912c 100644
--- a/lib/Magento/Module/Dir.php
+++ b/lib/Magento/Module/Dir.php
@@ -25,7 +25,7 @@
  */
 namespace Magento\Module;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 
 class Dir
 {
@@ -42,12 +42,12 @@ class Dir
     protected $_string;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Stdlib\String $string
      */
     public function __construct(Filesystem $filesystem, \Magento\Stdlib\String $string)
     {
-        $this->_modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES);
+        $this->_modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
         $this->_string = $string;
     }
 
diff --git a/lib/Magento/Module/Dir/Reader.php b/lib/Magento/Module/Dir/Reader.php
index e440219c98d0ca62ec5b1e5e0a83a8cf71bab96a..3f19fe390e53326530e34f9a73bfbe4aeeaaa36a 100644
--- a/lib/Magento/Module/Dir/Reader.php
+++ b/lib/Magento/Module/Dir/Reader.php
@@ -26,7 +26,7 @@
 namespace Magento\Module\Dir;
 
 use Magento\Filesystem\Directory\Read;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 
 class Reader
 {
@@ -57,22 +57,23 @@ class Reader
     protected $modulesDirectory;
 
     protected $fileIteratorFactory;
+
     /**
      * @param \Magento\Module\Dir $moduleDirs
      * @param \Magento\Module\ModuleListInterface $moduleList
      * @param Filesystem $filesystem
-     * @param \Magento\Config\FileIteratorFactory $fileIterator
+     * @param \Magento\Config\FileIteratorFactory $fileIteratorFactory
      */
     public function __construct(
         \Magento\Module\Dir                 $moduleDirs,
         \Magento\Module\ModuleListInterface $moduleList,
-        \Magento\Filesystem                 $filesystem,
+        \Magento\App\Filesystem             $filesystem,
         \Magento\Config\FileIteratorFactory $fileIteratorFactory
     ) {
         $this->moduleDirs           = $moduleDirs;
         $this->modulesList          = $moduleList;
         $this->fileIteratorFactory  = $fileIteratorFactory;
-        $this->modulesDirectory     = $filesystem->getDirectoryRead(Filesystem::MODULES);
+        $this->modulesDirectory     = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
     }
 
     /**
diff --git a/lib/Magento/Object/Copy/Config/SchemaLocator.php b/lib/Magento/Object/Copy/Config/SchemaLocator.php
index 25c0c4b37853eb48a12429c75bef6e348b0215be..3dee553eaf3d31dabad7df1e6852df3e1fef8996 100644
--- a/lib/Magento/Object/Copy/Config/SchemaLocator.php
+++ b/lib/Magento/Object/Copy/Config/SchemaLocator.php
@@ -42,14 +42,14 @@ class SchemaLocator implements \Magento\Config\SchemaLocatorInterface
     protected $_perFileSchema;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param string $schema
      * @param string $perFileSchema
      */
-    public function __construct(\Magento\Filesystem $filesystem, $schema, $perFileSchema)
+    public function __construct(\Magento\App\Filesystem $filesystem, $schema, $perFileSchema)
     {
-        $this->_schema = $filesystem->getPath(\Magento\Filesystem::ROOT) . '/' . $schema;
-        $this->_perFileSchemaschema = $filesystem->getPath(\Magento\Filesystem::ROOT) . '/' . $perFileSchema;
+        $this->_schema = $filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR) . '/' . $schema;
+        $this->_perFileSchemaschema = $filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR) . '/' . $perFileSchema;
     }
 
     /**
diff --git a/lib/Magento/View/Asset/MergeService.php b/lib/Magento/View/Asset/MergeService.php
index 02674f5d281eac63ec6883d19d7f79880cba24c2..8d700a0e819f6aedf0e089b5ca21410568dc8c8e 100644
--- a/lib/Magento/View/Asset/MergeService.php
+++ b/lib/Magento/View/Asset/MergeService.php
@@ -40,7 +40,7 @@ class MergeService
     protected $config;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -52,13 +52,13 @@ class MergeService
     /**
      * @param \Magento\ObjectManager $objectManager
      * @param ConfigInterface $config
-     * @param \Magento\Filesystem $filesystem,
+     * @param \Magento\App\Filesystem $filesystem,
      * @param \Magento\App\State $state
      */
     public function __construct(
         \Magento\ObjectManager $objectManager,
         ConfigInterface $config,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\App\State $state
     ) {
         $this->objectManager = $objectManager;
@@ -106,6 +106,7 @@ class MergeService
      */
     public function cleanMergedJsCss()
     {
-        $this->filesystem->getDirectoryWrite(\Magento\Filesystem::PUB_VIEW_CACHE)->delete(Merged::PUBLIC_MERGE_DIR);
+        $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR)
+            ->delete(Merged::PUBLIC_MERGE_DIR);
     }
 }
diff --git a/lib/Magento/View/Asset/MergeStrategy/Checksum.php b/lib/Magento/View/Asset/MergeStrategy/Checksum.php
index bd59e33e3a7ce01e90c6e99904afbffcceef1a53..a7eca9114033c0e3839021fd3da925da48b54174 100644
--- a/lib/Magento/View/Asset/MergeStrategy/Checksum.php
+++ b/lib/Magento/View/Asset/MergeStrategy/Checksum.php
@@ -36,17 +36,17 @@ class Checksum implements \Magento\View\Asset\MergeStrategyInterface
     protected $strategy;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\View\Asset\MergeStrategyInterface $strategy
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\View\Asset\MergeStrategyInterface $strategy,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->strategy = $strategy;
         $this->filesystem = $filesystem;
@@ -61,7 +61,7 @@ class Checksum implements \Magento\View\Asset\MergeStrategyInterface
 
         // Check whether we have already merged these files
         $filesMTimeData = '';
-        $directory = $this->filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $directory = $this->filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         foreach ($publicFiles as $file) {
             $filesMTimeData .= $directory->stat($file)['mtime'];
         }
diff --git a/lib/Magento/View/Asset/MergeStrategy/Direct.php b/lib/Magento/View/Asset/MergeStrategy/Direct.php
index b76fef5ec5023ad616ad1fb9d5011f01e96da22e..1009bb04e536c1aec9ce2c1387a8c2185fc02a47 100644
--- a/lib/Magento/View/Asset/MergeStrategy/Direct.php
+++ b/lib/Magento/View/Asset/MergeStrategy/Direct.php
@@ -40,14 +40,14 @@ class Direct implements \Magento\View\Asset\MergeStrategyInterface
     protected $cssUrlResolver;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Url\CssResolver $cssUrlResolver
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Url\CssResolver $cssUrlResolver
     ) {
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Filesystem::PUB);
+        $this->_directory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::PUB_DIR);
         $this->_cssUrlResolver = $cssUrlResolver;
     }
 
diff --git a/lib/Magento/View/Asset/MergeStrategy/FileExists.php b/lib/Magento/View/Asset/MergeStrategy/FileExists.php
index f83bb67e36e2d951827ad59900ad71b2633a730d..abb45162ee575e44358c0521d5d3d33aa85f4e30 100644
--- a/lib/Magento/View/Asset/MergeStrategy/FileExists.php
+++ b/lib/Magento/View/Asset/MergeStrategy/FileExists.php
@@ -35,17 +35,17 @@ class FileExists implements \Magento\View\Asset\MergeStrategyInterface
     protected $strategy;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\View\Asset\MergeStrategyInterface $strategy
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\View\Asset\MergeStrategyInterface $strategy,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->strategy = $strategy;
         $this->filesystem = $filesystem;
@@ -56,7 +56,7 @@ class FileExists implements \Magento\View\Asset\MergeStrategyInterface
      */
     public function mergeFiles(array $publicFiles, $destinationFile, $contentType)
     {
-        if (!$this->filesystem->getDirectoryRead(\Magento\Filesystem::ROOT)->isExist($destinationFile)) {
+        if (!$this->filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR)->isExist($destinationFile)) {
             $this->strategy->mergeFiles($publicFiles, $destinationFile, $contentType);
         }
     }
diff --git a/lib/Magento/View/Asset/Merged.php b/lib/Magento/View/Asset/Merged.php
index e016a1d59a2bc1b41aebc0dd8b113693e0e35c6b..475b53901c0461a20a4c737d11f0863da28c27b4 100644
--- a/lib/Magento/View/Asset/Merged.php
+++ b/lib/Magento/View/Asset/Merged.php
@@ -162,10 +162,10 @@ class Merged implements \Iterator
      */
     protected function getMergedFilePath(array $publicFiles)
     {
-        /** @var \Magento\Filesystem $filesystem */
-        $filesystem = $this->objectManager->get('Magento\Filesystem');
-        $jsDir = $filesystem->getPath(\Magento\Filesystem::PUB_LIB);
-        $publicDir = $filesystem->getPath(\Magento\Filesystem::STATIC_VIEW);
+        /** @var \Magento\App\Filesystem $filesystem */
+        $filesystem = $this->objectManager->get('Magento\App\Filesystem');
+        $jsDir = $filesystem->getPath(\Magento\App\Filesystem::PUB_LIB_DIR);
+        $publicDir = $filesystem->getPath(\Magento\App\Filesystem::STATIC_VIEW_DIR);
 
         $prefixRemovals = array($jsDir, $publicDir);
 
@@ -174,7 +174,7 @@ class Merged implements \Iterator
             $relFileNames[] = ltrim(str_replace($prefixRemovals, '', $file), '/');
         }
 
-        $mergedDir = $filesystem->getDirectoryRead(\Magento\Filesystem::PUB_VIEW_CACHE)
+        $mergedDir = $filesystem->getDirectoryRead(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR)
             ->getAbsolutePath(self::PUBLIC_MERGE_DIR);
         return $mergedDir . '/' . md5(implode('|', $relFileNames)) . '.' . $this->contentType;
     }
diff --git a/lib/Magento/View/Asset/MinifyService.php b/lib/Magento/View/Asset/MinifyService.php
index 0d9246ac083a116891b15357ec6069b48f9c4ccd..2113f2dbc26eb19912f20793bcf7abf38c36b2ba 100644
--- a/lib/Magento/View/Asset/MinifyService.php
+++ b/lib/Magento/View/Asset/MinifyService.php
@@ -57,7 +57,7 @@ class MinifyService
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -65,13 +65,13 @@ class MinifyService
      * @param ConfigInterface $config
      * @param \Magento\ObjectManager $objectManager
      * @param \Magento\App\State $appState
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         ConfigInterface $config,
         \Magento\ObjectManager $objectManager,
         \Magento\App\State $appState,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->config = $config;
         $this->objectManager = $objectManager;
@@ -126,7 +126,7 @@ class MinifyService
                         ->create('Magento\Code\Minifier\Strategy\Generate', $strategyParams);
             }
             $baseDir = $this->_filesystem
-                ->getDirectoryRead(\Magento\Filesystem::PUB_VIEW_CACHE)
+                ->getDirectoryRead(\Magento\App\Filesystem::PUB_VIEW_CACHE_DIR)
                 ->getAbsolutePath('minify');
 
             $this->minifiers[$contentType] = $this->objectManager->create('Magento\Code\Minifier',
diff --git a/lib/Magento/View/Config.php b/lib/Magento/View/Config.php
index 91cbe01d636012dd2819c02c8c5481df97bffe1a..a6405be371b55eca335ebf6db66139062819a119 100644
--- a/lib/Magento/View/Config.php
+++ b/lib/Magento/View/Config.php
@@ -24,13 +24,11 @@
 
 namespace Magento\View;
 
+use Magento\Filesystem\Directory\ReadInterface;
+
 /**
  * Handles theme view.xml files
  */
-namespace Magento\View;
-
-use Magento\Filesystem\Directory\ReadInterface;
-
 class Config implements \Magento\View\ConfigInterface
 {
     /**
@@ -76,7 +74,7 @@ class Config implements \Magento\View\ConfigInterface
 
     /**
      * @param \Magento\Module\Dir\Reader $moduleReader
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param Service $viewService
      * @param FileSystem $viewFileSystem
      * @param \Magento\Config\FileIteratorFactory $fileIteratorFactory
@@ -84,14 +82,14 @@ class Config implements \Magento\View\ConfigInterface
      */
     public function __construct(
         \Magento\Module\Dir\Reader $moduleReader,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Service $viewService,
         \Magento\View\FileSystem $viewFileSystem,
         \Magento\Config\FileIteratorFactory $fileIteratorFactory,
         $filename = self::CONFIG_FILE_NAME
     ) {
         $this->moduleReader = $moduleReader;
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
         $this->viewService = $viewService;
         $this->viewFileSystem = $viewFileSystem;
         $this->filename = $filename;
diff --git a/lib/Magento/View/Design/Fallback/Factory.php b/lib/Magento/View/Design/Fallback/Factory.php
index 1d3bec7e9d88fce66d514aed195bb2e0322b605d..672783e46f4301d8e4e79526f3b131dab850ff5c 100644
--- a/lib/Magento/View/Design/Fallback/Factory.php
+++ b/lib/Magento/View/Design/Fallback/Factory.php
@@ -24,7 +24,7 @@
 
 namespace Magento\View\Design\Fallback;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\View\Design\Fallback\Rule\Composite;
 use Magento\View\Design\Fallback\Rule\ModularSwitch;
 use Magento\View\Design\Fallback\Rule\RuleInterface;
@@ -60,7 +60,7 @@ class Factory
      */
     public function createLocaleFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES);
+        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
         return new Theme(
             new Simple("$themesDir/<area>/<theme_path>/i18n/<locale>")
         );
@@ -73,8 +73,8 @@ class Factory
      */
     public function createFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES);
-        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES);
+        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
+        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR);
         return new ModularSwitch(
             new Theme(
                 new Simple(
@@ -103,9 +103,9 @@ class Factory
      */
     public function createViewFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES);
-        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES);
-        $pubLibDir = $this->filesystem->getPath(Filesystem::PUB_LIB);
+        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
+        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR);
+        $pubLibDir = $this->filesystem->getPath(Filesystem::PUB_LIB_DIR);
         return new ModularSwitch(
             new Composite(
                 array(
diff --git a/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php b/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php
index c073e7d55f50449dded7c85087d2b0c2353d9a01..2c8c710a94863dac3c37b572220bff7fcc716d3a 100644
--- a/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php
+++ b/lib/Magento/View/Design/FileResolution/Strategy/Fallback.php
@@ -24,7 +24,7 @@
 
 namespace Magento\View\Design\FileResolution\Strategy;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\View\Design\Fallback\Factory;
 use Magento\View\Design\Fallback\Rule\RuleInterface;
 use Magento\View\Design\ThemeInterface;
@@ -70,7 +70,7 @@ class Fallback implements FileInterface, LocaleInterface, ViewInterface
      */
     public function __construct(Filesystem $filesystem, Factory $fallbackFactory)
     {
-        $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT);
+        $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR);
         $this->fallbackFactory = $fallbackFactory;
     }
 
diff --git a/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php b/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php
index 6e0ef3d135f48bb5033d85d96513c1394eabb634..bd1468fb03511825a0c01bac28709628f691ceb6 100644
--- a/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php
+++ b/lib/Magento/View/Design/FileResolution/Strategy/Fallback/CachingProxy.php
@@ -24,7 +24,7 @@
 
 namespace Magento\View\Design\FileResolution\Strategy\Fallback;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\View\Design\FileResolution\Strategy\Fallback;
 use Magento\View\Design\FileResolution\Strategy\FileInterface;
 use Magento\View\Design\FileResolution\Strategy\LocaleInterface;
@@ -98,7 +98,7 @@ class CachingProxy implements FileInterface, LocaleInterface, ViewInterface, Not
     ) {
         $this->fallback = $fallback;
         $this->varDirectory = $filesystem->getDirectoryWrite(Filesystem::VAR_DIR);
-        $rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT);
+        $rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR);
         if (!$rootDirectory->isDirectory($rootDirectory->getRelativePath($baseDir))) {
             throw new \InvalidArgumentException("Wrong base directory specified: '{$baseDir}'");
         }
diff --git a/lib/Magento/View/Design/FileResolution/StrategyPool.php b/lib/Magento/View/Design/FileResolution/StrategyPool.php
index 27a552b33bc24860e4bf2516d492e9bcffffdd79..174c70b0e1fb943654d065f547e41a3dabaca1b9 100644
--- a/lib/Magento/View/Design/FileResolution/StrategyPool.php
+++ b/lib/Magento/View/Design/FileResolution/StrategyPool.php
@@ -26,7 +26,7 @@ namespace Magento\View\Design\FileResolution;
 
 use Magento\Exception;
 use Magento\App\State;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\ObjectManager;
 
 /**
@@ -186,7 +186,7 @@ class StrategyPool
                 $mapDir = $this->filesystem->getPath(Filesystem::VAR_DIR) . '/' . self::FALLBACK_MAP_DIR;
                 $arguments = array(
                     'mapDir' => $mapDir,
-                    'baseDir' => $this->filesystem->getPath(Filesystem::ROOT),
+                    'baseDir' => $this->filesystem->getPath(Filesystem::ROOT_DIR),
                 );
                 break;
             default:
diff --git a/lib/Magento/View/Design/Theme/Customization/AbstractFile.php b/lib/Magento/View/Design/Theme/Customization/AbstractFile.php
index 74925edeff4419cbdad2657568eebb0cbda1e331..374d55bba9787fca645b8ad4933ea5b022e8b156 100644
--- a/lib/Magento/View/Design/Theme/Customization/AbstractFile.php
+++ b/lib/Magento/View/Design/Theme/Customization/AbstractFile.php
@@ -42,19 +42,19 @@ abstract class AbstractFile
     protected $_fileFactory;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\View\Design\Theme\Customization\Path $customizationPath
      * @param \Magento\View\Design\Theme\FileFactory $fileFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\View\Design\Theme\Customization\Path $customizationPath,
         \Magento\View\Design\Theme\FileFactory $fileFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_customizationPath = $customizationPath;
         $this->_fileFactory = $fileFactory;
@@ -207,6 +207,6 @@ abstract class AbstractFile
      */
     protected function getDirectoryWrite()
     {
-        return $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        return $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
     }
 }
diff --git a/lib/Magento/View/Design/Theme/Customization/Path.php b/lib/Magento/View/Design/Theme/Customization/Path.php
index 168edb82554cb93da0243a205b45a41f09a04eaf..797af847ad66a6d9d04c7ebe88efd556402e5cd7 100644
--- a/lib/Magento/View/Design/Theme/Customization/Path.php
+++ b/lib/Magento/View/Design/Theme/Customization/Path.php
@@ -43,7 +43,7 @@ class Path
     protected $filename;
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -60,17 +60,17 @@ class Path
     /**
      * Constructor
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param $filename
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         $filename = \Magento\View\ConfigInterface::CONFIG_FILE_NAME
     ) {
         $this->filesystem           = $filesystem;
         $this->filename             = $filename;
-        $this->mediaDirectoryRead   = $this->filesystem->getDirectoryRead(\Magento\Filesystem::MEDIA);
-        $this->themeDirectoryRead   = $this->filesystem->getDirectoryRead(\Magento\Filesystem::THEMES);
+        $this->mediaDirectoryRead   = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::MEDIA_DIR);
+        $this->themeDirectoryRead   = $this->filesystem->getDirectoryRead(\Magento\App\Filesystem::THEMES_DIR);
     }
 
     /**
diff --git a/lib/Magento/View/Design/Theme/Image.php b/lib/Magento/View/Design/Theme/Image.php
index a78d7104c51a208548ebe7cb5cfd494e22e3610c..404a4ce1d2321f06a6417357e8ba3433eddcd297 100644
--- a/lib/Magento/View/Design/Theme/Image.php
+++ b/lib/Magento/View/Design/Theme/Image.php
@@ -74,7 +74,7 @@ class Image
     /**
      * Initialize dependencies
      *
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\Image\Factory $imageFactory
      * @param Image\Uploader $uploader
      * @param Image\PathInterface $themeImagePath
@@ -82,14 +82,14 @@ class Image
      * @param \Magento\View\Design\ThemeInterface $theme
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\Image\Factory $imageFactory,
         Image\Uploader $uploader,
         Image\PathInterface $themeImagePath,
         \Magento\Logger $logger,
         \Magento\View\Design\ThemeInterface $theme = null
     ) {
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::MEDIA);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::MEDIA_DIR);
         $this->_imageFactory = $imageFactory;
         $this->_uploader = $uploader;
         $this->_themeImagePath = $themeImagePath;
diff --git a/lib/Magento/View/Design/Theme/Image/Uploader.php b/lib/Magento/View/Design/Theme/Image/Uploader.php
index 6d7b93d6e644b0665bbf7e97f91f07ed67175000..1d642f9701fd8a5f4bc7b7ef57686b94ac15d888 100644
--- a/lib/Magento/View/Design/Theme/Image/Uploader.php
+++ b/lib/Magento/View/Design/Theme/Image/Uploader.php
@@ -37,7 +37,7 @@ class Uploader
     protected  $_allowedExtensions = array('jpg', 'jpeg', 'gif', 'png', 'xbm', 'wbmp');
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -52,12 +52,12 @@ class Uploader
     protected $_uploaderFactory;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\HTTP\Adapter\FileTransferFactory $adapterFactory
      * @param \Magento\File\UploaderFactory $uploaderFactory
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\HTTP\Adapter\FileTransferFactory $adapterFactory,
         \Magento\File\UploaderFactory $uploaderFactory
     ) {
diff --git a/lib/Magento/View/Element/AbstractBlock.php b/lib/Magento/View/Element/AbstractBlock.php
index e9c7d5c78081c3c48ed6c10d95722af8edc9a3ec..5ba9c9bfd29e5a3d761641c42df0779d0536c52d 100644
--- a/lib/Magento/View/Element/AbstractBlock.php
+++ b/lib/Magento/View/Element/AbstractBlock.php
@@ -145,6 +145,14 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
      */
     protected $_locale;
 
+    /**
+     * The property is used to define content-scope of block. Can be private or public.
+     * If it isn't defined then application considers it as false.
+     *
+     * @var bool
+     */
+    protected $_isScopePrivate;
+
     /**
      * @param \Magento\View\Element\Context $context
      * @param array $data
@@ -170,6 +178,7 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
         $this->_escaper         = $context->getEscaper();
         $this->filterManager    = $context->getFilterManager();
         $this->_locale          = $context->getLocale();
+        $this->_isScopePrivate  = false;
         parent::__construct($data);
         $this->_construct();
     }
@@ -974,4 +983,15 @@ abstract class AbstractBlock extends \Magento\Object implements BlockInterface
         $module = $module ?: $this->getModuleName();
         return $this->_viewConfig->getViewConfig()->getVarValue($module, $name);
     }
+
+    /**
+     * Determine if the block scope is private or public.
+     * Returns true if scope is private, false otherwise
+     *
+     * @return bool
+     */
+    public function isScopePrivate()
+    {
+        return $this->_isScopePrivate;
+    }
 }
diff --git a/lib/Magento/View/Element/BlockFactory.php b/lib/Magento/View/Element/BlockFactory.php
index b111a133bd4a1a573c20b53cead0293518fd9ed8..2f5238f6ced44e8327983067dee8844e2366640d 100644
--- a/lib/Magento/View/Element/BlockFactory.php
+++ b/lib/Magento/View/Element/BlockFactory.php
@@ -56,6 +56,9 @@ class BlockFactory
         if (!$block instanceof BlockInterface) {
             throw new \LogicException($blockName . ' does not implemented BlockInterface');
         }
+        if ($block instanceof Template) {
+            $block->setTemplateContext($block);
+        }
         return $block;
     }
 }
diff --git a/lib/Magento/View/Element/Template.php b/lib/Magento/View/Element/Template.php
index fbb38b33711f0033ed401760d9f33f3baef7e2da..4101ed5e6556f3e8775f76b935de4e36fcb14a75 100644
--- a/lib/Magento/View/Element/Template.php
+++ b/lib/Magento/View/Element/Template.php
@@ -24,7 +24,7 @@
 
 namespace Magento\View\Element;
 
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 
 /**
  * Base html block
@@ -109,6 +109,11 @@ class Template extends AbstractBlock
      */
     private $mediaDirectory;
 
+    /**
+     * @var \Magento\View\Element\BlockInterface
+     */
+    protected $templateContext;
+
     /**
      * @param Template\Context $context
      * @param array $data
@@ -122,9 +127,20 @@ class Template extends AbstractBlock
         $this->templateEnginePool = $context->getEnginePool();
         $this->_storeManager = $context->getStoreManager();
         $this->_appState = $context->getAppState();
+        $this->templateContext = $this;
         parent::__construct($context, $data);
     }
 
+    /**
+     * Set template context. Sets the object that should represent $this in template
+     *
+     * @param $templateContext
+     */
+    public function setTemplateContext($templateContext)
+    {
+        $this->templateContext = $templateContext;
+    }
+
     /**
      * Internal constructor, that is called from real constructor
      */
@@ -226,7 +242,7 @@ class Template extends AbstractBlock
         if ($this->isTemplateFileValid($fileName)) {
             $extension = pathinfo($fileName, PATHINFO_EXTENSION);
             $templateEngine = $this->templateEnginePool->get($extension);
-            $html = $templateEngine->render($this, $fileName, $this->_viewVars);
+            $html = $templateEngine->render($this->templateContext, $fileName, $this->_viewVars);
         } else {
             $html = '';
             $this->_logger->log("Invalid template file: '{$fileName}'", \Zend_Log::CRIT);
@@ -310,7 +326,7 @@ class Template extends AbstractBlock
     protected function getRootDirectory()
     {
         if (null === $this->directory) {
-            $this->directory = $this->_filesystem->getDirectoryRead(Filesystem::ROOT);
+            $this->directory = $this->_filesystem->getDirectoryRead(Filesystem::ROOT_DIR);
         }
 
         return $this->directory;
@@ -324,7 +340,7 @@ class Template extends AbstractBlock
     protected function getMediaDirectory()
     {
         if (!$this->mediaDirectory) {
-            $this->mediaDirectory = $this->_filesystem->getDirectoryRead(Filesystem::MEDIA);
+            $this->mediaDirectory = $this->_filesystem->getDirectoryRead(Filesystem::MEDIA_DIR);
         }
         return $this->mediaDirectory;
     }
@@ -344,8 +360,8 @@ class Template extends AbstractBlock
     {
         $fileName = str_replace('\\', '/', $fileName);
 
-        $themesDir = str_replace('\\', '/', $this->_filesystem->getPath(Filesystem::THEMES));
-        $appDir = str_replace('\\', '/', $this->_filesystem->getPath(Filesystem::APP));
+        $themesDir = str_replace('\\', '/', $this->_filesystem->getPath(Filesystem::THEMES_DIR));
+        $appDir = str_replace('\\', '/', $this->_filesystem->getPath(Filesystem::APP_DIR));
         return (
             $this->isPathInDirectory($fileName, $appDir)
             || $this->isPathInDirectory($fileName, $themesDir)
diff --git a/lib/Magento/View/Element/Template/Context.php b/lib/Magento/View/Element/Template/Context.php
index 9cfc9153397cdcaf9004bc2578e1b89ad24cae08..7f5f814876fffe379c647fa7f9304cefc8b79417 100644
--- a/lib/Magento/View/Element/Template/Context.php
+++ b/lib/Magento/View/Element/Template/Context.php
@@ -27,7 +27,7 @@ class Context extends \Magento\View\Element\Context
     /**
      * Filesystem instance
      *
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -71,13 +71,13 @@ class Context extends \Magento\View\Element\Context
      * @param \Magento\Escaper $escaper
      * @param \Magento\Filter\FilterManager $filterManager
      * @param \Magento\Core\Model\LocaleInterface $locale
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\FileSystem $viewFileSystem
      * @param \Magento\View\TemplateEnginePool $enginePool
      * @param \Magento\App\State $appState
      * @param \Magento\Core\Model\StoreManagerInterface $storeManager
      * @param array $data
-     * 
+     *
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -100,7 +100,7 @@ class Context extends \Magento\View\Element\Context
         \Magento\Escaper $escaper,
         \Magento\Filter\FilterManager $filterManager,
         \Magento\Core\Model\LocaleInterface $locale,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\FileSystem $viewFileSystem,
         \Magento\View\TemplateEnginePool $enginePool,
         \Magento\App\State $appState,
@@ -141,7 +141,7 @@ class Context extends \Magento\View\Element\Context
     /**
      * Get filesystem instance
      *
-     * @return \Magento\Filesystem
+     * @return \Magento\App\Filesystem
      */
     public function getFilesystem()
     {
diff --git a/lib/Magento/View/Layout/File/Source/Base.php b/lib/Magento/View/Layout/File/Source/Base.php
index 727755a86264388e8062e002a8ce766a119e808e..eeefa64a6871ad361fded7c91beddfc0ceaadb79 100644
--- a/lib/Magento/View/Layout/File/Source/Base.php
+++ b/lib/Magento/View/Layout/File/Source/Base.php
@@ -26,7 +26,7 @@ namespace Magento\View\Layout\File\Source;
 
 use Magento\View\Layout\File\SourceInterface;
 use Magento\View\Design\ThemeInterface;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\Filesystem\Directory\ReadInterface;
 use Magento\View\Layout\File\Factory;
 
@@ -53,7 +53,7 @@ class Base implements SourceInterface
         Filesystem $filesystem,
         Factory $fileFactory
     ) {
-        $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
         $this->fileFactory = $fileFactory;
     }
 
diff --git a/lib/Magento/View/Layout/File/Source/Override/Base.php b/lib/Magento/View/Layout/File/Source/Override/Base.php
index 8a525c5688a26d28c80deb02005b8c4ec16adef6..db99303df4904cff6191658eb0529a553cb4f010 100644
--- a/lib/Magento/View/Layout/File/Source/Override/Base.php
+++ b/lib/Magento/View/Layout/File/Source/Override/Base.php
@@ -26,7 +26,7 @@ namespace Magento\View\Layout\File\Source\Override;
 
 use Magento\View\Layout\File\SourceInterface;
 use Magento\View\Design\ThemeInterface;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\Filesystem\Directory\ReadInterface;
 use Magento\View\Layout\File\Factory;
 
@@ -53,7 +53,7 @@ class Base implements SourceInterface
         Filesystem $filesystem,
         Factory $fileFactory
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES);
+        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
         $this->fileFactory = $fileFactory;
     }
 
diff --git a/lib/Magento/View/Layout/File/Source/Override/Theme.php b/lib/Magento/View/Layout/File/Source/Override/Theme.php
index f894c640123dfba39bd433513d36c404b3186d50..26dae12eea69194299d5a0c7b14eca4b4d5c383f 100644
--- a/lib/Magento/View/Layout/File/Source/Override/Theme.php
+++ b/lib/Magento/View/Layout/File/Source/Override/Theme.php
@@ -26,7 +26,7 @@ namespace Magento\View\Layout\File\Source\Override;
 
 use Magento\View\Layout\File\SourceInterface;
 use Magento\View\Design\ThemeInterface;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\Filesystem\Directory\ReadInterface;
 use Magento\View\Layout\File\Factory;
 use Magento\Exception;
@@ -54,7 +54,7 @@ class Theme implements SourceInterface
         Filesystem $filesystem,
         Factory $fileFactory
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES);
+        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
         $this->fileFactory = $fileFactory;
     }
 
diff --git a/lib/Magento/View/Layout/File/Source/Theme.php b/lib/Magento/View/Layout/File/Source/Theme.php
index 3b5154cc06e4282886ab607a607d47f165019215..307a8cab448f25dec44eb5386c9dc9404fbafdba 100644
--- a/lib/Magento/View/Layout/File/Source/Theme.php
+++ b/lib/Magento/View/Layout/File/Source/Theme.php
@@ -26,7 +26,7 @@ namespace Magento\View\Layout\File\Source;
 
 use Magento\View\Layout\File\SourceInterface;
 use Magento\View\Design\ThemeInterface;
-use Magento\Filesystem;
+use Magento\App\Filesystem;
 use Magento\Filesystem\Directory\ReadInterface;
 use Magento\View\Layout\File\Factory;
 
@@ -53,7 +53,7 @@ class Theme implements SourceInterface
         Filesystem $filesystem,
         Factory $fileFactory
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES);
+        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
         $this->fileFactory = $fileFactory;
     }
 
diff --git a/lib/Magento/View/Publisher.php b/lib/Magento/View/Publisher.php
index a6ccd6e60a804851e9497f8242076af285e7edef..f4951adaae1670676ee4b040991b098aa0255643 100644
--- a/lib/Magento/View/Publisher.php
+++ b/lib/Magento/View/Publisher.php
@@ -52,7 +52,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
     /**#@-*/
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -97,7 +97,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
 
     /**
      * @param \Magento\Logger $logger
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\Url\CssResolver $cssUrlResolver
      * @param Service $viewService
      * @param FileSystem $viewFileSystem
@@ -106,7 +106,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
      */
     public function __construct(
         \Magento\Logger $logger,
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\Url\CssResolver $cssUrlResolver,
         \Magento\View\Service $viewService,
         \Magento\View\FileSystem $viewFileSystem,
@@ -114,7 +114,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
         $allowDuplication
     ) {
         $this->_filesystem = $filesystem;
-        $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\Filesystem::ROOT);
+        $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\App\Filesystem::ROOT_DIR);
         $this->_cssUrlResolver = $cssUrlResolver;
         $this->_viewService = $viewService;
         $this->_viewFileSystem = $viewFileSystem;
@@ -198,7 +198,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
             $cssContent = $this->_getPublicCssContent($sourcePath, $targetPath, $filePath, $params);
         }
 
-        $targetDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Filesystem::STATIC_VIEW);
+        $targetDirectory = $this->_filesystem->getDirectoryWrite(\Magento\App\Filesystem::STATIC_VIEW_DIR);
         $sourcePathRelative = $this->rootDirectory->getRelativePath($sourcePath);
         $targetPathRelative = $targetDirectory->getRelativePath($targetPath);
 
@@ -252,7 +252,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
      */
     protected function _needToProcessFile($filePath)
     {
-        $jsPath = $this->_filesystem->getPath(\Magento\Filesystem::PUB_LIB) . '/';
+        $jsPath = $this->_filesystem->getPath(\Magento\App\Filesystem::PUB_LIB_DIR) . '/';
         $filePath = str_replace('\\', '/', $filePath);
         if (strncmp($filePath, $jsPath, strlen($jsPath)) === 0) {
             return false;
@@ -267,7 +267,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
             return false;
         }
 
-        $themePath = $this->_filesystem->getPath(\Magento\Filesystem::STATIC_VIEW) . '/';
+        $themePath = $this->_filesystem->getPath(\Magento\App\Filesystem::STATIC_VIEW_DIR) . '/';
         if (strncmp($filePath, $themePath, strlen($themePath)) !== 0) {
             return true;
         }
@@ -322,7 +322,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
      */
     protected function _buildPublicViewSufficientFilename($filename, array $params)
     {
-        $designDir = $this->_filesystem->getPath(\Magento\Filesystem::THEMES) . '/';
+        $designDir = $this->_filesystem->getPath(\Magento\App\Filesystem::THEMES_DIR) . '/';
         if (0 === strpos($filename, $designDir)) {
             // theme file
             $publicFile = substr($filename, strlen($designDir));
@@ -394,7 +394,7 @@ class Publisher implements \Magento\View\PublicFilesManagerInterface
             $filePath = $this->_viewService->extractScope($this->_viewFileSystem->normalizePath($fileId), $params);
         } else {
             /* Check if module file overridden on theme level based on _module property and file path */
-            $themesPath = $this->_filesystem->getPath(\Magento\Filesystem::THEMES);
+            $themesPath = $this->_filesystem->getPath(\Magento\App\Filesystem::THEMES_DIR);
             if ($params['module'] && strpos($parentFilePath, $themesPath) === 0) {
                 /* Add module directory to relative URL */
                 $filePath = dirname($params['module'] . '/' . $parentFileName)
diff --git a/lib/Magento/View/Service.php b/lib/Magento/View/Service.php
index 70abdc723aba2b50ab14a1aa67030933b6627f8a..5b5586b3d3632bf0ee014584a4c63915e65c6362 100644
--- a/lib/Magento/View/Service.php
+++ b/lib/Magento/View/Service.php
@@ -58,17 +58,17 @@ class Service
      * @param \Magento\App\State $appState
      * @param \Magento\View\DesignInterface $design
      * @param \Magento\View\Design\Theme\FlyweightFactory $themeFactory
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      */
     public function __construct(
         \Magento\App\State $appState,
         \Magento\View\DesignInterface $design,
         \Magento\View\Design\Theme\FlyweightFactory $themeFactory,
-        \Magento\Filesystem $filesystem
+        \Magento\App\Filesystem $filesystem
     ) {
         $this->_appState = $appState;
         $this->_design = $design;
-        $this->_pubDirectory = $filesystem->getPath(\Magento\Filesystem::STATIC_VIEW);
+        $this->_pubDirectory = $filesystem->getPath(\Magento\App\Filesystem::STATIC_VIEW_DIR);
         $this->themeFactory = $themeFactory;
     }
 
diff --git a/lib/Magento/View/Url.php b/lib/Magento/View/Url.php
index 4e8f48b3cbc410a2f09f8a380f4a38936233ee78..d87622d48882b8010fa78407ecb470f6c805cc91 100644
--- a/lib/Magento/View/Url.php
+++ b/lib/Magento/View/Url.php
@@ -35,7 +35,7 @@ class Url
     const XML_PATH_STATIC_FILE_SIGNATURE = 'dev/static/sign';
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $_filesystem;
 
@@ -77,7 +77,7 @@ class Url
     protected $_viewFileSystem;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\UrlInterface $urlBuilder
      * @param Url\ConfigInterface $config
      * @param Service $viewService
@@ -87,7 +87,7 @@ class Url
      * @param array $fileUrlMap
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\UrlInterface $urlBuilder,
         \Magento\View\Url\ConfigInterface $config,
         \Magento\View\Service $viewService,
@@ -167,7 +167,7 @@ class Url
                     ) . $relativePath;
 
                 if ($this->_isStaticFilesSigned() && $this->_viewService->isViewFileOperationAllowed()) {
-                    $directory = $this->_filesystem->getDirectoryRead(\Magento\Filesystem::ROOT);
+                    $directory = $this->_filesystem->getDirectoryRead(\Magento\App\Filesystem::ROOT_DIR);
                     $fileMTime = $directory->stat($directory->getRelativePath($publicFilePath))['mtime'];
                     $url .= '?' . $fileMTime;
                 }
diff --git a/lib/Magento/View/Url/CssResolver.php b/lib/Magento/View/Url/CssResolver.php
index 16689050c41bf221ed998d83db880fd77416d0e1..4fa3a98b82c920ec6e51aefd1bf0f4eb9eb240a7 100644
--- a/lib/Magento/View/Url/CssResolver.php
+++ b/lib/Magento/View/Url/CssResolver.php
@@ -36,7 +36,7 @@ class CssResolver
         = '#url\s*\(\s*(?(?=\'|").)(?!http\://|https\://|/|data\:)(.+?)(?:[\#\?].*?|[\'"])?\s*\)#';
 
     /**
-     * @var \Magento\Filesystem
+     * @var \Magento\App\Filesystem
      */
     protected $filesystem;
 
@@ -46,11 +46,11 @@ class CssResolver
     protected $viewFileSystem;
 
     /**
-     * @param \Magento\Filesystem $filesystem
+     * @param \Magento\App\Filesystem $filesystem
      * @param \Magento\View\FileSystem $viewFileSystem
      */
     public function __construct(
-        \Magento\Filesystem $filesystem,
+        \Magento\App\Filesystem $filesystem,
         \Magento\View\FileSystem $viewFileSystem
     ) {
         $this->filesystem = $filesystem;
@@ -124,7 +124,7 @@ class CssResolver
          * Thus, calculating relative path is not possible in general case. So we just assume,
          * that urls follow the structure of directory paths.
          */
-        $topDir = $this->filesystem->getPath(\Magento\Filesystem::ROOT);
+        $topDir = $this->filesystem->getPath(\Magento\App\Filesystem::ROOT_DIR);
         if (strpos($file, $topDir) !== 0 || strpos($referencedFile, $topDir) !== 0) {
             throw new \Magento\Exception('Offset can be calculated for internal resources only.');
         }
diff --git a/pub/cron.php b/pub/cron.php
index 0adb9285e9f8dcc593ff5f41391976b6758c0440..18b9f3bb54c52e3ea9cef28447d6a625230ed674 100644
--- a/pub/cron.php
+++ b/pub/cron.php
@@ -27,18 +27,11 @@
  */
 
 require dirname(__DIR__) . '/app/bootstrap.php';
-\Magento\Profiler::start('magento');
 umask(0);
+$params = array(
+    \Magento\Core\Model\App::PARAM_RUN_CODE => 'admin',
+    \Magento\Core\Model\Store::CUSTOM_ENTRY_POINT_PARAM => true
+);
+$entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
+$entryPoint->run('Magento\App\Cron');
 
-try {
-    $params = array(
-        \Magento\Core\Model\App::PARAM_RUN_CODE => 'admin',
-        \Magento\Core\Model\Store::CUSTOM_ENTRY_POINT_PARAM => true
-    );
-    $entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
-    $entryPoint->run('Magento\App\Cron');
-} catch (\Exception $e) {
-    print $e->getMessage() . "\n\n";
-    print $e->getTraceAsString();
-}
-\Magento\Profiler::stop('magento');
diff --git a/pub/errors/404.php b/pub/errors/404.php
index cc8394f86cc51bdbf1bfc466650e8fbd0ad60310..3bfa04d7cdf83af6e0f4ac02e083086cda5d8bc8 100644
--- a/pub/errors/404.php
+++ b/pub/errors/404.php
@@ -24,7 +24,9 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+require_once __DIR__ . '/../../app/bootstrap.php';
 require_once 'processor.php';
 
-$processor = new Error_Processor();
-$processor->process404();
+$processor = new Error_Processor(new \Magento\App\Response\Http());
+$response = $processor->process404();
+$response->sendResponse();
\ No newline at end of file
diff --git a/pub/errors/503.php b/pub/errors/503.php
index 1a83d97e12f010f9abbdfd14d6a187ee6b4b7929..548f24b0c73b1e44ec804235ab1a3979c198aee7 100644
--- a/pub/errors/503.php
+++ b/pub/errors/503.php
@@ -24,7 +24,9 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+require_once __DIR__ . '/../../app/bootstrap.php';
 require_once 'processor.php';
 
-$processor = new Error_Processor();
-$processor->process503();
+$processor = new Error_Processor(new \Magento\App\Response\Http());
+$response = $processor->process503();
+$response->sendResponse();
diff --git a/pub/errors/noCache.php b/pub/errors/noCache.php
index 6a70600504a55da85692f144b2f71b516592c546..0edd11c96a5deb5c37eaf2fe6e8606ae0e44886c 100644
--- a/pub/errors/noCache.php
+++ b/pub/errors/noCache.php
@@ -26,5 +26,6 @@
 
 require_once 'processor.php';
 
-$processor = new Error_Processor();
-$processor->processNoCache();
+$processor = new Error_Processor(new \Magento\App\Response\Http());
+$response = $processor->processNoCache();
+$response->sendResponse();
\ No newline at end of file
diff --git a/pub/errors/processor.php b/pub/errors/processor.php
index b5ee4c6ee11e2061474b08345c915e2fa4ab8997..62cd5f55e857a18c4612b5c51cc009deb18b4f93 100644
--- a/pub/errors/processor.php
+++ b/pub/errors/processor.php
@@ -139,8 +139,16 @@ class Error_Processor
     */
     protected $_config;
 
-    public function __construct()
+    /**
+     * Http response
+     *
+     * @var Magento\App\Response\Http
+     */
+    protected $_response;
+
+    public function __construct(\Magento\App\Response\Http $response)
     {
+        $this->_response = $response;
         $this->_errorDir  = __DIR__ . '/';
         $this->_reportDir = dirname(dirname($this->_errorDir)) . '/var/report/';
 
@@ -169,40 +177,52 @@ class Error_Processor
 
     /**
      * Process no cache error
+     *
+     * @return \Magento\App\Response\Http
      */
     public function processNoCache()
     {
         $this->pageTitle = 'Error : cached config data is unavailable';
-        $this->_renderPage('nocache.phtml');
+        $this->_response->setBody($this->_renderPage('nocache.phtml'));
+        return $this->_response;
     }
 
     /**
      * Process 404 error
-    */
+     *
+     * @return \Magento\App\Response\Http
+     */
     public function process404()
     {
         $this->pageTitle = 'Error 404: Not Found';
-        $this->_sendHeaders(404);
-        $this->_renderPage('404.phtml');
+        $this->_response->setHttpResponseCode(404);
+        $this->_response->setBody($this->_renderPage('404.phtml'));
+        return $this->_response;
+
     }
 
     /**
      * Process 503 error
-    */
+     *
+     * @return \Magento\App\Response\Http
+     */
     public function process503()
     {
         $this->pageTitle = 'Error 503: Service Unavailable';
-        $this->_sendHeaders(503);
-        $this->_renderPage('503.phtml');
+        $this->_response->setHttpResponseCode(503);
+        $this->_response->setBody($this->_renderPage('503.phtml'));
+        return $this->_response;
     }
 
     /**
      * Process report
-    */
+     *
+     * @return \Magento\App\Response\Http
+     */
     public function processReport()
     {
         $this->pageTitle = 'There has been an error processing your request';
-        $this->_sendHeaders(503);
+        $this->_response->setHttpResponseCode(503);
 
         $this->showErrorMsg = false;
         $this->showSentMsg  = false;
@@ -214,7 +234,8 @@ class Error_Processor
             $this->showSendForm = true;
             $this->sendReport();
         }
-        $this->_renderPage('report.phtml');
+        $this->_response->setBody($this->_renderPage('report.phtml'));
+        return $this->_response;
     }
 
     /**
@@ -342,8 +363,8 @@ class Error_Processor
     /**
      * Load xml file
      *
-     * @param string $config
-     * return SimpleXMLElement
+     * @param string $xmlFile
+     * @return SimpleXMLElement
      */
     protected function _loadXml($xmlFile)
     {
@@ -352,40 +373,21 @@ class Error_Processor
     }
 
     /**
-     * Send error headers
-     *
-     * @param int $statusCode
-     */
-    protected function _sendHeaders($statusCode)
-    {
-        $serverProtocol = !empty($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
-        switch ($statusCode) {
-            case 404:
-                $description = 'Not Found';
-                break;
-            case 503:
-                $description = 'Service Unavailable';
-                break;
-            default:
-                $description = '';
-                break;
-        }
-
-        header(sprintf('%s %s %s', $serverProtocol, $statusCode, $description), true, $statusCode);
-        header(sprintf('Status: %s %s', $statusCode, $description), true, $statusCode);
-    }
-
-    /**
-     * Render page
+     * @param string $template
+     * @return string
      */
     protected function _renderPage($template)
     {
         $baseTemplate = $this->_getTemplatePath('page.phtml');
         $contentTemplate = $this->_getTemplatePath($template);
 
+        $html = '';
         if ($baseTemplate && $contentTemplate) {
+            ob_start();
             require_once $baseTemplate;
+            $html = ob_get_clean();
         }
+        return $html;
     }
 
     /**
diff --git a/pub/errors/report.php b/pub/errors/report.php
index 446c6dec2dafa07f16e04c5a0a9cffca4afbbc82..049db121f28ed93e2b56035c88f35afb9da5ac28 100644
--- a/pub/errors/report.php
+++ b/pub/errors/report.php
@@ -24,12 +24,12 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+require_once __DIR__ . '/../../app/bootstrap.php';
 require_once 'processor.php';
 
-$processor = new Error_Processor();
-
+$processor = new Error_Processor(new \Magento\App\Response\Http());
 if (isset($reportData) && is_array($reportData)) {
     $processor->saveReport($reportData);
 }
-
-$processor->processReport();
+$response = $processor->processReport();
+$response->sendResponse();
diff --git a/pub/index.php b/pub/index.php
index bf3c9be3dcb330b12a5849954221d5e972eb2f6e..ee5a238911156ec88a9b7364438ac6ce357c637a 100644
--- a/pub/index.php
+++ b/pub/index.php
@@ -24,10 +24,7 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 require __DIR__ . '/../app/bootstrap.php';
-\Magento\Profiler::start('magento');
 $params = $_SERVER;
-$params[\Magento\Filesystem::PARAM_APP_DIRS][\Magento\Filesystem::PUB] = array('uri' => '');
+$params[\Magento\App\Filesystem::PARAM_APP_DIRS][\Magento\App\Filesystem::PUB_DIR] = array('uri' => '');
 $entryPoint = new \Magento\App\EntryPoint\EntryPoint(BP, $params);
-$result = $entryPoint->run('Magento\App\Http');
-\Magento\Profiler::stop('magento');
-return $result;
+$entryPoint->run('Magento\App\Http');
diff --git a/pub/lib/mage/dataPost.js b/pub/lib/mage/dataPost.js
new file mode 100644
index 0000000000000000000000000000000000000000..3a24d7379904712b669f38b1352d48c2bfb8806a
--- /dev/null
+++ b/pub/lib/mage/dataPost.js
@@ -0,0 +1,52 @@
+/**
+ * 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    mage compare list
+ * @package     mage
+ * @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)
+ */
+/*jshint browser:true jquery:true*/
+/*global confirm:true*/
+(function ($) {
+    $.widget('mage.dataPost', {
+        options: {
+            formTemplate: '<form action="${action}" method="post">{{each data}}<input name="${$index}" value="${$value}">{{/each}}</form>',
+            postTrigger: ['a[data-post]', 'button[data-post]', 'span[data-post]']
+        },
+        _create: function() {
+            this._bind();
+        },
+        _bind: function() {
+            var events = {};
+            $.each(this.options.postTrigger, function(index, value) {
+                events['click ' + value] = '_postDataAction';
+            });
+            this._on(events);
+        },
+        _postDataAction: function(e) {
+            e.preventDefault();
+            this.postData($(e.currentTarget).data('post'));
+        },
+        postData: function(data) {
+            $.tmpl(this.options.formTemplate, data).appendTo('body').hide().submit();
+        }
+    });
+    $(document).dataPost();
+})(jQuery);
\ No newline at end of file
diff --git a/pub/lib/mage/directpost.js b/pub/lib/mage/directpost.js
index 52af4fe9fa35d8b193ec52ffebd8429945f5cb9e..329ee57ab03c3196f40ae5a33e02c7516399f367 100644
--- a/pub/lib/mage/directpost.js
+++ b/pub/lib/mage/directpost.js
@@ -90,8 +90,8 @@ directPost.prototype = {
                         }
                     }.bind(this));
                     break;
-                case 'sales_order_create':
-                case 'sales_order_edit':
+                case 'order_create':
+                case 'order_edit':
                     // Temporary solution will be removed after refactoring Authorize.Net (sales) functionality
                     jQuery('.scalable.save:not(disabled)').removeAttr('onclick');
                     jQuery(document).on(
@@ -117,8 +117,8 @@ directPost.prototype = {
                         this.returnQuote();
                     }
                     break;
-                case 'sales_order_edit':
-                case 'sales_order_create':
+                case 'order_edit':
+                case 'order_create':
                     if (!this.orderRequestSent) {
                         this.paymentRequestSent = false;
                         if (!this.hasError) {
@@ -172,8 +172,8 @@ directPost.prototype = {
                     case 'onepage':
                         this.resetLoadWaiting();
                         break;
-                    case 'sales_order_edit':
-                    case 'sales_order_create':
+                    case 'order_edit':
+                    case 'order_create':
                         this.changeInputOptions('disabled', false);
                         $('loading-mask').hide();
                         enableElements('save');