diff --git a/.travis.yml b/.travis.yml
index ea1c267b481704e9bf04048ce7b8f98c73c0f936..31c7946798cc4e0c188277cba70c89b047fb3fb6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,7 +17,6 @@ matrix:
 before_install:
   - sudo apt-get update -qq
   - sudo apt-get install -y -qq postfix
-  - composer install
 before_script:
   # mock mail
   - sudo service postfix stop
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 89394c5c2cc7d20605812f2b52f1e0453373c2dc..da0af54df5bcc64b59261381d7e770b6e651c0dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,113 @@
+0.1.0-alpha101
+=============
+ * Framework improvements:
+  * Updated the Service infrastructure to support Module Service Contract based approach
+  * Added new base classes in the Service infrastructure lib to support extensible Data Interfaces
+  * Updated the WebApi framework serialization (for SOAP and REST) to process requests based on Data Interfaces and removed dependency on Data Objects
+  * Added base class for Data Interface based builders and implemented a code generator for the same
+ * File system improvements: 
+   * List of available application directories is complete now and defined in the \Magento\Framework\Filesystem\DirectoryList and the \Magento\Framework\App\Filesystem\DirectoryList classes. There is no ability to extend the list in configuration
+   * Directory paths  can be changed using environment/bootstrap
+   * Information about necessary permissions (writable, readable) belongs to Setup Application, Magento Application does not possess this info and does not verify. Setup Application performs permissions validation
+   * Unnecessary writable permissions are validated by Setup Application after installation and corresponding message is displayed to the user
+ * Functional tests:
+  * Configure a product in a customer wishlist  in the Admin panel 
+  * Configure a product in a customer wishlist on the storefront 
+  * Create terms and conditions 
+  * Manage products stock 
+  * Move a product from a shopping card to a wishlist 
+  * Un-assign custom order status 
+  * Update terms and conditions 
+  * Update URL rewrites after moving/deleting a category 
+  * Update URL rewrites after changing category assignment for a product
+  * View customer wishlist  in the Admin panel
+  * Tax calculation test
+  * Cross border trade setting
+ * Documentation:
+  * Code documentation:
+    * Added codeblock for the Checkout module
+  * Added README files with module description for the following modules:
+    * Backend
+    * Backup
+    * Cron
+    * Log
+    * PageCache
+    * Store
+    * Checkout
+    * GiftMessage
+    * Eav
+    * Multishipping
+    * CheckoutAgreement
+    * AdminNotification
+    * Authz
+    * Connect
+    * CurrencySymbol
+    * Directory
+    * Email
+    * Integration
+    * Service
+    * User
+    * Webapi
+    * Sales
+    * Tax
+    * Weee
+  * Added README files with component description for the following framework components:
+    * Magento\Framework\App\Cache
+    * Magento\Framework\Archive
+    * Magento\Framework\Backup
+    * Magento\Framework\Convert
+    * Magento\Framework\Encryption
+    * Magento\Framework\File
+    * Magento\Framework\Filesystem
+    * Magento\Framework\Flag
+    * Magento\Framework\Image
+    * Magento\Framework\Math
+    * Magento\Framework\Option
+    * Magento\Framework\Profiler
+    * Magento\Framework\Shell
+    * Magento\Framework\Stdlib
+    * Magento\Framework\Validator
+ * Performance improvements:
+  * Reduced checkout response time by loading only current checkout step 
+  * Reduced the number of AJAX calls on checkout steps 
+  * Improved performance on the billing and shipping checkout steps 
+  * Improved performance in certain areas by loading translation data from cache 
+  * Removed transactions from visitors logging 
+  * Fixed classmap generator to consider namespaces 
+  * Eliminated a redundant query for category tree rendering 
+  * Optimized StoreManager and Storage performance 
+  * Optimized Object Manager 
+ * Fixed bugs:
+  * Fixed an issue where partial invoices and partial credit memos contained incorrect customer's tax details 
+  * Fixed an issue where a PHP fatal error occurred when logging in during checkout to order a product with FPT 
+  * Fixed an issue where FPT was not calculated in reorders 
+  * Fixed an issue where there was a duplicated Administrator role after installation 
+  * Fixed an issue where the Try Again button was disabled after entering the incorrect data during installation 
+  * Fixed an issue where the "Application is not installed yet" error was thrown instead of redirecting to the Installation Wizard in the developer mode
+  * Fixed an issue where an error was thrown during installation with db_prefix option 
+  * Fixed an issue where the SQL query was not optimized for product search ('catalogsearch_query')
+  * Fixed an issue where the wrong message was displayed after changing customer password on the storefront 
+  * Fixed an issue where Newsletter preview led to an empty page 
+  * Fixed an issue where a new search term was not displayed in suggested results 
+  * Fixed an issue where no results were found for the Products Viewed report 
+  * Fixed an issue where no results were found for Coupons reports 
+  * Fixed an issue with incremental Qty setting 
+  * Fixed an issue with allowing importing of negative weight values 
+  * Fixed an issue with Inventory - Only X left Treshold being not dependent on Qty for Item's Status to Become Out of Stock 
+  * Fixed an issue where the "Catalog Search Index index was rebuilt." message was displayed when reindexing the Catalog Search index  
+ * Search module:
+  * Integrated the Search library to the advanced search functionality 
+    * Substituted the old logic of the EAV attributes search by Advanced Search 
+    * Introduced mappers for MySQL adapter 
+    * Restored  the currency calculation functionality 
+    * Fixed sorting by relevance in quick search and advanced search 
+  * Integrated the Search library into the search widget functionality 
+    * Removed the dependency on the catalogsearch_result table 
+    * Substituted the old logic of EAV attributes by Quick search APIs 
+  * Search modularity: 
+    * Removed circular dependency between Catalog and  Catalog Search 
+    * Removed exceeded dependencies of the Search module
+
 0.1.0-alpha100
 =============
  * Added the following functional tests:
diff --git a/app/code/Magento/AdminNotification/README.md b/app/code/Magento/AdminNotification/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..c74d794fcce25528e3bdc4534b792aec48357feb
--- /dev/null
+++ b/app/code/Magento/AdminNotification/README.md
@@ -0,0 +1,4 @@
+# Admin Notification
+
+**Admin Notification** provides the ability to alert administrators via
+system messages and provides a message inbox for surveys and notifications.
diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json
index 3d75489db0b9100521ef81db27591e6d16d75fe2..5e226f33c31f087b1ebe91b83b442e9f722b188c 100644
--- a/app/code/Magento/AdminNotification/composer.json
+++ b/app/code/Magento/AdminNotification/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Authorization/README.md b/app/code/Magento/Authorization/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..02c42b61f78755603794cb4be9fcfd3301c64f96
--- /dev/null
+++ b/app/code/Magento/Authorization/README.md
@@ -0,0 +1,4 @@
+# Authorization
+
+**Authorization** provides the management of access control list roles and
+rules in the application.
diff --git a/app/code/Magento/Authorization/composer.json b/app/code/Magento/Authorization/composer.json
index 9801a83ab4a33c6f79d83e2bfb577a48c7272af4..4a865d6835423377804d04eb137a086db037d5bf 100644
--- a/app/code/Magento/Authorization/composer.json
+++ b/app/code/Magento/Authorization/composer.json
@@ -3,12 +3,12 @@
     "description": "Authorization module provides access to Magento ACL functionality.",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Authorizenet/composer.json b/app/code/Magento/Authorizenet/composer.json
index aa4c04928f9f4ee7e2465436ab57410186abf80b..e24e4b0d690da40e817c3d08ddc0f0c619aba820 100644
--- a/app/code/Magento/Authorizenet/composer.json
+++ b/app/code/Magento/Authorizenet/composer.json
@@ -3,18 +3,18 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-centinel": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-centinel": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Backend/App/Response/Http/FileFactory.php b/app/code/Magento/Backend/App/Response/Http/FileFactory.php
index 4fc7c89976549b58c3aaa6676a51c15c43ca7874..74bab81f41eb52b875e96e04969011215d7755d3 100644
--- a/app/code/Magento/Backend/App/Response/Http/FileFactory.php
+++ b/app/code/Magento/Backend/App/Response/Http/FileFactory.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backend\App\Response\Http;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileFactory extends \Magento\Framework\App\Response\Http\FileFactory
 {
     /**
@@ -57,7 +59,7 @@ class FileFactory extends \Magento\Framework\App\Response\Http\FileFactory
 
     /**
      * @param \Magento\Framework\App\ResponseInterface $response
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Backend\Model\Auth $auth
      * @param \Magento\Backend\Model\UrlInterface $backendUrl
      * @param \Magento\Backend\Model\Session $session
@@ -66,7 +68,7 @@ class FileFactory extends \Magento\Framework\App\Response\Http\FileFactory
      */
     public function __construct(
         \Magento\Framework\App\ResponseInterface $response,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Backend\Model\Auth $auth,
         \Magento\Backend\Model\UrlInterface $backendUrl,
         \Magento\Backend\Model\Session $session,
@@ -112,7 +114,7 @@ class FileFactory extends \Magento\Framework\App\Response\Http\FileFactory
     public function create(
         $fileName,
         $content,
-        $baseDir = \Magento\Framework\App\Filesystem::ROOT_DIR,
+        $baseDir = DirectoryList::ROOT,
         $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 656b3931b13934a64488b08ea9137bac7926ff09..017fff482d292e2cd8e6f36a123dc96869a17c0e 100644
--- a/app/code/Magento/Backend/Block/Template/Context.php
+++ b/app/code/Magento/Backend/Block/Template/Context.php
@@ -80,7 +80,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\View\TemplateEnginePool $enginePool
      * @param \Magento\Framework\App\State $appState
@@ -113,7 +113,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
         \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\View\TemplateEnginePool $enginePool,
         \Magento\Framework\App\State $appState,
diff --git a/app/code/Magento/Backend/Block/Widget/Context.php b/app/code/Magento/Backend/Block/Widget/Context.php
index 9596a04f3e316018aa0195b3bb67ba36cb53e160..29c0b21cacb2fe2978e7fda7a3dea8812bc2b302 100644
--- a/app/code/Magento/Backend/Block/Widget/Context.php
+++ b/app/code/Magento/Backend/Block/Widget/Context.php
@@ -63,7 +63,7 @@ class Context extends \Magento\Backend\Block\Template\Context
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\View\TemplateEnginePool $enginePool
      * @param \Magento\Framework\App\State $appState
@@ -98,7 +98,7 @@ class Context extends \Magento\Backend\Block\Template\Context
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
         \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\View\TemplateEnginePool $enginePool,
         \Magento\Framework\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 16312478bb6eacdfbe067073c94a2d4ca59472b9..ab1d22bfc922f694e291f888771977d188bb9ca1 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Export.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Export.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backend\Block\Widget\Grid;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
@@ -95,7 +97,7 @@ class Export extends \Magento\Backend\Block\Widget implements \Magento\Backend\B
                 $this->addExportType($type['urlPath'], $type['label']);
             }
         }
-        $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->_directory = $this->_filesystem->getDirectoryWrite(DirectoryList::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 97d9ecbe19f24ba5e4000de7bdbd3861ca2de850..687d493904f217ef2c46fc3af96e60dd4012df50 100644
--- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php
+++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backend\Block\Widget\Grid;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Backend\Block\Widget\Grid\ExportInterface
 {
     /**
@@ -190,7 +192,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba
         parent::_construct();
         $this->_emptyText = __('We couldn\'t find any records.');
 
-        $this->_directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->_directory = $this->_filesystem->getDirectoryWrite(DirectoryList::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 ffd1a9df18f98661b20d274ad3cb7a512237a122..1416a260cd0083981ee7ee50abb7fb016f2c1c4f 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Store.php
@@ -24,6 +24,8 @@
 namespace Magento\Backend\Controller\Adminhtml\System;
 
 use Magento\Backend\App\Action;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Store controller
@@ -101,21 +103,15 @@ class Store extends Action
             return $this;
         }
         try {
+            /** @var \Magento\Backup\Model\Db $backupDb */
             $backupDb = $this->_objectManager->create('Magento\Backup\Model\Db');
-            $backup = $this->_objectManager->create(
-                'Magento\Backup\Model\Backup'
-            )->setTime(
-                time()
-            )->setType(
-                'db'
-            )->setPath(
-                $this->_objectManager->get(
-                    'Magento\Framework\App\Filesystem'
-                )->getPath(
-                    \Magento\Framework\App\Filesystem::VAR_DIR
-                ) . '/backups'
-            );
-
+            /** @var \Magento\Backup\Model\Backup $backup */
+            $backup = $this->_objectManager->create('Magento\Backup\Model\Backup');
+            /** @var Filesystem $filesystem */
+            $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+            $backup->setTime(time())
+                ->setType('db')
+                ->setPath($filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath('backups'));
             $backupDb->createBackup($backup);
             $this->messageManager->addSuccess(__('The database was backed up.'));
         } catch (\Magento\Framework\Model\Exception $e) {
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 b49f3a99614ffa1bf0948ec5c5909077c83cee9f..7612bc3734aca2894d1e57cc4de930228edb76c9 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/Admin/Robots.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Backend\Model\Config\Backend\Admin;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Robots extends \Magento\Framework\App\Config\Value
 {
     /**
@@ -43,7 +45,7 @@ class Robots extends \Magento\Framework\App\Config\Value
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -52,13 +54,13 @@ class Robots extends \Magento\Framework\App\Config\Value
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Framework\App\Config\ScopeConfigInterface $config,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $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 fc34b881e727adce450f2ec6359f4d751a4d0349..12cffc5be8ada3c725bc2b2033c36999ef5ca067 100644
--- a/app/code/Magento/Backend/Model/Config/Backend/File.php
+++ b/app/code/Magento/Backend/Model/Config/Backend/File.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Backend\Model\Config\Backend;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem;
+
 /**
  * System config file field backend model
  *
@@ -43,7 +46,7 @@ class File extends \Magento\Framework\App\Config\Value
     protected $_maxFileSize = 0;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $_filesystem;
 
@@ -63,7 +66,7 @@ class File extends \Magento\Framework\App\Config\Value
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
      * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
      * @param \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -74,7 +77,7 @@ class File extends \Magento\Framework\App\Config\Value
         \Magento\Framework\App\Config\ScopeConfigInterface $config,
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
         \Magento\Backend\Model\Config\Backend\File\RequestData\RequestDataInterface $requestData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -82,7 +85,7 @@ class File extends \Magento\Framework\App\Config\Value
         $this->_uploaderFactory = $uploaderFactory;
         $this->_requestData = $requestData;
         $this->_filesystem = $filesystem;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
     }
 
@@ -143,7 +146,7 @@ class File extends \Magento\Framework\App\Config\Value
      */
     public function validateMaxSize($filePath)
     {
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+        $directory = $this->_filesystem->getDirectoryRead(DirectoryList::SYS_TMP);
         if ($this->_maxFileSize > 0 && $directory->stat(
             $directory->getRelativePath($filePath)
         )['size'] > $this->_maxFileSize * 1024
diff --git a/app/code/Magento/Backend/Model/Session/AdminConfig.php b/app/code/Magento/Backend/Model/Session/AdminConfig.php
index 614fb677d30a56787f40f9dcf34725aa14853c44..fff8c358482c9a2be7a73d2d3d630d47287e5aeb 100644
--- a/app/code/Magento/Backend/Model/Session/AdminConfig.php
+++ b/app/code/Magento/Backend/Model/Session/AdminConfig.php
@@ -26,6 +26,7 @@
 namespace Magento\Backend\Model\Session;
 
 use Magento\Backend\App\Area\FrontNameResolver;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Session\Config;
 use Magento\Framework\UrlInterface;
 
@@ -56,7 +57,7 @@ class AdminConfig extends Config
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Framework\Stdlib\String $stringHelper
      * @param \Magento\Framework\App\RequestInterface $request
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param string $scopeType
      * @param FrontNameResolver $frontNameResolver
      * @param \Magento\Framework\StoreManagerInterface $storeManager
@@ -72,7 +73,7 @@ class AdminConfig extends Config
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Framework\Stdlib\String $stringHelper,
         \Magento\Framework\App\RequestInterface $request,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         $scopeType,
         FrontNameResolver $frontNameResolver,
         \Magento\Framework\StoreManagerInterface $storeManager,
diff --git a/app/code/Magento/Backend/README.md b/app/code/Magento/Backend/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..385ca0f917613cea72d08bf95c737e39c88337f6
--- /dev/null
+++ b/app/code/Magento/Backend/README.md
@@ -0,0 +1,4 @@
+The Backend module contains common infrastructure and assets for other modules to be defined and used in their
+administration user interface (UI). It does not contain anything specific to other modules. Among many things it
+handles the logic of authenticating and authorizing users, configuring locale, layout, search, session, translation and
+several other configurations for admin user.
diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json
index d1acaa1ece578c1a415492dc40780bd6077bf160..efb4d4cfa3634dbd6d41481cf294c7063d1503bc 100644
--- a/app/code/Magento/Backend/composer.json
+++ b/app/code/Magento/Backend/composer.json
@@ -3,26 +3,26 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-cron": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-reports": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-user": "0.1.0-alpha100",
-        "magento/module-backup": "0.1.0-alpha100",
-        "magento/module-email": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-translation": "0.1.0-alpha100",
-        "magento/module-require-js": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-cron": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-reports": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-user": "0.1.0-alpha101",
+        "magento/module-backup": "0.1.0-alpha101",
+        "magento/module-email": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-translation": "0.1.0-alpha101",
+        "magento/module-require-js": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php
index 388baac9c82bf61bbf102eaf9ded920ba03c808e..1f121546b671e0b4596d6d5905789af0b95dd802 100644
--- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php
+++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php
@@ -24,6 +24,9 @@
  */
 namespace Magento\Backup\Controller\Adminhtml\Index;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Create extends \Magento\Backup\Controller\Adminhtml\Index
 {
     /**
@@ -86,11 +89,11 @@ class Create extends \Magento\Backup\Controller\Adminhtml\Index
             }
 
             if ($type != \Magento\Framework\Backup\Factory::TYPE_DB) {
-                $backupManager->setRootDir(
-                    $this->_objectManager->get('Magento\Framework\App\Filesystem')->getPath()
-                )->addIgnorePaths(
-                    $helper->getBackupIgnorePaths()
-                );
+                /** @var Filesystem $filesystem */
+                $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+                $backupManager->setRootDir($filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath())
+                    ->addIgnorePaths($helper->getBackupIgnorePaths())
+                ;
             }
 
             $successMessage = $helper->getCreateSuccessMessageByType($type);
diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php
index 6a41d6c42b332fc0c2bff3795330070d82b0966d..fcd84fe0cca6afcc4bc988e95b0cab38c7166c1f 100644
--- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php
+++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Download.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\Backup\Controller\Adminhtml\Index;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Download extends \Magento\Backup\Controller\Adminhtml\Index
 {
 
@@ -49,7 +51,7 @@ class Download extends \Magento\Backup\Controller\Adminhtml\Index
         $response = $this->_fileFactory->create(
             $fileName,
             null,
-            \Magento\Framework\App\Filesystem::VAR_DIR,
+            DirectoryList::VAR_DIR,
             'application/octet-stream',
             $backup->getSize()
         );
diff --git a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php
index 94c7927e5c10667f8a7382c1fd84aee408aa1f69..08b01ed3a9f6687d0f068f6e98b296a538eb8e19 100644
--- a/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php
+++ b/app/code/Magento/Backup/Controller/Adminhtml/Index/Rollback.php
@@ -24,6 +24,9 @@
  */
 namespace Magento\Backup\Controller\Adminhtml\Index;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Rollback extends \Magento\Backup\Controller\Adminhtml\Index
 {
     /**
@@ -109,11 +112,11 @@ class Rollback extends \Magento\Backup\Controller\Adminhtml\Index
 
             if ($type != \Magento\Framework\Backup\Factory::TYPE_DB) {
 
-                $backupManager->setRootDir(
-                    $this->_objectManager->get('Magento\Framework\App\Filesystem')->getPath()
-                )->addIgnorePaths(
-                    $helper->getRollbackIgnorePaths()
-                );
+                /** @var Filesystem $filesystem */
+                $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+                $backupManager->setRootDir($filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath())
+                    ->addIgnorePaths($helper->getRollbackIgnorePaths())
+                ;
 
                 if ($this->getRequest()->getParam('use_ftp', false)) {
                     $backupManager->setUseFtp(
diff --git a/app/code/Magento/Backup/Helper/Data.php b/app/code/Magento/Backup/Helper/Data.php
index 4b38d04e4f3fd0bdb5e2e0ccc8e4279f5c7013d2..c260073c2fbb42a725907e7764c06df99e9760de 100644
--- a/app/code/Magento/Backup/Helper/Data.php
+++ b/app/code/Magento/Backup/Helper/Data.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backup\Helper;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\MaintenanceMode;
 
 /**
@@ -31,7 +33,7 @@ use Magento\Framework\App\MaintenanceMode;
 class Data extends \Magento\Framework\App\Helper\AbstractHelper
 {
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $_filesystem;
 
@@ -49,13 +51,13 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      * Construct
      *
      * @param \Magento\Framework\App\Helper\Context $context
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param \Magento\Framework\AuthorizationInterface $authorization
      * @param \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         \Magento\Framework\AuthorizationInterface $authorization,
         \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList
     ) {
@@ -112,7 +114,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getBackupsDir()
     {
-        return $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/backups';
+        return $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR)->getAbsolutePath('backups');
     }
 
     /**
@@ -183,13 +185,14 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
         return array(
             '.git',
             '.svn',
-            $this->_filesystem->getPath(MaintenanceMode::FLAG_DIR) . '/' . MaintenanceMode::FLAG_FILENAME,
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::SESSION_DIR),
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::CACHE_DIR),
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::LOG_DIR),
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/full_page_cache',
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/locks',
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/report'
+            $this->_filesystem->getDirectoryRead(MaintenanceMode::FLAG_DIR)
+                ->getAbsolutePath(MaintenanceMode::FLAG_FILENAME),
+            $this->_filesystem->getDirectoryRead(DirectoryList::SESSION)->getAbsolutePath(),
+            $this->_filesystem->getDirectoryRead(DirectoryList::CACHE)->getAbsolutePath(),
+            $this->_filesystem->getDirectoryRead(DirectoryList::LOG)->getAbsolutePath(),
+            $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath('full_page_cache'),
+            $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath('locks'),
+            $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath('report'),
         );
     }
 
@@ -203,13 +206,14 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
         return array(
             '.svn',
             '.git',
-            $this->_filesystem->getPath(MaintenanceMode::FLAG_DIR) . '/' . MaintenanceMode::FLAG_FILENAME,
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::SESSION_DIR),
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::LOG_DIR),
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/locks',
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/report',
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR) . '/errors',
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR) . '/index.php'
+            $this->_filesystem->getDirectoryRead(MaintenanceMode::FLAG_DIR)
+                ->getAbsolutePath(MaintenanceMode::FLAG_FILENAME),
+            $this->_filesystem->getDirectoryRead(DirectoryList::SESSION)->getAbsolutePath(),
+            $this->_filesystem->getDirectoryRead(DirectoryList::LOG)->getAbsolutePath(),
+            $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath('locks'),
+            $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath('report'),
+            $this->_filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath('errors'),
+            $this->_filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath('index.php'),
         );
     }
 
diff --git a/app/code/Magento/Backup/Model/Backup.php b/app/code/Magento/Backup/Model/Backup.php
index a3c64cabe044cb12762bc64d0c351166a0523a21..c16e52612131974352a29f71662e786f44877069 100644
--- a/app/code/Magento/Backup/Model/Backup.php
+++ b/app/code/Magento/Backup/Model/Backup.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backup\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Backup file item model
  *
@@ -52,7 +54,7 @@ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Bac
     protected $_stream = null;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -90,7 +92,7 @@ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Bac
      * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
      * @param \Magento\Backend\Model\Auth\Session $authSession
      * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param array $data
      */
     public function __construct(
@@ -98,14 +100,14 @@ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Bac
         \Magento\Framework\Locale\ResolverInterface $localeResolver,
         \Magento\Backend\Model\Auth\Session $authSession,
         \Magento\Framework\Encryption\EncryptorInterface $encryptor,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $data = array()
     ) {
         $this->_encryptor = $encryptor;
         parent::__construct($data);
 
         $this->_filesystem = $filesystem;
-        $this->varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $this->_helper = $helper;
         $this->_localeResolver = $localeResolver;
         $this->_backendAuthSession = $authSession;
@@ -308,11 +310,11 @@ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Bac
 
         try {
             /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $varDirectory */
-            $varDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+            $varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
             $this->_stream = $varDirectory->openFile(
                 $this->_getFilePath(),
                 $mode,
-                \Magento\Framework\App\Filesystem::WRAPPER_CONTENT_ZLIB
+                \Magento\Framework\Filesystem\DriverPool::ZLIB
             );
         } catch (\Magento\Framework\Filesystem\FilesystemException $e) {
             throw new \Magento\Framework\Backup\Exception\NotEnoughPermissions(
@@ -403,7 +405,7 @@ class Backup extends \Magento\Framework\Object implements \Magento\Framework\Bac
         }
 
         /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $directory */
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $directory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $directory = $directory->readFile($this->_getFilePath());
 
         echo $directory;
diff --git a/app/code/Magento/Backup/Model/Fs/Collection.php b/app/code/Magento/Backup/Model/Fs/Collection.php
index b93d7125ef4a330d381a6b9cc2688552abc993b9..683ff7945e5d4ebea0eec6d01f6616600be50fee 100644
--- a/app/code/Magento/Backup/Model/Fs/Collection.php
+++ b/app/code/Magento/Backup/Model/Fs/Collection.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backup\Model\Fs;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Backup data collection
  */
@@ -57,13 +59,13 @@ class Collection extends \Magento\Framework\Data\Collection\Filesystem
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Backup\Helper\Data $backupData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Backup\Model\Backup $backup
      */
     public function __construct(
         \Magento\Core\Model\EntityFactory $entityFactory,
         \Magento\Backup\Helper\Data $backupData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Backup\Model\Backup $backup
     ) {
         $this->_backupData = $backupData;
@@ -71,7 +73,7 @@ class Collection extends \Magento\Framework\Data\Collection\Filesystem
 
         $this->_filesystem = $filesystem;
         $this->_backup = $backup;
-        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->_varDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
 
         $this->_hideBackupsForApache();
 
diff --git a/app/code/Magento/Backup/Model/Observer.php b/app/code/Magento/Backup/Model/Observer.php
index df14190b7182d16e1a0b2bd9886587aa2442fa33..43687e619b9729ff9f78d8efcae0cf2bae491e92 100644
--- a/app/code/Magento/Backup/Model/Observer.php
+++ b/app/code/Magento/Backup/Model/Observer.php
@@ -29,6 +29,7 @@
  */
 namespace Magento\Backup\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Store\Model\ScopeInterface;
 
 class Observer
@@ -75,7 +76,7 @@ class Observer
     /**
      * Filesystem facade
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -94,7 +95,7 @@ class Observer
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\Logger $logger
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Backup\Factory $backupFactory
      * @param \Magento\Framework\App\MaintenanceMode $maintenanceMode
      */
@@ -103,7 +104,7 @@ class Observer
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\Logger $logger,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Backup\Factory $backupFactory,
         \Magento\Framework\App\MaintenanceMode $maintenanceMode
     ) {
@@ -149,7 +150,7 @@ class Observer
 
             if ($type != \Magento\Framework\Backup\Factory::TYPE_DB) {
                 $backupManager->setRootDir(
-                    $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR)
+                    $this->_filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath()
                 )->addIgnorePaths(
                     $this->_backupData->getBackupIgnorePaths()
                 );
diff --git a/app/code/Magento/Backup/README.md b/app/code/Magento/Backup/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..661f8a5d6ddd86f23772c9f595526420ae51dd9e
--- /dev/null
+++ b/app/code/Magento/Backup/README.md
@@ -0,0 +1,3 @@
+The Backup module allows administrators to perform backups and rollbacks. Types of backups include system, database and media backups. This module relies on the Cron module to schedule backups.
+
+This module does not effect the storefront.
\ No newline at end of file
diff --git a/app/code/Magento/Backup/composer.json b/app/code/Magento/Backup/composer.json
index 88026055c8f5156631e678f01f892a6d5ca909fd..8f5754f8e07bbf5befe093d8cb05281770022405 100644
--- a/app/code/Magento/Backup/composer.json
+++ b/app/code/Magento/Backup/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-cron": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-cron": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php
index c1d30c9cf4cee355f7ee21f64ee42e98aa9250d0..bccf84b173c451ad75caa0dec25abb66b1001d91 100644
--- a/app/code/Magento/Bundle/Model/Product/Type.php
+++ b/app/code/Magento/Bundle/Model/Product/Type.php
@@ -148,7 +148,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Framework\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\Logger $logger
      * @param \Magento\Catalog\Helper\Product $catalogProduct
@@ -173,7 +173,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Framework\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\Logger $logger,
         \Magento\Catalog\Helper\Product $catalogProduct,
@@ -335,9 +335,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
                     $virtualCount++;
                 }
             }
-            if ($virtualCount == count($selections)) {
-                return true;
-            }
+            return  $virtualCount == count($selections);
         }
         return false;
     }
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 4d7f57e5e92f748a46532d5efceabc702158c4b8..cbb823a8a8a5f01a92b43594f9c480aa34ea4ed2 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
@@ -39,7 +39,7 @@ class Creditmemo extends AbstractItems
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -50,7 +50,7 @@ class Creditmemo extends AbstractItems
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Model\Resource\AbstractResource $resource = 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 c12f8df0c5ac922ab158b8aafe6323411085c6ed..4b9122d25ce83e5a5edca3714ff80527f74bfcee 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
@@ -37,7 +37,7 @@ class Invoice extends AbstractItems
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\String $coreString
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -48,7 +48,7 @@ class Invoice extends AbstractItems
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\String $coreString,
         \Magento\Framework\Model\Resource\AbstractResource $resource = 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 51d2c4c62741922266583d7e099a128bd1840ea3..90953b101aab72d1001b6cdbb4245d6a76ec5508 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
@@ -37,7 +37,7 @@ class Shipment extends AbstractItems
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -48,7 +48,7 @@ class Shipment extends AbstractItems
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
diff --git a/app/code/Magento/Bundle/composer.json b/app/code/Magento/Bundle/composer.json
index bab8976e1277c5ccaad213f4d5ad2b2754cfc949..d0e94cec88da3d85be1da591f43c0fde95b2e456 100644
--- a/app/code/Magento/Bundle/composer.json
+++ b/app/code/Magento/Bundle/composer.json
@@ -3,24 +3,24 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-catalog-rule": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-gift-message": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
-        "magento/module-webapi": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-catalog-rule": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-gift-message": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
+        "magento/module-webapi": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php
index 7e5ffa62633ce60660d87bfe8c2f2fd4f9410706..4f13ca720f027444f14d63f6cf7a09149c863d47 100644
--- a/app/code/Magento/Captcha/Helper/Adminhtml/Data.php
+++ b/app/code/Magento/Captcha/Helper/Adminhtml/Data.php
@@ -40,7 +40,7 @@ class Data extends \Magento\Captcha\Helper\Data
      * @param \Magento\Framework\App\Helper\Context $context
      * @param \Magento\Store\Model\StoreManager $storeManager
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Captcha\Model\CaptchaFactory $factory
      * @param \Magento\Backend\App\ConfigInterface $backendConfig
      */
@@ -48,7 +48,7 @@ class Data extends \Magento\Captcha\Helper\Data
         \Magento\Framework\App\Helper\Context $context,
         \Magento\Store\Model\StoreManager $storeManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $config,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\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 f7ed3ae927f470e71d3d99a266aee6d16637c52f..d77c820d3caca25dec663d251fcabfde63eaf1a1 100644
--- a/app/code/Magento/Captcha/Helper/Data.php
+++ b/app/code/Magento/Captcha/Helper/Data.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Captcha\Helper;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Captcha image model
  */
@@ -65,7 +68,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
     protected $_config;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $_filesystem;
 
@@ -83,14 +86,14 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      * @param \Magento\Framework\App\Helper\Context $context
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param \Magento\Captcha\Model\CaptchaFactory $factory
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $config,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         \Magento\Captcha\Model\CaptchaFactory $factory
     ) {
         $this->_storeManager = $storeManager;
@@ -150,11 +153,11 @@ class Data extends \Magento\Framework\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\Framework\App\Filesystem::LIB_INTERNAL);
+            $libDir = $this->_filesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL);
             foreach ($fontsConfig as $fontName => $fontConfig) {
                 $fonts[$fontName] = array(
                     'label' => $fontConfig['label'],
-                    'path' => $libDir . '/' . $fontConfig['path']
+                    'path' => $libDir->getAbsolutePath($fontConfig['path'])
                 );
             }
         }
@@ -169,7 +172,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getImgDir($website = null)
     {
-        $mediaDir = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $mediaDir = $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $captchaDir = '/captcha/' . $this->_getWebsiteCode($website);
         $mediaDir->create($captchaDir);
         $mediaDir->changePermissions($captchaDir, 0775);
@@ -197,7 +200,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
     public function getImgUrl($website = null)
     {
         return $this->_storeManager->getStore()->getBaseUrl(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         ) . 'captcha' . '/' . $this->_getWebsiteCode(
             $website
         ) . '/';
diff --git a/app/code/Magento/Captcha/Model/Cron.php b/app/code/Magento/Captcha/Model/Cron.php
index 4ac212eefae09478d4627d0fcfbfe38716d506d9..66bae56e6c8e9149d1150dfe8f72566de2d69328 100644
--- a/app/code/Magento/Captcha/Model/Cron.php
+++ b/app/code/Magento/Captcha/Model/Cron.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Captcha\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Captcha cron actions
  */
@@ -61,20 +63,20 @@ class Cron
      * @param Resource\LogFactory $resLogFactory
      * @param \Magento\Captcha\Helper\Data $helper
      * @param \Magento\Captcha\Helper\Adminhtml\Data $adminHelper
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Store\Model\StoreManager $storeManager
      */
     public function __construct(
         Resource\LogFactory $resLogFactory,
         \Magento\Captcha\Helper\Data $helper,
         \Magento\Captcha\Helper\Adminhtml\Data $adminHelper,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Store\Model\StoreManager $storeManager
     ) {
         $this->_resLogFactory = $resLogFactory;
         $this->_helper = $helper;
         $this->_adminHelper = $adminHelper;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_storeManager = $storeManager;
     }
 
diff --git a/app/code/Magento/Captcha/composer.json b/app/code/Magento/Captcha/composer.json
index aeb2b865eac448207e5f0da1399a0ab02943d3da..e31b4b16776c3c59268415b1fc44ccb903d11254 100644
--- a/app/code/Magento/Captcha/composer.json
+++ b/app/code/Magento/Captcha/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Catalog/Block/Product/Context.php b/app/code/Magento/Catalog/Block/Product/Context.php
index ae4512a66517d1d3d2fe2d3a2b8c7ead09775386..30911032871dd1bf0b68d891b1d117aaaf3ee63e 100644
--- a/app/code/Magento/Catalog/Block/Product/Context.php
+++ b/app/code/Magento/Catalog/Block/Product/Context.php
@@ -107,7 +107,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\View\TemplateEnginePool $enginePool
      * @param \Magento\Framework\App\State $appState
@@ -146,7 +146,7 @@ class Context extends \Magento\Framework\View\Element\Template\Context
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
         \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\View\TemplateEnginePool $enginePool,
         \Magento\Framework\App\State $appState,
diff --git a/app/code/Magento/Catalog/Block/Product/Gallery.php b/app/code/Magento/Catalog/Block/Product/Gallery.php
index d303bad8442d6cd42326f5f2f540d0d386793548..89d2c357b3609155edb2acb083bece58f86b01ff 100644
--- a/app/code/Magento/Catalog/Block/Product/Gallery.php
+++ b/app/code/Magento/Catalog/Block/Product/Gallery.php
@@ -30,6 +30,7 @@
 namespace Magento\Catalog\Block\Product;
 
 use Magento\Catalog\Model\Product;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Data\Collection;
 
 class Gallery extends \Magento\Framework\View\Element\Template
@@ -122,7 +123,7 @@ class Gallery extends \Magento\Framework\View\Element\Template
     {
         $file = $this->getCurrentImage()->getPath();
 
-        if ($this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR)->isFile($file)) {
+        if ($this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->isFile($file)) {
             $size = getimagesize($file);
             if (isset($size[0])) {
                 if ($size[0] > 600) {
diff --git a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php
index c306c98005840076b8a6c39649d8c24d48fba4c0..eee14a3d7dafbecc940eb96fc907bab1d497ecf4 100644
--- a/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php
+++ b/app/code/Magento/Catalog/Controller/Adminhtml/Product/Gallery/Upload.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\Catalog\Controller\Adminhtml\Product\Gallery;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Upload extends \Magento\Backend\App\Action
 {
     /**
@@ -49,9 +51,9 @@ class Upload extends \Magento\Backend\App\Action
             $uploader->setFilesDispersion(true);
             /** @var \Magento\Framework\Filesystem\Directory\Read $mediaDirectory */
             $mediaDirectory = $this->_objectManager->get(
-                'Magento\Framework\App\Filesystem'
+                'Magento\Framework\Filesystem'
             )->getDirectoryRead(
-                \Magento\Framework\App\Filesystem::MEDIA_DIR
+                DirectoryList::MEDIA
             );
             $config = $this->_objectManager->get('Magento\Catalog\Model\Product\Media\Config');
             $result = $uploader->save($mediaDirectory->getAbsolutePath($config->getBaseTmpMediaPath()));
diff --git a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php
index a63a8c46757024b7c4e118e1d5ded5a51ec9b0c1..4456b5b7b902ddae4190383ae01327ebeaf22e51 100644
--- a/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php
+++ b/app/code/Magento/Catalog/Helper/Product/Flat/Indexer.php
@@ -82,7 +82,7 @@ class Indexer extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * @var \Magento\Catalog\Model\Attribute\Config
      */
-    private $_attributeConfig;
+    protected $_attributeConfig;
 
     /**
      * @var array
diff --git a/app/code/Magento/Catalog/Helper/Product/Options.php b/app/code/Magento/Catalog/Helper/Product/Options.php
index b0d5f60a434218615efac719370194dacca336c0..e50b4ea390405894001f8f5913f1d87b8494e43c 100644
--- a/app/code/Magento/Catalog/Helper/Product/Options.php
+++ b/app/code/Magento/Catalog/Helper/Product/Options.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Helper\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Catalog Product Custom Options helper
  *
@@ -37,12 +39,12 @@ class Options extends \Magento\Framework\App\Helper\AbstractHelper
 
     /**
      * @param \Magento\Framework\App\Helper\Context $context
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
-    public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\App\Filesystem $filesystem)
+    public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\Filesystem $filesystem)
     {
         parent::__construct($context);
-        $this->directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->directory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
     }
 
     /**
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 c3b6de549709a274c0597e08f3c8048a39d5bc3c..313507ef63b1b1d9bdeeb96ec4bb631be2b15d2a 100644
--- a/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
+++ b/app/code/Magento/Catalog/Model/Category/Attribute/Backend/Image.php
@@ -30,6 +30,8 @@
  */
 namespace Magento\Catalog\Model\Category\Attribute\Backend;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
 {
     /**
@@ -40,7 +42,7 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
     /**
      * Filesystem facade
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -55,12 +57,12 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
      * Construct
      *
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
      */
     public function __construct(
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
     ) {
         $this->_filesystem = $filesystem;
@@ -90,7 +92,7 @@ class Image extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
         }
 
         $path = $this->_filesystem->getDirectoryRead(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->getAbsolutePath(
             'catalog/category/'
         );
diff --git a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php
index 48c850836f0672e4ad505aa3ae5ebcbec7e20a05..9fd739a5bb47542d4137ebbe6875f20f23b1d08c 100644
--- a/app/code/Magento/Catalog/Model/Layer/Filter/Price.php
+++ b/app/code/Magento/Catalog/Model/Layer/Filter/Price.php
@@ -236,22 +236,6 @@ class Price extends \Magento\Catalog\Model\Layer\Filter\AbstractFilter
         return $items;
     }
 
-    /**
-     * Prepare text of item label
-     *
-     * @param      int $range
-     * @param      float $value
-     * @return     string
-     * @deprecated since 1.7.0.0
-     */
-    protected function _renderItemLabel($range, $value)
-    {
-        $fromPrice = $this->priceCurrency->format(($value - 1) * $range);
-        $toPrice = $this->priceCurrency->format($value * $range);
-
-        return __('%1 - %2', $fromPrice, $toPrice);
-    }
-
     /**
      * Prepare text of range label
      *
diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Search/CollectionFilter.php b/app/code/Magento/Catalog/Model/Layer/Search/CollectionFilter.php
similarity index 84%
rename from app/code/Magento/CatalogSearch/Model/Layer/Search/CollectionFilter.php
rename to app/code/Magento/Catalog/Model/Layer/Search/CollectionFilter.php
index e6c5f4f169d3df725d8999b5a7425a3f045793ef..1a2a476e822653dd3bd5511083115d262b2b787d 100644
--- a/app/code/Magento/CatalogSearch/Model/Layer/Search/CollectionFilter.php
+++ b/app/code/Magento/Catalog/Model/Layer/Search/CollectionFilter.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -22,13 +21,13 @@
  * @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\CatalogSearch\Model\Layer\Search;
+namespace Magento\Catalog\Model\Layer\Search;
 
 use Magento\Catalog\Model\Config;
 use Magento\Catalog\Model\Layer\CollectionFilterInterface;
 use Magento\Catalog\Model\Product\Visibility;
+use Magento\Framework\DB\Select;
 use Magento\Framework\StoreManagerInterface;
-use Magento\Search\Model\QueryFactory;
 
 class CollectionFilter implements CollectionFilterInterface
 {
@@ -37,11 +36,6 @@ class CollectionFilter implements CollectionFilterInterface
      */
     protected $catalogConfig;
 
-    /**
-     * @var \Magento\Search\Model\QueryFactory
-     */
-    protected $queryFactory;
-
     /**
      * @var StoreManagerInterface
      */
@@ -54,27 +48,25 @@ class CollectionFilter implements CollectionFilterInterface
 
     /**
      * @param Config $catalogConfig
-     * @param \Magento\Search\Model\QueryFactory $queryFactory
      * @param StoreManagerInterface $storeManager
      * @param Visibility $productVisibility
      */
     public function __construct(
         Config $catalogConfig,
-        QueryFactory $queryFactory,
         StoreManagerInterface $storeManager,
         Visibility $productVisibility
     ) {
         $this->catalogConfig = $catalogConfig;
-        $this->queryFactory = $queryFactory;
         $this->storeManager = $storeManager;
         $this->productVisibility = $productVisibility;
     }
 
     /**
+     * Filter product collection
+     *
      * @param \Magento\Catalog\Model\Resource\Product\Collection $collection
      * @param \Magento\Catalog\Model\Category $category
      * @return void
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
      */
     public function filter(
         $collection,
@@ -82,13 +74,13 @@ class CollectionFilter implements CollectionFilterInterface
     ) {
         $collection
             ->addAttributeToSelect($this->catalogConfig->getProductAttributes())
-            ->addSearchFilter($this->queryFactory->get()->getQueryText())
             ->setStore($this->storeManager->getStore())
             ->addMinimalPrice()
             ->addFinalPrice()
             ->addTaxPercents()
             ->addStoreFilter()
             ->addUrlRewrite()
-            ->setVisibility($this->productVisibility->getVisibleInSearchIds());
+            ->setVisibility($this->productVisibility->getVisibleInSearchIds())
+            ->setOrder('relevance', Select::SQL_ASC);
     }
 }
diff --git a/app/code/Magento/Catalog/Model/Layer/Search/Context.php b/app/code/Magento/Catalog/Model/Layer/Search/Context.php
index b1d5e1fbd21806e4ff3658d9ec40006f1114befa..c75345d496a9b231a4b4f9a5fdf68dd8a9a8050a 100644
--- a/app/code/Magento/Catalog/Model/Layer/Search/Context.php
+++ b/app/code/Magento/Catalog/Model/Layer/Search/Context.php
@@ -24,20 +24,21 @@
  */
 namespace Magento\Catalog\Model\Layer\Search;
 
-use Magento\CatalogSearch\Model\Layer\Search\CollectionFilter;
-use Magento\CatalogSearch\Model\Layer\Search\StateKey;
+use Magento\Catalog\Model\Layer\CollectionFilterInterface;
+use Magento\Catalog\Model\Layer\ItemCollectionProviderInterface;
+use Magento\Catalog\Model\Layer\StateKeyInterface;
 
 class Context extends \Magento\Catalog\Model\Layer\Context
 {
     /**
-     * @param ItemCollectionProvider $collectionProvider
-     * @param StateKey $stateKey
-     * @param CollectionFilter $collectionFilter
+     * @param ItemCollectionProviderInterface $collectionProvider
+     * @param StateKeyInterface $stateKey
+     * @param CollectionFilterInterface $collectionFilter
      */
     public function __construct(
-        \Magento\Catalog\Model\Layer\Search\ItemCollectionProvider $collectionProvider,
-        \Magento\CatalogSearch\Model\Layer\Search\StateKey $stateKey,
-        \Magento\CatalogSearch\Model\Layer\Search\CollectionFilter $collectionFilter
+        ItemCollectionProviderInterface $collectionProvider,
+        StateKeyInterface $stateKey,
+        CollectionFilterInterface $collectionFilter
     ) {
         parent::__construct($collectionProvider, $stateKey, $collectionFilter);
     }
diff --git a/app/code/Magento/Catalog/Model/Layer/Search/Filter/Attribute.php b/app/code/Magento/Catalog/Model/Layer/Search/Filter/Attribute.php
index bad9f768c137d395d3cf4dd427bc3f21b9d71bb7..9e44a1685b6389e091cf83ef0f646848c6ecb12f 100644
--- a/app/code/Magento/Catalog/Model/Layer/Search/Filter/Attribute.php
+++ b/app/code/Magento/Catalog/Model/Layer/Search/Filter/Attribute.php
@@ -23,7 +23,7 @@
  */
 
 /**
- * CatalogSearch layer attribute filter
+ * Layer attribute filter
  *
  */
 namespace Magento\Catalog\Model\Layer\Search\Filter;
diff --git a/app/code/Magento/Catalog/Model/Layer/Search/ItemCollectionProvider.php b/app/code/Magento/Catalog/Model/Layer/Search/ItemCollectionProvider.php
index 04b8edf9b46fb61d3a1b48ec6263c3109783fbf4..b4e2ebb56f30a42e931c089242861589ccfa1856 100644
--- a/app/code/Magento/Catalog/Model/Layer/Search/ItemCollectionProvider.php
+++ b/app/code/Magento/Catalog/Model/Layer/Search/ItemCollectionProvider.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,33 +24,30 @@
 namespace Magento\Catalog\Model\Layer\Search;
 
 use Magento\Catalog\Model\Layer\ItemCollectionProviderInterface;
-use Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory;
+use Magento\Catalog\Model\Resource\Product\CollectionFactory;
 
 class ItemCollectionProvider implements ItemCollectionProviderInterface
 {
+
     /**
-     * @var \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory
+     * @var CollectionFactory
      */
-    protected $fulltextCollectionFactory;
+    private $collectionFactory;
 
     /**
-     * ItemCollectionProvider constructor
-     *
-     * @param CollectionFactory $fulltextCollectionFactory
+     * @param CollectionFactory $collectionFactory
      */
-    public function __construct(CollectionFactory $fulltextCollectionFactory)
+    public function __construct(CollectionFactory $collectionFactory)
     {
-        $this->fulltextCollectionFactory = $fulltextCollectionFactory;
+        $this->collectionFactory = $collectionFactory;
     }
 
     /**
-     * Retrieve item colleciton
-     *
      * @param \Magento\Catalog\Model\Category $category
      * @return \Magento\Catalog\Model\Resource\Product\Collection
      */
     public function getCollection(\Magento\Catalog\Model\Category $category)
     {
-        return $this->fulltextCollectionFactory->create();
+        return $this->collectionFactory->create();
     }
 }
diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php
index 5ac4bd524d102c0d9e377e5590d46f8a54e679f6..3474930ad77e7910f7e1df375777574674921225 100644
--- a/app/code/Magento/Catalog/Model/Product.php
+++ b/app/code/Magento/Catalog/Model/Product.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Catalog\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Pricing\Object\SaleableInterface;
 use Magento\Framework\Object\IdentityInterface;
 
@@ -231,7 +232,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements IdentityIn
     /**
      * Filesystem facade
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -280,7 +281,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements IdentityIn
      * @param Resource\Product $resource
      * @param Resource\Product\Collection $resourceCollection
      * @param \Magento\Framework\Data\CollectionFactory $collectionFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Indexer\Model\IndexerInterface $categoryIndexer
      * @param Indexer\Product\Flat\Processor $productFlatIndexerProcessor
      * @param Indexer\Product\Price\Processor $productPriceIndexerProcessor
@@ -309,7 +310,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements IdentityIn
         Resource\Product $resource,
         Resource\Product\Collection $resourceCollection,
         \Magento\Framework\Data\CollectionFactory $collectionFactory,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Indexer\Model\IndexerInterface $categoryIndexer,
         \Magento\Catalog\Model\Indexer\Product\Flat\Processor $productFlatIndexerProcessor,
         \Magento\Catalog\Model\Indexer\Product\Price\Processor $productPriceIndexerProcessor,
@@ -1242,7 +1243,7 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements IdentityIn
      */
     public function getMediaGalleryImages()
     {
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $directory = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA);
         if (!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {
             $images = $this->_collectionFactory->create();
             foreach ($this->getMediaGallery('images') as $image) {
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 5c0b87889784b7c84daae8f0d7e1d1e30cc4ed08..183594e8200cbe3cbf9b14f8db409dfd389f30c7 100644
--- a/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
+++ b/app/code/Magento/Catalog/Model/Product/Attribute/Backend/Media.php
@@ -29,6 +29,7 @@
  */
 namespace Magento\Catalog\Model\Product\Attribute\Backend;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Model\Exception;
 
 class Media extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
@@ -92,7 +93,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\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Media $resourceProductAttribute
      */
     public function __construct(
@@ -102,7 +103,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\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Media $resourceProductAttribute
     ) {
         $this->_productFactory = $productFactory;
@@ -111,11 +112,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\Framework\App\Filesystem::MEDIA_DIR);
-
-        $this->_mediaDirectory->create($this->_mediaConfig->getBaseMediaPath());
-        $this->_mediaDirectory->create($this->_mediaConfig->getBaseTmpMediaPath());
-
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         parent::__construct($logger);
     }
 
diff --git a/app/code/Magento/Catalog/Model/Product/Image.php b/app/code/Magento/Catalog/Model/Product/Image.php
index a926fdae7867fcb4a6020840c8d04425b2f2a73d..971026714d2a077a5573fcc716be28a7ac5657e5 100644
--- a/app/code/Magento/Catalog/Model/Product/Image.php
+++ b/app/code/Magento/Catalog/Model/Product/Image.php
@@ -29,6 +29,7 @@
  */
 namespace Magento\Catalog\Model\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Store\Model\Store;
 use Magento\Framework\Image as MagentoImage;
 
@@ -183,7 +184,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Image\Factory $imageFactory
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
@@ -198,7 +199,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Catalog\Model\Product\Media\Config $catalogProductMediaConfig,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Image\Factory $imageFactory,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\View\FileSystem $viewFileSystem,
@@ -211,7 +212,7 @@ class Image extends \Magento\Framework\Model\AbstractModel
         $this->_catalogProductMediaConfig = $catalogProductMediaConfig;
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $result = $this->_mediaDirectory->create($this->_catalogProductMediaConfig->getBaseMediaPath());
         $this->_imageFactory = $imageFactory;
         $this->_assetRepo = $assetRepo;
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 298b5c23d4e59f708f48b0b8b2482c614420404d..092edb9b2936a94a5ef8b2788912af09d6783dcd 100644
--- a/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
+++ b/app/code/Magento/Catalog/Model/Product/Option/Type/File.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Model\Product\Option\Type;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Model\Exception;
 
 /**
@@ -44,7 +46,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
     protected $_formattedOptionValue = null;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -117,7 +119,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
      * @param \Magento\Catalog\Model\Product\Option\UrlBuilder $urlBuilder
      * @param \Magento\Framework\Escaper $escaper
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\File\Size $fileSize
      * @param array $data
      */
@@ -128,7 +130,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
         \Magento\Catalog\Model\Product\Option\UrlBuilder $urlBuilder,
         \Magento\Framework\Escaper $escaper,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\File\Size $fileSize,
         array $data = array()
     ) {
@@ -137,8 +139,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\Framework\App\Filesystem::ROOT_DIR);
-        $this->_mediaDirectory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_rootDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::ROOT);
+        $this->_mediaDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_fileSize = $fileSize;
         $this->_data = $data;
         parent::__construct($checkoutSession, $scopeConfig, $data);
@@ -362,7 +364,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
 
             $filePath = $dispersion;
 
-            $tmpDirectory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+            $tmpDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::SYS_TMP);
             $fileHash = md5($tmpDirectory->readFile($tmpDirectory->getRelativePath($fileInfo['tmp_name'])));
             $filePath .= '/' . $fileHash . '.' . $extension;
             $fileFullPath = $this->_mediaDirectory->getAbsolutePath($this->_quotePath . $filePath);
@@ -389,7 +391,7 @@ class File extends \Magento\Catalog\Model\Product\Option\Type\DefaultType
                     $_height = $_imageSize[1];
                 }
             }
-            $uri = $this->_filesystem->getUri(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+            $uri = $this->_filesystem->getUri(DirectoryList::MEDIA);
             $this->setUserValue(
                 array(
                     'type' => $fileInfo['type'],
diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
index 865a7f2ee4f30d9cb255765af8ac5dbe6a9a1a7e..9b00dd49a2e96469dd3429f3049f0bd7bd8ec4fb 100644
--- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
+++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Model\Product\Type;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Abstract model for product type implementation
  */
@@ -102,7 +104,7 @@ abstract class AbstractType
     const OPTION_PREFIX = 'option_';
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -181,7 +183,7 @@ abstract class AbstractType
      * @param \Magento\Framework\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\Logger $logger
      * @param array $data
@@ -194,7 +196,7 @@ abstract class AbstractType
         \Magento\Framework\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\Logger $logger,
         array $data = array()
@@ -503,7 +505,7 @@ abstract class AbstractType
 
                         try {
                             $rootDir = $this->_filesystem->getDirectoryWrite(
-                                \Magento\Framework\App\Filesystem::ROOT_DIR
+                                DirectoryList::ROOT
                             );
                             $rootDir->create($rootDir->getRelativePath($path));
                         } catch (\Magento\Framework\Filesystem\FilesystemException $e) {
diff --git a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php
index c87b776ff1277d3905862f5d5346deae60c9a8e7..79bf34f70024d4dfaf2d6760181828479ba0a903 100644
--- a/app/code/Magento/Catalog/Model/Resource/Category/Tree.php
+++ b/app/code/Magento/Catalog/Model/Resource/Category/Tree.php
@@ -174,7 +174,7 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp
     }
 
     /**
-     * Enter description here...
+     * Add data to collection
      *
      * @param Collection $collection
      * @param boolean $sorted
@@ -209,7 +209,7 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp
         $collection->addIdFilter($nodeIds);
         if ($onlyActive) {
 
-            $disabledIds = $this->_getDisabledIds($collection);
+            $disabledIds = $this->_getDisabledIds($collection, $nodeIds);
             if ($disabledIds) {
                 $collection->addFieldToFilter('entity_id', array('nin' => $disabledIds));
             }
@@ -286,19 +286,15 @@ class Tree extends \Magento\Framework\Data\Tree\Dbp
      * Return disable category ids
      *
      * @param Collection $collection
+     * @param array $allIds
      * @return array
      */
-    protected function _getDisabledIds($collection)
+    protected function _getDisabledIds($collection, $allIds)
     {
         $storeId = $this->_storeManager->getStore()->getId();
-
         $this->_inactiveItems = $this->getInactiveCategoryIds();
-
-
         $this->_inactiveItems = array_merge($this->_getInactiveItemIds($collection, $storeId), $this->_inactiveItems);
 
-
-        $allIds = $collection->getAllIds();
         $disabledIds = array();
 
         foreach ($allIds as $id) {
diff --git a/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php b/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php
index 98361f06b2f9042c9214e0d8cc69bb389cae4327..594f0d7f5524d97d8457655cbdfc0ca0b7e0627b 100644
--- a/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php
+++ b/app/code/Magento/Catalog/Model/Resource/Layer/Filter/Price.php
@@ -25,8 +25,6 @@ namespace Magento\Catalog\Model\Resource\Layer\Filter;
 
 /**
  * Catalog Layer Price Filter resource model
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
 class Price extends \Magento\Framework\Model\Resource\Db\AbstractDb
 {
@@ -78,18 +76,6 @@ class Price extends \Magento\Framework\Model\Resource\Db\AbstractDb
         parent::__construct($resource);
     }
 
-    /**
-     * Retrieve maximal price for attribute
-     *
-     * @param \Magento\Catalog\Model\Layer\Filter\Price $filter
-     * @return float
-     * @deprecated since 1.7.0.0
-     */
-    public function getMaxPrice($filter)
-    {
-        return $filter->getLayer()->getProductCollection()->getMaxPrice();
-    }
-
     /**
      * Retrieve array with products counts per price range
      *
@@ -244,28 +230,6 @@ class Price extends \Magento\Framework\Model\Resource\Db\AbstractDb
         );
     }
 
-    /**
-     * Apply attribute filter to product collection
-     *
-     * @param \Magento\Catalog\Model\Layer\Filter\Price $filter
-     * @param int $range
-     * @param int $index the range factor
-     * @return $this
-     * @deprecated since 1.7.0.0
-     */
-    public function applyFilterToCollection($filter, $range, $index)
-    {
-        $select = $filter->getLayer()->getProductCollection()->getSelect();
-        $priceExpr = $this->_getPriceExpression($select);
-        $filter->getLayer()->getProductCollection()->getSelect()->where(
-            $priceExpr . ' >= ' . $this->_getComparingValue($range * ($index - 1))
-        )->where(
-            $priceExpr . ' < ' . $this->_getComparingValue($range * $index)
-        );
-
-        return $this;
-    }
-
     /**
      * Get comparing value sql part
      *
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 ced577ac55df0bba4f4e7a164f9fb3f94c5e5be2..4fc18afeaa1de3a4397635f06d916775a63d0683 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
@@ -24,6 +24,7 @@
 namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend;
 
 use Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Product image attribute backend
@@ -35,7 +36,7 @@ class Image extends AbstractBackend
     /**
      * Filesystem facade
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -48,12 +49,12 @@ class Image extends AbstractBackend
 
     /**
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
      */
     public function __construct(
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Core\Model\File\UploaderFactory $fileUploaderFactory
     ) {
         $this->_filesystem = $filesystem;
@@ -87,7 +88,7 @@ class Image extends AbstractBackend
             return $this;
         }
         $path = $this->_filesystem->getDirectoryRead(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->getAbsolutePath(
             'catalog/product/'
         );
diff --git a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
index ffc76618132de799ff98f0debf5f7b0dc1df1369..ecd76ffd110ab441097a1684dafe5612ef3605fa 100644
--- a/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
+++ b/app/code/Magento/Catalog/Model/Resource/Product/Collection.php
@@ -25,6 +25,7 @@ namespace Magento\Catalog\Model\Resource\Product;
 
 use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
 use Magento\CatalogUrlRewrite\Model\ProductUrlRewriteGenerator;
+use Magento\Framework\DB\Select;
 use Magento\Store\Model\Store;
 use Magento\Customer\Service\V1\CustomerGroupServiceInterface;
 
@@ -1195,7 +1196,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
     {
         $select = clone $this->getSelect();
         /** @var $select \Magento\Framework\DB\Select */
-        $select->reset(\Zend_Db_Select::COLUMNS);
+        $select->reset(Select::COLUMNS);
+        $select->reset(Select::ORDER);
         $select->distinct(true);
         $select->columns('attribute_set_id');
         return $this->getConnection()->fetchCol($select);
@@ -2153,7 +2155,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Collection\AbstractColl
      * @param string $dir
      * @return $this
      */
-    public function setOrder($attribute, $dir = 'desc')
+    public function setOrder($attribute, $dir = Select::SQL_DESC)
     {
         if ($attribute == 'price') {
             $this->addAttributeToSort($attribute, $dir);
diff --git a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php
index b9924e9aa67fc4246228e15b29236b85160db94f..ce74fbf6b6db57d72cdf8e2a91c05551b070b67a 100644
--- a/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php
+++ b/app/code/Magento/Catalog/Service/V1/Data/Eav/Category/Info/Metadata.php
@@ -59,14 +59,6 @@ class Metadata extends AbstractExtensibleObject
 
     const ACTIVE = 'active';
 
-    /**
-     * @return \Magento\Framework\Service\Data\AttributeValue[]|null
-     */
-    public function getCustomAttributes()
-    {
-        $this->_get(self::CUSTOM_ATTRIBUTES_KEY);
-    }
-
     /**
      * @return int|null
      */
diff --git a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteService.php b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteService.php
index 0c80699b6dd34e83229f698a99fe6b4d00dccdcb..7471901226f18e2b5fc6e4d7b557be28444d2601 100644
--- a/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteService.php
+++ b/app/code/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteService.php
@@ -27,12 +27,13 @@ namespace Magento\Catalog\Service\V1\Product\Attribute\Media;
 
 use \Magento\Catalog\Service\V1\Product\Attribute\Media\Data\GalleryEntry;
 use \Magento\Catalog\Service\V1\Product\Attribute\Media\Data\GalleryEntryContent;
-use \Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use \Magento\Catalog\Service\V1\Product\ProductLoader;
 use \Magento\Catalog\Model\Product\Media\Config as MediaConfig;
 use \Magento\Catalog\Model\Product;
 use \Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
 use \Magento\Catalog\Service\V1\Product\Attribute\Media\Data\GalleryEntryContentValidator;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Store\Model\StoreFactory;
 use \Magento\Framework\Exception\InputException;
 use \Magento\Framework\Exception\StateException;
@@ -125,7 +126,7 @@ class WriteService implements WriteServiceInterface
 
         $fileContent = @base64_decode($entryContent->getData(), true);
         $mediaTmpPath = $this->mediaConfig->getBaseTmpMediaPath();
-        $mediaDirectory = $this->filesystem->getDirectoryWrite(Filesystem::MEDIA_DIR);
+        $mediaDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $mediaDirectory->create($mediaTmpPath);
         $fileName = $entryContent->getName() . '.' . $this->mimeTypeExtensionMap[$entryContent->getMimeType()];
         $relativeFilePath = $mediaTmpPath . DIRECTORY_SEPARATOR . $fileName;
diff --git a/app/code/Magento/Catalog/composer.json b/app/code/Magento/Catalog/composer.json
index 46b90630be543da942e78d84961681696a1fad6e..c15d2d0ceead3ac53da02687a0123a0b39353f4b 100644
--- a/app/code/Magento/Catalog/composer.json
+++ b/app/code/Magento/Catalog/composer.json
@@ -3,34 +3,33 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-indexer": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-log": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-widget": "0.1.0-alpha100",
-        "magento/module-wishlist": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-msrp": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-catalog-rule": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-catalog-search": "0.1.0-alpha100",
-        "magento/module-product-alert": "0.1.0-alpha100",
-        "magento/module-url-rewrite": "0.1.0-alpha100",
-        "magento/module-catalog-url-rewrite": "0.1.0-alpha100",
-        "magento/module-page-cache": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-indexer": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-log": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-widget": "0.1.0-alpha101",
+        "magento/module-wishlist": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-msrp": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-catalog-rule": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-product-alert": "0.1.0-alpha101",
+        "magento/module-url-rewrite": "0.1.0-alpha101",
+        "magento/module-catalog-url-rewrite": "0.1.0-alpha101",
+        "magento/module-page-cache": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Catalog/etc/adminhtml/di.xml b/app/code/Magento/Catalog/etc/adminhtml/di.xml
index 59df420f6582034910d9c09cdd148251e3f13627..97cc6699fa12e42728bc81a0b17b82f0c2a0b504 100644
--- a/app/code/Magento/Catalog/etc/adminhtml/di.xml
+++ b/app/code/Magento/Catalog/etc/adminhtml/di.xml
@@ -52,11 +52,6 @@
             </argument>
         </arguments>
     </type>
-    <type name="Magento\Catalog\Helper\Flat\AbstractFlat">
-        <arguments>
-            <argument name="isAvailable" xsi:type="boolean">false</argument>
-        </arguments>
-    </type>
     <type name="Magento\Catalog\Model\Product\CopyConstructor\Composite">
         <arguments>
             <argument name="constructors" xsi:type="array">
diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml
index d330ebfb2fb04a0be132825ac327982b9a5020ca..7c56db0754c112ddfb9a633889a4a9b91892907a 100644
--- a/app/code/Magento/Catalog/etc/di.xml
+++ b/app/code/Magento/Catalog/etc/di.xml
@@ -506,4 +506,11 @@
             </argument>
         </arguments>
     </type>
+    <type name="Magento\Catalog\Model\Layer\Search\Context">
+        <arguments>
+            <argument name="collectionProvider" xsi:type="object">Magento\Catalog\Model\Layer\Search\ItemCollectionProvider</argument>
+            <argument name="stateKey" xsi:type="object">Magento\Catalog\Model\Layer\Category\StateKey</argument>
+            <argument name="collectionFilter" xsi:type="object">Magento\Catalog\Model\Layer\Search\CollectionFilter</argument>
+        </arguments>
+    </type>
 </config>
diff --git a/app/code/Magento/Catalog/etc/module.xml b/app/code/Magento/Catalog/etc/module.xml
index 9b76a57f2864332c4a76898c71ce5b88246dc7fe..916a5eaf8a3434c5617992b7c2796a3f70d179ca 100644
--- a/app/code/Magento/Catalog/etc/module.xml
+++ b/app/code/Magento/Catalog/etc/module.xml
@@ -49,7 +49,6 @@
             <module name="Magento_Directory"/>
             <module name="Magento_CatalogRule"/>
             <module name="Magento_Sales"/>
-            <module name="Magento_CatalogSearch"/>
             <module name="Magento_ProductAlert"/>
             <module name="Magento_CatalogUrlRewrite"/>
             <module name="Magento_UrlRewrite"/>
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
index 7bef8186538c2fd3dade77da6984b3fcb4d6397e..17653dfb665d7ebb765576f627267f37a4e2887a 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\CatalogImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Import entity product model
  */
@@ -124,6 +126,8 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
 
     const ERROR_MEDIA_DATA_INCOMPLETE = 'mediaDataIsIncomplete';
 
+    const ERROR_INVALID_WEIGHT = 'invalidWeight';
+
     /**
      * Pairs of attribute set ID-to-name.
      *
@@ -211,7 +215,8 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         self::ERROR_TIER_DATA_INCOMPLETE => 'Tier Price data is incomplete',
         self::ERROR_SKU_NOT_FOUND_FOR_DELETE => 'Product with specified SKU not found',
         self::ERROR_SUPER_PRODUCTS_SKU_NOT_FOUND => 'Product with specified super products SKU not found',
-        self::ERROR_MEDIA_DATA_INCOMPLETE => 'Media data is incomplete'
+        self::ERROR_MEDIA_DATA_INCOMPLETE => 'Media data is incomplete',
+        self::ERROR_INVALID_WEIGHT => 'Product weight is invalid',
     );
 
     /**
@@ -512,7 +517,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
      * @param \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory
      * @param \Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory
      * @param \Magento\CatalogImportExport\Model\Import\UploaderFactory $uploaderFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Magento\Framework\Stdlib\DateTime $dateTime
@@ -543,7 +548,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         \Magento\Catalog\Model\Resource\Product\LinkFactory $linkFactory,
         \Magento\CatalogImportExport\Model\Import\Proxy\ProductFactory $proxyProdFactory,
         \Magento\CatalogImportExport\Model\Import\UploaderFactory $uploaderFactory,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\CatalogInventory\Model\Resource\Stock\ItemFactory $stockResItemFac,
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
         \Magento\Framework\Stdlib\DateTime $dateTime,
@@ -565,7 +570,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         $this->_linkFactory = $linkFactory;
         $this->_proxyProdFactory = $proxyProdFactory;
         $this->_uploaderFactory = $uploaderFactory;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_stockResItemFac = $stockResItemFac;
         $this->_localeDate = $localeDate;
         $this->dateTime = $dateTime;
@@ -1944,6 +1949,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         $this->_isGroupPriceValid($rowData, $rowNum);
         $this->_isSuperProductsSkuValid($rowData, $rowNum);
         $this->_isMediaValid($rowData, $rowNum);
+        $this->isWeightValid($rowData, $rowNum);
 
         if (self::SCOPE_DEFAULT == $rowScope) {
             // SKU is specified, row is SCOPE_DEFAULT, new product block begins
@@ -2062,4 +2068,20 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
         }
         return $productIds;
     }
+
+    /**
+     * Check weight data
+     *
+     * @param array $rowData
+     * @param int $rowNum
+     * @return bool
+     */
+    protected function isWeightValid($rowData, $rowNum)
+    {
+        if (!empty($rowData['weight']) && (!is_numeric($rowData['weight']) || $rowData['weight'] < 0)) {
+            $this->addRowError(self::ERROR_INVALID_WEIGHT, $rowNum);
+            return false;
+        }
+        return true;
+    }
 }
diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php
index 04dc6c2090f17b95b204dc6c84194ecfc7e8db52..789ddeecac7500c8c0a485b89c0c7c210348973f 100644
--- a/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php
+++ b/app/code/Magento/CatalogImportExport/Model/Import/Uploader.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\CatalogImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Import entity product model
  *
@@ -67,7 +69,7 @@ class Uploader extends \Magento\Core\Model\File\Uploader
      * @param \Magento\Core\Helper\File\Storage $coreFileStorage
      * @param \Magento\Framework\Image\AdapterFactory $imageFactory
      * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $validator
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $filePath
      */
     public function __construct(
@@ -75,7 +77,7 @@ class Uploader extends \Magento\Core\Model\File\Uploader
         \Magento\Core\Helper\File\Storage $coreFileStorage,
         \Magento\Framework\Image\AdapterFactory $imageFactory,
         \Magento\Core\Model\File\Validator\NotProtectedExtension $validator,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $filePath = null
     ) {
         if (!is_null($filePath)) {
@@ -85,7 +87,7 @@ class Uploader extends \Magento\Core\Model\File\Uploader
         $this->_coreFileStorageDb = $coreFileStorageDb;
         $this->_coreFileStorage = $coreFileStorage;
         $this->_validator = $validator;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
     }
 
     /**
diff --git a/app/code/Magento/CatalogImportExport/composer.json b/app/code/Magento/CatalogImportExport/composer.json
index 4ab9afd21f573aa3c88e74d81b3fdde893aae9c1..b2ee4d908e2e285aae72c813db505a9d90bca2b1 100644
--- a/app/code/Magento/CatalogImportExport/composer.json
+++ b/app/code/Magento/CatalogImportExport/composer.json
@@ -3,20 +3,20 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-import-export": "0.1.0-alpha100",
-        "magento/module-indexer": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-import-export": "0.1.0-alpha101",
+        "magento/module-indexer": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "ext-ctype": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php b/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php
index 6577cdf072b405d4e648781e8032797894fba6dd..59e31b7cc4a2b299a3c8d910d1b1489d26f76a5d 100644
--- a/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php
+++ b/app/code/Magento/CatalogInventory/Block/Stockqty/AbstractStockqty.php
@@ -138,6 +138,19 @@ abstract class AbstractStockqty extends \Magento\Framework\View\Element\Template
      */
     public function isMsgVisible()
     {
-        return $this->getStockQty() > 0 && $this->getStockQty() <= $this->getThresholdQty();
+        return $this->getStockQty() > 0 && $this->getStockQtyLeft() <= $this->getThresholdQty();
+    }
+
+    /**
+     * Retrieve current product qty left in stock
+     *
+     * @return float
+     */
+    public function getStockQtyLeft()
+    {
+        /** @var \Magento\CatalogInventory\Service\V1\Data\StockItem $stockItem */
+        $stockItem = $this->stockItemService->getStockItem($this->getProduct()->getId());
+        $minStockQty = $stockItem->getMinQty();
+        return $this->getStockQty() - $minStockQty;
     }
 }
diff --git a/app/code/Magento/CatalogInventory/composer.json b/app/code/Magento/CatalogInventory/composer.json
index ddf712742d1c0561542e5692656d232c0f5fa838..50a2ad72f2686c671fe4e393b0d4647e6f8d55b6 100644
--- a/app/code/Magento/CatalogInventory/composer.json
+++ b/app/code/Magento/CatalogInventory/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-indexer": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-indexer": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml
index cbb3aaf919c9dff07eebd1d23fc48b983d9e27e4..7eb2c87066d22fec84d11fc133dbbeb49ae28992 100644
--- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml
+++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml
@@ -31,9 +31,9 @@
         <a href="#"
            data-mage-init='{"toggleAdvanced": {"selectorsToggleClass": "active", "baseToggleClass": "expanded", "toggleContainers": "#<?php echo $this->getDetailsPlaceholderId() ?>"}}'
            id="<?php echo $this->getPlaceholderId() ?>"
-           title="<?php echo __('Only %1 left', ($this->getStockQty())) ?>"
+           title="<?php echo __('Only %1 left', ($this->getStockQtyLeft())) ?>"
            class="action show">
-            <?php echo __('Only %1 left', "<strong>{$this->getStockQty()}</strong>") ?>
+            <?php echo __('Only %1 left', "<strong>{$this->getStockQtyLeft()}</strong>") ?>
         </a>
     </div>
     <div class="availability only detailed" id="<?php echo $this->getDetailsPlaceholderId() ?>">
diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml
index 573ee3909e13d1ef53fcbd997229fd470ac5b75e..e2df54013b9112875f22616483f38b714a0081cb 100644
--- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml
+++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml
@@ -27,7 +27,7 @@
  */
 ?>
 <?php if($this->isMsgVisible()): ?>
-    <div class="availability only" title="<?php echo __('Only %1 left', ($this->getStockQty())) ?>">
-        <?php echo __('Only %1 left', "<strong>{$this->getStockQty()}</strong>") ?>
+    <div class="availability only" title="<?php echo __('Only %1 left', ($this->getStockQtyLeft())) ?>">
+        <?php echo __('Only %1 left', "<strong>{$this->getStockQtyLeft()}</strong>") ?>
     </div>
 <?php endif ?>
diff --git a/app/code/Magento/CatalogRule/composer.json b/app/code/Magento/CatalogRule/composer.json
index 8c490dcd71fb03b65e73ac321cf2208fa959df3e..5539ac7e891a5e38199c3136606c5b299c4a2962 100644
--- a/app/code/Magento/CatalogRule/composer.json
+++ b/app/code/Magento/CatalogRule/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-rule": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-rule": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CatalogSearch/Block/Result.php b/app/code/Magento/CatalogSearch/Block/Result.php
index ed26a122ac88ad37a1affc5f7e8ee288c0fb66eb..e6bd320e76025fb45e3c98c273647b9ab975e6d2 100644
--- a/app/code/Magento/CatalogSearch/Block/Result.php
+++ b/app/code/Magento/CatalogSearch/Block/Result.php
@@ -151,7 +151,6 @@ class Result extends Template
         /* @var $category \Magento\Catalog\Model\Category */
         $availableOrders = $category->getAvailableSortByOptions();
         unset($availableOrders['position']);
-        $availableOrders = array_merge(array('relevance' => __('Relevance')), $availableOrders);
 
         $this->getListBlock()->setAvailableOrders(
             $availableOrders
diff --git a/setup/module/Magento/Filesystem/src/Directory/WriteFactory.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Field/Resolver.php
similarity index 78%
rename from setup/module/Magento/Filesystem/src/Directory/WriteFactory.php
rename to app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Field/Resolver.php
index 63bca606476d043b8625ae6a702ec556588322ed..932632895f59482d704faafcfc7f34ec2717bd65 100644
--- a/setup/module/Magento/Filesystem/src/Directory/WriteFactory.php
+++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Field/Resolver.php
@@ -21,18 +21,17 @@
  * @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\Directory;
+namespace Magento\CatalogSearch\Model\Adapter\Mysql\Field;
 
-use Magento\Filesystem\Driver\File;
+use Magento\Framework\Search\Adapter\Mysql\Field\ResolverInterface;
 
-class WriteFactory
+class Resolver implements ResolverInterface
 {
     /**
-     * @param array $config
-     * @return \Magento\Filesystem\Directory\Write
+     * {@inheritdoc}
      */
-    public function create(array $config)
+    public function resolve($fields)
     {
-        return new Write(new File(), $config);
+        return 'data_index';
     }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..6e077c36ceeffe25c42c727cb39bcf441b605c6d
--- /dev/null
+++ b/app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php
@@ -0,0 +1,144 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\CatalogSearch\Model\Adapter\Mysql\Filter;
+
+use Magento\Eav\Model\Config;
+use Magento\Framework\App\Resource;
+use Magento\Framework\App\ScopeResolverInterface;
+use Magento\Framework\DB\Adapter\AdapterInterface;
+use Magento\Framework\Search\Adapter\Mysql\ConditionManager;
+use Magento\Framework\Search\Adapter\Mysql\Filter\PreprocessorInterface;
+use Magento\Framework\Search\Request\FilterInterface;
+
+class Preprocessor implements PreprocessorInterface
+{
+    /**
+     * @var ConditionManager
+     */
+    private $conditionManager;
+
+    /**
+     * @var ScopeResolverInterface
+     */
+    private $scopeResolver;
+
+    /**
+     * @var Config
+     */
+    private $config;
+
+    /**
+     * @var Resource
+     */
+    private $resource;
+
+    /**
+     * @param ConditionManager $conditionManager
+     * @param ScopeResolverInterface $scopeResolver
+     * @param Config $config
+     * @param Resource $resource
+     */
+    public function __construct(
+        ConditionManager $conditionManager,
+        ScopeResolverInterface $scopeResolver,
+        Config $config,
+        Resource $resource
+    ) {
+        $this->conditionManager = $conditionManager;
+        $this->scopeResolver = $scopeResolver;
+        $this->config = $config;
+        $this->resource = $resource;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function process(FilterInterface $filter, $isNegation, $query)
+    {
+        return $resultQuery =  $this->processQueryWithField($filter, $isNegation, $query);
+    }
+
+    /**
+     * @param FilterInterface $filter
+     * @param bool $isNegation
+     * @param string $query
+     * @return string
+     */
+    private function processQueryWithField(FilterInterface $filter, $isNegation, $query)
+    {
+        $currentStoreId = $this->scopeResolver->getScope()->getId();
+
+        $attribute = $this->config->getAttribute(\Magento\Catalog\Model\Product::ENTITY, $filter->getField());
+        $select = $this->getSelect();
+        $table = $attribute->getBackendTable();
+        if ($filter->getField() == 'price') {
+            $query = str_replace('price', 'min_price', $query);
+            $select->from(['main_table' => $this->resource->getTableName('catalog_product_index_price')], 'entity_id')
+                ->where($query);
+        } else {
+            if ($attribute->isStatic()) {
+                $select->from(['main_table' => $table], 'entity_id')
+                    ->where($query);
+            } else {
+
+                $ifNullCondition = $this->getConnection()->getIfNullSql('current_store.value', 'main_table.value');
+
+                $select->from(['main_table' => $table], 'entity_id')
+                    ->joinLeft(
+                        ['current_store' => $table],
+                        'current_store.attribute_id = main_table.attribute_id AND current_store.store_id = '
+                        . $currentStoreId,
+                        null
+                    )
+                    ->columns([$filter->getField() => $ifNullCondition])
+                    ->where(
+                        'main_table.attribute_id = ?',
+                        $attribute->getAttributeId()
+                    )
+                    ->where('main_table.store_id = ?', \Magento\Store\Model\Store::DEFAULT_STORE_ID)
+                    ->having($query);
+            }
+        }
+
+        return 'product_id ' . ' IN (
+                select entity_id from  ' . $this->conditionManager->wrapBrackets($select) . '
+             as filter)';
+    }
+
+    /**
+     * @return AdapterInterface
+     */
+    private function getConnection()
+    {
+        return $this->resource->getConnection(Resource::DEFAULT_READ_RESOURCE);
+    }
+
+    /**
+     * @return \Magento\Framework\DB\Select
+     */
+    private function getSelect()
+    {
+        return $this->getConnection()->select();
+    }
+}
diff --git a/app/code/Magento/CatalogSearch/Model/Advanced.php b/app/code/Magento/CatalogSearch/Model/Advanced.php
index 98f994a5ba2e3d711505bdd4a0f479434a7f8b1e..82dceefabe6a4200b0d2ea9fea61c271501ba1fa 100644
--- a/app/code/Magento/CatalogSearch/Model/Advanced.php
+++ b/app/code/Magento/CatalogSearch/Model/Advanced.php
@@ -31,17 +31,16 @@ use Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory;
 use Magento\CatalogSearch\Model\Resource\Advanced\Collection;
 use Magento\CatalogSearch\Model\Resource\EngineInterface;
 use Magento\CatalogSearch\Model\Resource\EngineProvider;
-use Magento\Framework\Model\Exception;
-use Magento\Framework\Model\Context;
-use Magento\Framework\Registry;
-use Magento\Framework\StoreManagerInterface;
 use Magento\Directory\Model\Currency;
 use Magento\Directory\Model\CurrencyFactory;
 use Magento\Eav\Model\Entity\Attribute as EntityAttribute;
+use Magento\Framework\Model\Context;
+use Magento\Framework\Model\Exception;
+use Magento\Framework\Registry;
+use Magento\Framework\StoreManagerInterface;
 
 /**
  * Catalog advanced search model
- *
  * @method \Magento\CatalogSearch\Model\Resource\Advanced getResource()
  * @method int getEntityTypeId()
  * @method \Magento\CatalogSearch\Model\Advanced setEntityTypeId(int $value)
@@ -169,31 +168,6 @@ class Advanced extends \Magento\Framework\Model\AbstractModel
         );
     }
 
-    /**
-     * Retrieve array of attributes used in advanced search
-     *
-     * @return array
-     */
-    public function getAttributes()
-    {
-        $attributes = $this->getData('attributes');
-        if (is_null($attributes)) {
-            $product = $this->_productFactory->create();
-            $attributes = $this->_attributeCollectionFactory
-                ->create()
-                ->addHasOptionsFilter()
-                ->addDisplayInAdvancedSearchFilter()
-                ->addStoreLabel($this->_storeManager->getStore()->getId())
-                ->setOrder('main_table.attribute_id', 'asc')
-                ->load();
-            foreach ($attributes as $attribute) {
-                $attribute->setEntity($product->getResource());
-            }
-            $this->setData('attributes', $attributes);
-        }
-        return $attributes;
-    }
-
     /**
      * Add advanced search filters to product collection
      *
@@ -213,59 +187,36 @@ class Advanced extends \Magento\Framework\Model\AbstractModel
                 continue;
             }
             $value = $values[$attribute->getAttributeCode()];
+            $this->_addSearchCriteria($attribute, $value);
 
             if ($attribute->getAttributeCode() == 'price') {
-                $value['from'] = isset($value['from']) ? trim($value['from']) : '';
-                $value['to'] = isset($value['to']) ? trim($value['to']) : '';
-                if (is_numeric($value['from']) || is_numeric($value['to'])) {
-                    if (!empty($value['currency'])) {
-                        $rate = $this->_storeManager->getStore()->getBaseCurrency()->getRate($value['currency']);
-                    } else {
-                        $rate = 1;
-                    }
-                    if ($this->_getResource()->addRatedPriceFilter(
-                        $this->getProductCollection(),
-                        $attribute,
-                        $value,
-                        $rate
-                    )
-                    ) {
-                        $hasConditions = true;
-                        $this->_addSearchCriteria($attribute, $value);
-                    }
-                }
-            } elseif ($attribute->isIndexable()) {
-                if (!is_string($value) || strlen($value) != 0) {
-                    if ($this->_getResource()->addIndexableAttributeModifiedFilter(
-                        $this->getProductCollection(),
-                        $attribute,
-                        $value
-                    )
-                    ) {
-                        $hasConditions = true;
-                        $this->_addSearchCriteria($attribute, $value);
-                    }
-                }
-            } else {
-                $condition = $this->_getResource()->prepareCondition(
-                    $attribute,
-                    $value,
-                    $this->getProductCollection()
-                );
-                if ($condition === false) {
-                    continue;
+                $rate = 1;
+                $store = $this->_storeManager->getStore();
+                $curency = $store->getCurrentCurrencyCode();
+                if ($curency != $store->getBaseCurrencyCode()) {
+                    $rate = $store->getBaseCurrency()->getRate($curency);
                 }
 
-                $this->_addSearchCriteria($attribute, $value);
+                $value['from'] = isset($value['from']) ? (float)$value['from'] / $rate : '';
+                $value['to'] = isset($value['to']) ? (float)$value['to'] / $rate : '';
+            }
+            $condition = $this->_getResource()->prepareCondition(
+                $attribute,
+                $value,
+                $this->getProductCollection()
+            );
+            if ($condition === false) {
+                continue;
+            }
+
 
-                $table = $attribute->getBackend()->getTable();
-                if ($attribute->getBackendType() == 'static') {
-                    $attributeId = $attribute->getAttributeCode();
-                } else {
-                    $attributeId = $attribute->getId();
-                }
-                $allConditions[$table][$attributeId] = $condition;
+            $table = $attribute->getBackend()->getTable();
+            if ($attribute->getBackendType() == 'static') {
+                $attributeId = $attribute->getAttributeCode();
+            } else {
+                $attributeId = $attribute->getId();
             }
+            $allConditions[$table][$attributeId] = $condition;
         }
         if ($allConditions) {
             $this->_registry->register('advanced_search_conditions', $allConditions);
@@ -277,9 +228,74 @@ class Advanced extends \Magento\Framework\Model\AbstractModel
         return $this;
     }
 
+    /**
+     * Retrieve array of attributes used in advanced search
+     *
+     * @return array
+     */
+    public function getAttributes()
+    {
+        $attributes = $this->getData('attributes');
+        if (is_null($attributes)) {
+            $product = $this->_productFactory->create();
+            $attributes = $this->_attributeCollectionFactory
+                ->create()
+                ->addHasOptionsFilter()
+                ->addDisplayInAdvancedSearchFilter()
+                ->addStoreLabel($this->_storeManager->getStore()->getId())
+                ->setOrder('main_table.attribute_id', 'asc')
+                ->load();
+            foreach ($attributes as $attribute) {
+                $attribute->setEntity($product->getResource());
+            }
+            $this->setData('attributes', $attributes);
+        }
+        return $attributes;
+    }
+
+    /**
+     * Retrieve advanced search product collection
+     *
+     * @return Collection
+     */
+    public function getProductCollection()
+    {
+        if (is_null($this->_productCollection)) {
+            $collection = $this->_engine->getAdvancedResultCollection();
+            $this->prepareProductCollection($collection);
+            if (!$collection) {
+                return $collection;
+            }
+            $this->_productCollection = $collection;
+        }
+
+        return $this->_productCollection;
+    }
+
+    /**
+     * Prepare product collection
+     *
+     * @param Collection $collection
+     * @return $this
+     */
+    public function prepareProductCollection($collection)
+    {
+        $collection
+            ->addAttributeToSelect($this->_catalogConfig->getProductAttributes())
+            ->setStore($this->_storeManager->getStore())
+            ->addMinimalPrice()
+            ->addTaxPercents()
+            ->addStoreFilter()
+            ->setVisibility($this->_catalogProductVisibility->getVisibleInSearchIds());
+
+        return $this;
+    }
+
     /**
      * Add data about search criteria to object state
      *
+     * @todo: Move this code to block
+     *
      * @param   EntityAttribute $attribute
      * @param   mixed $value
      * @return  $this
@@ -355,42 +371,4 @@ class Advanced extends \Magento\Framework\Model\AbstractModel
     {
         return $this->_searchCriterias;
     }
-
-    /**
-     * Retrieve advanced search product collection
-     *
-     * @return Collection
-     */
-    public function getProductCollection()
-    {
-        if (is_null($this->_productCollection)) {
-            $collection = $this->_engine->getAdvancedResultCollection();
-            $this->prepareProductCollection($collection);
-            if (!$collection) {
-                return $collection;
-            }
-            $this->_productCollection = $collection;
-        }
-
-        return $this->_productCollection;
-    }
-
-    /**
-     * Prepare product collection
-     *
-     * @param Collection $collection
-     * @return $this
-     */
-    public function prepareProductCollection($collection)
-    {
-        $collection
-            ->addAttributeToSelect($this->_catalogConfig->getProductAttributes())
-            ->setStore($this->_storeManager->getStore())
-            ->addMinimalPrice()
-            ->addTaxPercents()
-            ->addStoreFilter()
-            ->setVisibility($this->_catalogProductVisibility->getVisibleInSearchIds());
-
-        return $this;
-    }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Fulltext.php
index f26ec04423e24f179dfcb37c7badfc956f6b6bf9..571d46e9d033e764382813f8f4ce3624de4df7b7 100644
--- a/app/code/Magento/CatalogSearch/Model/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/Fulltext.php
@@ -111,25 +111,6 @@ class Fulltext extends \Magento\Framework\Model\AbstractModel
         return $this;
     }
 
-    /**
-     * Prepare results for query
-     *
-     * @param Query $query
-     * @return $this
-     */
-    public function prepareResult($query = null)
-    {
-        if (!$query instanceof Query) {
-            $query = $this->queryFactory->get();
-        }
-        $queryText = $query->getQueryText();
-        if ($query->getSynonymFor()) {
-            $queryText = $query->getSynonymFor();
-        }
-        $this->getResource()->prepareResult($this, $queryText, $query);
-        return $this;
-    }
-
     /**
      * Retrieve search type
      *
diff --git a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php
index d0360c88f00deccb5758220fe6c31bc37ab2698d..8af2e3822a6248b3c3697b1a6b8765042aeb20f3 100644
--- a/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php
+++ b/app/code/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/Full.php
@@ -39,7 +39,7 @@ class Full
      *
      * @var string
      */
-    protected $separator = '|';
+    protected $separator = ' | ';
 
     /**
      * Array of \Magento\Framework\Stdlib\DateTime\DateInterface objects per store
@@ -374,8 +374,7 @@ class Full
             $this->saveProductIndexes($storeId, $productIndexes);
         }
 
-        // Reset only product-specific queries and results.
-        $this->fulltextResource->resetSearchResults($storeId, $productIds);
+        $this->fulltextResource->resetSearchResults();
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Filesystem/WrapperFactory.php b/app/code/Magento/CatalogSearch/Model/Layer/Search/ItemCollectionProvider.php
similarity index 52%
rename from lib/internal/Magento/Framework/Filesystem/WrapperFactory.php
rename to app/code/Magento/CatalogSearch/Model/Layer/Search/ItemCollectionProvider.php
index 0ea1ee1c91aa5a9cc250545faf3865143d5efb73..f578ed787fe9ff6a85a77dd235fb96afd3dd5cda 100644
--- a/lib/internal/Magento/Framework/Filesystem/WrapperFactory.php
+++ b/app/code/Magento/CatalogSearch/Model/Layer/Search/ItemCollectionProvider.php
@@ -1,5 +1,6 @@
 <?php
 /**
+ *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -21,47 +22,36 @@
  * @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\Framework\Filesystem;
+namespace Magento\CatalogSearch\Model\Layer\Search;
 
-/**
- * Class WrapperFactory
- *
- */
-class WrapperFactory
-{
-    /**
-     * @var array
-     */
-    private $wrappers = array();
+use Magento\Catalog\Model\Layer\ItemCollectionProviderInterface;
+use Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory;
 
+class ItemCollectionProvider implements ItemCollectionProviderInterface
+{
     /**
-     * @var \Magento\Framework\Filesystem\DirectoryList
+     * @var \Magento\CatalogSearch\Model\Resource\Fulltext\CollectionFactory
      */
-    protected $directoryList;
+    protected $fulltextCollectionFactory;
 
     /**
-     * @param DirectoryList $directoryList
+     * ItemCollectionProvider constructor
+     *
+     * @param CollectionFactory $fulltextCollectionFactory
      */
-    public function __construct(DirectoryList $directoryList)
+    public function __construct(CollectionFactory $fulltextCollectionFactory)
     {
-        $this->directoryList = $directoryList;
+        $this->fulltextCollectionFactory = $fulltextCollectionFactory;
     }
 
     /**
-     * Return specific wrapper
+     * Retrieve item colleciton
      *
-     * @param string $protocolCode
-     * @param DriverInterface $driver
-     * @return WrapperInterface
+     * @param \Magento\Catalog\Model\Category $category
+     * @return \Magento\Catalog\Model\Resource\Product\Collection
      */
-    public function get($protocolCode, DriverInterface $driver)
+    public function getCollection(\Magento\Catalog\Model\Category $category)
     {
-        $wrapperClass = $this->directoryList->getProtocolConfig($protocolCode)['driver'];
-
-        if (!isset($this->wrappers[$protocolCode])) {
-            $this->wrappers[$protocolCode] = new $wrapperClass($driver);
-        }
-
-        return $this->wrappers[$protocolCode];
+        return $this->fulltextCollectionFactory->create();
     }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Search/Plugin/CollectionFilter.php b/app/code/Magento/CatalogSearch/Model/Layer/Search/Plugin/CollectionFilter.php
new file mode 100644
index 0000000000000000000000000000000000000000..a42f362d3bfe1c4a86b3935a1fe3cbc7d8ff4613
--- /dev/null
+++ b/app/code/Magento/CatalogSearch/Model/Layer/Search/Plugin/CollectionFilter.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\CatalogSearch\Model\Layer\Search\Plugin;
+
+use Magento\Catalog\Model\Category;
+use Magento\CatalogSearch\Model\Resource\Fulltext\Collection as FulltextCollection;
+use Magento\Search\Model\QueryFactory;
+
+class CollectionFilter
+{
+    /**
+     * @var \Magento\Search\Model\QueryFactory
+     */
+    protected $queryFactory;
+
+    /**
+     * @param QueryFactory $queryFactory
+     */
+    public function __construct(QueryFactory $queryFactory)
+    {
+        $this->queryFactory = $queryFactory;
+    }
+
+    /**
+     * Add search filter criteria to search collection
+     *
+     * @param \Magento\Catalog\Model\Layer\Search\CollectionFilter $subject
+     * @param \Closure $proceed
+     * @param \Magento\CatalogSearch\Model\Resource\Fulltext\Collection $collection
+     * @param Category $category
+     * @return void
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function aroundFilter(
+        \Magento\Catalog\Model\Layer\Search\CollectionFilter $subject,
+        \Closure $proceed,
+        $collection,
+        Category $category
+    ) {
+        $proceed($collection, $category);
+        $collection->addSearchFilter($this->queryFactory->get()->getQueryText());
+    }
+}
diff --git a/app/code/Magento/CatalogSearch/Model/Layer/Search/StateKey.php b/app/code/Magento/CatalogSearch/Model/Layer/Search/StateKey.php
index 84c42753ec3a1938e1b4642458771559d5323c41..9dd24ff3deccb77b05f5203d3ebf2a9d3c078453 100644
--- a/app/code/Magento/CatalogSearch/Model/Layer/Search/StateKey.php
+++ b/app/code/Magento/CatalogSearch/Model/Layer/Search/StateKey.php
@@ -25,8 +25,9 @@
 
 namespace Magento\CatalogSearch\Model\Layer\Search;
 
+use Magento\Catalog\Model\Layer\StateKeyInterface;
 
-class StateKey extends \Magento\Catalog\Model\Layer\Category\StateKey
+class StateKey extends \Magento\Catalog\Model\Layer\Category\StateKey implements StateKeyInterface
 {
     /**
      * @var \Magento\Search\Model\QueryFactory
@@ -53,6 +54,7 @@ class StateKey extends \Magento\Catalog\Model\Layer\Category\StateKey
      */
     public function toString($category)
     {
-        return 'Q_' . $this->queryFactory->get()->getId() . '_' . \Magento\Catalog\Model\Layer\Category\StateKey::toString($category);
+        return 'Q_' . $this->queryFactory->get()->getId()
+        . '_' . \Magento\Catalog\Model\Layer\Category\StateKey::toString($category);
     }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php
index 007cebc8321f3920f61e646e49c2e64ffdbf91a0..e5b794a91a4b094ac64655946c326b34e36f823c 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced.php
@@ -102,10 +102,9 @@ class Advanced extends \Magento\Framework\Model\Resource\Db\AbstractDb
      *
      * @param \Magento\Catalog\Model\Resource\Eav\Attribute $attribute
      * @param string|array $value
-     * @param \Magento\CatalogSearch\Model\Resource\Advanced\Collection $collection
      * @return string|array
      */
-    public function prepareCondition($attribute, $value, $collection)
+    public function prepareCondition($attribute, $value)
     {
         $condition = false;
 
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php
index 15da583d8161c172de16f03ea5c55af170267ffb..e914b79a8a45d2267e538880db93126f8ec66d20 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Advanced/Collection.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\CatalogSearch\Model\Resource\Advanced;
 
-use Magento\Framework\Model\Exception;
+use Magento\Catalog\Model\Product;
 
 /**
  * Collection Advanced
@@ -33,11 +33,20 @@ use Magento\Framework\Model\Exception;
 class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
 {
     /**
-     * Date
-     *
-     * @var \Magento\Framework\Stdlib\DateTime\DateTime
+     * List Of filters
+     * @var array
+     */
+    private $filters = [];
+
+    /**
+     * @var \Magento\Framework\Search\Request\Builder
      */
-    protected $_date;
+    private $requestBuilder;
+
+    /**
+     * @var \Magento\Search\Model\SearchEngine
+     */
+    private $searchEngine;
 
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
@@ -50,7 +59,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Catalog\Model\Resource\Helper $resourceHelper
      * @param \Magento\Framework\Validator\UniversalFactory $universalFactory
      * @param \Magento\Framework\StoreManagerInterface $storeManager
-     * @param \Magento\Framework\Module\Manager $moduleManager,
+     * @param \Magento\Framework\Module\Manager $moduleManager ,
      * @param \Magento\Catalog\Model\Indexer\Product\Flat\State $catalogProductFlatState
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Catalog\Model\Product\OptionFactory $productOptionFactory
@@ -59,8 +68,9 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Customer\Model\Session $customerSession
      * @param \Magento\Framework\Stdlib\DateTime $dateTime
      * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
+     * @param \Magento\Framework\Search\Request\Builder $requestBuilder
+     * @param \Magento\Search\Model\SearchEngine $searchEngine
      * @param \Zend_Db_Adapter_Abstract $connection
-     * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -82,10 +92,12 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
         \Magento\Customer\Model\Session $customerSession,
         \Magento\Framework\Stdlib\DateTime $dateTime,
-        \Magento\Framework\Stdlib\DateTime\DateTime $date,
+        \Magento\Framework\Search\Request\Builder $requestBuilder,
+        \Magento\Search\Model\SearchEngine $searchEngine,
         $connection = null
     ) {
-        $this->_date = $date;
+        $this->requestBuilder = $requestBuilder;
+        $this->searchEngine = $searchEngine;
         parent::__construct(
             $entityFactory,
             $logger,
@@ -119,89 +131,54 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
     public function addFieldsToFilter($fields)
     {
         if ($fields) {
-            $previousSelect = null;
-            $conn = $this->getConnection();
-            foreach ($fields as $table => $conditions) {
-                foreach ($conditions as $attributeId => $conditionValue) {
-                    $select = $conn->select();
-                    $select->from(array('t1' => $table), 'entity_id');
-                    $conditionData = array();
-
-                    if (!is_numeric($attributeId)) {
-                        $field = 't1.' . $attributeId;
-                    } else {
-                        $storeId = $this->getStoreId();
-                        $onCondition = 't1.entity_id = t2.entity_id' .
-                            ' AND t1.attribute_id = t2.attribute_id' .
-                            ' AND t2.store_id=?';
-
-                        $select->joinLeft(array('t2' => $table), $conn->quoteInto($onCondition, $storeId), array());
-                        $select->where('t1.store_id = ?', 0);
-                        $select->where('t1.attribute_id = ?', $attributeId);
-
-                        if (array_key_exists('price_index', $this->getSelect()->getPart(\Magento\Framework\DB\Select::FROM))) {
-                            $select->where('t1.entity_id = price_index.entity_id');
-                        }
+            $this->filters = array_merge($this->filters, $fields);
+        }
+        return $this;
+    }
 
-                        $field = $this->getConnection()->getIfNullSql('t2.value', 't1.value');
+    /**
+     * @inheritdoc
+     */
+    protected function _renderFiltersBefore()
+    {
+        if ($this->filters) {
+            $this->requestBuilder->bindDimension('scope', $this->getStoreId());
+            $this->requestBuilder->setRequestName('advanced_search_container');
+            foreach ($this->filters as $attributes) {
+                foreach ($attributes as $attributeCode => $attributeValue) {
+                    if (is_numeric($attributeCode)) {
+                        $attributeCode = $this->_eavConfig->getAttribute(Product::ENTITY, $attributeCode)
+                            ->getAttributeCode();
                     }
-
-                    if (is_array($conditionValue)) {
-                        if (isset($conditionValue['in'])) {
-                            $conditionData[] = array('in' => $conditionValue['in']);
-                        } elseif (isset($conditionValue['in_set'])) {
-                            $conditionParts = array();
-                            foreach ($conditionValue['in_set'] as $value) {
-                                $conditionParts[] = array('finset' => $value);
-                            }
-                            $conditionData[] = $conditionParts;
-                        } elseif (isset($conditionValue['like'])) {
-                            $conditionData[] = array('like' => $conditionValue['like']);
-                        } elseif (isset($conditionValue['from']) && isset($conditionValue['to'])) {
-                            $invalidDateMessage = __('Please specify correct data.');
-                            if ($conditionValue['from']) {
-                                if (!\Zend_Date::isDate($conditionValue['from'])) {
-                                    throw new Exception($invalidDateMessage);
-                                }
-                                if (!is_numeric($conditionValue['from'])) {
-                                    $conditionValue['from'] = $this->_date->gmtDate(null, $conditionValue['from']);
-                                    if (!$conditionValue['from']) {
-                                        $conditionValue['from'] = $this->_date->gmtDate();
-                                    }
-                                }
-                                $conditionData[] = array('gteq' => $conditionValue['from']);
-                            }
-                            if ($conditionValue['to']) {
-                                if (!\Zend_Date::isDate($conditionValue['to'])) {
-                                    throw new Exception($invalidDateMessage);
-                                }
-                                if (!is_numeric($conditionValue['to'])) {
-                                    $conditionValue['to'] = $this->_date->gmtDate(null, $conditionValue['to']);
-                                    if (!$conditionValue['to']) {
-                                        $conditionValue['to'] = $this->_date->gmtDate();
-                                    }
-                                }
-                                $conditionData[] = array('lteq' => $conditionValue['to']);
-                            }
+                    if (!empty($attributeValue['from']) || !empty($attributeValue['to'])) {
+                        if (!empty($attributeValue['from'])) {
+                            $this->requestBuilder->bind("{$attributeCode}.from", $attributeValue['from']);
                         }
-                    } else {
-                        $conditionData[] = array('eq' => $conditionValue);
-                    }
-
-
-                    foreach ($conditionData as $data) {
-                        $select->where($conn->prepareSqlCondition($field, $data));
-                    }
-
-                    if (!is_null($previousSelect)) {
-                        $select->where('t1.entity_id IN (?)', new \Zend_Db_Expr($previousSelect));
+                        if (!empty($attributeValue['to'])) {
+                            $this->requestBuilder->bind("{$attributeCode}.to", $attributeValue['to']);
+                        }
+                    } elseif (!is_array($attributeValue)) {
+                        $this->requestBuilder->bind($attributeCode, $attributeValue);
+                    } elseif (isset($attributeValue['like'])) {
+                        $this->requestBuilder->bind($attributeCode, trim($attributeValue['like'], '%'));
+                    } elseif (isset($attributeValue['in'])) {
+                        $this->requestBuilder->bind($attributeCode, $attributeValue['in']);
+                    } elseif (isset($attributeValue['in_set'])) {
+                        $this->requestBuilder->bind($attributeCode, implode('%', $attributeValue['in_set']));
                     }
-                    $previousSelect = $select;
                 }
             }
-            $this->addFieldToFilter('entity_id', array('in' => new \Zend_Db_Expr($select)));
-        }
+            $queryRequest = $this->requestBuilder->create();
+            $queryResponse = $this->searchEngine->search($queryRequest);
 
-        return $this;
+            $ids = [0];
+            /** @var \Magento\Framework\Search\Document $document */
+            foreach ($queryResponse as $document) {
+                $ids[] = $document->getId();
+            }
+
+            $this->addIdFilter($ids);
+        }
+        return parent::_renderFiltersBefore();
     }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
index ac0c24b79b678b40f7a6904dfb33a4cb97cb4dbb..99d339cacceb477c74a92a00a9f1cae632717d0d 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext.php
@@ -82,135 +82,13 @@ class Fulltext extends \Magento\Framework\Model\Resource\Db\AbstractDb
     /**
      * Reset search results
      *
-     * @param null|int $storeId
-     * @param null|array $productIds
      * @return $this
      */
-    public function resetSearchResults($storeId = null, $productIds = null)
+    public function resetSearchResults()
     {
         $adapter = $this->_getWriteAdapter();
         $adapter->update($this->getTable('search_query'), array('is_processed' => 0));
-
-        if ($storeId === null && $productIds === null) {
-            // Keeping public interface
-            $adapter->update($this->getTable('search_query'), array('is_processed' => 0));
-            $adapter->delete($this->getTable('catalogsearch_result'));
-            $this->_eventManager->dispatch('catalogsearch_reset_search_result');
-        } else {
-            // Optimized deletion only product-related records
-            /** @var $select \Magento\Framework\DB\Select */
-            $select = $adapter->select()->from(
-                array('r' => $this->getTable('catalogsearch_result')),
-                null
-            )->join(
-                array('q' => $this->getTable('search_query')),
-                'q.query_id=r.query_id',
-                array()
-            )->join(
-                array('res' => $this->getTable('catalogsearch_result')),
-                'q.query_id=res.query_id',
-                array()
-            );
-            if (!empty($storeId)) {
-                $select->where('q.store_id = ?', $storeId);
-            }
-            if (!empty($productIds)) {
-                $select->where('r.product_id IN(?)', $productIds);
-            }
-            $query = $select->deleteFromSelect('res');
-            $adapter->query($query);
-
-            /** @var $select \Magento\Framework\DB\Select */
-            $select = $adapter->select();
-            $subSelect = $adapter->select()->from(array('res' => $this->getTable('catalogsearch_result')), null);
-            $select->exists($subSelect, 'res.query_id=' . $this->getTable('search_query') . '.query_id', false);
-
-            $adapter->update(
-                $this->getTable('search_query'),
-                array('is_processed' => 0),
-                $select->getPart(\Zend_Db_Select::WHERE)
-            );
-        }
-
-        return $this;
-    }
-
-    /**
-     * Prepare results for query
-     *
-     * @param \Magento\CatalogSearch\Model\Fulltext $object
-     * @param string $queryText
-     * @param \Magento\Search\Model\Query $query
-     * @return $this
-     */
-    public function prepareResult($object, $queryText, $query)
-    {
-        $adapter = $this->_getWriteAdapter();
-        if (!$query->getIsProcessed()) {
-            $searchType = $object->getSearchType($query->getStoreId());
-
-            $bind = array();
-            $like = array();
-            $likeCond = '';
-            if ($searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_LIKE ||
-                $searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_COMBINE
-            ) {
-                $words = $this->filter->splitWords(
-                    $queryText,
-                    array('uniqueOnly' => true, 'wordsQty' => $query->getMaxQueryWords())
-                );
-                foreach ($words as $word) {
-                    $like[] = $this->_resourceHelper->getCILike('s.data_index', $word, array('position' => 'any'));
-                }
-                if ($like) {
-                    $likeCond = '(' . join(' OR ', $like) . ')';
-                }
-            }
-            $mainTableAlias = 's';
-            $fields = array('query_id' => new \Zend_Db_Expr($query->getId()), 'product_id');
-            $select = $adapter->select()->from(
-                array($mainTableAlias => $this->getMainTable()),
-                $fields
-            )->joinInner(
-                array('e' => $this->getTable('catalog_product_entity')),
-                'e.entity_id = s.product_id',
-                array()
-            )->where(
-                $mainTableAlias . '.store_id = ?',
-                (int)$query->getStoreId()
-            );
-
-            $where = '';
-            if ($searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_FULLTEXT ||
-                $searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_COMBINE
-            ) {
-                $preparedTerms = $this->_resourceHelper->prepareTerms($queryText, $query->getMaxQueryWords());
-                $bind[':query'] = implode(' ', $preparedTerms[0]);
-                $where = $this->_resourceHelper->chooseFulltext($this->getMainTable(), $mainTableAlias, $select);
-            }
-
-            if ($likeCond != '' && $searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_COMBINE) {
-                $where .= ($where ? ' OR ' : '') . $likeCond;
-            } elseif ($likeCond != '' && $searchType == \Magento\CatalogSearch\Model\Fulltext::SEARCH_TYPE_LIKE) {
-                $select->columns(array('relevance' => new \Zend_Db_Expr(0)));
-                $where = $likeCond;
-            }
-
-            if ($where != '') {
-                $select->where($where);
-            }
-
-            $sql = $adapter->insertFromSelect(
-                $select,
-                $this->getTable('catalogsearch_result'),
-                array(),
-                \Magento\Framework\DB\Adapter\AdapterInterface::INSERT_ON_DUPLICATE
-            );
-            $adapter->query($sql, $bind);
-
-            $query->setIsProcessed(1);
-        }
-
+        $this->_eventManager->dispatch('catalogsearch_reset_search_result');
         return $this;
     }
 }
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php
index 5ba27c635f0ace68e28ca07fc217b57257f3a127..37a0e51de343b27c8c2bf161798ab141ef9645ab 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Fulltext/Collection.php
@@ -23,10 +23,10 @@
  */
 namespace Magento\CatalogSearch\Model\Resource\Fulltext;
 
+use Magento\Framework\DB\Select;
+
 /**
  * Fulltext Collection
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
 class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
 {
@@ -44,6 +44,19 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      */
     protected $_catalogSearchFulltext;
 
+    /**
+     * @var \Magento\Framework\Search\Request\Builder
+     */
+    private $requestBuilder;
+
+    /**
+     * @var \Magento\Search\Model\SearchEngine
+     */
+    private $searchEngine;
+
+    /** @var  string */
+    private $queryText;
+
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
      * @param \Magento\Framework\Logger $logger
@@ -65,8 +78,9 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param \Magento\Framework\Stdlib\DateTime $dateTime
      * @param \Magento\Search\Model\QueryFactory $catalogSearchData
      * @param \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext
+     * @param \Magento\Framework\Search\Request\Builder $requestBuilder
+     * @param \Magento\Search\Model\SearchEngine $searchEngine
      * @param \Zend_Db_Adapter_Abstract $connection
-     * 
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
      */
     public function __construct(
@@ -90,6 +104,8 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
         \Magento\Framework\Stdlib\DateTime $dateTime,
         \Magento\Search\Model\QueryFactory $catalogSearchData,
         \Magento\CatalogSearch\Model\Fulltext $catalogSearchFulltext,
+        \Magento\Framework\Search\Request\Builder $requestBuilder,
+        \Magento\Search\Model\SearchEngine $searchEngine,
         $connection = null
     ) {
         $this->_catalogSearchFulltext = $catalogSearchFulltext;
@@ -115,38 +131,49 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
             $dateTime,
             $connection
         );
+        $this->requestBuilder = $requestBuilder;
+        $this->searchEngine = $searchEngine;
     }
 
     /**
-     * Retrieve query model object
+     * Add search query filter
      *
-     * @return \Magento\Search\Model\Query
+     * @param string $query
+     * @return $this
      */
-    protected function _getQuery()
+    public function addSearchFilter($query)
     {
-        return $this->queryFactory->get();
+        $this->queryText = trim($this->queryText .' ' . $query);
+        return $this;
     }
 
     /**
-     * Add search query filter
-     *
-     * @param string $query
-     * @return $this
+     * @inheritdoc
      */
-    public function addSearchFilter($query)
+    protected function _renderFiltersBefore()
     {
-        $this->_catalogSearchFulltext->prepareResult();
+        if ($this->queryText) {
+            $this->requestBuilder->bindDimension('scope', $this->getStoreId());
+            $this->requestBuilder->bind('search_term', $this->queryText);
+            $this->requestBuilder->setRequestName('quick_search_container');
+            $queryRequest = $this->requestBuilder->create();
 
-        $this->getSelect()->joinInner(
-            array('search_result' => $this->getTable('catalogsearch_result')),
-            $this->getConnection()->quoteInto(
-                'search_result.product_id=e.entity_id AND search_result.query_id=?',
-                $this->_getQuery()->getId()
-            ),
-            array('relevance' => 'relevance')
-        );
+            $queryResponse = $this->searchEngine->search($queryRequest);
+            $ids = [0];
+            /** @var \Magento\Framework\Search\Document $document */
+            foreach ($queryResponse as $document) {
+                $ids[] = $document->getId();
+            }
+            $this->addIdFilter($ids);
 
-        return $this;
+            $this->getSelect()
+                ->columns(
+                    [
+                        'relevance' => new \Zend_Db_Expr($this->_conn->quoteInto('FIELD(e.entity_id, ?)', $ids))
+                    ]
+                );
+        }
+        return parent::_renderFiltersBefore();
     }
 
     /**
@@ -156,7 +183,7 @@ class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
      * @param string $dir
      * @return $this
      */
-    public function setOrder($attribute, $dir = 'desc')
+    public function setOrder($attribute, $dir = Select::SQL_DESC)
     {
         if ($attribute == 'relevance') {
             $this->getSelect()->order("relevance {$dir}");
diff --git a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php
index 333f72508f40ecdeab52003f9c05b9b47a6cfd06..815bde46c4fecb452dfdb053f07e5135f0fabcca 100644
--- a/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php
+++ b/app/code/Magento/CatalogSearch/Model/Resource/Search/Collection.php
@@ -26,9 +26,9 @@ namespace Magento\CatalogSearch\Model\Resource\Search;
 /**
  * Search collection
  *
- * @author      Magento Core Team <core@magentocommerce.com>
+ * @deprecated
  */
-class Collection extends \Magento\Catalog\Model\Resource\Product\Collection
+class Collection extends \Magento\Catalog\Model\Resource\Product\Collection implements \Magento\Search\Model\SearchCollectionInterface
 {
     /**
      * Attribute collection
diff --git a/app/code/Magento/CatalogSearch/Model/Search/Catalog.php b/app/code/Magento/CatalogSearch/Model/Search/Catalog.php
index ecffab8fd6eecae12da18b3a22077bef47dac236..5d0beab48cd1097d8427d98de57477f0ff27c0d0 100644
--- a/app/code/Magento/CatalogSearch/Model/Search/Catalog.php
+++ b/app/code/Magento/CatalogSearch/Model/Search/Catalog.php
@@ -26,7 +26,7 @@ namespace Magento\CatalogSearch\Model\Search;
 use Magento\Search\Model\QueryFactory;
 
 /**
- * Search Catalog Model
+ * Search model for backend search
  */
 class Catalog extends \Magento\Framework\Object
 {
@@ -79,17 +79,14 @@ class Catalog extends \Magento\Framework\Object
             return $this;
         }
 
-        $collection = $this->queryFactory->get()->getSearchCollection()->addAttributeToSelect(
-            'name'
-        )->addAttributeToSelect(
-            'description'
-        )->addBackendSearchFilter(
-            $this->getQuery()
-        )->setCurPage(
-            $this->getStart()
-        )->setPageSize(
-            $this->getLimit()
-        )->load();
+        $collection = $this->queryFactory->get()
+            ->getSearchCollection()
+            ->addAttributeToSelect('name')
+            ->addAttributeToSelect('description')
+            ->addBackendSearchFilter($this->getQuery())
+            ->setCurPage($this->getStart())
+            ->setPageSize($this->getLimit())
+            ->load();
 
         foreach ($collection as $product) {
             $description = strip_tags($product->getDescription());
diff --git a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php
index 2ad1ef807b163d2c26a72ef9c7dd16be5c3507dc..7acd5c9050c2c14a0b694a4a170ee6563db3b63f 100644
--- a/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php
+++ b/app/code/Magento/CatalogSearch/Model/Search/RequestGenerator.php
@@ -23,19 +23,21 @@
  */
 namespace Magento\CatalogSearch\Model\Search;
 
+use Magento\Catalog\Model\Entity\Attribute;
+use Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory;
+
 class RequestGenerator
 {
     /**
-     * @var \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory
+     * @var CollectionFactory
      */
     private $productAttributeCollectionFactory;
 
     /**
-     * @param \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollectionFactory
+     * @param CollectionFactory $productAttributeCollectionFactory
      */
-    public function __construct(
-        \Magento\Catalog\Model\Resource\Product\Attribute\CollectionFactory $productAttributeCollectionFactory
-    ) {
+    public function __construct(CollectionFactory $productAttributeCollectionFactory)
+    {
         $this->productAttributeCollectionFactory = $productAttributeCollectionFactory;
     }
 
@@ -61,7 +63,7 @@ class RequestGenerator
     {
         $request = [];
         foreach ($this->getSearchableAttributes() as $attribute) {
-            /** @var $attribute \Magento\Catalog\Model\Product\Attribute */
+            /** @var $attribute Attribute */
             if (in_array($attribute->getAttributeCode(), ['price', 'sku'])) {
                 //same fields have special semantics
                 continue;
@@ -74,6 +76,20 @@ class RequestGenerator
         return $request;
     }
 
+    /**
+     * Retrieve searchable attributes
+     *
+     * @return \Traversable
+     */
+    protected function getSearchableAttributes()
+    {
+        /** @var \Magento\Catalog\Model\Resource\Product\Attribute\Collection $productAttributes */
+        $productAttributes = $this->productAttributeCollectionFactory->create();
+        $productAttributes->addFieldToFilter(['is_searchable', 'is_visible_in_advanced_search'], [1, 1]);
+
+        return $productAttributes;
+    }
+
     /**
      * Generate advanced search request
      *
@@ -83,7 +99,7 @@ class RequestGenerator
     {
         $request = [];
         foreach ($this->getSearchableAttributes() as $attribute) {
-            /** @var $attribute \Magento\Catalog\Model\Product\Attribute */
+            /** @var $attribute Attribute */
             if (!$attribute->getIsVisibleInAdvancedSearch()) {
                 continue;
             }
@@ -102,19 +118,36 @@ class RequestGenerator
                     break;
                 case 'text':
                 case 'varchar':
-                    $request['queries'][$queryName] = [
-                        'name' => $queryName,
-                        'type' => 'matchQuery',
-                        'value' => '$' . $attribute->getAttributeCode() . '$',
-                        'match' => [
-                            [
-                                'field' => $attribute->getAttributeCode(),
-                                'boost' => $attribute->getSearchWeight() ?: 1,
+                    if ($attribute->getFrontendInput() === 'multiselect') {
+                        $filterName = $attribute->getAttributeCode() . '_filter';
+                        $request['queries'][$queryName] = [
+                            'name' => $queryName,
+                            'type' => 'filteredQuery',
+                            'filterReference' => [['ref' => $filterName]]
+                        ];
+
+                        $request['filters'][$filterName] = [
+                            'type' => 'wildcardFilter',
+                            'name' => $filterName,
+                            'field' => $attribute->getAttributeCode(),
+                            'value' => '$' . $attribute->getAttributeCode() . '$',
+                        ];
+                    } else {
+                        $request['queries'][$queryName] = [
+                            'name' => $queryName,
+                            'type' => 'matchQuery',
+                            'value' => '$' . $attribute->getAttributeCode() . '$',
+                            'match' => [
+                                [
+                                    'field' => $attribute->getAttributeCode(),
+                                    'boost' => $attribute->getSearchWeight() ?: 1,
+                                ]
                             ]
-                        ]
-                    ];
+                        ];
+                    }
                     break;
                 case 'decimal':
+                case 'datetime':
                 case 'date':
                     $filterName = $attribute->getAttributeCode() . '_filter';
                     $request['queries'][$queryName] = [
@@ -124,6 +157,7 @@ class RequestGenerator
                     ];
                     $request['filters'][$filterName] = [
                         'field' => $attribute->getAttributeCode(),
+                        'name' => $filterName,
                         'type' => 'rangeFilter',
                         'from' => '$' . $attribute->getAttributeCode() . '.from$',
                         'to' => '$' . $attribute->getAttributeCode() . '.to$',
@@ -139,6 +173,7 @@ class RequestGenerator
 
                     $request['filters'][$filterName] = [
                         'type' => 'termFilter',
+                        'name' => $filterName,
                         'field' => $attribute->getAttributeCode(),
                         'value' => '$' . $attribute->getAttributeCode() . '$',
                     ];
@@ -146,18 +181,4 @@ class RequestGenerator
         }
         return $request;
     }
-
-    /**
-     * Retrieve searchable attributes
-     *
-     * @return \Traversable
-     */
-    protected function getSearchableAttributes()
-    {
-        /** @var \Magento\Catalog\Model\Resource\Product\Attribute\Collection $productAttributes */
-        $productAttributes = $this->productAttributeCollectionFactory->create();
-        $productAttributes->addFieldToFilter('is_searchable', 1);
-
-        return $productAttributes;
-    }
 }
diff --git a/app/code/Magento/CatalogSearch/composer.json b/app/code/Magento/CatalogSearch/composer.json
index 349226343a4e23e8e064a1e6772363fc8c3a0cbf..c3226e3cb962046dca2098f6c53b3c6cab06843b 100644
--- a/app/code/Magento/CatalogSearch/composer.json
+++ b/app/code/Magento/CatalogSearch/composer.json
@@ -3,21 +3,21 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-search": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-indexer": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-search": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-indexer": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CatalogSearch/etc/catalog_attributes.xml b/app/code/Magento/CatalogSearch/etc/catalog_attributes.xml
new file mode 100644
index 0000000000000000000000000000000000000000..eff16b15c93a7d9e0a8ae82e083bee6d83e48612
--- /dev/null
+++ b/app/code/Magento/CatalogSearch/etc/catalog_attributes.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)
+ */
+-->
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Catalog/etc/catalog_attributes.xsd">
+    <group name="catalog_product">
+        <attribute name="description"/>
+    </group>
+</config>
diff --git a/app/code/Magento/CatalogSearch/etc/di.xml b/app/code/Magento/CatalogSearch/etc/di.xml
index a354a4153f42cfe48ce4e71391219d6c06fb27d5..52a3239ecf4288eeb8f60b70ab1b30bc1241d2d8 100644
--- a/app/code/Magento/CatalogSearch/etc/di.xml
+++ b/app/code/Magento/CatalogSearch/etc/di.xml
@@ -24,7 +24,9 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
+    <preference for="Magento\Framework\Search\Adapter\Mysql\Field\ResolverInterface" type="Magento\CatalogSearch\Model\Adapter\Mysql\Field\Resolver" />
     <preference for="Magento\Framework\Search\Adapter\Mysql\Aggregation\DataProviderInterface" type="Magento\CatalogSearch\Model\Adapter\Mysql\Aggregation\DataProvider"/>
+    <preference for="Magento\Framework\Search\Adapter\Mysql\Filter\PreprocessorInterface" type="Magento\CatalogSearch\Model\Adapter\Mysql\Filter\Preprocessor" />
     <type name="Magento\Framework\Search\Adapter\Mysql\Aggregation\DataProviderContainer">
         <arguments>
             <argument name="dataProviders" xsi:type="array">
@@ -72,7 +74,7 @@
     <type name="Magento\Framework\Search\EntityMetadata" />
     <virtualType name="Magento\Framework\Search\ProductEntityMetadata" type="Magento\Framework\Search\EntityMetadata">
         <arguments>
-            <argument name="entityId" xsi:type="string">product_id</argument>
+            <argument name="entityId" xsi:type="string">entity_id</argument>
         </arguments>
     </virtualType>
     <type name="Magento\Framework\Search\Adapter\Mysql\DocumentFactory">
@@ -108,4 +110,13 @@
         </arguments>
     </type>
     <preference for="Magento\Search\Model\SearchCollectionInterface" type="Magento\CatalogSearch\Model\Resource\Search\Collection" />
+    <type name="Magento\Catalog\Model\Layer\Search\Context">
+        <arguments>
+            <argument name="collectionProvider" xsi:type="object">Magento\CatalogSearch\Model\Layer\Search\ItemCollectionProvider</argument>
+            <argument name="stateKey" xsi:type="object">Magento\CatalogSearch\Model\Layer\Search\StateKey</argument>
+        </arguments>
+    </type>
+    <type name="Magento\Catalog\Model\Layer\Search\CollectionFilter">
+        <plugin name="searchQuery" type="Magento\CatalogSearch\Model\Layer\Search\Plugin\CollectionFilter" />
+    </type>
 </config>
diff --git a/app/code/Magento/CatalogSearch/etc/search_request.xml b/app/code/Magento/CatalogSearch/etc/search_request.xml
index b23b1bb90db5570231ddf84b08774462f2755e7d..d94de239c61559089419c7893c50069b849c3e7a 100644
--- a/app/code/Magento/CatalogSearch/etc/search_request.xml
+++ b/app/code/Magento/CatalogSearch/etc/search_request.xml
@@ -24,43 +24,40 @@
  */
 -->
 <requests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Search/etc/search_request_merged.xsd">
-    <request query="quick_search_container" index="product">
+          xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Search/etc/search_request.xsd">
+    <request query="quick_search_container" index="catalogsearch_fulltext">
         <dimensions>
             <dimension name="scope" value="default"/>
         </dimensions>
         <queries>
-            <query xsi:type="matchQuery" value="$search_term" name="quick_search_container">
-                <match field="name" boost="1" />
-                <match field="sku" boost="1" />
-                <match field="description" boost="1" />
-                <match field="short_description" boost="1" />
-                <match field="price" boost="1" />
-                <match field="tax_class" boost="1" />
+            <query xsi:type="matchQuery" value="$search_term$*" name="quick_search_container">
+                <match field="name" boost="1"/>
+                <match field="description" boost="1"/>
+                <match field="short_description" boost="1"/>
             </query>
         </queries>
-        <from>10</from>
+        <from>0</from>
         <size>10</size>
     </request>
-    <request query="advanced_search_container" index="product">
+    <request query="advanced_search_container" index="catalogsearch_fulltext">
         <dimensions>
-            <dimension name="scope" value="default" />
+            <dimension name="scope" value="default"/>
         </dimensions>
         <queries>
             <query xsi:type="boolQuery" name="advanced_search_container" boost="1">
-                <queryReference clause="should" ref="sku_query" />
-                <queryReference clause="should" ref="price_query" />
+                <queryReference clause="should" ref="sku_query"/>
+                <queryReference clause="should" ref="price_query"/>
             </query>
             <query name="sku_query" xsi:type="filteredQuery">
-                <filterReference clause="must" ref="sku_query_filter" />
+                <filterReference clause="must" ref="sku_query_filter"/>
             </query>
             <query name="price_query" xsi:type="filteredQuery">
-                <filterReference clause="must" ref="price_query_filter" />
+                <filterReference clause="must" ref="price_query_filter"/>
             </query>
         </queries>
         <filters>
-            <filter xsi:type="termFilter" name="sku_query_filter" field="sku" value="$sku" />
-            <filter xsi:type="rangeFilter" name="price_query_filter" field="price" from="$price_from" to="$price_to" />
+            <filter xsi:type="wildcardFilter" name="sku_query_filter" field="sku" value="$sku$"/>
+            <filter xsi:type="rangeFilter" name="price_query_filter" field="price" from="$price.from$" to="$price.to$"/>
         </filters>
         <from>0</from>
         <size>10</size>
diff --git a/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php b/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php
index 89b2b8fe34fd24d9f9c1986d4e64e536bc0c72c9..b593ecfe741026a950397ba9d6146e20679a7ba5 100644
--- a/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php
+++ b/app/code/Magento/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php
@@ -27,51 +27,6 @@ $installer = $this;
 
 $installer->startSetup();
 
-/**
- * Create table 'catalogsearch_result'
- */
-$table = $installer->getConnection()->newTable(
-    $installer->getTable('catalogsearch_result')
-)->addColumn(
-    'query_id',
-    \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
-    null,
-    array('unsigned' => true, 'nullable' => false, 'primary' => true),
-    'Query ID'
-)->addColumn(
-    'product_id',
-    \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
-    null,
-    array('unsigned' => true, 'nullable' => false, 'primary' => true),
-    'Product ID'
-)->addColumn(
-    'relevance',
-    \Magento\Framework\DB\Ddl\Table::TYPE_DECIMAL,
-    '20,4',
-    array('nullable' => false, 'default' => '0.0000'),
-    'Relevance'
-)->addForeignKey(
-    $installer->getFkName('catalogsearch_result', 'query_id', 'search_query', 'query_id'),
-    'query_id',
-    $installer->getTable('search_query'),
-    'query_id',
-    \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE,
-    \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
-)->addIndex(
-    $installer->getIdxName('catalogsearch_result', 'product_id'),
-    'product_id'
-)->addForeignKey(
-    $installer->getFkName('catalogsearch_result', 'product_id', 'catalog_product_entity', 'entity_id'),
-    'product_id',
-    $installer->getTable('catalog_product_entity'),
-    'entity_id',
-    \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE,
-    \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
-)->setComment(
-    'Catalog search result table'
-);
-$installer->getConnection()->createTable($table);
-
 /**
  * Create table 'catalogsearch_fulltext'
  */
diff --git a/app/code/Magento/CatalogUrlRewrite/composer.json b/app/code/Magento/CatalogUrlRewrite/composer.json
index 0d2e305b3dfa3a72175166be074be27ff24acbd8..836601c0fe4f4760cd71fea0eb6295afb840ef61 100644
--- a/app/code/Magento/CatalogUrlRewrite/composer.json
+++ b/app/code/Magento/CatalogUrlRewrite/composer.json
@@ -3,18 +3,18 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-catalog-import-export": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-import-export": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-url-rewrite": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-catalog-import-export": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-import-export": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-url-rewrite": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Centinel/composer.json b/app/code/Magento/Centinel/composer.json
index 4c0895517e9f47772c80506c97eca82aaf2bd1f5..259048544abfe962e81af78fb22ce27c13ea0504 100644
--- a/app/code/Magento/Centinel/composer.json
+++ b/app/code/Magento/Centinel/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Checkout/Block/Onepage/Progress.php b/app/code/Magento/Checkout/Block/Onepage/Progress.php
index a82c21b96c1418976e41e5c9b2c86878f286999b..632afb43eab3c51cc9301cfeda8bcfb43f06f116 100644
--- a/app/code/Magento/Checkout/Block/Onepage/Progress.php
+++ b/app/code/Magento/Checkout/Block/Onepage/Progress.php
@@ -95,7 +95,7 @@ class Progress extends \Magento\Checkout\Block\Onepage\AbstractOnepage
     {
         $stepsRevertIndex = array_flip($this->_getStepCodes());
 
-        $toStep = $this->getRequest()->getParam('toStep');
+        $toStep = $this->getNextStep();
 
         if (empty($toStep) || !isset($stepsRevertIndex[$currentStep])) {
             return $this->getCheckout()->getStepData($currentStep, 'complete');
diff --git a/app/code/Magento/Checkout/Controller/Onepage.php b/app/code/Magento/Checkout/Controller/Onepage.php
index 46ad4629866a8eb12479c9926f3396b5fce702e0..42005283eefaef2e1c52c572944794ef3e2106f3 100644
--- a/app/code/Magento/Checkout/Controller/Onepage.php
+++ b/app/code/Magento/Checkout/Controller/Onepage.php
@@ -200,6 +200,19 @@ class Onepage extends Action
         return $this->_getHtmlByHandle('checkout_onepage_paymentmethod');
     }
 
+    /**
+     * Get progress html checkout step
+     *
+     * @param string $checkoutStep
+     * @return mixed
+     */
+    protected function getProgressHtml($checkoutStep = '')
+    {
+        $this->_view->loadLayout(['checkout_onepage_progress']);
+        $block = $this->_view->getLayout()->getBlock('progress')->setAttribute('next_step', $checkoutStep);
+        return $block->toHtml();
+    }
+
     /**
      * Get one page checkout model
      *
diff --git a/app/code/Magento/Checkout/Controller/Onepage/Review.php b/app/code/Magento/Checkout/Controller/Onepage/Review.php
index f7980d9b277e15a9957e7737afffbbd7bd8bc407..31c5c5b75dd8fc7ad475b675f252a47ccf852ab2 100644
--- a/app/code/Magento/Checkout/Controller/Onepage/Review.php
+++ b/app/code/Magento/Checkout/Controller/Onepage/Review.php
@@ -24,6 +24,20 @@
  */
 namespace Magento\Checkout\Controller\Onepage;
 
-class Review extends Progress
+use Magento\Checkout\Controller\Onepage;
+
+class Review extends Onepage
 {
+    /**
+     * {@inheritdoc}
+     */
+    public function execute()
+    {
+        if ($this->_expireAjax()) {
+            return;
+        }
+        $this->_view->addPageLayoutHandles();
+        $this->_view->loadLayout(false);
+        $this->_view->renderLayout();
+    }
 }
diff --git a/app/code/Magento/Checkout/Controller/Onepage/SaveBilling.php b/app/code/Magento/Checkout/Controller/Onepage/SaveBilling.php
index 4a2b61c66fba152708c81eb11b26675c1c49ecfd..bb29d1550484fbb73e3495322ff8dc34a06262f2 100644
--- a/app/code/Magento/Checkout/Controller/Onepage/SaveBilling.php
+++ b/app/code/Magento/Checkout/Controller/Onepage/SaveBilling.php
@@ -71,6 +71,7 @@ class SaveBilling extends \Magento\Checkout\Controller\Onepage
 
                     $result['allow_sections'] = ['shipping'];
                     $result['duplicateBillingInfo'] = 'true';
+                    $result['update_progress'] = ['html' => $this->getProgressHtml($result['goto_section'])];
                 }
             } else {
                 $result['goto_section'] = 'shipping';
diff --git a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php
index 854562b517bde88cc2de3f9a71f4ee9a5d030383..b94c6112f907f0062cc42a50d67392980f4465ff 100644
--- a/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php
+++ b/app/code/Magento/Checkout/Controller/Onepage/SavePayment.php
@@ -54,14 +54,15 @@ class SavePayment extends \Magento\Checkout\Controller\Onepage
                 return;
             }
 
-            $data = $this->getRequest()->getPost('payment', array());
+            $data = $this->getRequest()->getPost('payment', []);
             $result = $this->getOnepage()->savePayment($data);
 
             // get section and redirect data
             $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
             if (empty($result['error']) && !$redirectUrl) {
                 $result['goto_section'] = 'review';
-                $result['update_section'] = array('name' => 'review', 'html' => $this->_getReviewHtml());
+                $result['update_section'] = ['name' => 'review', 'html' => $this->_getReviewHtml()];
+                $result['update_progress'] = ['html' => $this->getProgressHtml('review')];
             }
             if ($redirectUrl) {
                 $result['redirect'] = $redirectUrl;
diff --git a/app/code/Magento/Checkout/Controller/Onepage/SaveShipping.php b/app/code/Magento/Checkout/Controller/Onepage/SaveShipping.php
index d17414f82ffcbc83b18fc6d013220ad7c379ebef..29f4829bddac11d192ac465dbda22ffd005de909 100644
--- a/app/code/Magento/Checkout/Controller/Onepage/SaveShipping.php
+++ b/app/code/Magento/Checkout/Controller/Onepage/SaveShipping.php
@@ -57,6 +57,7 @@ class SaveShipping extends \Magento\Checkout\Controller\Onepage
                     'name' => 'shipping-method',
                     'html' => $this->_getShippingMethodsHtml()
                 ];
+                $result['update_progress'] = ['html' => $this->getProgressHtml($result['goto_section'])];
             }
         }
         $this->getResponse()->representJson(
diff --git a/app/code/Magento/Checkout/Controller/Onepage/SaveShippingMethod.php b/app/code/Magento/Checkout/Controller/Onepage/SaveShippingMethod.php
index 9558349a0a120d5f6319cc8f50273a93d9a103b9..8d95e6edabe90b26ac5a7ceaac8adb4623bf729d 100644
--- a/app/code/Magento/Checkout/Controller/Onepage/SaveShippingMethod.php
+++ b/app/code/Magento/Checkout/Controller/Onepage/SaveShippingMethod.php
@@ -43,7 +43,7 @@ class SaveShippingMethod extends \Magento\Checkout\Controller\Onepage
             if (!$result) {
                 $this->_eventManager->dispatch(
                     'checkout_controller_onepage_save_shipping_method',
-                    array('request' => $this->getRequest(), 'quote' => $this->getOnepage()->getQuote())
+                    ['request' => $this->getRequest(), 'quote' => $this->getOnepage()->getQuote()]
                 );
                 $this->getOnepage()->getQuote()->collectTotals();
                 $this->getResponse()->representJson(
@@ -51,10 +51,11 @@ class SaveShippingMethod extends \Magento\Checkout\Controller\Onepage
                 );
 
                 $result['goto_section'] = 'payment';
-                $result['update_section'] = array(
+                $result['update_section'] = [
                     'name' => 'payment-method',
                     'html' => $this->_getPaymentMethodsHtml()
-                );
+                ];
+                $result['update_progress'] = ['html' => $this->getProgressHtml($result['goto_section'])];
             }
             $this->getOnepage()->getQuote()->collectTotals()->save();
             $this->getResponse()->representJson(
diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php
index 6c353ca06c6faa6986dd73b778cf138a1e2c4b58..c9890bc9eeca2517f96826cf4ae1e0eda0a42c10 100644
--- a/app/code/Magento/Checkout/Model/Type/Onepage.php
+++ b/app/code/Magento/Checkout/Model/Type/Onepage.php
@@ -46,6 +46,8 @@ class Onepage
     const METHOD_GUEST    = 'guest';
     const METHOD_REGISTER = 'register';
     const METHOD_CUSTOMER = 'customer';
+    const USE_FOR_SHIPPING = 1;
+    const NOT_USE_FOR_SHIPPING = 0;
 
     /**
      * @var \Magento\Customer\Model\Session
@@ -369,22 +371,15 @@ class Onepage
             array()
         );
 
-        if (!empty($customerAddressId)) {
+        if ($customerAddressId) {
             try {
                 $customerAddress = $this->_customerAddressService->getAddress($customerAddressId);
-            } catch (\Exception $e) {
-                /** Address does not exist */
-            }
-            if (isset($customerAddress)) {
                 if ($customerAddress->getCustomerId() != $this->getQuote()->getCustomerId()) {
                     return array('error' => 1, 'message' => __('The customer address is not valid.'));
                 }
-
                 $address->importCustomerAddressData($customerAddress)->setSaveInAddressBook(0);
-                $addressErrors = $addressForm->validateData($address->getData());
-                if ($addressErrors !== true) {
-                    return array('error' => 1, 'message' => $addressErrors);
-                }
+            } catch (\Exception $e) {
+                return array('error' => 1, 'message' => __('Address does not exist.'));
             }
         } else {
             // emulate request object
@@ -393,8 +388,7 @@ class Onepage
             if ($addressErrors !== true) {
                 return array('error' => 1, 'message' => array_values($addressErrors));
             }
-            $addressData = $addressForm->compactData($addressData);
-            $address->addData($addressData);
+            $address->addData($addressForm->compactData($addressData));
             //unset billing address attributes which were not shown in form
             foreach ($addressForm->getAttributes() as $attribute) {
                 if (!isset($data[$attribute->getAttributeCode()])) {
@@ -436,14 +430,15 @@ class Onepage
             /**
              * Billing address using options
              */
-            $usingCase = isset($data['use_for_shipping']) ? (int)$data['use_for_shipping'] : 0;
+            $usingCase = isset($data['use_for_shipping']) ? (int)$data['use_for_shipping'] : self::NOT_USE_FOR_SHIPPING;
 
             switch ($usingCase) {
-                case 0:
+                case self::NOT_USE_FOR_SHIPPING:
                     $shipping = $this->getQuote()->getShippingAddress();
                     $shipping->setSameAsBilling(0);
+                    $shipping->save();
                     break;
-                case 1:
+                case self::USE_FOR_SHIPPING:
                     $billing = clone $address;
                     $billing->unsAddressId()->unsAddressType();
                     $shipping = $this->getQuote()->getShippingAddress();
@@ -478,19 +473,14 @@ class Onepage
                         $shippingMethod
                     )->setCollectShippingRates(
                         true
-                    );
+                    )->collectTotals();
+                    $shipping->save();
                     $this->getCheckout()->setStepData('shipping', 'complete', true);
                     break;
             }
         }
 
-        $this->getQuote()->collectTotals();
-        $this->getQuote()->save();
-
-        if (!$this->getQuote()->isVirtual() && $this->getCheckout()->getStepData('shipping', 'complete') == true) {
-            //Recollect Shipping rates for shipping methods
-            $this->getQuote()->getShippingAddress()->setCollectShippingRates(true);
-        }
+        $address->save();
 
         $this->getCheckout()->setStepData(
             'billing',
@@ -664,7 +654,7 @@ class Onepage
             return array('error' => 1, 'message' => $validateRes);
         }
 
-        $this->getQuote()->collectTotals()->save();
+        $address->collectTotals()->save();
 
         $this->getCheckout()->setStepData('shipping', 'complete', true)->setStepData('shipping_method', 'allow', true);
 
@@ -682,11 +672,15 @@ class Onepage
         if (empty($shippingMethod)) {
             return array('error' => -1, 'message' => __('Invalid shipping method'));
         }
-        $rate = $this->getQuote()->getShippingAddress()->getShippingRateByCode($shippingMethod);
+        $shippingAddress = $this->getQuote()->getShippingAddress();
+        $rate = $shippingAddress->getShippingRateByCode($shippingMethod);
         if (!$rate) {
             return array('error' => -1, 'message' => __('Invalid shipping method'));
+        } else {
+            $shippingDescription = $rate->getCarrierTitle() . ' - ' . $rate->getMethodTitle();
+            $shippingAddress->setShippingDescription(trim($shippingDescription, ' -'));
         }
-        $this->getQuote()->getShippingAddress()->setShippingMethod($shippingMethod);
+        $shippingAddress->setShippingMethod($shippingMethod)->save();
 
         $this->getCheckout()->setStepData('shipping_method', 'complete', true)->setStepData('payment', 'allow', true);
 
diff --git a/app/code/Magento/Checkout/README.md b/app/code/Magento/Checkout/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d395d3f077695887d2b1c0b7c18fb883a0a51776
--- /dev/null
+++ b/app/code/Magento/Checkout/README.md
@@ -0,0 +1,3 @@
+Magento\Checkout module allows merchant to register sale transaction with the customer. Module implements consumer flow
+that includes such actions like adding products to cart, providing shipping and billing information and confirming
+the purchase.
\ No newline at end of file
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php
index 83e1f7de5f34b3f425ec78d087e0bc483582a7e2..f47d8862767e018f0961293b5bb76d15326f367e 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadService.php
@@ -21,26 +21,32 @@
  * @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\Checkout\Service\V1\Address\Billing;
 
 use \Magento\Checkout\Service\V1\Address\Converter as AddressConverter;
 
+/** Quote billing address read service object. */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Address converter.
+     *
      * @var AddressConverter
      */
     protected $addressConverter;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param AddressConverter $addressConverter
+     * Constructs a quote billing address object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param AddressConverter $addressConverter Address converter.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -51,11 +57,19 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address Quote billing address object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getAddress($cartId)
     {
-        /** @var  \Magento\Sales\Model\Quote\Address $address */
+        /**
+         * Address.
+         *
+         * @var  \Magento\Sales\Model\Quote\Address $address
+         */
         $address = $this->quoteRepository->get($cartId)->getBillingAddress();
         return $this->addressConverter->convertModelToDataObject($address);
     }
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php
index 690cfd7c30fb3eaca9a93100bf1ca556fa6aae83..8e0b0d1c7f86a462541e9d1bf332a599bc860a61 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Billing/ReadServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote billing address service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,14 +23,15 @@
  */
 namespace Magento\Checkout\Service\V1\Address\Billing;
 
+/** Quote billing address read service interface. */
 interface ReadServiceInterface
 {
     /**
-     * Get billing address of the quote
+     * Returns the billing address for a specified quote.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Address
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address Quote billing address object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getAddress($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php
index 1ca53780b300cf0503213a6d162c1a6b7d558d02..9691eec44e9f7096af182c3790603b30ddcc0c37 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteService.php
@@ -21,7 +21,6 @@
  * @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\Checkout\Service\V1\Address\Billing;
 
 use Magento\Framework\Exception\InputException;
@@ -31,39 +30,52 @@ use \Magento\Sales\Model\Quote\AddressFactory;
 use \Magento\Checkout\Service\V1\Address\Converter;
 use \Magento\Checkout\Service\V1\Address\Validator;
 
+/** Quote billing address write service object. */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Validator.
+     *
      * @var Validator
      */
     protected $addressValidator;
 
     /**
+     * Logger.
+     *
      * @var Logger
      */
     protected $logger;
 
     /**
+     * Address factory.
+     *
      * @var AddressFactory
      */
     protected $quoteAddressFactory;
 
     /**
+     * Converter.
+     *
      * @var Converter
      */
     protected $addressConverter;
 
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     protected $quoteRepository;
 
     /**
-     * @param QuoteRepository $quoteRepository
-     * @param Converter $addressConverter
-     * @param Validator $addressValidator
-     * @param AddressFactory $quoteAddressFactory
-     * @param Logger $logger
+     * Constructs a quote billing address service object.
+     *
+     * @param QuoteRepository $quoteRepository Quote repository.
+     * @param Converter $addressConverter Address converter.
+     * @param Validator $addressValidator Address validator.
+     * @param AddressFactory $quoteAddressFactory Quote address factory.
+     * @param Logger $logger Logger.
      */
     public function __construct(
         QuoteRepository $quoteRepository,
@@ -80,13 +92,27 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData Billing address data.
+     * @return int Address ID.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid.
      */
     public function setAddress($cartId, $addressData)
     {
-        /** @var \Magento\Sales\Model\Quote $quote */
+        /**
+         * Quote.
+         *
+         * @var \Magento\Sales\Model\Quote $quote
+         */
         $quote = $this->quoteRepository->get($cartId);
-        /** @var \Magento\Sales\Model\Quote\Address $address */
+        /**
+         * Address.
+         *
+         * @var \Magento\Sales\Model\Quote\Address $address
+         */
         $address = $this->quoteAddressFactory->create();
         $this->addressValidator->validate($addressData);
         if ($addressData->getId()) {
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php
index 406c6860684123344ef3e1e5d8ef3ee51c4eef07..1fd21b2bf6c760030105a676ae78a48259ce00b7 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Billing/WriteServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote billing address service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,16 +23,19 @@
  */
 namespace Magento\Checkout\Service\V1\Address\Billing;
 
+/**
+ * Quote billing address write service interface.
+ */
 interface WriteServiceInterface
 {
     /**
-     * Assign billing address to cart
+     * Assigns a specified billing address to a specified cart.
      *
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\InputException
-     * @param int $cartId
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData
-     * @return int
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData Billing address data.
+     * @return int Address ID.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid.
      */
     public function setAddress($cartId, $addressData);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Converter.php b/app/code/Magento/Checkout/Service/V1/Address/Converter.php
index c3abebefd746735a46ee788382550c647f7687e0..b1202eb98fed74f90a4eb65a1c9b718568ef50d7 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Converter.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Converter.php
@@ -21,7 +21,6 @@
  * @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\Checkout\Service\V1\Address;
 
 use Magento\Checkout\Service\V1\Data\Cart\Address;
@@ -31,21 +30,28 @@ use Magento\Customer\Service\V1\CustomerMetadataServiceInterface;
 use Magento\Framework\Service\Data\AttributeValue;
 use Magento\Framework\Service\SimpleDataObjectConverter;
 
+/** Quote shipping address converter service. */
 class Converter
 {
     /**
+     * Address builder.
+     *
      * @var AddressBuilder
      */
     protected $addressBuilder;
 
     /**
+     * Customer metadata service interface.
+     *
      * @var CustomerMetadataServiceInterface
      */
     protected $metadataService;
 
     /**
-     * @param AddressBuilder $addressBuilder
-     * @param CustomerMetadataServiceInterface $metadataService
+     * Constructs a quote shipping address converter service object.
+     *
+     * @param AddressBuilder $addressBuilder Address builder.
+     * @param CustomerMetadataServiceInterface $metadataService Metadata service.
      */
     public function __construct(AddressBuilder $addressBuilder, CustomerMetadataServiceInterface $metadataService)
     {
@@ -54,8 +60,10 @@ class Converter
     }
 
     /**
-     * @param \Magento\Sales\Model\Quote\Address $address
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Address
+     * Converts a quote address model to an address data object.
+     *
+     * @param \Magento\Sales\Model\Quote\Address $address The quote address model.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address Address data object.
      */
     public function convertModelToDataObject(\Magento\Sales\Model\Quote\Address $address)
     {
@@ -94,11 +102,11 @@ class Converter
     }
 
     /**
-     * Convert address data object to quote address model
+     * Converts an address data object to a quote address model.
      *
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $dataObject
-     * @param \Magento\Sales\Model\Quote\Address $address
-     * @return \Magento\Sales\Model\Quote\Address
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $dataObject The address data object.
+     * @param \Magento\Sales\Model\Quote\Address $address The address.
+     * @return \Magento\Sales\Model\Quote\Address Quote address model.
      */
     public function convertDataObjectToModel($dataObject, $address)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php
index 1427051831a83afd217998b5c1494432b7fd6d8f..47c0c465ef075f60236f8fa6b5a5b0c21b5aa719 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadService.php
@@ -21,27 +21,33 @@
  * @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\Checkout\Service\V1\Address\Shipping;
 
 use \Magento\Checkout\Service\V1\Address\Converter as AddressConverter;
 use \Magento\Framework\Exception\NoSuchEntityException;
 
+/** Quote billing address read service object. */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Address converter.
+     *
      * @var AddressConverter
      */
     protected $addressConverter;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param AddressConverter $addressConverter
+     * Constructs a quote billing address read service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param AddressConverter $addressConverter Address converter.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -52,11 +58,19 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address Shipping address object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getAddress($cartId)
     {
-        /** @var \Magento\Sales\Model\Quote $quote */
+        /**
+         * Quote.
+         *
+         * @var \Magento\Sales\Model\Quote $quote
+         */
         $quote = $this->quoteRepository->get($cartId);
         if ($quote->isVirtual()) {
             throw new NoSuchEntityException(
@@ -64,7 +78,11 @@ class ReadService implements ReadServiceInterface
             );
         }
 
-        /** @var \Magento\Sales\Model\Quote\Address $address */
+        /**
+         * Address.
+         *
+         * @var \Magento\Sales\Model\Quote\Address $address
+         */
         $address = $quote->getShippingAddress();
         return $this->addressConverter->convertModelToDataObject($address);
     }
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php
index d657f9c02018c6ad0e450f1d5271ed51209cb511..79984acc4828aac45042089dfa1716b12d0adef5 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Shipping/ReadServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote shipping address service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,14 +23,15 @@
  */
 namespace Magento\Checkout\Service\V1\Address\Shipping;
 
+/** Quote billing address read service interface. */
 interface ReadServiceInterface
 {
     /**
-     * Get shipping address of the quote
+     * Returns the shipping address for a specified quote.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Address
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address Shipping address object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getAddress($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php
index cfc2a33425d62b24d04d1f5f842611ffddc725b6..82ae00681ed2fcd0ca9cb9d891fa4657e306103f 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteService.php
@@ -21,46 +21,58 @@
  * @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\Checkout\Service\V1\Address\Shipping;
 
 use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Logger;
 
+/** Quote shipping address write service object. */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Quote address factory.
+     *
      * @var \Magento\Sales\Model\Quote\AddressFactory
      */
     protected $quoteAddressFactory;
 
     /**
+     * Address converter.
+     *
      * @var \Magento\Checkout\Service\V1\Address\Converter
      */
     protected $addressConverter;
 
     /**
+     * Address validator.
+     *
      * @var \Magento\Checkout\Service\V1\Address\Validator
      */
     protected $addressValidator;
 
     /**
+     * Logger.
+     *
      * @var Logger
      */
     protected $logger;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param \Magento\Checkout\Service\V1\Address\Converter $addressConverter
-     * @param \Magento\Checkout\Service\V1\Address\Validator $addressValidator
-     * @param \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory
-     * @param Logger $logger
+     * Constructs a quote shipping address write service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param \Magento\Checkout\Service\V1\Address\Converter $addressConverter Address converter.
+     * @param \Magento\Checkout\Service\V1\Address\Validator $addressValidator Address validator.
+     * @param \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory Quote address factory.
+     * @param Logger $logger Logger.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -77,7 +89,13 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData The shipping address data.
+     * @return int Address ID.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid.
      */
     public function setAddress($cartId, $addressData)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php
index caa591b036205f33264fa8fa3c076c483c682a5e..e2c2a5c937162d3b4ce6c18b80b60013ef10c8aa 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Shipping/WriteServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote shipping address service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,16 +23,17 @@
  */
 namespace Magento\Checkout\Service\V1\Address\Shipping;
 
+/** Quote shipping address write service interface. */
 interface WriteServiceInterface
 {
     /**
-     * Assign shipping address to cart
+     * Assigns a specified shipping address to a specified cart.
      *
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\InputException
-     * @param int $cartId
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData
-     * @return int
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData The shipping address data.
+     * @return int Address ID.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\InputException The specified cart ID or address data is not valid.
      */
     public function setAddress($cartId, $addressData);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Address/Validator.php b/app/code/Magento/Checkout/Service/V1/Address/Validator.php
index 6390f90e3b55cef35e410cca8cf2c7ada734268c..3bef151f61cc923b3a8bbd2004d314e57c9a3f3c 100644
--- a/app/code/Magento/Checkout/Service/V1/Address/Validator.php
+++ b/app/code/Magento/Checkout/Service/V1/Address/Validator.php
@@ -21,24 +21,30 @@
  * @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\Checkout\Service\V1\Address;
 
+/** Quote shipping address validator service. */
 class Validator
 {
     /**
+     * Address factory.
+     *
      * @var \Magento\Sales\Model\Quote\AddressFactory
      */
     protected $quoteAddressFactory;
 
     /**
+     * Customer factory.
+     *
      * @var \Magento\Customer\Model\CustomerFactory
      */
     protected $customerFactory;
 
     /**
-     * @param \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory
-     * @param \Magento\Customer\Model\CustomerFactory $customerFactory
+     * Constructs a quote shipping address validator service object.
+     *
+     * @param \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory Address factory.
+     * @param \Magento\Customer\Model\CustomerFactory $customerFactory Customer factory.
      */
     public function __construct(
         \Magento\Sales\Model\Quote\AddressFactory $quoteAddressFactory,
@@ -49,12 +55,12 @@ class Validator
     }
 
     /**
-     * Validate data object fields
+     * Validates the fields in a specified address data object.
      *
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Address $addressData The address data object.
      * @return bool
-     * @throws \Magento\Framework\Exception\InputException
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @throws \Magento\Framework\Exception\InputException The specified address belongs to another customer.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer ID or address ID is not valid.
      */
     public function validate($addressData)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php
index 3ee84d162de0307b23621cf9ba7a516ae12ae683..3a5885f7cde3f376069ebffe4f223d524f5b6cc9 100644
--- a/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadService.php
@@ -32,29 +32,42 @@ use \Magento\Framework\Exception\InputException;
 use \Magento\Framework\Service\V1\Data\Search\FilterGroup;
 use \Magento\Checkout\Service\V1\Data;
 
+/** 
+ * Cart read service object. 
+ */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     private $quoteRepository;
 
     /**
+     * Quote collection.
+     *
      * @var QuoteCollection
      */
     private $quoteCollection;
 
     /**
+     * Search results builder.
+     *
      * @var Data\CartSearchResultsBuilder
      */
     private $searchResultsBuilder;
 
     /**
+     * Cart mapper.
+     *
      * @var Data\CartMapper
      */
     private $cartMapper;
 
     /**
+     * Array of valid search fields.
+     *
      * @var array
      */
     private $validSearchFields = array(
@@ -67,7 +80,7 @@ class ReadService implements ReadServiceInterface
     );
 
     /**
-     * Cart data object - quote field map
+     * Cart data object - quote field map.
      *
      * @var array
      */
@@ -76,10 +89,12 @@ class ReadService implements ReadServiceInterface
     );
 
     /**
-     * @param QuoteRepository $quoteRepository
-     * @param QuoteCollection $quoteCollection
-     * @param Data\CartSearchResultsBuilder $searchResultsBuilder
-     * @param Data\CartMapper $cartMapper
+     * Constructs a cart read service object.
+     *
+     * @param QuoteRepository $quoteRepository Quote repository.
+     * @param QuoteCollection $quoteCollection Quote collection.
+     * @param Data\CartSearchResultsBuilder $searchResultsBuilder Search results builder.
+     * @param Data\CartMapper $cartMapper Cart mapper.
      */
     public function __construct(
         QuoteRepository $quoteRepository,
@@ -94,7 +109,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart Cart object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getCart($cartId)
     {
@@ -103,7 +122,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $customerId The customer ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart Cart object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist.
      */
     public function getCartForCustomer($customerId)
     {
@@ -112,7 +135,10 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria The search criteria.
+     * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object.
      */
     public function getCartList(SearchCriteria $searchCriteria)
     {
@@ -146,12 +172,12 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * Add FilterGroup to the given quote collection.
+     * Adds a specified filter group to the specified quote collection.
      *
-     * @param FilterGroup $filterGroup
-     * @param QuoteCollection $collection
+     * @param FilterGroup $filterGroup The filter group.
+     * @param QuoteCollection $collection The quote collection.
      * @return void
-     * @throws InputException
+     * @throws InputException The specified filter group or quote collection does not exist.
      */
     protected function addFilterGroupToCollection(FilterGroup $filterGroup, QuoteCollection $collection)
     {
@@ -168,11 +194,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * Retrieve mapped search field
+     * Returns a mapped search field.
      *
-     * @param string $field
-     * @return string
-     * @throws InputException
+     * @param string $field The field.
+     * @return string Mapped search field.
+     * @throws InputException The specified field cannot be used for search.
      */
     protected function getQuoteSearchField($field)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php
index 4a1ca0823b87950e426134a3d751481a2b103d2f..90ee6e54e6e8b9550860dcd4034d7c3b2258ff6d 100644
--- a/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Cart/ReadServiceInterface.php
@@ -25,34 +25,34 @@ namespace Magento\Checkout\Service\V1\Cart;
 
 use \Magento\Framework\Service\V1\Data\SearchCriteria;
 
+/** 
+ * Cart read service interface. 
+ */
 interface ReadServiceInterface
 {
     /**
-     * Retrieve information about cart represented by given ID
+     * Enables an administrative user to return information for a specified cart.
      *
-     * Access level: admin
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart Cart object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getCart($cartId);
 
     /**
-     * Retrieve information about cart of provided customer
+     * Returns information for the cart for a specified customer.
      *
-     * @param int $customerId
-     * @return \Magento\Checkout\Service\V1\Data\Cart
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $customerId The customer ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart Cart object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified customer does not exist.
      */
     public function getCartForCustomer($customerId);
 
     /**
-     * Retrieve list of carts that match given search criteria
-     *
-     * Access level: admin
+     * Enables administrative users to list carts that match specified search criteria.
      *
-     * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria
-     * @return \Magento\Checkout\Service\V1\Data\CartSearchResults
+     * @param \Magento\Framework\Service\V1\Data\SearchCriteria $searchCriteria The search criteria.
+     * @return \Magento\Checkout\Service\V1\Data\CartSearchResults Cart search results object.
      */
     public function getCartList(SearchCriteria $searchCriteria);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php b/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php
index afea3b331046b2616c29067d17dae7647f3ec1ad..2e44c33c8bdb2143f96a7de098c45d0585011b2b 100644
--- a/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php
+++ b/app/code/Magento/Checkout/Service/V1/Cart/TotalsService.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -29,33 +28,46 @@ use Magento\Sales\Model\Quote;
 use Magento\Sales\Model\QuoteRepository;
 use \Magento\Checkout\Service\V1\Data\Cart\Totals;
 
+/** 
+ * Cart totals service object. 
+ */
 class TotalsService implements TotalsServiceInterface
 {
     /**
+     * Cart totals builder.
+     *
      * @var Cart\TotalsBuilder
      */
     private $totalsBuilder;
 
     /**
+     * Cart totals mapper.
+     *
      * @var Cart\TotalsMapper
      */
     private $totalsMapper;
 
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     private $quoteRepository;
 
     /**
+     * Item totals mapper.
+     *
      * @var Totals\ItemMapper;
      */
     private $itemTotalsMapper;
 
     /**
-     * @param Cart\TotalsBuilder $totalsBuilder
-     * @param Cart\TotalsMapper $totalsMapper
-     * @param QuoteRepository $quoteRepository
-     * @param Totals\ItemMapper $itemTotalsMapper
+     * Constructs a cart totals service object.
+     *
+     * @param Cart\TotalsBuilder $totalsBuilder Cart totals builder.
+     * @param Cart\TotalsMapper $totalsMapper Cart totals mapper.
+     * @param QuoteRepository $quoteRepository Quote repository.
+     * @param Totals\ItemMapper $itemTotalsMapper Item totals mapper.
      */
     public function __construct(
         Cart\TotalsBuilder $totalsBuilder,
@@ -70,11 +82,18 @@ class TotalsService implements TotalsServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return Totals Quote totals data.
      */
     public function getTotals($cartId)
     {
-        /** @var \Magento\Sales\Model\Quote $quote */
+        /**
+         * Quote.
+         *
+         * @var \Magento\Sales\Model\Quote $quote
+         */
         $quote = $this->quoteRepository->get($cartId);
 
         $this->totalsBuilder->populateWithArray($this->totalsMapper->map($quote));
diff --git a/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php
index ff5eb7aea60c36bc9162c93ee1e5a1e7eb408c90..2e4a62059ea6b24cc22374e5c9c009e6f4bea99f 100644
--- a/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Cart/TotalsServiceInterface.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -24,14 +23,17 @@
  */
 namespace Magento\Checkout\Service\V1\Cart;
 
+/** 
+ * Totals service interface. 
+ */
 interface TotalsServiceInterface
 {
     /**
-     * Retrieve quote totals data
+     * Returns quote totals data for a specified cart.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Totals
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Totals Quote totals data.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getTotals($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php
index f537f5d80424f4de9dc4b9400ebb4c07a4664286..733bd5eaa79eeba7813e6d76458a8e6e1f7fc017 100644
--- a/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/Cart/WriteService.php
@@ -28,45 +28,62 @@ use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\Framework\Exception\StateException;
 use Magento\Authorization\Model\UserContextInterface;
 
+/** 
+ * Cart write service object. 
+ */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Quote factory.
+     *
      * @var \Magento\Sales\Model\QuoteFactory
      */
     protected $quoteFactory;
 
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Store manager interface.
+     *
      * @var \Magento\Framework\StoreManagerInterface
      */
     protected $storeManager;
 
     /**
+     * Customer registry.
+     *
      * @var \Magento\Customer\Model\CustomerRegistry
      */
     protected $customerRegistry;
 
     /**
+     * User context interface.
+     *
      * @var UserContextInterface
      */
     protected $userContext;
 
     /**
+     * Quote factory.
+     *
      * @var \Magento\Sales\Model\Service\QuoteFactory
      */
     protected $quoteServiceFactory;
 
     /**
-     * @param \Magento\Sales\Model\QuoteFactory $quoteFactory
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param \Magento\Framework\StoreManagerInterface $storeManager
-     * @param \Magento\Customer\Model\CustomerRegistry $customerRegistry
-     * @param UserContextInterface $userContext
-     * @param \Magento\Sales\Model\Service\QuoteFactory $quoteServiceFactory
+     * Constructs a cart write service object.
+     *
+     * @param \Magento\Sales\Model\QuoteFactory $quoteFactory Quote factory.
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param \Magento\Framework\StoreManagerInterface $storeManager Store manager.
+     * @param \Magento\Customer\Model\CustomerRegistry $customerRegistry Customer registry.
+     * @param UserContextInterface $userContext User context.
+     * @param \Magento\Sales\Model\Service\QuoteFactory $quoteServiceFactory Quote service factory.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteFactory $quoteFactory,
@@ -85,7 +102,10 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created.
+     * @return int Cart ID.
      */
     public function create()
     {
@@ -102,9 +122,9 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * Create anonymous cart
+     * Creates an anonymous cart.
      *
-     * @return \Magento\Sales\Model\Quote
+     * @return \Magento\Sales\Model\Quote Cart object.
      */
     protected function createAnonymousCart()
     {
@@ -116,10 +136,10 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * Create cart for current logged in customer
+     * Creates a cart for the currently logged-in customer.
      *
-     * @return \Magento\Sales\Model\Quote
-     * @throws CouldNotSaveException
+     * @return \Magento\Sales\Model\Quote Cart object.
+     * @throws CouldNotSaveException The cart could not be created.
      */
     protected function createCustomerCart()
     {
@@ -140,7 +160,12 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param int $customerId The customer ID.
+     * @return boolean
+     * @throws \Magento\Framework\Exception\StateException The customer cannot be assigned to the specified cart: The cart belongs to a different store or is not anonymous, or the customer already has an active cart.
      */
     public function assignCustomer($cartId, $customerId)
     {
@@ -165,7 +190,10 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return int Order ID.
      */
     public function order($cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php
index e643df26347a385c188d3b034481d69cde014a9e..14c9dae7f128b14401f6a69076b383b3bdc24f9c 100644
--- a/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Cart/WriteServiceInterface.php
@@ -23,32 +23,33 @@
  */
 namespace Magento\Checkout\Service\V1\Cart;
 
+/** 
+ * Cart write service interface. 
+ */
 interface WriteServiceInterface
 {
     /**
-     * Create empty cart/quote for anonymous customer
-     *
-     * Access level: admin or guest
+     * Enables an administrative or guest user to create an empty cart and quote for an anonymous customer.
      *
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @return int cart id
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The empty cart and quote could not be created.
+     * @return int Cart ID.
      */
     public function create();
 
     /**
-     * Assign customer to the given shopping cart
+     * Assigns a specified customer to a specified shopping cart.
      *
-     * @param int $cartId
-     * @param int $customerId
+     * @param int $cartId The cart ID.
+     * @param int $customerId The customer ID.
      * @return boolean
      */
     public function assignCustomer($cartId, $customerId);
 
     /**
-     * Place order for cart
+     * Places an order for a specified cart.
      *
-     * @param int $cartId
-     * @return int
+     * @param int $cartId The cart ID.
+     * @return int Order ID.
      */
     public function order($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php b/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php
index f170475d9f21146d1e2165296272d8f28ff67809..343640c2242362d4472791458933bc0d83663906 100644
--- a/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/Coupon/ReadService.php
@@ -27,23 +27,29 @@ use \Magento\Checkout\Service\V1\Data\Cart\CouponBuilder as CouponBuilder;
 use \Magento\Checkout\Service\V1\Data\Cart\Coupon as Coupon;
 
 /**
- * Class ReadService
+ * Coupon read service object.
  */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Coupon builder.
+     *
      * @var CouponBuilder
      */
     protected $couponBuilder;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param CouponBuilder $couponBuilder
+     * Constructs a coupon read service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param CouponBuilder $couponBuilder Coupon builder.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -54,7 +60,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Coupon Coupon object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function get($cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php
index b6d24ef3a31c3e45e4c6b7e17957807e46847fd7..9c775f722af6fd72ba281cb476cdb76c3901d9bb 100644
--- a/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Coupon/ReadServiceInterface.php
@@ -24,16 +24,16 @@
 namespace Magento\Checkout\Service\V1\Coupon;
 
 /**
- * Interface ReadServiceInterface
+ * Coupon read service interface.
  */
 interface ReadServiceInterface
 {
     /**
-     * Retrieve information about coupon in cart
+     * Returns information for a coupon in a specified cart.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Coupon
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Coupon Coupon object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function get($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php b/app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php
index 509219fcc20c612d79bc1d6e960824ff379d6a9e..e0ac991969314b6af6a0cc3b38a0ac6e196ff355 100644
--- a/app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/Coupon/WriteService.php
@@ -29,23 +29,29 @@ use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Exception\CouldNotSaveException;
 
 /**
- * Class WriteService
+ * Coupon write service object.
  */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Coupon builder.
+     *
      * @var CouponBuilder
      */
     protected $couponBuilder;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param CouponBuilder $couponBuilder
+     * Constructs a coupon write service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param CouponBuilder $couponBuilder Coupon builder.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -57,6 +63,12 @@ class WriteService implements WriteServiceInterface
 
     /**
      * {@inheritdoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData The coupon code data.
+     * @return bool
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added.
      */
     public function set($cartId, \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData)
     {
@@ -82,6 +94,11 @@ class WriteService implements WriteServiceInterface
 
     /**
      * {@inheritdoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return bool
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted.
      */
     public function delete($cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php
index 8f2ca64d084cf3354d030bf99a6aa0280e2a6568..c38590aa332b53985b79acbacff58c21384e26be 100644
--- a/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Coupon/WriteServiceInterface.php
@@ -23,26 +23,29 @@
  */
 namespace Magento\Checkout\Service\V1\Coupon;
 
+/**
+ * Coupon write service interface.
+ */
 interface WriteServiceInterface
 {
     /**
-     * Add coupon by code to cart
+     * Adds a coupon by code to a specified cart.
      *
-     * @param int $cartId
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData The coupon code data.
      * @return bool
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified coupon could not be added.
      */
     public function set($cartId, \Magento\Checkout\Service\V1\Data\Cart\Coupon $couponCodeData);
 
     /**
-     * Delete coupon from cart
+     * Deletes a coupon from a specified cart.
      *
-     * @param int $cartId
+     * @param int $cartId The cart ID.
      * @return bool
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\CouldNotDeleteException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotDeleteException The specified coupon could not be deleted.
      */
     public function delete($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart.php b/app/code/Magento/Checkout/Service/V1/Data/Cart.php
index eb12589071c90b430a460cae8f655d1a47935968..aac85942d9e3cc1579ebbbdb343ba2fc50073951 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart.php
@@ -24,52 +24,106 @@
 namespace Magento\Checkout\Service\V1\Data;
 
 /**
- * Cart data object
+ * Cart data object.
  *
  * @codeCoverageIgnore
  */
 class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
 {
+    /**
+     * Cart ID.
+     */
     const ID = 'id';
 
+    /**
+     * ID of the store where the cart was created.
+     */
     const STORE_ID = 'store_id';
 
+    /**
+     * Cart creation date and time.
+     */
     const CREATED_AT = 'created_at';
 
+    /**
+     * Cart last update date and time.
+     */
     const UPDATED_AT = 'updated_at';
 
+    /**
+     * Cart conversion date and time.
+     */
     const CONVERTED_AT = 'converted_at';
 
+    /**
+     * Flag that shows whether the cart is still active.
+     */
     const IS_ACTIVE = 'is_active';
 
+    /**
+     * Flag that shows whether the cart is virtual. A virtual cart contains virtual items.
+     */
     const IS_VIRTUAL = 'is_virtual';
 
+    /**
+     * List of cart items.
+     */
     const ITEMS = 'items';
 
+    /**
+     * Number of different items or products in the cart.
+     */
     const ITEMS_COUNT = 'items_count';
 
+    /**
+     * Total quantity of all cart items.
+     */
     const ITEMS_QUANTITY = 'items_qty';
 
+    /**
+     * Information about the customer who is assigned to the cart.
+     */
     const CUSTOMER = 'customer';
 
+    /**
+     * Payment method that is used to process the cart.
+     */
     const CHECKOUT_METHOD = 'checkout_method';
 
+    /**
+     * Cart shipping address.
+     */
     const SHIPPING_ADDRESS = 'shipping_address';
 
+    /**
+     * Cart billing address.
+     */
     const BILLING_ADDRESS = 'shipping_address';
 
+    /**
+     * Information about cart totals.
+     */
     const TOTALS = 'totals';
 
+    /**
+     * The order ID that is reserved for the cart.
+     */
     const RESERVED_ORDER_ID = 'reserved_order_id';
 
+    /**
+     * Original order ID.
+     */
     const ORIG_ORDER_ID = 'orig_order_id';
 
+    /**
+     * Information about the quote currency, such as code, exchange rates, and so on.
+     */
     const CURRENCY = 'currency';
 
     /**
-     * Cart/Quote id
+     * Returns the cart/quote ID.
      *
-     * @return int
+     * @return int Cart/quote ID.
      */
     public function getId()
     {
@@ -77,9 +131,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Store id
+     * Returns the store ID for the store where the cart was created.
      *
-     * @return int
+     * @return int|null Store ID. Otherwise, null.
      */
     public function getStoreId()
     {
@@ -87,9 +141,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Creation date and time
+     * Returns the cart creation date and time.
      *
-     * @return string
+     * @return string|null Cart creation date and time. Otherwise, null.
      */
     public function getCreatedAt()
     {
@@ -97,9 +151,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Last update date and time
+     * Returns the cart last update date and time.
      *
-     * @return string
+     * @return string|null Cart last update date and time. Otherwise, null.
      */
     public function getUpdatedAt()
     {
@@ -107,9 +161,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get conversion date and time
+     * Returns the cart conversion date and time.
      *
-     * @return string|null
+     * @return string|null Cart conversion date and time. Otherwise, null.
      */
     public function getConvertedAt()
     {
@@ -117,9 +171,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get active status flag
+     * Determines whether the cart is still active.
      *
-     * @return bool|null
+     * @return bool|null Active status flag value. Otherwise, null.
      */
     public function getIsActive()
     {
@@ -132,9 +186,11 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get virtual flag(cart contains virtual products)
+     * Determines whether the cart is a virtual cart.
+     *
+     * A virtual cart contains virtual items.
      *
-     * @return bool|null
+     * @return bool|null Virtual flag value. Otherwise, null.
      */
     public function getIsVirtual()
     {
@@ -147,9 +203,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get cart items
+     * Lists items in the cart.
      *
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Item[]|null
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Item[]|null Array of items. Otherwise, null.
      */
     public function getItems()
     {
@@ -157,9 +213,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Amount of different items/products in cart
+     * Returns the number of different items or products in the cart.
      *
-     * @return int|null
+     * @return int|null Number of different items or products in the cart. Otherwise, null.
      */
     public function getItemsCount()
     {
@@ -167,9 +223,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get quantity of all items/products in cart
+     * Returns the total quantity of all cart items.
      *
-     * @return float|null
+     * @return float|null Total quantity of all cart items. Otherwise, null.
      */
     public function getItemsQty()
     {
@@ -177,9 +233,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get customer data
+     * Returns information about the customer who is assigned to the cart.
      *
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Customer
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Customer Information about the customer who is assigned to the cart.
      */
     public function getCustomer()
     {
@@ -187,9 +243,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get checkout method
+     * Returns the payment method that is used to process the cart.
      *
-     * @return string|null
+     * @return string|null Payment method. Otherwise, null.
      */
     public function getCheckoutMethod()
     {
@@ -197,7 +253,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Address|null
+     * Returns the cart shipping address.
+     *
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address|null Cart shipping address. Otherwise, null.
      */
     public function getShippingAddress()
     {
@@ -205,7 +263,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Address|null
+     * Returns the cart billing address.
+     *
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Address|null Cart billing address. Otherwise, null.
      */
     public function getBillingAddress()
     {
@@ -213,7 +273,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Totals|null
+     * Returns information about cart totals.
+     *
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Totals|null Information about cart totals. Otherwise, null.
      */
     public function getTotals()
     {
@@ -221,9 +283,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get reserved order id
+     * Returns the reserved order ID for the cart.
      *
-     * @return string|null
+     * @return string|null Reserved order ID. Otherwise, null.
      */
     public function getReservedOrderId()
     {
@@ -231,9 +293,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get original order id
+     * Returns the original order ID for the cart.
      *
-     * @return string|null
+     * @return string|null Original order ID. Otherwise, null.
      */
     public function getOrigOrderId()
     {
@@ -241,9 +303,9 @@ class Cart extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get currency information
+     * Returns information about quote currency, such as code, exchange rate, and so on.
      *
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Currency|null
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Currency|null Quote currency information. Otherwise, null.
      */
     public function getCurrency()
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php
index 78124a81bba472dfb558c3c5a9ba452ddaf88170..3f11e19f1bf5829ef7788c00c3541a1cd8b36695 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Address/Region.php
@@ -31,18 +31,27 @@ class Region extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     /**#@+
      * Array keys
      */
+    /**
+     * Region code.
+     */
     const REGION_CODE = 'region_code';
 
+    /**
+     * Region name.
+     */
     const REGION = 'region';
 
+    /**
+     * Region ID.
+     */
     const REGION_ID = 'region_id';
 
     /**#@-*/
 
     /**
-     * Get region code
+     * Returns the region code.
      *
-     * @return string
+     * @return string Region code.
      */
     public function getRegionCode()
     {
@@ -50,9 +59,9 @@ class Region extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get region
+     * Returns the region name.
      *
-     * @return string
+     * @return string Region.
      */
     public function getRegion()
     {
@@ -60,9 +69,9 @@ class Region extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * Get region id
+     * Returns the region ID.
      *
-     * @return int
+     * @return int Region ID.
      */
     public function getRegionId()
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php
index b2b38079320f7535deb68e87d64c90a65ea96d72..5b4c401d48df664eeb79b763b12f8ecae25913f1 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Coupon.php
@@ -21,23 +21,24 @@
  * @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\Checkout\Service\V1\Data\Cart;
 
 /**
- * Coupon data for quote
+ * Coupon data for quote.
  *
  * @codeCoverageIgnore
  */
 class Coupon extends \Magento\Framework\Service\Data\AbstractExtensibleObject
 {
     /**
-     * Constants defined for keys of array
+     * Coupon code.
      */
     const COUPON_CODE = 'coupon_code';
 
     /**
-     * @return string
+     * Returns the coupon code.
+     *
+     * @return string Coupon code.
      */
     public function getCouponCode()
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php
index 05712a19a0ed03544d6c15aa64167e72d4be078b..0a2357fec14f9e0d46221f30e010809d6bff8ced 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Customer.php
@@ -24,14 +24,20 @@
 namespace Magento\Checkout\Service\V1\Data\Cart;
 
 /**
- * Customer data for quote
+ * Customer data for quote.
  *
  * @codeCoverageIgnore
  */
 class Customer extends \Magento\Framework\Service\Data\AbstractExtensibleObject
 {
+    /**
+     * Customer ID.
+     */
     const ID = 'id';
 
+    /**
+     * Customer tax class ID.
+     */
     const TAX_CLASS_ID = 'tax_class_id';
 
     const GROUP_ID = 'group_id';
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php
index 0e252acd74c1d62e1b8de2113905cb449a7c15e4..e74a7b4c5ee8bb0cc6aa40b89f218a8d230f2524 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Item.php
@@ -25,27 +25,46 @@
 namespace Magento\Checkout\Service\V1\Data\Cart;
 
 /**
+ * Shopping cart item data object.
+ * 
  * @codeCoverageIgnore
  */
 class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject
 {
-    /**#@+
-     * Constants defined for keys of array
+    /**
+     * Item ID.
      */
     const ITEM_ID = 'item_id';
-
+    
+    /**
+     * Product SKU.
+     */
     const SKU = 'sku';
 
+    /**
+     * Product quantity.
+     */
     const QTY = 'qty';
 
+    /**
+     * Product name.
+     */
     const NAME = 'name';
 
+    /**
+     * Product price.
+     */
     const PRICE = 'price';
 
+    /**
+     * Product type.
+     */
     const PRODUCT_TYPE = 'product_type';
 
     /**
-     * @return int|null
+     * Returns the item ID.
+     *
+     * @return int|null Item ID. Otherwise, null.
      */
     public function getItemId()
     {
@@ -53,7 +72,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return string|null
+     * Returns the product SKU.
+     *
+     * @return string|null Product SKU. Otherwise, null.
      */
     public function getSku()
     {
@@ -61,7 +82,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return int
+     * Returns the product quantity.
+     *
+     * @return int Product quantity.
      */
     public function getQty()
     {
@@ -69,7 +92,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return string|null
+     * Returns the product name.
+     *
+     * @return string|null Product name. Otherwise, null.
      */
     public function getName()
     {
@@ -77,7 +102,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return float|null
+     * Returns the product price.
+     *
+     * @return float|null Product price. Otherwise, null.
      */
     public function getPrice()
     {
@@ -85,7 +112,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractExtensibleObject
     }
 
     /**
-     * @return string|null
+     * Returns the product type.
+     *
+     * @return string|null Product type. Otherwise, null.
      */
     public function getProductType()
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php
index b6650cd14a78168225ae5661bc1593cb914ce443..7975c482fe890b4d229fdaf7d63c495e0ca85948 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethod.php
@@ -24,34 +24,51 @@
 namespace Magento\Checkout\Service\V1\Data\Cart;
 
 /**
- * Quote shipping method data
+ * Quote shipping method data.
  *
  * @codeCoverageIgnore
  */
 class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleObject
 {
-    /**#@+
-     * Constants defined for keys of array, makes typos less likely
+    /**
+     * Shipping carrier code.
      */
     const CARRIER_CODE = 'carrier_code';
 
+    /**
+     * Shipping method code.
+     */
     const METHOD_CODE = 'method_code';
 
+    /**
+     * Shipping carrier title.
+     */
     const CARRIER_TITLE = 'carrier_title';
 
+    /**
+     * Shipping method title.
+     */
     const METHOD_TITLE = 'method_title';
 
+    /**
+     * Shipping amount in store currency.
+     */
     const SHIPPING_AMOUNT = 'amount';
 
+    /**
+     * Shipping amount in base currency.
+     */
     const BASE_SHIPPING_AMOUNT = 'base_amount';
 
+    /**
+     * Available.
+     */
     const AVAILABLE = 'available';
-    /**#@-*/
 
     /**
-     * Get carrier code
+     * Returns the shipping carrier code.
      *
-     * @return string
+     * @return string Shipping carrier code.
      */
     public function getCarrierCode()
     {
@@ -59,9 +76,9 @@ class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleO
     }
 
     /**
-     * Get shipping method code
+     * Returns the shipping method code.
      *
-     * @return string
+     * @return string Shipping method code.
      */
     public function getMethodCode()
     {
@@ -69,9 +86,9 @@ class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleO
     }
 
     /**
-     * Get shipping carrier title
+     * Returns the shipping carrier title.
      *
-     * @return string|null
+     * @return string|null Shipping carrier title. Otherwise, null.
      */
     public function getCarrierTitle()
     {
@@ -79,9 +96,9 @@ class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleO
     }
 
     /**
-     * Get shipping method title
+     * Returns the shipping method title.
      *
-     * @return string|null
+     * @return string|null Shipping method title. Otherwise, null.
      */
     public function getMethodTitle()
     {
@@ -89,9 +106,9 @@ class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleO
     }
 
     /**
-     * Get shipping amount
+     * Returns the shipping amount in store currency.
      *
-     * @return float
+     * @return float Shipping amount in store currency.
      */
     public function getAmount()
     {
@@ -99,9 +116,9 @@ class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleO
     }
 
     /**
-     * Get base shipping amount
+     * Returns the shipping amount in base currency.
      *
-     * @return float
+     * @return float Shipping amount in base currency.
      */
     public function getBaseAmount()
     {
@@ -109,7 +126,7 @@ class ShippingMethod extends \Magento\Framework\Service\Data\AbstractExtensibleO
     }
 
     /**
-     * Get availability flag of current method
+     * Returns the value of the availability flag for the current shipping method.
      *
      * @return bool
      */
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php
index adeadd88a3f81e5db7fc0aaf522140d78d3a7665..f5473768f439258221d203996dcc6e6c65cad51b 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/ShippingMethodConverter.php
@@ -24,20 +24,24 @@
 namespace Magento\Checkout\Service\V1\Data\Cart;
 
 /**
- * Quote shipping method data
+ * Quote shipping method data.
  *
  * @codeCoverageIgnore
  */
 class ShippingMethodConverter
 {
     /**
+     * Shipping method builder.
+     *
      * @var ShippingMethodBuilder
      */
     protected $builder;
 
     /**
-     * @param ShippingMethodBuilder $builder
-     * @param \Magento\Framework\StoreManagerInterface $storeManager
+     * Constructs a shipping method builder object.
+     *
+     * @param ShippingMethodBuilder $builder Shipping method builder.
+     * @param \Magento\Framework\StoreManagerInterface $storeManager Store manager interface.
      */
     public function __construct(
         \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder $builder,
@@ -48,11 +52,11 @@ class ShippingMethodConverter
     }
 
     /**
-     * Convert rate model to ShippingMethod data object
-     * @param string $quoteCurrencyCode
-     * @param \Magento\Sales\Model\Quote\Address\Rate $rateModel
+     * Converts a specified rate model to a shipping method data object.
      *
-     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod
+     * @param string $quoteCurrencyCode The quote currency code.
+     * @param \Magento\Sales\Model\Quote\Address\Rate $rateModel The rate model.
+     * @return mixed Shipping method data object.
      */
     public function modelToDataObject($rateModel, $quoteCurrencyCode)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php
index 2124e00c6b85cbad39b3f28b0fc1e78a700247d2..d81f628688ae32968436499276a0865e62f4420f 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/Cart/Totals/Item.php
@@ -24,41 +24,96 @@
 namespace Magento\Checkout\Service\V1\Data\Cart\Totals;
 
 /**
- * Cart item totals
+ * Cart item totals.
  *
  * @codeCoverageIgnore
  */
 class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
 {
-    /* ITEM DATA */
+    /**
+     * Price.
+     */
     const PRICE = 'price';
+
+    /**
+     * Base price.
+     */
     const BASE_PRICE = 'base_price';
+
+    /**
+     * Quantity.
+     */
     const QTY = 'qty';
 
-    /* ROW TOTALS */
+    /**
+     * Row total.
+     */
     const ROW_TOTAL = 'row_total';
+
+    /**
+     * Base row total.
+     */
     const BASE_ROW_TOTAL = 'base_row_total';
+
+    /**
+     * Row total with discount.
+     */
     const ROW_TOTAL_WITH_DISCOUNT = 'row_total_with_discount';
 
-    /* DISCOUNT */
+    /**
+     * Discount amount.
+     */
     const DISCOUNT_AMOUNT = 'discount_amount';
+
+    /**
+     * Base discount amount.
+     */
     const BASE_DISCOUNT_AMOUNT = 'base_discount_amount';
+
+    /**
+     * Discount percent.
+     */
     const DISCOUNT_PERCENT = 'discount_percent';
 
-    /* TAX */
+    /**
+     * Tax amount.
+     */
     const TAX_AMOUNT = 'tax_amount';
+
+    /**
+     * Base tax amount.
+     */
     const BASE_TAX_AMOUNT = 'base_tax_amount';
+
+    /**
+     * Tax percent.
+     */
     const TAX_PERCENT = 'tax_percent';
 
+    /**
+     * Price including tax.
+     */
     const PRICE_INCL_TAX = 'price_incl_tax';
+
+    /**
+     * Base price including tax.
+     */
     const BASE_PRICE_INCL_TAX = 'base_price_incl_tax';
+
+    /**
+     * Row total including tax.
+     */
     const ROW_TOTAL_INCL_TAX = 'row_total_incl_tax';
+
+    /**
+     * Base row total including tax.
+     */
     const BASE_ROW_TOTAL_INCL_TAX = 'base_row_total_incl_tax';
 
     /**
-     * Get item price in quote currency
+     * Returns the item price in quote currency.
      *
-     * @return float
+     * @return float Item price in quote currency.
      */
     public function getPrice()
     {
@@ -66,9 +121,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get item price in base currency
+     * Returns the item price in base currency.
      *
-     * @return float
+     * @return float Item price in base currency.
      */
     public function getBasePrice()
     {
@@ -76,9 +131,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get item qty
+     * Returns the item quantity.
      *
-     * @return int
+     * @return int Item quantity.
      */
     public function getQty()
     {
@@ -86,9 +141,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get row total in quote currency
+     * Returns the row total in quote currency.
      *
-     * @return float
+     * @return float Row total in quote currency.
      */
     public function getRowTotal()
     {
@@ -96,9 +151,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get row total in base currency
+     * Returns the row total in base currency.
      *
-     * @return float
+     * @return float Row total in base currency.
      */
     public function getBaseRowTotal()
     {
@@ -106,9 +161,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get row total with discount in quote currency
+     * Returns the row total with discount in quote currency.
      *
-     * @return float|null
+     * @return float|null Row total with discount in quote currency. Otherwise, null.
      */
     public function getRowTotalWithDiscount()
     {
@@ -116,9 +171,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get tax amount in quote currency
+     * Returns the tax amount in quote currency.
      *
-     * @return float|null
+     * @return float|null Tax amount in quote currency. Otherwise, null.
      */
     public function getTaxAmount()
     {
@@ -126,9 +181,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get tax amount in base currency
+     * Returns the tax amount in base currency.
      *
-     * @return float|null
+     * @return float|null Tax amount in base currency. Otherwise, null.
      */
     public function getBaseTaxAmount()
     {
@@ -136,9 +191,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get tax percent
+     * Returns the tax percent.
      *
-     * @return int|null
+     * @return int|null Tax percent. Otherwise, null.
      */
     public function getTaxPercent()
     {
@@ -146,9 +201,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get discount amount in quote currency
+     * Returns the discount amount in quote currency.
      *
-     * @return float|null
+     * @return float|null Discount amount in quote currency. Otherwise, null.
      */
     public function getDiscountAmount()
     {
@@ -156,9 +211,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get discount amount in base currency
+     * Returns the discount amount in base currency.
      *
-     * @return float|null
+     * @return float|null Discount amount in base currency. Otherwise, null.
      */
     public function getBaseDiscountAmount()
     {
@@ -166,9 +221,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get discount percent
+     * Returns the discount percent.
      *
-     * @return int|null
+     * @return int|null Discount percent. Otherwise, null.
      */
     public function getDiscountPercent()
     {
@@ -176,9 +231,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get price including tax in quote currency
+     * Returns the price including tax in quote currency.
      *
-     * @return float|null
+     * @return float|null Price including tax in quote currency. Otherwise, null.
      */
     public function getPriceInclTax()
     {
@@ -186,9 +241,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get price including tax in base currency
+     * Returns the price including tax in base currency.
      *
-     * @return float|null
+     * @return float|null Price including tax in base currency. Otherwise, null.
      */
     public function getBasePriceInclTax()
     {
@@ -196,9 +251,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get row total including tax in quote currency
+     * Returns the row total including tax in quote currency.
      *
-     * @return float|null
+     * @return float|null Row total including tax in quote currency. Otherwise, null.
      */
     public function getRowTotalInclTax()
     {
@@ -206,9 +261,9 @@ class Item extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get row total including tax in base currency
+     * Returns the row total including tax in base currency.
      *
-     * @return float|null
+     * @return float|null Row total including tax in base currency. Otherwise, null.
      */
     public function getBaseRowTotalInclTax()
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php b/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php
index ab448fbae0bd4f29505f5de98038a50404683350..f3ec1b2658b28a2206ddc20a80ed3ce9ca3835d3 100644
--- a/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php
+++ b/app/code/Magento/Checkout/Service/V1/Data/PaymentMethod/Converter.php
@@ -21,20 +21,26 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
-
 namespace Magento\Checkout\Service\V1\Data\PaymentMethod;
 
 use Magento\Checkout\Service\V1\Data\PaymentMethod as QuotePaymentMethod;
 
+/**
+ * Payment method converter.
+ */
 class Converter
 {
     /**
+     * Payment method builder.
+     *
      * @var \Magento\Checkout\Service\V1\Data\Cart\PaymentMethodBuilder
      */
     protected $builder;
 
     /**
-     * @param \Magento\Checkout\Service\V1\Data\PaymentMethodBuilder $builder
+     * Constructs a payment method converter object.
+     *
+     * @param \Magento\Checkout\Service\V1\Data\PaymentMethodBuilder $builder Payment method builder.
      */
     public function __construct(\Magento\Checkout\Service\V1\Data\PaymentMethodBuilder $builder)
     {
@@ -42,10 +48,10 @@ class Converter
     }
 
     /**
-     * Convert quote payment object to payment data object
+     * Converts quote payment object to payment data object.
      *
-     * @param \Magento\Payment\Model\MethodInterface $object
-     * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod
+     * @param \Magento\Payment\Model\MethodInterface $object The quote payment object.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod Payment data object.
      */
     public function toDataObject(\Magento\Payment\Model\MethodInterface $object)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Item/ReadService.php b/app/code/Magento/Checkout/Service/V1/Item/ReadService.php
index 5c858a7907477393e18ab2241fe43696be192dc6..30f4b5b7887386d30639157b72c77e6469556669 100644
--- a/app/code/Magento/Checkout/Service/V1/Item/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/Item/ReadService.php
@@ -21,24 +21,32 @@
  * @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\Checkout\Service\V1\Item;
 
+/** 
+ * Read service object. 
+ */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Item mapper.
+     *
      * @var \Magento\Checkout\Service\V1\Data\Cart\ItemMapper
      */
     protected $itemMapper;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param \Magento\Checkout\Service\V1\Data\Cart\ItemMapper $itemMapper
+     * Constructs a read service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\ItemMapper $itemMapper Item mapper.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -49,7 +57,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Item[] Array of items.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getList($cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php
index 2a3d580d25201b2fbf3e79ce4400c6241467e574..a94a3dbc9a2fdab37df9cb2bf1f970169d4831a1 100644
--- a/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Item/ReadServiceInterface.php
@@ -23,14 +23,17 @@
  */
 namespace Magento\Checkout\Service\V1\Item;
 
+/** 
+ * Read service interface. 
+ */
 interface ReadServiceInterface
 {
     /**
-     * Get items assigned to a cart
+     * Lists items that are assigned to a specified cart.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\Item[]
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\Item[] Array of items.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getList($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/Item/WriteService.php b/app/code/Magento/Checkout/Service/V1/Item/WriteService.php
index c421182ac3f8c788adce0c2ac0252a2961cd09c4..3cb79d5b15c0df39acd610b10ebf9a0b2a3bf5fd 100644
--- a/app/code/Magento/Checkout/Service/V1/Item/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/Item/WriteService.php
@@ -21,28 +21,36 @@
  * @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\Checkout\Service\V1\Item;
 
 use Magento\Framework\Exception\NoSuchEntityException;
 use Magento\Framework\Exception\CouldNotSaveException;
 use Magento\Framework\Exception\InputException;
 
+/** 
+ * Write service object. 
+ */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Product loader.
+     *
      * @var \Magento\Catalog\Service\V1\Product\ProductLoader
      */
     protected $productLoader;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param \Magento\Catalog\Service\V1\Product\ProductLoader $productLoader
+     * Constructs a write service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param \Magento\Catalog\Service\V1\Product\ProductLoader $productLoader Product loader.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -53,7 +61,14 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item.
+     * @return int Item ID.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart.
+     * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid.
      */
     public function addItem($cartId, \Magento\Checkout\Service\V1\Data\Cart\Item $data)
     {
@@ -76,7 +91,15 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param int $itemId The item ID of the item to be updated.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item.
+     * @return bool
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be updated.
+     * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid.
      */
     public function updateItem($cartId, $itemId, \Magento\Checkout\Service\V1\Data\Cart\Item $data)
     {
@@ -101,11 +124,21 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @param int $itemId The item ID of the item to be removed.
+     * @return bool
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed.
      */
     public function removeItem($cartId, $itemId)
     {
-        /** @var \Magento\Sales\Model\Quote $quote */
+        /**
+         * Quote.
+         *
+         * @var \Magento\Sales\Model\Quote $quote
+         */
         $quote = $this->quoteRepository->get($cartId);
         $quoteItem = $quote->getItemById($itemId);
         if (!$quoteItem) {
diff --git a/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php
index 6dbe55e16dceded2508cd908abba65f2d9689912..6a17c3675e4410d3a8469043ca221f40f32b5cd8 100644
--- a/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/Item/WriteServiceInterface.php
@@ -23,35 +23,44 @@
  */
 namespace Magento\Checkout\Service\V1\Item;
 
+/** 
+ * Write service interface. 
+ */
 interface WriteServiceInterface
 {
     /**
-     * @param int $cartId
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data
-     * @return int
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @throws \Magento\Framework\Exception\InputException
+     * Adds the specified item to the specified cart.
+     *
+     * @param int $cartId The cart ID.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item.
+     * @return int Item ID.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified item could not be saved to the cart.
+     * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid.
      */
     public function addItem($cartId, \Magento\Checkout\Service\V1\Data\Cart\Item $data);
 
     /**
-     * @param int $cartId
-     * @param int $itemId
-     * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data
+     * Updates the specified item in the specified cart.
+     *
+     * @param int $cartId The cart ID.
+     * @param int $itemId The item ID of the item to be updated.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\Item $data The item.
      * @return bool
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @throws \Magento\Framework\Exception\InputException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be updated.
+     * @throws \Magento\Framework\Exception\InputException The specified item or cart is not valid.
      */
     public function updateItem($cartId, $itemId, \Magento\Checkout\Service\V1\Data\Cart\Item $data);
 
     /**
-     * @param int $cartId
-     * @param int $itemId
+     * Removes the specified item from the specified cart.
+     *
+     * @param int $cartId The cart ID.
+     * @param int $itemId The item ID of the item to be removed.
      * @return bool
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item or cart does not exist.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The item could not be removed.
      */
     public function removeItem($cartId, $itemId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php
index 20b45310af2c92f192b52798821a6d7533875993..712a1399d94c85aa6c0385d9747681b1df2dd1d1 100644
--- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadService.php
@@ -21,7 +21,6 @@
  * @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\Checkout\Service\V1\PaymentMethod;
 
 use \Magento\Sales\Model\QuoteRepository;
@@ -30,33 +29,46 @@ use Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Converter as QuoteMethod
 use Magento\Checkout\Service\V1\Data\PaymentMethod\Converter as PaymentMethodConverter;
 use \Magento\Payment\Model\MethodList;
 
+/**
+ * Payment method read service object.
+ */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Quote method converter.
+     *
      * @var QuoteMethodConverter
      */
     protected $quoteMethodConverter;
 
     /**
+     * Payment method converter.
+     *
      * @var PaymentMethodConverter
      */
     protected $paymentMethodConverter;
 
     /**
+     * Method list.
+     *
      * @var MethodList
      */
     protected $methodList;
 
     /**
-     * @param QuoteRepository $quoteRepository
-     * @param QuoteMethodConverter $quoteMethodConverter
-     * @param PaymentMethodConverter $paymentMethodConverter
-     * @param MethodList $methodList
+     * Constructs a payment method read service object.
+     *
+     * @param QuoteRepository $quoteRepository Quote repository.
+     * @param QuoteMethodConverter $quoteMethodConverter Quote method converter.
+     * @param PaymentMethodConverter $paymentMethodConverter Payment method converter.
+     * @param MethodList $methodList Method list.
      */
     public function __construct(
         QuoteRepository $quoteRepository,
@@ -71,7 +83,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod  Payment method object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getPayment($cartId)
     {
@@ -85,7 +101,11 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\PaymentMethod[] Array of payment methods.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getList($cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php
index 4447057cfa7c3e5701d04531e161cf979d11908b..2a6005dde745159d3250dec326aa1c8938bfda97 100644
--- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/ReadServiceInterface.php
@@ -21,26 +21,28 @@
  * @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\Checkout\Service\V1\PaymentMethod;
 
+/**
+ * Payment method read service interface.
+ */
 interface ReadServiceInterface
 {
     /**
-     * Get list of payment methods
+     * Returns the payment method for a specified shopping cart.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod  Payment method object.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getPayment($cartId);
 
     /**
-     * Get the list of available payment methods for a shopping cart
+     * Lists available payment methods for a specified shopping cart.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\PaymentMethod[]
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\PaymentMethod[] Array of payment methods.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function getList($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php
index 48212c9196a295b4444d2261b6786a7798b82b25..be815921f5272c1efa6929dd8ecb6a2ad1f315a8 100644
--- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteService.php
@@ -21,7 +21,6 @@
  * @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\Checkout\Service\V1\PaymentMethod;
 
 use \Magento\Sales\Model\QuoteRepository;
@@ -29,27 +28,38 @@ use \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod\Builder;
 use \Magento\Framework\Exception\State\InvalidTransitionException;
 use \Magento\Payment\Model\Checks\ZeroTotal;
 
+/**
+ * Payment method write service object.
+ */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Payment method builder.
+     *
      * @var Builder
      */
     protected $paymentMethodBuilder;
 
     /**
+     * Zero total validator.
+     *
      * @var ZeroTotal
      */
     protected $zeroTotalValidator;
 
     /**
-     * @param QuoteRepository $quoteRepository
-     * @param Builder $paymentMethodBuilder
-     * @param ZeroTotal $zeroTotalValidator
+     * Constructs a payment method write service object.
+     *
+     * @param QuoteRepository $quoteRepository Quote repository.
+     * @param Builder $paymentMethodBuilder Payment method builder.
+     * @param ZeroTotal $zeroTotalValidator Zero total validator.
      */
     public function __construct(
         QuoteRepository $quoteRepository,
@@ -62,7 +72,12 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method The payment method.
+     * @param int $cartId The cart ID.
+     * @return int Payment method ID.
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available.
      */
     public function set(\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method, $cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php
index 7e3d641fdddc0ce2414f7debb002549b893a8565..169688caf2be065fd4fcbc693a27c8450bd1bb71 100644
--- a/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/PaymentMethod/WriteServiceInterface.php
@@ -21,19 +21,21 @@
  * @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\Checkout\Service\V1\PaymentMethod;
 
+/**
+ * Payment method write service interface.
+ */
 interface WriteServiceInterface
 {
     /**
-     * Add payment method to list of selected for cart
+     * Adds a specified payment method to a specified shopping cart.
      *
-     * @param \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method
-     * @param int $cartId
-     * @return int
-     * @throws \Magento\Framework\Exception\State\InvalidTransitionException
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param \Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method The payment method.
+     * @param int $cartId The cart ID.
+     * @return int Payment method ID.
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set, or the specified payment method is not available.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
      */
     public function set(\Magento\Checkout\Service\V1\Data\Cart\PaymentMethod $method, $cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php
index 5c965a3b48575e182f5a42ba04787a44094a172a..cf914a488e724ead94b44248e6fe621c080eefd4 100644
--- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php
+++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadService.php
@@ -31,27 +31,38 @@ use \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder;
 use \Magento\Framework\Exception\StateException;
 use \Magento\Framework\Exception\InputException;
 
+/**
+ * Shipping method read service.
+ */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Shipping method builder.
+     *
      * @var \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder
      */
     protected $methodBuilder;
 
     /**
+     * Shipping method converter.
+     *
      * @var ShippingMethodConverter
      */
     protected $converter;
 
     /**
-     * @param QuoteRepository $quoteRepository
-     * @param ShippingMethodConverter $converter
-     * @param \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder $methodBuilder
+     * Constructs a shipping method read service object.
+     *
+     * @param QuoteRepository $quoteRepository Quote repository.
+     * @param ShippingMethodConverter $converter Shipping method converter.
+     * @param \Magento\Checkout\Service\V1\Data\Cart\ShippingMethodBuilder $methodBuilder Shipping method builder.
      */
     public function __construct(
         QuoteRepository $quoteRepository,
@@ -64,7 +75,12 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod Shipping method.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist.
+     * @throws \Magento\Framework\Exception\StateException The shipping address is not set.
      */
     public function getMethod($cartId)
     {
@@ -99,10 +115,12 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * @param string $delimiter
-     * @param string $line
-     * @return array
-     * @throws \Magento\Framework\Exception\InputException
+     * Divides names at specified delimiter character on a specified line.
+     *
+     * @param string $delimiter The delimiter character.
+     * @param string $line The line.
+     * @return array Array of names.
+     * @throws \Magento\Framework\Exception\InputException The specified line does not contain the specified delimiter character.
      */
     protected function divideNames($delimiter, $line)
     {
@@ -113,7 +131,12 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod[] An array of shipping methods.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist.
+     * @throws \Magento\Framework\Exception\StateException The shipping address is not set.
      */
     public function getList($cartId)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php
index 2543f3f3d90da5c89aa916b4ec5d286c46d8a6df..7b18759555c092afac6f1a33b4387e4573b746c7 100644
--- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/ReadServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote shipping method read service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,25 +23,28 @@
  */
 namespace Magento\Checkout\Service\V1\ShippingMethod;
 
+/**
+ * Quote shipping method read service interface.
+ */
 interface ReadServiceInterface
 {
     /**
-     * Get selected shipping method of the quote
+     * Returns selected shipping method for a specified quote.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\StateException
+     * @param int $cartId The shopping cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod Shipping method.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified shopping cart does not exist.
+     * @throws \Magento\Framework\Exception\StateException The shipping address is not set.
      */
     public function getMethod($cartId);
 
     /**
-     * Get list of applicable shipping methods for quote
+     * Lists applicable shipping methods for a specified quote.
      *
-     * @param int $cartId
-     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod[]
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\StateException
+     * @param int $cartId The shopping cart ID.
+     * @return \Magento\Checkout\Service\V1\Data\Cart\ShippingMethod[] An array of shipping methods.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified quote does not exist.
+     * @throws \Magento\Framework\Exception\StateException The shipping address is not set.
      */
     public function getList($cartId);
 }
diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php
index 1f42987f194c4fd0e26d948748ecc60cedff5cf4..c372b11df1648851dd140c072d851048b03e6148 100644
--- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php
+++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteService.php
@@ -29,21 +29,30 @@ use \Magento\Framework\Exception\NoSuchEntityException;
 use \Magento\Framework\Exception\InputException;
 use \Magento\Framework\Exception\StateException;
 
+/**
+ * Shipping method write service object.
+ */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Address factory.
+     *
      * @var \Magento\Sales\Model\Quote\AddressFactory
      */
     protected $addressFactory;
 
     /**
+     * Quote repository.
+     *
      * @var QuoteRepository
      */
     protected $quoteRepository;
 
     /**
-     * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory
-     * @param QuoteRepository $quoteRepository
+     * Constructs a shipping method write service object.
+     *
+     * @param \Magento\Sales\Model\Quote\AddressFactory $addressFactory Address factory.
+     * @param QuoteRepository $quoteRepository Quote repository.
      */
     public function __construct(
         \Magento\Sales\Model\Quote\AddressFactory $addressFactory,
@@ -54,7 +63,16 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @param string $carrierCode The carrier code.
+     * @param string $methodCode The shipping method code.
+     * @return bool
+     * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products and the shipping method is not applicable.
+     * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set.
      */
     public function setMethod($cartId, $carrierCode, $methodCode)
     {
diff --git a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php
index cc0ccbe38e56bf3c17c293a9d4c558487f09f58d..52a642e87873a3c6e363bf376f01c888df7c59de 100644
--- a/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php
+++ b/app/code/Magento/Checkout/Service/V1/ShippingMethod/WriteServiceInterface.php
@@ -21,26 +21,24 @@
  * @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\Checkout\Service\V1\ShippingMethod;
 
 /**
- * Interface to choose shipping method for cart address
+ * Interface to choose the shipping method for a cart address.
  */
 interface WriteServiceInterface
 {
     /**
-     * Set shipping method and carrier for the specified cart
-     *
-     * @param int $cartId
-     * @param string $carrierCode
-     * @param string $methodCode
+     * Sets the carrier and shipping methods codes for a specified cart.
      *
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @throws \Magento\Framework\Exception\InputException
-     * @throws \Magento\Framework\Exception\StateException
+     * @param int $cartId The shopping cart ID.
+     * @param string $carrierCode The carrier code.
+     * @param string $methodCode The shipping method code.
      * @return bool
+     * @throws \Magento\Framework\Exception\InputException The shipping method is not valid for an empty cart.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The shipping method could not be saved.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart contains only virtual products so the shipping method does not apply.
+     * @throws \Magento\Framework\Exception\StateException The billing or shipping address is not set.
      */
     public function setMethod($cartId, $carrierCode, $methodCode);
 }
diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json
index ee3e19a4a972776752e309378d41a7e5a1a3558e..5f1c4458e09776a3dc691ab917ab67df7ea829f8 100644
--- a/app/code/Magento/Checkout/composer.json
+++ b/app/code/Magento/Checkout/composer.json
@@ -3,27 +3,27 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-authorization": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-gift-message": "0.1.0-alpha100",
-        "magento/module-wishlist": "0.1.0-alpha100",
-        "magento/module-page-cache": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-msrp": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-authorization": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-gift-message": "0.1.0-alpha101",
+        "magento/module-wishlist": "0.1.0-alpha101",
+        "magento/module-page-cache": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-msrp": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml
index d798a79f5b2ab40fcbc801d2a9cd9c10f812700b..fef6185f701a80c8502cbdba9b55399cb2d4dbe8 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/payment.phtml
@@ -26,7 +26,7 @@
     <?php echo $this->getBlockHtml('formkey') ?>
     <fieldset class="fieldset">
         <?php echo $this->getChildChildHtml('methods_additional') ?>
-        <div id="checkout-payment-method-load" class="opc-payment"><?php echo $this->getChildHtml('methods') ?></div>
+        <div id="checkout-payment-method-load" class="opc-payment"></div>
     </fieldset>
     <?php echo $this->getChildChildHtml('additional') ?>
     <div class="actions-toolbar" id="payment-buttons-container">
diff --git a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml
index 66387563d75509529819d0173798d96183688bde..2c8b582e64273733066c192434a30ac8c9b67f07 100644
--- a/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml
+++ b/app/code/Magento/Checkout/view/frontend/templates/onepage/shipping_method.phtml
@@ -23,9 +23,7 @@
  */
 ?>
 <form class="form methods-shipping" id="co-shipping-method-form">
-    <div id="checkout-shipping-method-load">
-        <?php echo $this->getChildHtml('available') ?>
-    </div>
+    <div id="checkout-shipping-method-load"></div>
     <div id="onepage-checkout-shipping-method-additional-load">
         <?php echo $this->getChildHtml('additional') ?>
     </div>
diff --git a/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js b/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js
index 8e770c6c8a2749dfcab4750c3ee58e4d5902f22e..432232f104a0f9672fc28026dcb57d975ee96ab8 100644
--- a/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js
+++ b/app/code/Magento/Checkout/view/frontend/web/js/opc-checkout-method.js
@@ -91,7 +91,6 @@ define([
                 showAjaxLoader: '_ajaxSend',
                 hideAjaxLoader: '_ajaxComplete',
                 gotoSection: function(e, section) {
-                    this._ajaxUpdateProgress(section);
                     self.element.find('.section').filter('.' + self.sectionActiveClass).children(self.contentSelector).trigger("processStop");
                     var toActivate = this.steps.index($('#' + self.options.sectionSelectorPrefix + section));
                     this._activateSection(toActivate);
@@ -103,7 +102,6 @@ define([
                 'click [data-goto-section]' : function(e) {
                     var gotoSection = $(e.target).data('goto-section');
                     self.element.find('.section').filter('.' + self.sectionActiveClass).children(self.contentSelector).trigger("processStop");
-                    this._ajaxUpdateProgress(gotoSection);
                     var toActivate = this.steps.index($('#' + self.options.sectionSelectorPrefix + gotoSection));
                     this._activateSection(toActivate);
                     return false;
@@ -225,7 +223,7 @@ define([
                 dataType: 'json',
                 beforeSend: this._ajaxSend,
                 complete: this._ajaxComplete,
-                success: function(response) {
+                success: function (response) {
                     if (successCallback) {
                         successCallback.call(this, response);
                     }
@@ -239,7 +237,7 @@ define([
                                 $(this.options.countrySelector).trigger('change');
                                 var emailAddress = {};
                                 emailAddress[this.options.billing.emailAddressName] = msg;
-                                var billingFormValidator = $( this.options.billing.form ).validate();
+                                var billingFormValidator = $(this.options.billing.form).validate();
                                 billingFormValidator.showErrors(emailAddress);
                             } else {
                                 alert($.mage.__(response.error));
@@ -261,6 +259,9 @@ define([
                             $(this.options.updateSelectorPrefix + response.update_section.name + this.options.updateSelectorSuffix)
                                 .html($(response.update_section.html)).trigger('contentUpdated');
                         }
+                        if (response.update_progress) {
+                            $(this.options.checkoutProgressContainer).html($(response.update_progress.html)).trigger('progressUpdated');
+                        }
                         if (response.duplicateBillingInfo) {
                             $(this.options.shipping.copyBillingSelector).prop('checked', true).trigger('click');
                             $(this.options.shipping.addressDropdownSelector).val($(this.options.billing.addressDropdownSelector).val()).change();
@@ -273,27 +274,6 @@ define([
                     }
                 }
             });
-        },
-
-        /**
-         * Update progress sidebar content
-         * @private
-         * @param toStep
-         */
-        _ajaxUpdateProgress: function(toStep) {
-            if (toStep) {
-                $.ajax({
-                    url: this.options.progressUrl,
-                    type: 'get',
-                    async: false,
-                    cache: false,
-                    context: this,
-                    data: toStep ? {toStep: toStep} : null,
-                    success: function(response) {
-                        $(this.options.checkoutProgressContainer).html(response);
-                    }
-                });
-            }
         }
     });
 });
diff --git a/app/code/Magento/CheckoutAgreements/README.md b/app/code/Magento/CheckoutAgreements/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..3d31bffd1b5425969ec60573e1b0108e5e9f54ab
--- /dev/null
+++ b/app/code/Magento/CheckoutAgreements/README.md
@@ -0,0 +1,3 @@
+Magento\CheckoutAgreements module provides the ability add web store agreement that customers must accept before purchasing
+products from store. The customer will need to accept the terms and conditions in the Order Review section of the
+checkout process to be able to place an order if Terms and Conditions functionality is enabled.
\ No newline at end of file
diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php
index 25bb597d6a2a5b3edeed29196ff5b42584973d21..730e486ff1c4a261a6ef8b4d1831d0348ae5e484 100644
--- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php
+++ b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadService.php
@@ -32,33 +32,46 @@ use \Magento\Store\Model\ScopeInterface;
 use \Magento\CheckoutAgreements\Service\V1\Data\AgreementBuilder;
 use \Magento\CheckoutAgreements\Service\V1\Data\Agreement as AgreementDataObject;
 
+/**
+ * Checkout agreement service.
+ */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Collection factory.
+     *
      * @var AgreementCollectionFactory
      */
     private $collectionFactory;
 
     /**
+     * Agreement builder.
+     *
      * @var AgreementBuilder
      */
     private $agreementBuilder;
 
     /**
+     * Store manager.
+     *
      * @var  \Magento\Framework\StoreManagerInterface
      */
     private $storeManager;
 
     /**
+     * Scope config.
+     *
      * @var ScopeConfigInterface
      */
     private $scopeConfig;
 
     /**
-     * @param AgreementCollectionFactory $collectionFactory
-     * @param AgreementBuilder $agreementBuilder
-     * @param \Magento\Framework\StoreManagerInterface $storeManager
-     * @param ScopeConfigInterface $scopeConfig
+     * Constructs a checkout agreement service object.
+     *
+     * @param AgreementCollectionFactory $collectionFactory Collection factory.
+     * @param AgreementBuilder $agreementBuilder Agreement builder.
+     * @param \Magento\Framework\StoreManagerInterface $storeManager Store manager.
+     * @param ScopeConfigInterface $scopeConfig Scope config.
      */
     public function __construct(
         AgreementCollectionFactory $collectionFactory,
@@ -74,6 +87,8 @@ class ReadService implements ReadServiceInterface
 
     /**
      * {@inheritdoc}
+     *
+     * @return array|\Magento\CheckoutAgreements\Service\V1\Data\Agreement[] Array of checkout agreement service objects.
      */
     public function getList()
     {
@@ -95,10 +110,10 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * Create agreement data object based on given agreement model
+     * Creates an agreement data object based on a specified agreement model.
      *
-     * @param Agreement $agreement
-     * @return AgreementDataObject
+     * @param Agreement $agreement The agreement model.
+     * @return AgreementDataObject Agreement data object.
      */
     protected function createAgreementDataObject(Agreement $agreement)
     {
diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php
index 2274a7ed767a940897dd52ee52064d76c7b69098..70d3430f77e54eb77441b7e6e3d63e5f48e1ac33 100644
--- a/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php
+++ b/app/code/Magento/CheckoutAgreements/Service/V1/Agreement/ReadServiceInterface.php
@@ -23,12 +23,15 @@
  */
 namespace Magento\CheckoutAgreements\Service\V1\Agreement;
 
+/**
+ * Checkout agreement service interface.
+ */
 interface ReadServiceInterface
 {
     /**
-     * Retrieve the list of active checkout agreements
+     * Lists active checkout agreements.
      *
-     * @return \Magento\CheckoutAgreements\Service\V1\Data\Agreement[]
+     * @return \Magento\CheckoutAgreements\Service\V1\Data\Agreement[] Array of active checkout agreements.
      */
     public function getList();
 }
diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php b/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php
index 6dda06c3561d1e7b952e6834facb78e348af3965..882a708d045ac5a8c666fda43d16e13a662df806 100644
--- a/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php
+++ b/app/code/Magento/CheckoutAgreements/Service/V1/Data/Agreement.php
@@ -26,22 +26,51 @@ namespace Magento\CheckoutAgreements\Service\V1\Data;
 use \Magento\Framework\Service\Data\AbstractExtensibleObject;
 
 /**
+ * Checkout agreement data object.
+ *
  * @codeCoverageIgnore
  */
 class Agreement extends AbstractExtensibleObject
 {
+    /**
+     * Agreement ID.
+     */
     const ID = 'id';
+
+    /**
+     * Agreement name.
+     */
     const NAME = 'name';
+
+    /**
+     * Agreement content.
+     */
     const CONTENT = 'content';
+
+    /**
+     * Agreement content height. Optional CSS property.
+     */
     const CONTENT_HEIGHT = 'content_height';
+
+    /**
+     * Agreement checkbox text. Caption of UI component.
+     */
     const CHECKBOX_TEXT = 'checkbox_text';
+
+    /**
+     * Agreement status.
+     */
     const ACTIVE = 'active';
+
+    /**
+     * Agreement content type. True is HTML. False is plain text.
+     */
     const HTML = 'html';
 
     /**
-     * Retrieve agreement ID
+     * Returns the agreement ID.
      *
-     * @return int
+     * @return int Agreement ID.
      */
     public function getId()
     {
@@ -49,9 +78,9 @@ class Agreement extends AbstractExtensibleObject
     }
 
     /**
-     * Retrieve agreement name
+     * Returns the agreement name.
      *
-     * @return string
+     * @return string Agreement name.
      */
     public function getName()
     {
@@ -59,9 +88,9 @@ class Agreement extends AbstractExtensibleObject
     }
 
     /**
-     * Retrieve agreement content
+     * Returns the agreement content.
      *
-     * @return string
+     * @return string Agreement content.
      */
     public function getContent()
     {
@@ -69,9 +98,9 @@ class Agreement extends AbstractExtensibleObject
     }
 
     /**
-     * Retrieve agreement content height (optional CSS property)
+     * Returns the agreement content height, which is an optional CSS property.
      *
-     * @return string|null
+     * @return string|null Agreement content height. Otherwise, null.
      */
     public function getContentHeight()
     {
@@ -79,9 +108,9 @@ class Agreement extends AbstractExtensibleObject
     }
 
     /**
-     * Retrieve agreement checkbox text
+     * Returns the agreement checkbox text.
      *
-     * @return string
+     * @return string Agreement checkbox text.
      */
     public function getCheckboxText()
     {
@@ -89,9 +118,9 @@ class Agreement extends AbstractExtensibleObject
     }
 
     /**
-     * Retrieve agreement status
+     * Returns the agreement status.
      *
-     * @return bool
+     * @return bool Agreement status.
      */
     public function isActive()
     {
@@ -99,9 +128,10 @@ class Agreement extends AbstractExtensibleObject
     }
 
     /**
-     * Retrieve agreement content type
+     * Returns the agreement content type.
      *
-     * @return bool
+     * @return bool * true - HTML.
+     * * false - plain text.
      */
     public function isHtml()
     {
diff --git a/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php b/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php
index 1d5412faf404ac6b92dd0017bd7d9fa5ae83fbde..eee32b41b6230e42e961d859953a08ae1a70e334 100644
--- a/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php
+++ b/app/code/Magento/CheckoutAgreements/Service/V1/Data/AgreementBuilder.php
@@ -26,14 +26,16 @@ namespace Magento\CheckoutAgreements\Service\V1\Data;
 use \Magento\Framework\Service\Data\AbstractExtensibleObjectBuilder;
 
 /**
+ * Checkout agreement data object builder.
+ * 
  * @codeCoverageIgnore
  */
 class AgreementBuilder extends AbstractExtensibleObjectBuilder
 {
     /**
-     * Set agreement ID
+     * Sets the agreement ID.
      *
-     * @param int $value
+     * @param int $value The agreement ID.
      * @return $this
      */
     public function setId($value)
@@ -42,9 +44,9 @@ class AgreementBuilder extends AbstractExtensibleObjectBuilder
     }
 
     /**
-     * Set agreement name
+     * Sets the agreement name.
      *
-     * @param string $value
+     * @param string $value The agreement name.
      * @return $this
      */
     public function setName($value)
@@ -53,9 +55,9 @@ class AgreementBuilder extends AbstractExtensibleObjectBuilder
     }
 
     /**
-     * Set agreement content
+     * Sets the agreement content.
      *
-     * @param string $value
+     * @param string $value The agreement content.
      * @return $this
      */
     public function setContent($value)
@@ -64,9 +66,9 @@ class AgreementBuilder extends AbstractExtensibleObjectBuilder
     }
 
     /**
-     * Set agreement content height (optional CSS property)
+     * Sets the agreement content height, which is an optional CSS property.
      *
-     * @param string $value
+     * @param string $value The agreement content height.
      * @return $this
      */
     public function setContentHeight($value)
@@ -75,9 +77,9 @@ class AgreementBuilder extends AbstractExtensibleObjectBuilder
     }
 
     /**
-     * Set agreement checkbox text
+     * Sets the agreement checkbox text.
      *
-     * @param string $value
+     * @param string $value The agreement checkbox text.
      * @return $this
      */
     public function setCheckboxText($value)
@@ -86,9 +88,9 @@ class AgreementBuilder extends AbstractExtensibleObjectBuilder
     }
 
     /**
-     * Set agreement status
+     * Sets the agreement status.
      *
-     * @param bool $value
+     * @param bool $value The agreement status value. Set to true for active.
      * @return $this
      */
     public function setActive($value)
@@ -97,9 +99,9 @@ class AgreementBuilder extends AbstractExtensibleObjectBuilder
     }
 
     /**
-     * Set agreement content type
+     * Sets the agreement content type.
      *
-     * @param bool $value
+     * @param bool $value The agreement content type. Set to true for HTML. Set to false for plain text.
      * @return $this
      */
     public function setHtml($value)
diff --git a/app/code/Magento/CheckoutAgreements/composer.json b/app/code/Magento/CheckoutAgreements/composer.json
index 9c098f0588b2619ed0ece6721e10282b2e033145..921322bda8ba5de6484f0b73acbd20f1326684ce 100644
--- a/app/code/Magento/CheckoutAgreements/composer.json
+++ b/app/code/Magento/CheckoutAgreements/composer.json
@@ -3,14 +3,14 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php
index c6751601562728143bc2a2c905f040c64c9edcf6..f6f5dc8450689377dce30439f6714b5477876652 100644
--- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php
+++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/DeleteFiles.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class DeleteFiles extends \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images
 {
     /**
@@ -44,9 +46,9 @@ class DeleteFiles extends \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images
             $path = $this->getStorage()->getSession()->getCurrentPath();
             foreach ($files as $file) {
                 $file = $helper->idDecode($file);
-                /** @var \Magento\Framework\App\Filesystem $filesystem */
-                $filesystem = $this->_objectManager->get('Magento\Framework\App\Filesystem');
-                $dir = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+                /** @var \Magento\Framework\Filesystem $filesystem */
+                $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+                $dir = $filesystem->getDirectoryRead(DirectoryList::MEDIA);
                 $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 c8b0aa35b4e16494876484dc79556eb7ba68f250..e8526277175bbb61fdca3f0a597794fbb4129c74 100644
--- a/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
+++ b/app/code/Magento/Cms/Helper/Wysiwyg/Images.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Cms\Helper\Wysiwyg;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Wysiwyg Images Helper
  */
@@ -79,14 +81,14 @@ class Images extends \Magento\Framework\App\Helper\AbstractHelper
      * @param \Magento\Framework\App\Helper\Context $context
      * @param \Magento\Backend\Helper\Data $backendData
      * @param \Magento\Core\Helper\Data $coreData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
         \Magento\Backend\Helper\Data $backendData,
         \Magento\Core\Helper\Data $coreData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\StoreManagerInterface $storeManager
     ) {
         parent::__construct($context);
@@ -94,7 +96,7 @@ class Images extends \Magento\Framework\App\Helper\AbstractHelper
         $this->_coreData = $coreData;
         $this->_storeManager = $storeManager;
 
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $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 40d09c13574a27f60ea996f90076b998348fb7b3..049b90baebc0ad4e29b7c05bcae0a81b7c788e38 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage.php
@@ -24,6 +24,7 @@
 namespace Magento\Cms\Model\Wysiwyg\Images;
 
 use Magento\Cms\Helper\Wysiwyg\Images;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Wysiwyg Images model
@@ -148,7 +149,7 @@ class Storage extends \Magento\Framework\Object
      * @param \Magento\Backend\Model\UrlInterface $backendUrl
      * @param \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Image\AdapterFactory $imageFactory
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory $storageCollectionFactory
@@ -168,7 +169,7 @@ class Storage extends \Magento\Framework\Object
         \Magento\Backend\Model\UrlInterface $backendUrl,
         \Magento\Cms\Helper\Wysiwyg\Images $cmsWysiwygImages,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Image\AdapterFactory $imageFactory,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Cms\Model\Wysiwyg\Images\Storage\CollectionFactory $storageCollectionFactory,
@@ -185,7 +186,7 @@ class Storage extends \Magento\Framework\Object
         $this->_backendUrl = $backendUrl;
         $this->_cmsWysiwygImages = $cmsWysiwygImages;
         $this->_coreFileStorageDb = $coreFileStorageDb;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_imageFactory = $imageFactory;
         $this->_assetRepo = $assetRepo;
         $this->_storageCollectionFactory = $storageCollectionFactory;
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 93e4a99c14a909a3d7206f6de884ebe6de9179d2..8f4bf04582611876a9eff0a54bdd6ddb21a9a8b9 100644
--- a/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php
+++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/Storage/Collection.php
@@ -23,21 +23,23 @@
  */
 namespace Magento\Cms\Model\Wysiwyg\Images\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Wysiwyg Images storage collection
  */
 class Collection extends \Magento\Framework\Data\Collection\Filesystem
 {
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\Core\Model\EntityFactory $entityFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
-    public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\App\Filesystem $filesystem)
+    public function __construct(\Magento\Core\Model\EntityFactory $entityFactory, \Magento\Framework\Filesystem $filesystem)
     {
         $this->_filesystem = $filesystem;
         parent::__construct($entityFactory);
@@ -52,7 +54,7 @@ class Collection extends \Magento\Framework\Data\Collection\Filesystem
     protected function _generateRow($filename)
     {
         $filename = preg_replace('~[/\\\]+~', '/', $filename);
-        $path = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $path = $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         return array(
             'filename' => $filename,
             'basename' => basename($filename),
diff --git a/app/code/Magento/Cms/composer.json b/app/code/Magento/Cms/composer.json
index ede920d029cec71ed1d44490ae034febc75cf7ef..d021717c8946db19bd5d767a7b460fc8ec91496a 100644
--- a/app/code/Magento/Cms/composer.json
+++ b/app/code/Magento/Cms/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-widget": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-email": "0.1.0-alpha100",
-        "magento/module-ui": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-widget": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-email": "0.1.0-alpha101",
+        "magento/module-ui": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CmsUrlRewrite/composer.json b/app/code/Magento/CmsUrlRewrite/composer.json
index bb657fd5f356d705896cd4b9651f5f9c96fd9a2e..6c63a63f59348b79f9d5fc4b2a2ee6c5f1f8b72b 100644
--- a/app/code/Magento/CmsUrlRewrite/composer.json
+++ b/app/code/Magento/CmsUrlRewrite/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-url-rewrite": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-url-rewrite": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/ConfigurableImportExport/composer.json b/app/code/Magento/ConfigurableImportExport/composer.json
index ab3de4e54aaf6a27523965a8c87436b15b8deeed..2caf5e9635208ab1b3cc0675f43b477f58e49f60 100644
--- a/app/code/Magento/ConfigurableImportExport/composer.json
+++ b/app/code/Magento/ConfigurableImportExport/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-catalog-import-export": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-import-export": "0.1.0-alpha100",
-        "magento/module-configurable-product": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-catalog-import-export": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-import-export": "0.1.0-alpha101",
+        "magento/module-configurable-product": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php
index 6b78393236a3d7a0c8636f2de855c9343f7eb419..80347684aef6bafc2cd46722097d844d6856771a 100644
--- a/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php
+++ b/app/code/Magento/ConfigurableProduct/Model/Product/Type/Configurable.php
@@ -167,7 +167,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Framework\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\Logger $logger
      * @param \Magento\ConfigurableProduct\Model\Resource\Product\Type\ConfigurableFactory $typeConfigurableFactory
@@ -191,7 +191,7 @@ class Configurable extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Framework\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\Logger $logger,
         \Magento\ConfigurableProduct\Model\Resource\Product\Type\ConfigurableFactory $typeConfigurableFactory,
diff --git a/app/code/Magento/ConfigurableProduct/composer.json b/app/code/Magento/ConfigurableProduct/composer.json
index 23985f8e513d53d78bcbd5ff08f3244383aabd29..b536fcfea121d53f8acd98372f00bba1382c2c59 100644
--- a/app/code/Magento/ConfigurableProduct/composer.json
+++ b/app/code/Magento/ConfigurableProduct/composer.json
@@ -3,23 +3,23 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-catalog-rule": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
-        "magento/module-webapi": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-catalog-rule": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
+        "magento/module-webapi": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Contact/composer.json b/app/code/Magento/Contact/composer.json
index ced09c56822ac653028677f0396916bb8c6b598e..93c08d22d692dbeef545ba0be9f937b73ebcdc21 100644
--- a/app/code/Magento/Contact/composer.json
+++ b/app/code/Magento/Contact/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Core/App/Media.php b/app/code/Magento/Core/App/Media.php
index 0a8868324d5e6381ee36aad78fdd7a92e92ca68a..1f40c727c61df0f0483a10602b8f95f3019848ce 100644
--- a/app/code/Magento/Core/App/Media.php
+++ b/app/code/Magento/Core/App/Media.php
@@ -25,6 +25,7 @@
  */
 namespace Magento\Core\App;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\State;
 use Magento\Framework\App;
 use Magento\Framework\AppInterface;
@@ -85,7 +86,7 @@ class Media implements AppInterface
     protected $_response;
 
     /**
-     * @var \Magento\Framework\App\Filesystem $filesystem
+     * @var \Magento\Framework\Filesystem $filesystem
      */
     protected $filesystem;
 
@@ -103,7 +104,7 @@ class Media implements AppInterface
      * @param string $mediaDirectory
      * @param string $configCacheFile
      * @param string $relativeFileName
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         ObjectManager $objectManager,
@@ -114,7 +115,7 @@ class Media implements AppInterface
         $mediaDirectory,
         $configCacheFile,
         $relativeFileName,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_objectManager = $objectManager;
         $this->_request = $request;
@@ -125,7 +126,7 @@ class Media implements AppInterface
         $this->_configCacheFile = $configCacheFile;
         $this->_relativeFileName = $relativeFileName;
         $this->filesystem = $filesystem;
-        $this->directory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->directory = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);
     }
 
     /**
diff --git a/app/code/Magento/Core/Helper/File/Media.php b/app/code/Magento/Core/Helper/File/Media.php
index 91364a8738467d38e63307b93df2b9e808361119..6dddf4ddb0b2fadd21b922a5b8794e647daf240a 100644
--- a/app/code/Magento/Core/Helper/File/Media.php
+++ b/app/code/Magento/Core/Helper/File/Media.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Helper\File;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class Media
  */
@@ -34,7 +36,7 @@ class Media extends \Magento\Framework\App\Helper\AbstractHelper
     protected $_date;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -43,12 +45,12 @@ class Media extends \Magento\Framework\App\Helper\AbstractHelper
      *
      * @param \Magento\Framework\App\Helper\Context $context
      * @param \Magento\Framework\Stdlib\DateTime\DateTime $date
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
         \Magento\Framework\Stdlib\DateTime\DateTime $date,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         parent::__construct($context);
         $this->_date = $date;
@@ -74,7 +76,7 @@ class Media extends \Magento\Framework\App\Helper\AbstractHelper
         $path = ltrim($path, '\\/');
         $fullPath = $mediaDirectory . '/' . $path;
 
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $dir = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);
         $relativePath = $dir->getRelativePath($fullPath);
         if (!$dir->isFile($relativePath)) {
             throw new \Magento\Framework\Model\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 3f479431463012b7c52e89ad1845209900e9d2d1..ec65327bb64b15c97dd893aa4aefc75cd8fe5177 100644
--- a/app/code/Magento/Core/Helper/File/Storage/Database.php
+++ b/app/code/Magento/Core/Helper/File/Storage/Database.php
@@ -29,6 +29,9 @@
  */
 namespace Magento\Core\Helper\File\Storage;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Database extends \Magento\Framework\App\Helper\AbstractHelper
 {
     /**
@@ -58,7 +61,7 @@ class Database extends \Magento\Framework\App\Helper\AbstractHelper
     protected $_mediaBaseDirectory;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $_filesystem;
 
@@ -81,14 +84,14 @@ class Database extends \Magento\Framework\App\Helper\AbstractHelper
      * @param \Magento\Framework\App\Helper\Context $context
      * @param \Magento\Core\Model\File\Storage\DatabaseFactory $dbStorageFactory
      * @param \Magento\Core\Model\File\Storage\File $fileStorage
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
         \Magento\Core\Model\File\Storage\DatabaseFactory $dbStorageFactory,
         \Magento\Core\Model\File\Storage\File $fileStorage,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         \Magento\Framework\App\Config\ScopeConfigInterface $config
     ) {
         $this->_filesystem = $filesystem;
@@ -320,7 +323,7 @@ class Database extends \Magento\Framework\App\Helper\AbstractHelper
             $uniqueResultFile = $this->getUniqueFilename($path, $file);
 
             if ($uniqueResultFile !== $file) {
-                $dirWrite = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+                $dirWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT);
                 $dirWrite->renameFile($path . $file, $path . $uniqueResultFile);
             }
             $this->saveFile($path . $uniqueResultFile);
@@ -351,8 +354,8 @@ class Database extends \Magento\Framework\App\Helper\AbstractHelper
     public function getMediaBaseDir()
     {
         if (null === $this->_mediaBaseDirectory) {
-            $mediaDir = $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR);
-            $this->_mediaBaseDirectory = rtrim($mediaDir, '\\/');
+            $mediaDir = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath();
+            $this->_mediaBaseDirectory = rtrim($mediaDir, '/');
         }
         return $this->_mediaBaseDirectory;
     }
diff --git a/app/code/Magento/Core/Model/App/Emulation.php b/app/code/Magento/Core/Model/App/Emulation.php
index b0ff91b2808c19e2b77239747160817cb7a8cbf4..eabbb30c291fe3a823784dbf12848c5d44b096d1 100644
--- a/app/code/Magento/Core/Model/App/Emulation.php
+++ b/app/code/Magento/Core/Model/App/Emulation.php
@@ -70,6 +70,13 @@ class Emulation extends \Magento\Framework\Object
      */
     protected $inlineTranslation;
 
+    /**
+     * Ini
+     *
+     * @var \Magento\Framework\Object
+     */
+    private $initialEnvironmentInfo;
+
     /**
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Framework\View\DesignInterface $viewDesign
@@ -110,35 +117,45 @@ class Emulation extends \Magento\Framework\Object
      *
      * @param integer $storeId
      * @param string $area
-     * @param bool $emulateStoreInlineTranslation emulate inline translation of the specified store or just disable it
-     * @return \Magento\Framework\Object information about environment of the initial store
+     * @return void
      */
     public function startEnvironmentEmulation(
         $storeId,
-        $area = \Magento\Framework\App\Area::AREA_FRONTEND,
-        $emulateStoreInlineTranslation = false
+        $area = \Magento\Framework\App\Area::AREA_FRONTEND
     ) {
-        if ($area === null) {
-            $area = \Magento\Framework\App\Area::AREA_FRONTEND;
+        if ($storeId == $this->_storeManager->getStore()->getStoreId()) {
+            return;
         }
-        $initialTranslateInline = $emulateStoreInlineTranslation ? $this->_emulateInlineTranslation(
-            $storeId
-        ) : $this->_emulateInlineTranslation();
-        $initialDesign = $this->_emulateDesign($storeId, $area);
+        $this->storeCurrentEnvironmentInfo();
+
+        // emulate inline translations
+        $this->inlineTranslation->suspend($this->inlineConfig->isActive($storeId));
+
+        // emulate design
+        $storeTheme = $this->_viewDesign->getConfigurationDesignTheme($area, array('store' => $storeId));
+        $this->_viewDesign->setDesignTheme($storeTheme, $area);
+
+        if ($area == \Magento\Framework\App\Area::AREA_FRONTEND) {
+            $designChange = $this->_design->loadChange($storeId);
+            if ($designChange->getData()) {
+                $this->_viewDesign->setDesignTheme($designChange->getDesign(), $area);
+            }
+        }
+
         // Current store needs to be changed right before locale change and after design change
         $this->_storeManager->setCurrentStore($storeId);
-        $initialLocaleCode = $this->_emulateLocale($storeId, $area);
 
-        $initialEnvironmentInfo = new \Magento\Framework\Object();
-        $initialEnvironmentInfo->setInitialTranslateInline(
-            $initialTranslateInline
-        )->setInitialDesign(
-            $initialDesign
-        )->setInitialLocaleCode(
-            $initialLocaleCode
+        // emulate locale
+        $newLocaleCode = $this->_scopeConfig->getValue(
+            $this->_localeResolver->getDefaultLocalePath(),
+            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
+            $storeId
         );
+        $this->_localeResolver->setLocaleCode($newLocaleCode);
+        $this->_translate->setLocale($newLocaleCode);
+        $this->_translate->loadData($area);
 
-        return $initialEnvironmentInfo;
+        return;
     }
 
     /**
@@ -146,89 +163,44 @@ class Emulation extends \Magento\Framework\Object
      *
      * Function restores initial store environment
      *
-     * @param \Magento\Framework\Object $initialEnvironmentInfo information about environment of the initial store
      * @return \Magento\Core\Model\App\Emulation
      */
-    public function stopEnvironmentEmulation(\Magento\Framework\Object $initialEnvironmentInfo)
+    public function stopEnvironmentEmulation()
     {
-        $this->_restoreInitialInlineTranslation($initialEnvironmentInfo->getInitialTranslateInline());
-        $initialDesign = $initialEnvironmentInfo->getInitialDesign();
+        if (is_null($this->initialEnvironmentInfo)) {
+            return $this;
+        }
+
+        $this->_restoreInitialInlineTranslation($this->initialEnvironmentInfo->getInitialTranslateInline());
+        $initialDesign = $this->initialEnvironmentInfo->getInitialDesign();
         $this->_restoreInitialDesign($initialDesign);
         // Current store needs to be changed right before locale change and after design change
         $this->_storeManager->setCurrentStore($initialDesign['store']);
-        $this->_restoreInitialLocale($initialEnvironmentInfo->getInitialLocaleCode(), $initialDesign['area']);
+        $this->_restoreInitialLocale($this->initialEnvironmentInfo->getInitialLocaleCode(), $initialDesign['area']);
+        
+        $this->initialEnvironmentInfo = null;
         return $this;
     }
 
     /**
-     * Emulate inline translation of the specified store
-     *
-     * Function disables inline translation if $storeId is null
+     * Stores current environment info
      *
-     * @param integer|null $storeId
-     * @return boolean initial inline translation state
+     * @return void
      */
-    protected function _emulateInlineTranslation($storeId = null)
+    public function storeCurrentEnvironmentInfo()
     {
-        if (is_null($storeId)) {
-            $newTranslateInline = false;
-        } else {
-            $newTranslateInline = $this->inlineConfig->isActive($storeId);
-        }
-
-        $translateInline = $this->inlineTranslation->isEnabled();
-        $this->inlineTranslation->suspend($newTranslateInline);
-        return $translateInline;
-    }
-
-    /**
-     * Apply design of the specified store
-     *
-     * @param integer $storeId
-     * @param string $area
-     * @return array initial design parameters(package, store, area)
-     */
-    protected function _emulateDesign($storeId, $area = \Magento\Framework\App\Area::AREA_FRONTEND)
-    {
-        $store = $this->_storeManager->getStore();
-        $initialDesign = array(
-            'area' => $this->_viewDesign->getArea(),
-            'theme' => $this->_viewDesign->getDesignTheme(),
-            'store' => $store
-        );
-
-        $storeTheme = $this->_viewDesign->getConfigurationDesignTheme($area, array('store' => $storeId));
-        $this->_viewDesign->setDesignTheme($storeTheme, $area);
-
-        if ($area == \Magento\Framework\App\Area::AREA_FRONTEND) {
-            $designChange = $this->_design->loadChange($storeId);
-            if ($designChange->getData()) {
-                $this->_viewDesign->setDesignTheme($designChange->getDesign(), $area);
-            }
-        }
-
-        return $initialDesign;
-    }
-
-    /**
-     * Apply locale of the specified store
-     *
-     * @param integer $storeId
-     * @param string $area
-     * @return string initial locale code
-     */
-    protected function _emulateLocale($storeId, $area = \Magento\Framework\App\Area::AREA_FRONTEND)
-    {
-        $initialLocaleCode = $this->_localeResolver->getLocaleCode();
-        $newLocaleCode = $this->_scopeConfig->getValue(
-            $this->_localeResolver->getDefaultLocalePath(),
-            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
-            $storeId
+        $this->initialEnvironmentInfo = new \Magento\Framework\Object();
+        $this->initialEnvironmentInfo->setInitialTranslateInline(
+            $this->inlineTranslation->isEnabled()
+        )->setInitialDesign(
+            [
+                'area' => $this->_viewDesign->getArea(),
+                'theme' => $this->_viewDesign->getDesignTheme(),
+                'store' => $this->_storeManager->getStore()->getStoreId()
+            ]
+        )->setInitialLocaleCode(
+            $this->_localeResolver->getLocaleCode()
         );
-        $this->_localeResolver->setLocaleCode($newLocaleCode);
-        $this->_translate->setLocale($newLocaleCode)->loadData($area, true);
-
-        return $initialLocaleCode;
     }
 
     /**
@@ -267,7 +239,8 @@ class Emulation extends \Magento\Framework\Object
         $initialArea = \Magento\Framework\App\Area::AREA_ADMIN
     ) {
         $this->_localeResolver->setLocaleCode($initialLocaleCode);
-        $this->_translate->setLocale($initialLocaleCode)->loadData($initialArea, true);
+        $this->_translate->setLocale($initialLocaleCode);
+        $this->_translate->loadData($initialArea);
 
         return $this;
     }
diff --git a/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php b/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php
index 9f3308d7224a008b28cee1adbfa021760a022e84..4dbe5206737c91f8ee19147e69715f20c1721930 100644
--- a/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php
+++ b/app/code/Magento/Core/Model/Asset/Plugin/CleanMergedJsCss.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Model\Asset\Plugin;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class CleanMergedJsCss
 {
     /**
@@ -31,17 +33,17 @@ class CleanMergedJsCss
     protected $database;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\Core\Helper\File\Storage\Database $database
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Helper\File\Storage\Database $database,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->database = $database;
         $this->filesystem = $filesystem;
@@ -61,7 +63,7 @@ class CleanMergedJsCss
         $proceed();
 
         /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $pubStaticDirectory */
-        $pubStaticDirectory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $pubStaticDirectory = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
         $mergedDir = $pubStaticDirectory->getAbsolutePath() . '/'
             . \Magento\Framework\View\Asset\Merged::getRelativeDir();
         $this->database->deleteFolder($mergedDir);
diff --git a/app/code/Magento/Core/Model/File/Storage.php b/app/code/Magento/Core/Model/File/Storage.php
index 13ee674b96bb1d4d4be13593bb4db1a46903092f..158e90bbe5e4e517e20218f64b0c534147dfb4a1 100644
--- a/app/code/Magento/Core/Model/File/Storage.php
+++ b/app/code/Magento/Core/Model/File/Storage.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Core\Model\File;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Model\AbstractModel;
 
 /**
@@ -97,7 +98,7 @@ class Storage extends AbstractModel
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $filesystem;
 
@@ -110,7 +111,7 @@ class Storage extends 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\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -124,7 +125,7 @@ class Storage extends AbstractModel
         \Magento\Core\Model\File\Storage\Flag $fileFlag,
         \Magento\Core\Model\File\Storage\FileFactory $fileFactory,
         \Magento\Core\Model\File\Storage\DatabaseFactory $databaseFactory,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $data = array()
@@ -295,7 +296,7 @@ class Storage extends AbstractModel
     public function getScriptConfig()
     {
         $config = array();
-        $config['media_directory'] = $this->filesystem->getPath(Filesystem::MEDIA_DIR);
+        $config['media_directory'] = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath();
 
         $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 1d8445a68044fafdaef63b02853092a9bf519dd4..160f67486c9920b1ae7127c9f7a3dfcc18230f71 100644
--- a/app/code/Magento/Core/Model/File/Storage/Config.php
+++ b/app/code/Magento/Core/Model/File/Storage/Config.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Core\Model\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\WriteInterface as DirectoryWrite;
 use Magento\Framework\Filesystem\File\Write;
 use Magento\Framework\Filesystem\FilesystemException;
@@ -52,16 +53,16 @@ class Config
 
     /**
      * @param \Magento\Core\Model\File\Storage $storage
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $cacheFile
      */
     public function __construct(
         \Magento\Core\Model\File\Storage $storage,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $cacheFile
     ) {
         $this->config = $storage->getScriptConfig();
-        $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::PUB_DIR);
+        $this->pubDirectory = $filesystem->getDirectoryWrite(DirectoryList::PUB);
         $this->cacheFilePath = $cacheFile;
     }
 
diff --git a/app/code/Magento/Core/Model/File/Storage/Synchronization.php b/app/code/Magento/Core/Model/File/Storage/Synchronization.php
index 3fc0cd77a157fc16d03241cec93f68ed30820bae..a3cb28bd6b68d61c973057731949701a6a4e447b 100644
--- a/app/code/Magento/Core/Model/File/Storage/Synchronization.php
+++ b/app/code/Magento/Core/Model/File/Storage/Synchronization.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Core\Model\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\WriteInterface as DirectoryWrite;
 use Magento\Framework\Filesystem\File\Write;
 use Magento\Framework\Filesystem\FilesystemException;
@@ -48,14 +49,14 @@ class Synchronization
 
     /**
      * @param \Magento\Core\Model\File\Storage\DatabaseFactory $storageFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Model\File\Storage\DatabaseFactory $storageFactory,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->storageFactory = $storageFactory;
-        $this->pubDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::PUB_DIR);
+        $this->pubDirectory = $filesystem->getDirectoryWrite(DirectoryList::PUB);
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php
index e4b938d3a485531731e5b275272329c566798d30..cbb006b9c3e4575bc0ed283fe78e130bfdedcb32 100644
--- a/app/code/Magento/Core/Model/Layout/Merge.php
+++ b/app/code/Magento/Core/Model/Layout/Merge.php
@@ -24,6 +24,7 @@
 namespace Magento\Core\Model\Layout;
 
 use \Magento\Core\Model\Layout\Update\Validator;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Layout merge model
@@ -136,7 +137,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface
     protected $_logger;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -162,7 +163,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface
      * @param \Magento\Framework\Cache\FrontendInterface $cache
      * @param \Magento\Core\Model\Layout\Update\Validator $validator
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Page\Config $pageConfig
      * @param \Magento\Framework\View\Design\ThemeInterface $theme Non-injectable theme instance
      */
@@ -176,7 +177,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface
         \Magento\Framework\Cache\FrontendInterface $cache,
         \Magento\Core\Model\Layout\Update\Validator $validator,
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Page\Config $pageConfig,
         \Magento\Framework\View\Design\ThemeInterface $theme = null
     ) {
@@ -694,7 +695,7 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface
         $theme = $this->_getPhysicalTheme($this->_theme);
         $updateFiles = $this->_fileSource->getFiles($theme, '*.xml');
         $updateFiles = array_merge($updateFiles, $this->pageLayoutFileSource->getFiles($theme, '*.xml'));
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $dir = $this->filesystem->getDirectoryRead(DirectoryList::ROOT);
         $useErrors = libxml_use_internal_errors(true);
         foreach ($updateFiles as $file) {
             $filename = $dir->getRelativePath($file->getFilename());
diff --git a/app/code/Magento/Core/Model/Layout/Update/Validator.php b/app/code/Magento/Core/Model/Layout/Update/Validator.php
index bc0735adaa85153c7ad48a08e21995da83ad339a..0c1fcb0afc3de1ea7a8f14ee444fbb68d59b233e 100644
--- a/app/code/Magento/Core/Model/Layout/Update/Validator.php
+++ b/app/code/Magento/Core/Model/Layout/Update/Validator.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Core\Model\Layout\Update;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Validator for custom layout update
@@ -74,19 +74,19 @@ class Validator extends \Zend_Validate_Abstract
     protected $_domConfigFactory;
 
     /**
-     * @param Filesystem $filesystem
+     * @param DirectoryList $dirList
      * @param \Magento\Framework\Config\DomFactory $domConfigFactory
      */
     public function __construct(
-        Filesystem $filesystem,
+        DirectoryList $dirList,
         \Magento\Framework\Config\DomFactory $domConfigFactory
     ) {
         $this->_domConfigFactory = $domConfigFactory;
         $this->_initMessageTemplates();
         $this->_xsdSchemas = [
-            self::LAYOUT_SCHEMA_PAGE_HANDLE => $filesystem->getPath(Filesystem::LIB_INTERNAL)
+            self::LAYOUT_SCHEMA_PAGE_HANDLE => $dirList->getPath(DirectoryList::LIB_INTERNAL)
                 . '/Magento/Framework/View/Layout/etc/page_layout.xsd',
-            self::LAYOUT_SCHEMA_MERGED => $filesystem->getPath(Filesystem::LIB_INTERNAL)
+            self::LAYOUT_SCHEMA_MERGED => $dirList->getPath(DirectoryList::LIB_INTERNAL)
                 . '/Magento/Framework/View/Layout/etc/layout_merged.xsd'
         ];
     }
diff --git a/app/code/Magento/Core/Model/Observer.php b/app/code/Magento/Core/Model/Observer.php
index 43c3053c391ff43cd73c48b9f45378644d084acf..ffe475b85f32d3b3e2b02e69e9ab4a7ae5aa9d8e 100644
--- a/app/code/Magento/Core/Model/Observer.php
+++ b/app/code/Magento/Core/Model/Observer.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Core Observer model
  *
@@ -144,7 +146,7 @@ class Observer
                     $asset = $this->_assetRepo->createArbitrary(
                         $identifier,
                         $dirPath,
-                        \Magento\Framework\App\Filesystem::MEDIA_DIR,
+                        DirectoryList::MEDIA,
                         \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
                     );
                     $this->_pageAssets->add($identifier, $asset);
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 665b8fa943dc372df845024cee5b3618eabcc32e..001863e86b1d9d9d603107845fa566778808ecc7 100644
--- a/app/code/Magento/Core/Model/Resource/File/Storage/File.php
+++ b/app/code/Magento/Core/Model/Resource/File/Storage/File.php
@@ -23,13 +23,15 @@
  */
 namespace Magento\Core\Model\Resource\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class File
  */
 class File
 {
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -39,10 +41,10 @@ class File
     protected $_logger;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Logger $log
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, \Magento\Framework\Logger $log)
+    public function __construct(\Magento\Framework\Filesystem $filesystem, \Magento\Framework\Logger $log)
     {
         $this->_logger = $log;
         $this->_filesystem = $filesystem;
@@ -58,7 +60,7 @@ class File
     {
         $files = array();
         $directories = array();
-        $directoryInstance = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $directoryInstance = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA);
         if ($directoryInstance->isDirectory($dir)) {
             foreach ($directoryInstance->readRecursively($dir) as $path) {
                 $itemName = basename($path);
@@ -87,7 +89,7 @@ class File
      */
     public function clear($dir = '')
     {
-        $directoryInstance = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $directoryInstance = $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         if ($directoryInstance->isDirectory($dir)) {
             foreach ($directoryInstance->read($dir) as $path) {
                 $directoryInstance->delete($path);
@@ -113,11 +115,11 @@ class File
         $path = strlen($dir['path']) ? $dir['path'] . '/' . $dir['name'] : $dir['name'];
 
         try {
-            $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR)->create($path);
+            $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA)->create($path);
         } catch (\Exception $e) {
             $this->_logger->log($e->getMessage());
             throw new \Magento\Framework\Model\Exception(
-                __('Unable to create directory: %1', \Magento\Framework\App\Filesystem::MEDIA_DIR . '/' . $path)
+                __('Unable to create directory: %1', DirectoryList::MEDIA . '/' . $path)
             );
         }
 
@@ -136,7 +138,7 @@ class File
     public function saveFile($filePath, $content, $overwrite = false)
     {
         try {
-            $directoryInstance = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+            $directoryInstance = $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA);
             if (!$directoryInstance->isFile($filePath) || $overwrite && $directoryInstance->delete($filePath)) {
                 $directoryInstance->writeFile($filePath, $content);
                 return true;
diff --git a/app/code/Magento/Core/Model/Theme/Collection.php b/app/code/Magento/Core/Model/Theme/Collection.php
index e490c611df35fbc421fbaaff6b10e11a2efb9f06..c77d0fa092994efc41a484cf2280196a3c400afc 100644
--- a/app/code/Magento/Core/Model/Theme/Collection.php
+++ b/app/code/Magento/Core/Model/Theme/Collection.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Core\Model\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\Theme\ListInterface;
 use Magento\Framework\View\Design\ThemeInterface;
 
@@ -59,7 +60,7 @@ class Collection extends \Magento\Framework\Data\Collection implements ListInter
         \Magento\Framework\Filesystem $filesystem
     ) {
         parent::__construct($entityFactory);
-        $this->_directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::THEMES_DIR);
+        $this->_directory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
     }
 
     /**
diff --git a/app/code/Magento/Core/Model/Theme/Image/Path.php b/app/code/Magento/Core/Model/Theme/Image/Path.php
index 1651d4aca47197f544d2e594c9f5c264d3844525..2639da6165e2455d8e60ab082d80e7937a853de7 100644
--- a/app/code/Magento/Core/Model/Theme/Image/Path.php
+++ b/app/code/Magento/Core/Model/Theme/Image/Path.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Core\Model\Theme\Image;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\ThemeInterface;
 
 /**
@@ -56,16 +57,16 @@ class Path implements \Magento\Framework\View\Design\Theme\Image\PathInterface
     /**
      * Initialize dependencies
      * 
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\StoreManagerInterface $storeManager
     ) {
-        $this->mediaDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->mediaDirectory = $filesystem->getDirectoryRead(DirectoryList::MEDIA);
         $this->assetRepo = $assetRepo;
         $this->storeManager = $storeManager;
     }
diff --git a/app/code/Magento/Core/Model/Theme/Registration.php b/app/code/Magento/Core/Model/Theme/Registration.php
index 7d45405e2aeecdb124d6c9e07f925606def4c3d5..e1d3b05d5e05bf8a848898a5deaedd27df757f6f 100644
--- a/app/code/Magento/Core/Model/Theme/Registration.php
+++ b/app/code/Magento/Core/Model/Theme/Registration.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Core\Model\Theme;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Model\Exception;
 use Magento\Framework\View\Design\ThemeInterface;
 
@@ -83,7 +84,7 @@ class Registration
     ) {
         $this->_collectionFactory = $collectionFactory;
         $this->_themeCollection = $filesystemCollection;
-        $this->directoryRead = $filesystem->getDirectoryRead(Filesystem::MEDIA_DIR);
+        $this->directoryRead = $filesystem->getDirectoryRead(DirectoryList::MEDIA);
     }
 
     /**
diff --git a/app/code/Magento/Core/composer.json b/app/code/Magento/Core/composer.json
index 79b3331b3d2045e10bf0564866eaa14b3a456191..695029dc137e88952f4fe864be28090b05b2a5ea 100644
--- a/app/code/Magento/Core/composer.json
+++ b/app/code/Magento/Core/composer.json
@@ -3,18 +3,18 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-cron": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-page-cache": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-cron": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-page-cache": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Core/etc/config.xml b/app/code/Magento/Core/etc/config.xml
index ebd6b27a17cf9973693edf295441fb907ef0a939..5b40d0f166928a741c098cc5d39e4aeeb45c9891 100644
--- a/app/code/Magento/Core/etc/config.xml
+++ b/app/code/Magento/Core/etc/config.xml
@@ -77,78 +77,6 @@
                     <design_theme_folder>theme</design_theme_folder>
                 </allowed_resources>
             </media_storage_configuration>
-            <filesystem>
-                <directory>
-                    <media>
-                        <read_only>0</read_only>
-                        <path>pub/media</path>
-                        <uri>pub/media</uri>
-                        <permissions>511</permissions>
-                    </media>
-                    <static>
-                        <read_only>0</read_only>
-                        <path>pub/static</path>
-                        <uri>pub/static</uri>
-                        <permissions>511</permissions>
-                    </static>
-                    <pub>
-                        <read_only>0</read_only>
-                        <path>pub</path>
-                        <uri>pub</uri>
-                        <permissions>511</permissions>
-                    </pub>
-                    <lib_web>
-                        <read_only>1</read_only>
-                        <path>lib/web</path>
-                    </lib_web>
-                    <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>
-                    <ftp>
-                        <read_only>0</read_only>
-                        <permissions>511</permissions>
-                        <driver>Magento\Framework\Filesystem\Driver\File</driver>
-                    </ftp>
-                    <ftps>
-                        <read_only>0</read_only>
-                        <permissions>511</permissions>
-                        <driver>Magento\Framework\Filesystem\Driver\File</driver>
-                    </ftps>
-                    <ssh2>
-                        <read_only>0</read_only>
-                        <permissions>511</permissions>
-                        <driver>Magento\Framework\Filesystem\Driver\File</driver>
-                    </ssh2>
-                </directory>
-                <protocol>
-                    <zlib>
-                        <driver>Magento\Framework\Filesystem\Driver\Zlib</driver>
-                        <protocol>compress.zlib</protocol>
-                    </zlib>
-                    <http>
-                        <read_only>1</read_only>
-                        <driver>Magento\Framework\Filesystem\Driver\Http</driver>
-                        <protocol>http</protocol>
-                    </http>
-                    <https>
-                        <read_only>1</read_only>
-                        <driver>Magento\Framework\Filesystem\Driver\Https</driver>
-                        <protocol>https</protocol>
-                    </https>
-                </protocol>
-            </filesystem>
         </system>
         <web>
             <url>
diff --git a/app/code/Magento/Core/etc/di.xml b/app/code/Magento/Core/etc/di.xml
index 27c7dedf9039ea75dc62c589b37a83e9a74c41a9..ef5a849457081a6a6d586967e50028471b769497 100644
--- a/app/code/Magento/Core/etc/di.xml
+++ b/app/code/Magento/Core/etc/di.xml
@@ -83,6 +83,7 @@
     <preference for="Magento\Framework\Pricing\Amount\AmountInterface" type="Magento\Framework\Pricing\Amount\Base" />
     <preference for="Magento\Framework\Stdlib\CookieManager" type="Magento\Framework\Stdlib\Cookie\PhpCookieManager" />
     <preference for="Magento\Framework\View\Page\FaviconInterface" type="Magento\Theme\Model\Favicon\Favicon" />
+    <preference for="Magento\Framework\Api\AttributeInterface" type="Magento\Framework\Service\Data\AttributeValue" />
     <type name="Magento\Framework\App\DefaultPath\DefaultPath">
         <arguments>
             <argument name="parts" xsi:type="array">
diff --git a/app/code/Magento/Core/etc/frontend/di.xml b/app/code/Magento/Core/etc/frontend/di.xml
index 6f6749c94da9bb4b4651405ca8862dd87f9dfd70..6d8bbe5f89a99d2264d5d996fb8f13323a55aa75 100644
--- a/app/code/Magento/Core/etc/frontend/di.xml
+++ b/app/code/Magento/Core/etc/frontend/di.xml
@@ -29,7 +29,7 @@
                 type="Magento\Core\Model\Layout\DepersonalizePlugin" sortOrder="1"/>
     </type>
     <type name="Magento\Framework\App\FrontController">
-        <plugin name="requestPreprocessor" type="Magento\Core\App\FrontController\Plugin\RequestPreprocessor" sortOrder="50"/>
+        <plugin name="requestPreprocessor" type="Magento\Store\App\FrontController\Plugin\RequestPreprocessor" sortOrder="50"/>
     </type>
     <type name="Magento\Framework\App\Action\Action">
         <plugin name="lastUrl" type="Magento\Core\App\Action\Plugin\LastUrl" sortOrder="70"/>
diff --git a/app/code/Magento/Cron/Model/Observer.php b/app/code/Magento/Cron/Model/Observer.php
index 85e2a284bf31566f20568616cbe71dbd67f2815a..aab865c8b3bedb79183a35ee3b772068b7e0f5cc 100644
--- a/app/code/Magento/Cron/Model/Observer.php
+++ b/app/code/Magento/Cron/Model/Observer.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Cron\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Observer
 {
     /**#@+
@@ -153,7 +155,7 @@ class Observer
                     '%s -f %s -- --group=%s',
                     array(
                         PHP_BINARY,
-                        BP . '/' . \Magento\Framework\App\Filesystem::PUB_DIR . '/cron.php',
+                        BP . '/' . DirectoryList::PUB . '/cron.php',
                         $groupId
                     )
                 );
diff --git a/app/code/Magento/Cron/README.md b/app/code/Magento/Cron/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..0e9e37ff8db79646545182d24db3d75b2ce7445d
--- /dev/null
+++ b/app/code/Magento/Cron/README.md
@@ -0,0 +1,2 @@
+Cron is a module that enables scheduling of jobs. Other modules can add cron jobs by including crontab.xml in their etc directory. The script dev/shell/cron.sh should be run periodically to trigger the Cron module to run its scheduled jobs.
+This module also allows administrators to tune cron options in Magento Admin.
\ No newline at end of file
diff --git a/app/code/Magento/Cron/composer.json b/app/code/Magento/Cron/composer.json
index e8822a751d0cc1a382f34b7e460d819914d0125a..53d46e89796428050d7e56d47bea6d70705d3a4a 100644
--- a/app/code/Magento/Cron/composer.json
+++ b/app/code/Magento/Cron/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CurrencySymbol/README.md b/app/code/Magento/CurrencySymbol/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..aa65b869b3c99430acf1a84bbbbcab9503ea4dc4
--- /dev/null
+++ b/app/code/Magento/CurrencySymbol/README.md
@@ -0,0 +1,16 @@
+# CurrencySymbol
+
+**CurrencySymbol** module provides support for adding custom currencies as well as the management of the currency 
+conversion rates.
+
+## Controllers
+
+### Currency Controllers
+***CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRates.php*** retrieves conversion rates for a specified 
+currency to every other defined currency in the system.
+***CurrencySymbol\Controller\Adminhtml\System\Currency\SaveRates.php*** saves rates for each defined currency.
+
+### Currency Symbol Controllers
+***CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Reset.php*** resets all custom currency symbols.
+***CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Save.php*** creates a new custom currency symbols.
+
diff --git a/app/code/Magento/CurrencySymbol/composer.json b/app/code/Magento/CurrencySymbol/composer.json
index ee5d01bed4f7f4309a1c978a6bc75496fd43d6cc..953c93c3365e6459285d3abf1184a7b1f7d7a433 100644
--- a/app/code/Magento/CurrencySymbol/composer.json
+++ b/app/code/Magento/CurrencySymbol/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-page-cache": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-page-cache": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Customer/Controller/Adminhtml/Index/Viewfile.php b/app/code/Magento/Customer/Controller/Adminhtml/Index/Viewfile.php
index 77e16668710be3c516f65c16bc2b828f7200074a..d3f647ad217fe27163ded9a727d98b8f1da13172 100644
--- a/app/code/Magento/Customer/Controller/Adminhtml/Index/Viewfile.php
+++ b/app/code/Magento/Customer/Controller/Adminhtml/Index/Viewfile.php
@@ -25,6 +25,7 @@
 namespace Magento\Customer\Controller\Adminhtml\Index;
 
 use Magento\Framework\App\Action\NotFoundException;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class Viewfile extends \Magento\Customer\Controller\Adminhtml\Index
 {
@@ -57,9 +58,9 @@ class Viewfile extends \Magento\Customer\Controller\Adminhtml\Index
             throw new NotFoundException();
         }
 
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $filesystem = $this->_objectManager->get('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryRead(DirectoryList::MEDIA);
         $fileName = 'customer' . '/' . ltrim($file, '/');
         $path = $directory->getAbsolutePath($fileName);
         if (!$directory->isFile($fileName)
@@ -107,7 +108,7 @@ class Viewfile extends \Magento\Customer\Controller\Adminhtml\Index
             $this->_fileFactory->create(
                 $name,
                 array('type' => 'filename', 'value' => $fileName),
-                \Magento\Framework\App\Filesystem::MEDIA_DIR
+                DirectoryList::MEDIA
             )->sendResponse();
         }
 
diff --git a/app/code/Magento/Customer/Model/Metadata/Form/File.php b/app/code/Magento/Customer/Model/Metadata/Form/File.php
index 0a7c45533c2b396f20abdd4376d0f0727cab790b..a1de7918903ffb41b663643f0b70ebe4f7e3f705 100644
--- a/app/code/Magento/Customer/Model/Metadata/Form/File.php
+++ b/app/code/Magento/Customer/Model/Metadata/Form/File.php
@@ -25,6 +25,9 @@
  */
 namespace Magento\Customer\Model\Metadata\Form;
 
+use Magento\Framework\File\UploaderFactory;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Service\ArrayObjectSearch;
 
 class File extends AbstractData
@@ -49,10 +52,15 @@ class File extends AbstractData
     protected $_fileValidator;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $_fileSystem;
 
+    /**
+     * @var UploaderFactory
+     */
+    private $uploaderFactory;
+
     /**
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Magento\Framework\Logger $logger
@@ -63,7 +71,8 @@ class File extends AbstractData
      * @param bool $isAjax
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator
-     * @param \Magento\Framework\App\Filesystem $fileSystem
+     * @param Filesystem $fileSystem
+     * @param UploaderFactory $uploaderFactory
      */
     public function __construct(
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
@@ -75,12 +84,14 @@ class File extends AbstractData
         $isAjax,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator,
-        \Magento\Framework\App\Filesystem $fileSystem
+        Filesystem $fileSystem,
+        UploaderFactory $uploaderFactory
     ) {
         parent::__construct($localeDate, $logger, $attribute, $localeResolver, $value, $entityTypeCode, $isAjax);
         $this->_coreData = $coreData;
         $this->_fileValidator = $fileValidator;
         $this->_fileSystem = $fileSystem;
+        $this->uploaderFactory = $uploaderFactory;
     }
 
     /**
@@ -261,29 +272,22 @@ class File extends AbstractData
             }
         }
 
-        $path = $this->_fileSystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR)
-            . '/' . $this->_entityTypeCode;
-
+        $mediaDir = $this->_fileSystem->getDirectoryWrite(DirectoryList::MEDIA);
         $result = $original;
         // unlink entity file
         if ($toDelete) {
             $result = '';
-            $file = $path . $original;
-            $ioFile = new \Magento\Framework\Io\File();
-            if ($ioFile->fileExists($file)) {
-                $ioFile->rm($file);
-            }
+            $mediaDir->delete($this->_entityTypeCode . $original);
         }
 
         if (!empty($value['tmp_name'])) {
             try {
-                $uploader = new \Magento\Framework\File\Uploader($value);
+                $uploader = $this->uploaderFactory->create(['fileId' => $value]);
                 $uploader->setFilesDispersion(true);
                 $uploader->setFilenamesCaseSensitivity(false);
                 $uploader->setAllowRenameFiles(true);
-                $uploader->save($path, $value['name']);
-                $fileName = $uploader->getUploadedFileName();
-                $result = $fileName;
+                $uploader->save($mediaDir->getAbsolutePath($this->_entityTypeCode), $value['name']);
+                $result = $uploader->getUploadedFileName();
             } catch (\Exception $e) {
                 $this->_logger->logException($e);
             }
diff --git a/app/code/Magento/Customer/Service/V1/CustomerAccountService.php b/app/code/Magento/Customer/Service/V1/CustomerAccountService.php
index 899114e148a5393e47912dc30383f96867afa83c..1fd4eb9f235e851fba92b9b9b5c75005ac14fbf9 100644
--- a/app/code/Magento/Customer/Service/V1/CustomerAccountService.php
+++ b/app/code/Magento/Customer/Service/V1/CustomerAccountService.php
@@ -641,7 +641,11 @@ class CustomerAccountService implements CustomerAccountServiceInterface
         $customerModel->setPasswordHash($this->getPasswordHash($newPassword));
         $customerModel->save();
         // FIXME: Are we using the proper template here?
-        $customerModel->sendPasswordResetNotificationEmail();
+        try {
+            $customerModel->sendPasswordResetNotificationEmail();
+        } catch (MailException $e) {
+            $this->logger->logException($e);
+        }
 
         return true;
     }
diff --git a/app/code/Magento/Customer/Service/V1/CustomerAddressServiceInterface.php b/app/code/Magento/Customer/Service/V1/CustomerAddressServiceInterface.php
index 71b4d069ed97d0cf9779b099b5aa9575c8a54252..25295d5f97a678a3b161e0765d5079de8e8ebafb 100644
--- a/app/code/Magento/Customer/Service/V1/CustomerAddressServiceInterface.php
+++ b/app/code/Magento/Customer/Service/V1/CustomerAddressServiceInterface.php
@@ -58,7 +58,7 @@ interface CustomerAddressServiceInterface
     /**
      * Retrieve address by id
      *
-     * @param string $addressId
+     * @param int $addressId
      * @return \Magento\Customer\Service\V1\Data\Address
      * @throws \Magento\Framework\Exception\NoSuchEntityException If no address can be found for the provided id.
      */
diff --git a/app/code/Magento/Customer/composer.json b/app/code/Magento/Customer/composer.json
index f2300866397d020fd7a95b67c8098a4be06ced57..94c4dc96e2d2d8f839979eb7e136849e60ff4492 100644
--- a/app/code/Magento/Customer/composer.json
+++ b/app/code/Magento/Customer/composer.json
@@ -3,27 +3,27 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-newsletter": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-wishlist": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-review": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-page-cache": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
-        "magento/module-authorization": "0.1.0-alpha100",
-        "magento/module-integration": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-newsletter": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-wishlist": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-review": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-page-cache": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
+        "magento/module-authorization": "0.1.0-alpha101",
+        "magento/module-integration": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportCsv.php b/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportCsv.php
index f8dd56d5e66ce3bac4f97281380491580bbd43f9..fc7862020e7565ba4ea46435b30e514fafd66480 100644
--- a/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportCsv.php
+++ b/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportCsv.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\CustomerImportExport\Controller\Adminhtml\Index;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class Index
  */
@@ -62,7 +64,7 @@ class ExportCsv extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportXml.php b/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportXml.php
index db0ce66754bba635813632f3672717361cdc5999..e75aafcb8e6ae712970fd25e26123a9e442d9ba9 100644
--- a/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportXml.php
+++ b/app/code/Magento/CustomerImportExport/Controller/Adminhtml/Index/ExportXml.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\CustomerImportExport\Controller\Adminhtml\Index;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class Index
  */
@@ -60,6 +62,6 @@ class ExportXml extends \Magento\Backend\App\Action
         /** @var \Magento\Backend\Block\Widget\Grid\ExportInterface $exportBlock  */
         $exportBlock = $this->_view->getLayout()->getChildBlock('admin.block.customer.grid', 'grid.export');
         $content = $exportBlock->getExcelFile($fileName);
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/CustomerImportExport/composer.json b/app/code/Magento/CustomerImportExport/composer.json
index e31874c11ec2c24f76f27a3db871b1720ef6435f..364a34ece0fa8ebd0ed27e6e754feda60afb44db 100644
--- a/app/code/Magento/CustomerImportExport/composer.json
+++ b/app/code/Magento/CustomerImportExport/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-import-export": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-import-export": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
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 0e0bc2ff8f87139070e3c604a7072b9d861c6e6e..9b906a17bd77932469f0c0e556af99a0004a3ac2 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Configuration.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Configuration.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\DesignEditor\Model\Editor\Tools\Controls;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Configuration of controls
  */
@@ -51,7 +53,7 @@ class Configuration
     protected $_design;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -98,7 +100,7 @@ class Configuration
 
     /**
      * @param \Magento\Framework\View\DesignInterface $design
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Event\ManagerInterface $eventDispatcher
      * @param \Magento\Framework\View\ConfigInterface $viewConfig
      * @param \Magento\DesignEditor\Model\Config\Control\AbstractControl $configuration
@@ -107,7 +109,7 @@ class Configuration
      */
     public function __construct(
         \Magento\Framework\View\DesignInterface $design,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Event\ManagerInterface $eventDispatcher,
         \Magento\Framework\View\ConfigInterface $viewConfig,
         \Magento\DesignEditor\Model\Config\Control\AbstractControl $configuration = null,
@@ -300,7 +302,7 @@ class Configuration
     protected function _saveViewConfiguration(\DOMDocument $config)
     {
         $targetPath = $this->_theme->getCustomization()->getCustomViewConfigPath();
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $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 d4ecf8c0db1ddb3c2c32dfcbd9185dd5fa8a07bd..02cd4d0424d49dd612435178697bb25a5c6861de 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/Controls/Factory.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\DesignEditor\Model\Editor\Tools\Controls;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Controls configuration factory
  */
@@ -63,7 +65,7 @@ class Factory
     protected $fileIteratorFactory;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -71,13 +73,13 @@ class Factory
      * @param \Magento\Framework\ObjectManager $objectManager
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\ObjectManager $objectManager,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_objectManager = $objectManager;
         $this->assetRepo = $assetRepo;
@@ -132,7 +134,7 @@ class Factory
             default:
                 throw new \Magento\Framework\Exception("Unknown control configuration type: \"{$type}\"");
         }
-        $rootDirectory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $rootDirectory = $this->filesystem->getDirectoryRead(DirectoryList::ROOT);
         $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 f8b05238f4273cb0346180d318168007ff92000f..0d4e34f0ca42a1e414cd6c7577718b6050b74865 100644
--- a/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/ImageUploader.php
+++ b/app/code/Magento/DesignEditor/Model/Editor/Tools/QuickStyles/ImageUploader.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\DesignEditor\Model\Editor\Tools\QuickStyles;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Quick style file uploader
  */
@@ -41,7 +43,7 @@ class ImageUploader extends \Magento\Framework\Object
     protected $_storagePath;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -61,12 +63,12 @@ class ImageUploader extends \Magento\Framework\Object
      * Generic constructor of change instance
      *
      * @param \Magento\Core\Model\File\UploaderFactory $uploaderFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param array $data
      */
     public function __construct(
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         array $data = array()
     ) {
         $this->_uploaderFactory = $uploaderFactory;
@@ -152,7 +154,7 @@ class ImageUploader extends \Magento\Framework\Object
      */
     public function removeFile($file)
     {
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $directory = $this->_filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $path = $directory->getRelativePath($this->getStoragePath() . '/' . $file);
         if ($directory->isExist($path)) {
             $directory->delete($path);
diff --git a/app/code/Magento/DesignEditor/composer.json b/app/code/Magento/DesignEditor/composer.json
index fae72900d3f81c4c366897ceaf4de2f22b83a2e4..393c9acaffad1f3120618d52c6ff597249b15d6a 100644
--- a/app/code/Magento/DesignEditor/composer.json
+++ b/app/code/Magento/DesignEditor/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Dhl/Model/Carrier.php b/app/code/Magento/Dhl/Model/Carrier.php
index 72e086e86201ad722df978b4884b8a995b84d980..74e13e17db3c4d3bde24fa292f29885f7b804f28 100644
--- a/app/code/Magento/Dhl/Model/Carrier.php
+++ b/app/code/Magento/Dhl/Model/Carrier.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Dhl\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Sales\Model\Order\Shipment;
 use Magento\Sales\Model\Quote\Address\RateRequest;
 use Magento\Sales\Model\Quote\Address\RateResult\Error;
@@ -224,7 +225,7 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Math\Division $mathDivision
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Stdlib\DateTime $dateTime
      * @param \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory
      * @param \Magento\CatalogInventory\Service\V1\StockItemService $stockItemService
@@ -251,12 +252,12 @@ class Carrier extends \Magento\Dhl\Model\AbstractDhl implements \Magento\Shippin
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Math\Division $mathDivision,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Stdlib\DateTime $dateTime,
         \Magento\Framework\HTTP\ZendClientFactory $httpClientFactory,
         array $data = array()
     ) {
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->_carrierHelper = $carrierHelper;
         $this->_coreDate = $coreDate;
         $this->_storeManager = $storeManager;
diff --git a/app/code/Magento/Dhl/composer.json b/app/code/Magento/Dhl/composer.json
index 62a121220d00f0937676c489de49ee89a1ccc402..f08d5176930c250843380356d070d266bb80c3a3 100644
--- a/app/code/Magento/Dhl/composer.json
+++ b/app/code/Magento/Dhl/composer.json
@@ -3,21 +3,21 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Directory/README.md b/app/code/Magento/Directory/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..6faa14b7b8ab756a65d29609265aa4dc8020b58e
--- /dev/null
+++ b/app/code/Magento/Directory/README.md
@@ -0,0 +1,5 @@
+# Directory
+
+**Directory** provides the ability to manage the list of countries and regions recognized by the store as well as
+associated data like the country code. It also provides the ability to manage currency rates and convert prices to
+a currency format.
diff --git a/app/code/Magento/Directory/composer.json b/app/code/Magento/Directory/composer.json
index a6e05bcc52227b04bc3fe29e0cb7835d16e342f0..90f5c107c095e81fc3743a8bd55a2c0f90bfa6db 100644
--- a/app/code/Magento/Directory/composer.json
+++ b/app/code/Magento/Directory/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Downloadable/Helper/Download.php b/app/code/Magento/Downloadable/Helper/Download.php
index e93c41183f01fbe2ba383c01cc719ec0497af12f..a93250452296a0177dda8bf88c895430bcd71103 100644
--- a/app/code/Magento/Downloadable/Helper/Download.php
+++ b/app/code/Magento/Downloadable/Helper/Download.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Downloadable\Helper;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Model\Exception as CoreException;
 
 /**
@@ -117,7 +118,7 @@ class Download extends \Magento\Framework\App\Helper\AbstractHelper
     protected $_scopeConfig;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -138,7 +139,7 @@ class Download extends \Magento\Framework\App\Helper\AbstractHelper
      * @param \Magento\Downloadable\Helper\File $downloadableFile
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Session\SessionManagerInterface $session
      */
     public function __construct(
@@ -147,7 +148,7 @@ class Download extends \Magento\Framework\App\Helper\AbstractHelper
         \Magento\Downloadable\Helper\File $downloadableFile,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDb,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Session\SessionManagerInterface $session
     ) {
         $this->_coreData = $coreData;
@@ -176,7 +177,7 @@ class Download extends \Magento\Framework\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_DIR);
+                $this->_workingDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA);
                 $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 6740279c37e1687903d2045fc024437e039961f3..b32ada6a116376f0b5152ad13f3ae3ccb4a10978 100644
--- a/app/code/Magento/Downloadable/Helper/File.php
+++ b/app/code/Magento/Downloadable/Helper/File.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Downloadable\Helper;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Downloadable Products File Helper
  *
@@ -40,7 +42,7 @@ class File extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * Filesystem object.
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -54,18 +56,18 @@ class File extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * @param \Magento\Framework\App\Helper\Context $context
      * @param \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param array $mimeTypes
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
         \Magento\Core\Helper\File\Storage\Database $coreFileStorageDatabase,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         array $mimeTypes = array()
     ) {
         $this->_coreFileStorageDatabase = $coreFileStorageDatabase;
         $this->_filesystem = $filesystem;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite($filesystem::MEDIA_DIR);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         parent::__construct($context);
         if (!empty($mimeTypes)) {
             foreach ($mimeTypes as $key => $value) {
diff --git a/app/code/Magento/Downloadable/Model/Product/Type.php b/app/code/Magento/Downloadable/Model/Product/Type.php
index e9c082f78589750708b6cd1f20984ec2b3d7fe94..12e411ab661880a22c74bfd8702366d80b633fee 100644
--- a/app/code/Magento/Downloadable/Model/Product/Type.php
+++ b/app/code/Magento/Downloadable/Model/Product/Type.php
@@ -79,7 +79,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
      * @param \Magento\Framework\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\Logger $logger
      * @param \Magento\Downloadable\Helper\File $downloadableFile
@@ -99,7 +99,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\Virtual
         \Magento\Framework\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\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 179fc32c120020d5fe5fa1e982aeeed3609f065f..c35a1e8fa9f4d308c1e34bd359276a7497cff45d 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
@@ -56,7 +56,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
@@ -69,7 +69,7 @@ abstract class AbstractItems extends \Magento\Sales\Model\Order\Pdf\Items\Abstra
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
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 b0c0d9f52168788430c3c3334c373d12d036d474..3f9736b32ac605f57d594d013ea28b637530c38b 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
@@ -37,7 +37,7 @@ class Creditmemo extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstr
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
@@ -51,7 +51,7 @@ class Creditmemo extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstr
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
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 f7aecd4512cce1c63019868b832f8dc1b90419d4..8c98f0d923e0e80c08e39f0aeb345b3713c0048f 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
@@ -37,7 +37,7 @@ class Invoice extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstract
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory
@@ -51,7 +51,7 @@ class Invoice extends \Magento\Downloadable\Model\Sales\Order\Pdf\Items\Abstract
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Downloadable\Model\Link\PurchasedFactory $purchasedFactory,
diff --git a/app/code/Magento/Downloadable/Service/V1/Data/FileContentUploader.php b/app/code/Magento/Downloadable/Service/V1/Data/FileContentUploader.php
index 57ff82e322defdbb5b3df8057b12046a4b03ebd6..f6c55fa2e0ac7320dff22fa27d48621ea85a4f4a 100644
--- a/app/code/Magento/Downloadable/Service/V1/Data/FileContentUploader.php
+++ b/app/code/Magento/Downloadable/Service/V1/Data/FileContentUploader.php
@@ -24,8 +24,8 @@
 namespace Magento\Downloadable\Service\V1\Data;
 
 use \Magento\Core\Model\File\Uploader;
-use \Magento\Framework\Io\File;
-use \Magento\Framework\App\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem;
 use \Magento\Core\Model\File\Validator\NotProtectedExtension;
 use \Magento\Core\Helper\File\Storage;
 use \Magento\Core\Helper\File\Storage\Database;
@@ -85,8 +85,8 @@ class FileContentUploader extends Uploader implements FileContentUploaderInterfa
         $this->_validator = $validator;
         $this->_coreFileStorage = $coreFileStorage;
         $this->_coreFileStorageDb = $coreFileStorageDb;
-        $this->mediaDirectory = $filesystem->getDirectoryWrite(Filesystem::MEDIA_DIR);
-        $this->systemTmpDirectory = $filesystem->getDirectoryWrite(Filesystem::SYS_TMP_DIR);
+        $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+        $this->systemTmpDirectory = $filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);
         $this->linkConfig = $linkConfig;
         $this->sampleConfig = $sampleConfig;
     }
diff --git a/app/code/Magento/Downloadable/composer.json b/app/code/Magento/Downloadable/composer.json
index 8c6f527aef4d0f1a726cd2024a67353f1e054a60..be2ab99cc77725e1ed25a6bea6ece05aab07a317 100644
--- a/app/code/Magento/Downloadable/composer.json
+++ b/app/code/Magento/Downloadable/composer.json
@@ -3,26 +3,26 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-wishlist": "0.1.0-alpha100",
-        "magento/module-gift-message": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-msrp": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-wishlist": "0.1.0-alpha101",
+        "magento/module-gift-message": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-msrp": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Eav/Model/Attribute/Data/File.php b/app/code/Magento/Eav/Model/Attribute/Data/File.php
index f4edf6532b2557dd04cafe7ed7fa9f39094a3326..fe197266f6105d850c474f4632edc8085cb4d2c8 100644
--- a/app/code/Magento/Eav/Model/Attribute/Data/File.php
+++ b/app/code/Magento/Eav/Model/Attribute/Data/File.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Eav\Model\Attribute\Data;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\RequestInterface;
 
 /**
@@ -62,7 +63,7 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
      * @param \Magento\Framework\Locale\ResolverInterface $localeResolver
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
@@ -70,12 +71,12 @@ class File extends \Magento\Eav\Model\Attribute\Data\AbstractData
         \Magento\Framework\Locale\ResolverInterface $localeResolver,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Model\File\Validator\NotProtectedExtension $fileValidator,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         parent::__construct($localeDate, $logger, $localeResolver);
         $this->_coreData = $coreData;
         $this->_fileValidator = $fileValidator;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
     }
 
     /**
diff --git a/app/code/Magento/Eav/Model/Entity/Setup/Context.php b/app/code/Magento/Eav/Model/Entity/Setup/Context.php
index b94d962e5791e3a4c012e5865ca0fe15fa133fb1..39ddc67088b8bb32b668425c81481a7c507679a8 100644
--- a/app/code/Magento/Eav/Model/Entity/Setup/Context.php
+++ b/app/code/Magento/Eav/Model/Entity/Setup/Context.php
@@ -41,7 +41,7 @@ class Context extends \Magento\Framework\Module\Setup\Context
      * @param \Magento\Framework\Module\ResourceInterface $resourceResource
      * @param \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory
      * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param PropertyMapperInterface $attributeMapper
      */
     public function __construct(
@@ -53,7 +53,7 @@ class Context extends \Magento\Framework\Module\Setup\Context
         \Magento\Framework\Module\ResourceInterface $resourceResource,
         \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory,
         \Magento\Framework\Encryption\EncryptorInterface $encryptor,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         PropertyMapperInterface $attributeMapper
     ) {
         $this->attributeMapper = $attributeMapper;
diff --git a/app/code/Magento/Eav/README.md b/app/code/Magento/Eav/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..6710044ac6c894d15718536b497271c7fc01a4b8
--- /dev/null
+++ b/app/code/Magento/Eav/README.md
@@ -0,0 +1,2 @@
+Magento\EAV stands for Entity-Attribute-Value. The purpose of Magento\Eav module is to make entities
+configurable/extendable by admin user.
\ No newline at end of file
diff --git a/app/code/Magento/Eav/composer.json b/app/code/Magento/Eav/composer.json
index 60ad78880a4f4180e1ba5b41d83631efb8f0cd4f..82a538e9635553c9b02490d54b972df33b23b629 100644
--- a/app/code/Magento/Eav/composer.json
+++ b/app/code/Magento/Eav/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Email/Model/AbstractTemplate.php b/app/code/Magento/Email/Model/AbstractTemplate.php
index f216daea28818a9f7b630a95e763172b8fbf6362..106e249f281a7076a5c2dc91b127590618220bba 100644
--- a/app/code/Magento/Email/Model/AbstractTemplate.php
+++ b/app/code/Magento/Email/Model/AbstractTemplate.php
@@ -52,14 +52,6 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
      */
     protected $_emulatedDesignConfig = false;
 
-    /**
-     * Initial environment information
-     *
-     * @var \Magento\Framework\Object|null
-     * @see self::_applyDesignConfig()
-     */
-    protected $_initialEnvironmentInfo = null;
-
     /**
      * Package area
      *
@@ -127,7 +119,7 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
         $storeId = is_object($store) ? $store->getId() : $store;
         $area = $designConfig->getArea();
         if (!is_null($storeId)) {
-            $this->_initialEnvironmentInfo = $this->_appEmulation->startEnvironmentEmulation($storeId, $area);
+            $this->_appEmulation->startEnvironmentEmulation($storeId, $area);
         }
         return $this;
     }
@@ -139,10 +131,7 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
      */
     protected function _cancelDesignConfig()
     {
-        if (!empty($this->_initialEnvironmentInfo)) {
-            $this->_appEmulation->stopEnvironmentEmulation($this->_initialEnvironmentInfo);
-            $this->_initialEnvironmentInfo = null;
-        }
+        $this->_appEmulation->stopEnvironmentEmulation();
         return $this;
     }
 
diff --git a/app/code/Magento/Email/Model/BackendTemplate.php b/app/code/Magento/Email/Model/BackendTemplate.php
index d146153758219149497d70d5736363c327a18a4c..df63f8e50fa83297b69d9bfb2cdb2b9592d87a44 100644
--- a/app/code/Magento/Email/Model/BackendTemplate.php
+++ b/app/code/Magento/Email/Model/BackendTemplate.php
@@ -41,7 +41,7 @@ class BackendTemplate extends Template
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Core\Model\App\Emulation $appEmulation
      * @param \Magento\Framework\StoreManagerInterface $storeManager
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
@@ -58,7 +58,7 @@ class BackendTemplate extends Template
         \Magento\Framework\Registry $registry,
         \Magento\Core\Model\App\Emulation $appEmulation,
         \Magento\Framework\StoreManagerInterface $storeManager,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
diff --git a/app/code/Magento/Email/Model/Template.php b/app/code/Magento/Email/Model/Template.php
index 41cce270d9a431214aa52e1baf62195a1454d4b3..d68ab721a2ae683915f985d2a0947979f8070ca6 100644
--- a/app/code/Magento/Email/Model/Template.php
+++ b/app/code/Magento/Email/Model/Template.php
@@ -24,6 +24,7 @@
 namespace Magento\Email\Model;
 
 use Magento\Email\Model\Template\Filter;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filter\Template as FilterTemplate;
 use Magento\Framework\StoreManagerInterface;
 
@@ -135,7 +136,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento
     protected $_sendingException = null;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -176,7 +177,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Core\Model\App\Emulation $appEmulation
      * @param \Magento\Framework\StoreManagerInterface $storeManager
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
@@ -192,7 +193,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento
         \Magento\Framework\Registry $registry,
         \Magento\Core\Model\App\Emulation $appEmulation,
         StoreManagerInterface $storeManager,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
@@ -235,7 +236,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento
         );
         if ($fileName) {
             $uploadDir = \Magento\Backend\Model\Config\Backend\Email\Logo::UPLOAD_DIR;
-            $mediaDirectory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+            $mediaDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA);
             if ($mediaDirectory->isFile($uploadDir . '/' . $fileName)) {
                 return $this->_storeManager->getStore()->getBaseUrl(
                     \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
@@ -333,7 +334,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento
         $templateTypeCode = $templateType == 'html' ? self::TYPE_HTML : self::TYPE_TEXT;
         $this->setTemplateType($templateTypeCode);
 
-        $modulesDirectory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $modulesDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::MODULES);
         $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 590e0b27342a9046960cef2670685c06f2070851..1d500aa4845d3098a7586d3bfd08ee4c4a50bca8 100644
--- a/app/code/Magento/Email/Model/Template/Config/FileResolver.php
+++ b/app/code/Magento/Email/Model/Template/Config/FileResolver.php
@@ -25,6 +25,9 @@
  */
 namespace Magento\Email\Model\Template\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Config\FileIteratorFactory;
+
 class FileResolver implements \Magento\Framework\Config\FileResolverInterface
 {
     /**
@@ -38,14 +41,14 @@ class FileResolver implements \Magento\Framework\Config\FileResolverInterface
     protected $iteratorFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
-     * @param \Magento\Email\Model\Template\Config\FileIteratorFactory $iteratorFactory
+     * @param \Magento\Framework\Filesystem $filesystem
+     * @param \Magento\Framework\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
-        \Magento\Email\Model\Template\Config\FileIteratorFactory $iteratorFactory
+        \Magento\Framework\Filesystem $filesystem,
+        FileIteratorFactory $iteratorFactory
     ) {
-        $this->directoryRead = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->directoryRead = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->iteratorFactory = $iteratorFactory;
     }
 
diff --git a/app/code/Magento/Email/README.md b/app/code/Magento/Email/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b1fb93053d8ee7b748a71099bdeb358c21e5e5c1
--- /dev/null
+++ b/app/code/Magento/Email/README.md
@@ -0,0 +1,4 @@
+# Email
+
+**Email** provides the ability to manage email templates. The templates are used when sending email via the
+*\Magento\Framework\Mail\TransportInterface* implementations.
diff --git a/app/code/Magento/Email/composer.json b/app/code/Magento/Email/composer.json
index 6d50da97432f525910a0f48ce9053be7af475ec9..1549a791c0be2069dc01960ffaf09a9a416550da 100644
--- a/app/code/Magento/Email/composer.json
+++ b/app/code/Magento/Email/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Fedex/composer.json b/app/code/Magento/Fedex/composer.json
index bb05a80c683ffad09062e05c613fc79f455a18d3..fecb102ae3b257b8bef18089df1fb4e2353b0088 100644
--- a/app/code/Magento/Fedex/composer.json
+++ b/app/code/Magento/Fedex/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GiftMessage/README.md b/app/code/Magento/GiftMessage/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..7cc52a2f7cd8a7453ab471d8f1e9d15934d28dfe
--- /dev/null
+++ b/app/code/Magento/GiftMessage/README.md
@@ -0,0 +1 @@
+Magento\GiftMessage module allows to add a message to order or to each ordered item either on frontend or backend.
\ No newline at end of file
diff --git a/app/code/Magento/GiftMessage/Service/V1/Data/Message.php b/app/code/Magento/GiftMessage/Service/V1/Data/Message.php
index 59202b9844dc8152ff9e698f7323f85427afb5fb..e351e8df156a579bccb2435506bb9c54b26b1cef 100644
--- a/app/code/Magento/GiftMessage/Service/V1/Data/Message.php
+++ b/app/code/Magento/GiftMessage/Service/V1/Data/Message.php
@@ -24,26 +24,41 @@
 namespace Magento\GiftMessage\Service\V1\Data;
 
 /**
- * Gift Message data object
+ * Gift message data object.
  *
  * @codeCoverageIgnore
  */
-class Message extends \Magento\Framework\Service\Data\AbstractSimpleObject
+class Message extends \Magento\Framework\Service\Data\AbstractExtensibleObject
 {
+    /**
+     * Gift message ID.
+     */
     const GIFT_MESSAGE_ID = 'gift_message_id';
 
+    /**
+     * Sender name.
+     */
     const SENDER = 'sender';
 
+    /**
+     * Recipient name.
+     */
     const RECIPIENT = 'recipient';
 
+    /**
+     * Message text.
+     */
     const MESSAGE = 'message';
 
+    /**
+     * Customer ID.
+     */
     const CUSTOMER_ID = 'customer_id';
 
     /**
-     * Get gift message id
+     * Returns the gift message ID.
      *
-     * @return int|null
+     * @return int|null Gift message ID. Otherwise, null.
      */
     public function getGiftMessageId()
     {
@@ -51,9 +66,9 @@ class Message extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Get customer id
+     * Returns the customer ID.
      *
-     * @return int|null
+     * @return int|null Customer ID. Otherwise, null.
      */
     public function getCustomerId()
     {
@@ -61,9 +76,9 @@ class Message extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Sender name
+     * Returns the sender name.
      *
-     * @return string
+     * @return string Sender name.
      */
     public function getSender()
     {
@@ -71,9 +86,9 @@ class Message extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Recipient name
+     * Returns the recipient name.
      *
-     * @return string
+     * @return string Recipient name.
      */
     public function getRecipient()
     {
@@ -81,9 +96,9 @@ class Message extends \Magento\Framework\Service\Data\AbstractSimpleObject
     }
 
     /**
-     * Message text
+     * Returns the message text.
      *
-     * @return string
+     * @return string Message text.
      */
     public function getMessage()
     {
diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadService.php b/app/code/Magento/GiftMessage/Service/V1/ReadService.php
index 152f05f061e8c74bf061a71e31ed2882602daf53..85d3f5158608779e95cdaa78f004e13e1e86938e 100644
--- a/app/code/Magento/GiftMessage/Service/V1/ReadService.php
+++ b/app/code/Magento/GiftMessage/Service/V1/ReadService.php
@@ -21,32 +21,42 @@
  * @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\Service\V1;
 
 use Magento\Framework\Exception\NoSuchEntityException;
 
+/**
+ * Shopping cart gift message service object.
+ */
 class ReadService implements ReadServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Message factory.
+     *
      * @var \Magento\GiftMessage\Model\MessageFactory
      */
     protected $messageFactory;
 
     /**
+     * Message mapper.
+     *
      * @var \Magento\GiftMessage\Service\V1\Data\MessageMapper
      */
     protected $messageMapper;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param \Magento\GiftMessage\Model\MessageFactory $messageFactory
-     * @param \Magento\GiftMessage\Service\V1\Data\MessageMapper $messageMapper
+     * Constructs a shopping cart gift message service object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param \Magento\GiftMessage\Model\MessageFactory $messageFactory Message factory.
+     * @param \Magento\GiftMessage\Service\V1\Data\MessageMapper $messageMapper Message mapper.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -59,7 +69,10 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message.
      */
     public function get($cartId)
     {
@@ -78,11 +91,20 @@ class ReadService implements ReadServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @param int $itemId The item ID.
+     * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart.
      */
     public function getItemMessage($cartId, $itemId)
     {
-        /** @var \Magento\Sales\Model\Quote $quote */
+        /**
+         * Quote.
+         *
+         * @var \Magento\Sales\Model\Quote $quote
+         */
         $quote = $this->quoteRepository->get($cartId);
         if (!$item = $quote->getItemById($itemId)) {
             throw new NoSuchEntityException('There is no item with provided id in the cart');
@@ -92,7 +114,11 @@ class ReadService implements ReadServiceInterface
             return null;
         }
 
-        /** @var \Magento\GiftMessage\Model\Message $model */
+        /**
+         * Model.
+         *
+         * @var \Magento\GiftMessage\Model\Message $model
+         */
         $model = $this->messageFactory->create()->load($messageId);
 
         return $this->messageMapper->extractDto($model);
diff --git a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php
index 0ff7a879bac85b86f3a12ad529312d635b24dc87..58a3c7bcb1dfe576c70250a09c9398c39e1c54b6 100644
--- a/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php
+++ b/app/code/Magento/GiftMessage/Service/V1/ReadServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote shipping method read service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,23 +23,26 @@
  */
 namespace Magento\GiftMessage\Service\V1;
 
+/**
+ * Quote shipping method read service interface.
+ */
 interface ReadServiceInterface
 {
     /**
-     * Get gift message for order
+     * Returns the gift message for a specified order.
      *
-     * @param int $cartId
-     * @return \Magento\GiftMessage\Service\V1\Data\Message
+     * @param int $cartId The shopping cart ID.
+     * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message.
      */
     public function get($cartId);
 
     /**
-     * Get gift message for item
+     * Returns the gift message for a specified item in a specified shopping cart.
      *
-     * @param int $cartId
-     * @param int $itemId
-     * @return \Magento\GiftMessage\Service\V1\Data\Message
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
+     * @param int $cartId The shopping cart ID.
+     * @param int $itemId The item ID.
+     * @return \Magento\GiftMessage\Service\V1\Data\Message Gift message.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart.
      */
     public function getItemMessage($cartId, $itemId);
 }
diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteService.php b/app/code/Magento/GiftMessage/Service/V1/WriteService.php
index b603464d644e402d59a2578ec958025486c9b67e..8f32a889e1b5093bdabd367a320079b50708fcb0 100644
--- a/app/code/Magento/GiftMessage/Service/V1/WriteService.php
+++ b/app/code/Magento/GiftMessage/Service/V1/WriteService.php
@@ -21,7 +21,6 @@
  * @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\Service\V1;
 
 use Magento\Framework\Exception\CouldNotSaveException;
@@ -29,39 +28,54 @@ use Magento\Framework\Exception\InputException;
 use Magento\Framework\Exception\State\InvalidTransitionException;
 use Magento\Framework\Exception\NoSuchEntityException;
 
+/**
+ * Gift message write service data object.
+ */
 class WriteService implements WriteServiceInterface
 {
     /**
+     * Quote repository.
+     *
      * @var \Magento\Sales\Model\QuoteRepository
      */
     protected $quoteRepository;
 
     /**
+     * Store manager interface.
+     *
      * @var \Magento\Framework\StoreManagerInterface
      */
     protected $storeManager;
 
     /**
+     * Gift message manager.
+     *
      * @var \Magento\GiftMessage\Model\GiftMessageManager
      */
     protected $giftMessageManager;
 
     /**
+     * Message helper.
+     *
      * @var \Magento\GiftMessage\Helper\Message
      */
     protected $helper;
 
     /**
+     * Product loader.
+     *
      * @var \Magento\Catalog\Service\V1\Product\ProductLoader
      */
     protected $productLoader;
 
     /**
-     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository
-     * @param \Magento\Framework\StoreManagerInterface $storeManager
-     * @param \Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager
-     * @param \Magento\GiftMessage\Helper\Message $helper
-     * @param \Magento\Catalog\Service\V1\Product\ProductLoader $productLoader
+     * Constructs a gift message write service data object.
+     *
+     * @param \Magento\Sales\Model\QuoteRepository $quoteRepository Quote repository.
+     * @param \Magento\Framework\StoreManagerInterface $storeManager Store manager.
+     * @param \Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager Gift message manager.
+     * @param \Magento\GiftMessage\Helper\Message $helper Message helper.
+     * @param \Magento\Catalog\Service\V1\Product\ProductLoader $productLoader Product loader.
      */
     public function __construct(
         \Magento\Sales\Model\QuoteRepository $quoteRepository,
@@ -78,11 +92,22 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @param Data\Message $giftMessage The gift message.
+     * @return bool
+     * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts.
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to virtual
+     * products.
      */
     public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage)
     {
-        /** @var \Magento\Sales\Model\Quote $quote */
+        /**
+         * Quote.
+         *
+         * @var \Magento\Sales\Model\Quote $quote
+         */
         $quote = $this->quoteRepository->get($cartId);
 
         if (0 == $quote->getItemsCount()) {
@@ -98,7 +123,15 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * {@inheritdoc}
+     * {@inheritDoc}
+     *
+     * @param int $cartId The shopping cart ID.
+     * @param Data\Message $giftMessage The gift message.
+     * @param int $itemId The item ID.
+     * @return bool
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to
+     * virtual products.
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified item does not exist in the cart.
      */
     public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId)
     {
@@ -118,15 +151,15 @@ class WriteService implements WriteServiceInterface
     }
 
     /**
-     * Set gift message to item or quote
+     * Sets the gift message to item or quote.
      *
-     * @param \Magento\Sales\Model\Quote $quote
-     * @param string $type
-     * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage
-     * @param null|int $entityId
+     * @param \Magento\Sales\Model\Quote $quote The quote.
+     * @param string $type The type.
+     * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message.
+     * @param null|int $entityId The entity ID.
      * @return void
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
-     * @throws \Magento\Framework\Exception\State\InvalidTransitionException
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message is not available.
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException The billing or shipping address is not set.
      */
     protected function setMessage(\Magento\Sales\Model\Quote $quote, $type, $giftMessage, $entityId = null)
     {
diff --git a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php
index 3c5f17304fe696e37236ea417ef875977538b5b7..5c47d48a746877bbd6f74bd43182e3abaf1da623 100644
--- a/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php
+++ b/app/code/Magento/GiftMessage/Service/V1/WriteServiceInterface.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Quote shipping method read service
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -25,32 +23,37 @@
  */
 namespace Magento\GiftMessage\Service\V1;
 
+/**
+ * Quote shipping method read service.
+ */
 interface WriteServiceInterface
 {
     /**
-     * Set gift message for the entire order
+     * Sets the gift message for an entire order.
      *
-     * @param int $cartId
-     * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage
+     * @param int $cartId The cart ID.
+     * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message.
      * @return bool
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\InputException
-     * @throws \Magento\Framework\Exception\State\InvalidTransitionException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts.
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to
+     * virtual products.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved.
      */
     public function setForQuote($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage);
 
     /**
-     * Set gift message for the item
+     * Sets the gift message for a specified item.
      *
-     * @param int $cartId
-     * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage
-     * @param int $itemId
+     * @param int $cartId The cart ID.
+     * @param \Magento\GiftMessage\Service\V1\Data\Message $giftMessage The gift message.
+     * @param int $itemId The item ID.
      * @return bool
-     * @throws \Magento\Framework\Exception\NoSuchEntityException
-     * @throws \Magento\Framework\Exception\InputException
-     * @throws \Magento\Framework\Exception\State\InvalidTransitionException
-     * @throws \Magento\Framework\Exception\CouldNotSaveException
+     * @throws \Magento\Framework\Exception\NoSuchEntityException The specified cart does not exist.
+     * @throws \Magento\Framework\Exception\InputException You cannot add gift messages to empty carts.
+     * @throws \Magento\Framework\Exception\State\InvalidTransitionException You cannot add gift messages to
+     * virtual products.
+     * @throws \Magento\Framework\Exception\CouldNotSaveException The specified gift message could not be saved.
      */
     public function setForItem($cartId, \Magento\GiftMessage\Service\V1\Data\Message $giftMessage, $itemId);
 }
diff --git a/app/code/Magento/GiftMessage/composer.json b/app/code/Magento/GiftMessage/composer.json
index a8874b7adc9f2dd5fb6d75b13c7f438aa00c2847..2f11b383ee6cad998ed5c4cb3833c597d64f3eb0 100644
--- a/app/code/Magento/GiftMessage/composer.json
+++ b/app/code/Magento/GiftMessage/composer.json
@@ -3,20 +3,20 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-multishipping": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-multishipping": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GoogleAdwords/composer.json b/app/code/Magento/GoogleAdwords/composer.json
index 16feb6d641ab24268050262d99fed2fd39ac404f..b0991ae3b4afc4d6d24a78d46157989bdae2fedb 100644
--- a/app/code/Magento/GoogleAdwords/composer.json
+++ b/app/code/Magento/GoogleAdwords/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GoogleAnalytics/composer.json b/app/code/Magento/GoogleAnalytics/composer.json
index b7019fc78808b1fd89fec60fa06dededc9390d7b..a3c047e0519827e58c953fd54451013942ad389f 100644
--- a/app/code/Magento/GoogleAnalytics/composer.json
+++ b/app/code/Magento/GoogleAnalytics/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GoogleOptimizer/composer.json b/app/code/Magento/GoogleOptimizer/composer.json
index e69eeb805ea273d323987737f88e050339ecc8eb..2b1c7d83207c0d7fc01717cc171b86000079b604 100644
--- a/app/code/Magento/GoogleOptimizer/composer.json
+++ b/app/code/Magento/GoogleOptimizer/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-google-analytics": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-google-analytics": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GoogleShopping/composer.json b/app/code/Magento/GoogleShopping/composer.json
index 49053185f4489b05af68e0a76826d2c76ddfe02c..b099630b9d541a9891aae44a479b0fd49853f12e 100644
--- a/app/code/Magento/GoogleShopping/composer.json
+++ b/app/code/Magento/GoogleShopping/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GroupedImportExport/composer.json b/app/code/Magento/GroupedImportExport/composer.json
index 73f91ed761ae1efc908b46bb7c07e6de5a88487b..d30281c772946b4afebe9c26fbc26f989859d79a 100644
--- a/app/code/Magento/GroupedImportExport/composer.json
+++ b/app/code/Magento/GroupedImportExport/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-import-export": "0.1.0-alpha100",
-        "magento/module-catalog-import-export": "0.1.0-alpha100",
-        "magento/module-grouped-product": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-import-export": "0.1.0-alpha101",
+        "magento/module-catalog-import-export": "0.1.0-alpha101",
+        "magento/module-grouped-product": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
index b4e77702c70ee302fa1ae4a0983571abbd24cb5e..b9db093d79e7ee698c97e58b08f213bd2ecd023e 100644
--- a/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
+++ b/app/code/Magento/GroupedProduct/Model/Product/Type/Grouped.php
@@ -104,7 +104,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
      * @param \Magento\Framework\Event\ManagerInterface $eventManager
      * @param \Magento\Core\Helper\Data $coreData
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDb
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\Logger $logger
      * @param \Magento\GroupedProduct\Model\Resource\Product\Link $catalogProductLink
@@ -124,7 +124,7 @@ class Grouped extends \Magento\Catalog\Model\Product\Type\AbstractType
         \Magento\Framework\Event\ManagerInterface $eventManager,
         \Magento\Core\Helper\Data $coreData,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDb,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\Logger $logger,
         \Magento\GroupedProduct\Model\Resource\Product\Link $catalogProductLink,
diff --git a/app/code/Magento/GroupedProduct/composer.json b/app/code/Magento/GroupedProduct/composer.json
index c938f3e455507d041c2af7a6ee5c8ccf2360803e..09b353c83260e9cb96092173c23d4685bcfead53 100644
--- a/app/code/Magento/GroupedProduct/composer.json
+++ b/app/code/Magento/GroupedProduct/composer.json
@@ -3,21 +3,21 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-msrp": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-msrp": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/Export.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/Export.php
index c6bc35cf35df2b08c03ee9c2127a2e48d0a5a8b9..ac5ef756db91d75e471ef4b7488c64cf25564fcb 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Export/Export.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Export/Export.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\ImportExport\Controller\Adminhtml\Export;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Export extends \Magento\ImportExport\Controller\Adminhtml\Export
 {
     /**
@@ -59,7 +61,7 @@ class Export extends \Magento\ImportExport\Controller\Adminhtml\Export
                 return $this->_fileFactory->create(
                     $model->getFileName(),
                     $model->export(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     $model->getContentType()
                 );
             } catch (\Magento\Framework\Model\Exception $e) {
diff --git a/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Validate.php b/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Validate.php
index 1e8f33681f4a808f5e33e59f94451821f8ca39e5..339c4e8c2bb15e74dc5641972477a61b18f381c2 100644
--- a/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Validate.php
+++ b/app/code/Magento/ImportExport/Controller/Adminhtml/Import/Validate.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\ImportExport\Controller\Adminhtml\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Validate extends \Magento\ImportExport\Controller\Adminhtml\Import
 {
     /**
@@ -93,9 +95,9 @@ class Validate extends \Magento\ImportExport\Controller\Adminhtml\Import
                 $source = \Magento\ImportExport\Model\Import\Adapter::findAdapterFor(
                     $import->uploadSource(),
                     $this->_objectManager->create(
-                        'Magento\Framework\App\Filesystem'
+                        'Magento\Framework\Filesystem'
                     )->getDirectoryWrite(
-                        \Magento\Framework\App\Filesystem::ROOT_DIR
+                        DirectoryList::ROOT
                     )
                 );
                 $validationResult = $import->validateSource($source);
diff --git a/app/code/Magento/ImportExport/Model/AbstractModel.php b/app/code/Magento/ImportExport/Model/AbstractModel.php
index 5b462258648f6ba0df7abc38450fbf70d5003612..0f8178a709b9c8cd36c0b388610446c007d0a884 100644
--- a/app/code/Magento/ImportExport/Model/AbstractModel.php
+++ b/app/code/Magento/ImportExport/Model/AbstractModel.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\ImportExport\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Operation abstract class
  *
@@ -74,18 +76,18 @@ abstract class AbstractModel extends \Magento\Framework\Object
 
     /**
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Logger\AdapterFactory $adapterFactory
      * @param array $data
      */
     public function __construct(
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Logger\AdapterFactory $adapterFactory,
         array $data = array()
     ) {
         $this->_logger = $logger;
-        $this->_varDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->_varDirectory = $filesystem->getDirectoryWrite(DirectoryList::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 aa6d25a9e50e9393cc550c058a7d06b021826619..f157d656949355b8834a6559053a25c29d0bbb2d 100644
--- a/app/code/Magento/ImportExport/Model/Export.php
+++ b/app/code/Magento/ImportExport/Model/Export.php
@@ -76,7 +76,7 @@ class Export extends \Magento\ImportExport\Model\AbstractModel
 
     /**
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Logger\AdapterFactory $adapterFactory
      * @param \Magento\ImportExport\Model\Export\ConfigInterface $exportConfig
      * @param \Magento\ImportExport\Model\Export\Entity\Factory $entityFactory
@@ -85,7 +85,7 @@ class Export extends \Magento\ImportExport\Model\AbstractModel
      */
     public function __construct(
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Logger\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 d2451cea910f5dfdc8e5c455f7cb260984533f9b..4524228d97d0d25f0def10e4a1663c057614dfbe 100644
--- a/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php
+++ b/app/code/Magento/ImportExport/Model/Export/Adapter/AbstractAdapter.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\ImportExport\Model\Export\Adapter;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\DirectoryList;
+
 /**
  * Abstract adapter model
  *
@@ -52,13 +55,13 @@ abstract class AbstractAdapter
     /**
      * Constructor
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string|null $destination
      * @throws \Magento\Framework\Model\Exception
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, $destination = null)
+    public function __construct(\Magento\Framework\Filesystem $filesystem, $destination = null)
     {
-        $this->_directoryHandle = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+        $this->_directoryHandle = $filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);
         if (!$destination) {
             $destination = uniqid('importexport_');
             $this->_directoryHandle->touch($destination);
diff --git a/app/code/Magento/ImportExport/Model/Import.php b/app/code/Magento/ImportExport/Model/Import.php
index aa3b560b680f0073d8b60a20a07f575ccb693e7e..ade0deb91743920bd19bf2d6d8ec105c945fea48 100644
--- a/app/code/Magento/ImportExport/Model/Import.php
+++ b/app/code/Magento/ImportExport/Model/Import.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\ImportExport\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\HTTP\Adapter\FileTransferFactory;
 
 /**
@@ -123,13 +124,13 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
     protected $_behaviorFactory;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Logger\AdapterFactory $adapterFactory
      * @param \Magento\ImportExport\Helper\Data $importExportData
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig
@@ -145,7 +146,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
      */
     public function __construct(
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Logger\AdapterFactory $adapterFactory,
         \Magento\ImportExport\Helper\Data $importExportData,
         \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig,
@@ -227,7 +228,7 @@ class Import extends \Magento\ImportExport\Model\AbstractModel
     {
         return \Magento\ImportExport\Model\Import\Adapter::findAdapterFor(
             $sourceFile,
-            $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT)
         );
     }
 
diff --git a/app/code/Magento/ImportExport/composer.json b/app/code/Magento/ImportExport/composer.json
index a5d8e062ae64a8b37f0d4f689c9274900197bcbb..0905015002e8b7b94b107615c4cf50d46a8fece8 100644
--- a/app/code/Magento/ImportExport/composer.json
+++ b/app/code/Magento/ImportExport/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-indexer": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-indexer": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "ext-ctype": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Indexer/App/Indexer.php b/app/code/Magento/Indexer/App/Indexer.php
index f84527f37f3d043413e9e8401160e0b3737eb6fd..d5c9766df1814d938f9a36d92750ec60ae492863 100644
--- a/app/code/Magento/Indexer/App/Indexer.php
+++ b/app/code/Magento/Indexer/App/Indexer.php
@@ -24,6 +24,7 @@
 namespace Magento\Indexer\App;
 
 use Magento\Framework\App;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class Indexer implements \Magento\Framework\AppInterface
 {
@@ -62,7 +63,7 @@ class Indexer implements \Magento\Framework\AppInterface
     public function launch()
     {
         /* Clean reports */
-        $directory = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $this->filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $path = $directory->getRelativePath($this->reportDir);
         if ($directory->isExist($path)) {
             $directory->delete($path);
diff --git a/app/code/Magento/Indexer/Model/Shell.php b/app/code/Magento/Indexer/Model/Shell.php
index c3ae9859d419a23deb336de0b3b2dc184c9f569a..d687c487d4c440f2ee6c4afd085031c2712b9b54 100644
--- a/app/code/Magento/Indexer/Model/Shell.php
+++ b/app/code/Magento/Indexer/Model/Shell.php
@@ -43,13 +43,13 @@ class Shell extends \Magento\Framework\App\AbstractShell
     protected $indexerFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $entryPoint
      * @param Indexer\CollectionFactory $indexersFactory
      * @param IndexerFactory $indexerFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $entryPoint,
         Indexer\CollectionFactory $indexersFactory,
         IndexerFactory $indexerFactory
diff --git a/app/code/Magento/Indexer/composer.json b/app/code/Magento/Indexer/composer.json
index 6636bc52c354f5032f6d2af9d21326572ab02f45..a7011031a7b8e050550e58ed8e2abdb0b8552590 100644
--- a/app/code/Magento/Indexer/composer.json
+++ b/app/code/Magento/Indexer/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-page-cache": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-page-cache": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Install/App/Console.php b/app/code/Magento/Install/App/Console.php
index 37ecc5abf2004101796c1cec80faed1da68e38fa..18073a557882c5fcb39bef6831514ce6eefe0dda 100644
--- a/app/code/Magento/Install/App/Console.php
+++ b/app/code/Magento/Install/App/Console.php
@@ -27,6 +27,7 @@ namespace Magento\Install\App;
 
 use Magento\Framework\App\Console\Response;
 use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class Console implements \Magento\Framework\AppInterface
 {
@@ -72,7 +73,7 @@ class Console implements \Magento\Framework\AppInterface
      * @param \Magento\Framework\App\State $state
      * @param \Magento\Framework\App\ObjectManager\ConfigLoader $loader
      * @param \Magento\Framework\ObjectManager $objectManager
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param Response $response
      * @param array $arguments
      */
@@ -82,11 +83,11 @@ class Console implements \Magento\Framework\AppInterface
         \Magento\Framework\App\State $state,
         \Magento\Framework\App\ObjectManager\ConfigLoader $loader,
         \Magento\Framework\ObjectManager $objectManager,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         Response $response,
         array $arguments = array()
     ) {
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->_loader = $loader;
         $this->_state = $state;
         $this->_installerFactory = $installerFactory;
diff --git a/app/code/Magento/Install/Block/Download.php b/app/code/Magento/Install/Block/Download.php
index 85cbd6e21ab38126422a34122ec465502a41d05e..45b259d6740f8d52821d0efe1d55060dc181c97c 100644
--- a/app/code/Magento/Install/Block/Download.php
+++ b/app/code/Magento/Install/Block/Download.php
@@ -29,6 +29,8 @@
  */
 namespace Magento\Install\Block;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Download extends \Magento\Install\Block\AbstractBlock
 {
     /**
@@ -85,7 +87,7 @@ class Download extends \Magento\Install\Block\AbstractBlock
     public function hasLocalCopy()
     {
         $path = $this->_moduleReader->getModuleDir('etc', 'Magento_Adminhtml');
-        $directory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $directory = $this->_filesystem->getDirectoryRead(DirectoryList::MODULES);
 
         if ($path && $directory->isDirectory($directory->getRelativePath($path))) {
             return true;
diff --git a/app/code/Magento/Install/Model/Config.php b/app/code/Magento/Install/Model/Config.php
index 3ce4e3283ddd7a0708a8a9e82fc6b08e5c31e0ce..edde8e3bdaf72133ec50acee4297f16279e1bd1e 100644
--- a/app/code/Magento/Install/Model/Config.php
+++ b/app/code/Magento/Install/Model/Config.php
@@ -41,7 +41,7 @@ class Config
     /**
      * Filesystem
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -49,9 +49,9 @@ class Config
      * Constructor
      *
      * @param Config\Data $dataStorage
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
-    public function __construct(\Magento\Install\Model\Config\Data $dataStorage, \Magento\Framework\App\Filesystem $filesystem)
+    public function __construct(\Magento\Install\Model\Config\Data $dataStorage, \Magento\Framework\Filesystem $filesystem)
     {
         $this->_dataStorage = $dataStorage;
         $this->filesystem = $filesystem;
@@ -125,7 +125,7 @@ class Config
         ) ? $data['filesystem_prerequisites']['writables'] : array();
         foreach ($items as $nodeKey => $item) {
             $value = $item;
-            $value['path'] = $this->filesystem->getPath($nodeKey);
+            $value['path'] = $this->filesystem->getDirectoryWrite($nodeKey)->getAbsolutePath();
             $paths[$nodeKey] = $value;
         }
 
diff --git a/app/code/Magento/Install/Model/Installer/Config.php b/app/code/Magento/Install/Model/Installer/Config.php
index a8940519f1ec9a91d07101b1cb55beba882f4e94..5176dd7b6f63ebc6455cfac5354adce74eee60d8 100644
--- a/app/code/Magento/Install/Model/Installer/Config.php
+++ b/app/code/Magento/Install/Model/Installer/Config.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Install\Model\Installer;
 
+use Magento\Framework\Filesystem as AppFilesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Config installer
  */
@@ -45,7 +48,7 @@ class Config
     protected $_request;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var AppFilesystem
      */
     protected $_filesystem;
 
@@ -73,21 +76,21 @@ class Config
 
     /**
      * @param \Magento\Framework\App\RequestInterface $request
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param AppFilesystem $filesystem
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Framework\Message\ManagerInterface $messageManager
      */
     public function __construct(
         \Magento\Framework\App\RequestInterface $request,
-        \Magento\Framework\App\Filesystem $filesystem,
+        AppFilesystem $filesystem,
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Framework\Message\ManagerInterface $messageManager
     ) {
         $this->_request = $request;
         $this->_storeManager = $storeManager;
         $this->_filesystem = $filesystem;
-        $this->_pubDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::PUB_DIR);
-        $this->_configDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::CONFIG_DIR);
+        $this->_pubDirectory = $filesystem->getDirectoryRead(DirectoryList::PUB);
+        $this->_configDirectory = $filesystem->getDirectoryWrite(DirectoryList::CONFIG);
         $this->messageManager = $messageManager;
     }
 
@@ -100,9 +103,9 @@ class Config
     public function install($config)
     {
         $defaults = array(
-            'root_dir' => $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR),
-            'app_dir' => $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::APP_DIR),
-            'var_dir' => $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR),
+            'root_dir' => $this->_filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath(),
+            'app_dir' => $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath(),
+            'var_dir' => $this->_filesystem->getDirectoryRead(DirectoryList::VAR_DIR)->getAbsolutePath(),
             'base_url' => $this->_request->getDistroBaseUrl()
         );
         foreach ($defaults as $index => $value) {
@@ -198,9 +201,7 @@ class Config
     {
         try {
             $staticFile = $this->_findFirstFileRelativePath('', '/.+\.(html?|js|css|gif|jpe?g|png)$/');
-            $staticUrl = $baseUrl . $this->_filesystem->getUri(
-                \Magento\Framework\App\Filesystem::PUB_DIR
-            ) . '/' . $staticFile;
+            $staticUrl = $baseUrl . $this->_filesystem->getUri(DirectoryList::PUB) . '/' . $staticFile;
             $client = new \Magento\Framework\HTTP\ZendClient($staticUrl);
             $response = $client->request('GET');
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Install/Model/Installer/Filesystem.php b/app/code/Magento/Install/Model/Installer/Filesystem.php
index 69534670555951f8783efc63680ecf386536b551..0a5554f6fdd3671a8ed344d563dc0be704413c3d 100644
--- a/app/code/Magento/Install/Model/Installer/Filesystem.php
+++ b/app/code/Magento/Install/Model/Installer/Filesystem.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Install\Model\Installer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Filesystem installer
  */
@@ -38,7 +40,7 @@ class Filesystem
     /**#@- */
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -62,12 +64,12 @@ class Filesystem
     protected $messageManager;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Install\Model\Config $installConfig
      * @param \Magento\Framework\Message\ManagerInterface $messageManager
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Install\Model\Config $installConfig,
         \Magento\Framework\Message\ManagerInterface $messageManager
     ) {
@@ -122,7 +124,7 @@ class Filesystem
     protected function _checkFullPath($fullPath, $recursive, $existence)
     {
         $result = true;
-        $directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $path = $directory->getRelativePath($fullPath);
         if ($recursive && $directory->isDirectory($path)) {
             $pathsToCheck = $directory->read($path);
diff --git a/app/code/Magento/Install/Model/Uninstaller.php b/app/code/Magento/Install/Model/Uninstaller.php
index 2af58797e3fc57659b313936bedf60ac3ab8a34e..1b10a831c0920bbdf65477227dad2e39068f2745 100644
--- a/app/code/Magento/Install/Model/Uninstaller.php
+++ b/app/code/Magento/Install/Model/Uninstaller.php
@@ -24,7 +24,8 @@
 
 namespace Magento\Install\Model;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\FilesystemException;
 
 /**
@@ -80,8 +81,8 @@ class Uninstaller
         $this->log('Starting uninstall');
         $this->recreateDatabase();
         $this->log('File system cleanup:');
-        $this->deleteDirContents(Filesystem::VAR_DIR);
-        $this->deleteDirContents(Filesystem::STATIC_VIEW_DIR);
+        $this->deleteDirContents(DirectoryList::VAR_DIR);
+        $this->deleteDirContents(DirectoryList::STATIC_VIEW);
         $this->deleteLocalXml();
         $this->log('Uninstall complete.');
     }
@@ -144,7 +145,7 @@ class Uninstaller
      */
     protected function deleteLocalXml()
     {
-        $configDir = $this->filesystem->getDirectoryWrite(Filesystem::CONFIG_DIR);
+        $configDir = $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG);
         $localXml = "{$configDir->getAbsolutePath()}local.xml";
         if (!$configDir->isFile('local.xml')) {
             $this->log("The file '{$localXml}' doesn't exist - skipping cleanup");
diff --git a/app/code/Magento/Install/composer.json b/app/code/Magento/Install/composer.json
index 2e2a0f33021850a703d6d4159ef5a894fc912f8d..68903158c40f5d6392d2a21e81b5d9af0291c29d 100644
--- a/app/code/Magento/Install/composer.json
+++ b/app/code/Magento/Install/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-user": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-user": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Integration/README.md b/app/code/Magento/Integration/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..2e4ebb5bf55e1f831ca1e394051e407574e5e4e9
--- /dev/null
+++ b/app/code/Magento/Integration/README.md
@@ -0,0 +1,6 @@
+# Integration
+
+**Integration** provides the ability for 3rd party services to call the Web API using access tokens.
+It provides the UI to add an integration manually in the admin backend. Extensions can also provide a configuration
+file so that an integration can be automatically pre-configured. The module also contains the data
+model and management for request and access tokens.
diff --git a/app/code/Magento/Integration/composer.json b/app/code/Magento/Integration/composer.json
index 8cdd5069e8056968a86bb1354465f1c5ffe777d7..68c297e7be756d005549a11b375b06b51c58fd06 100644
--- a/app/code/Magento/Integration/composer.json
+++ b/app/code/Magento/Integration/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-user": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
-        "magento/module-authorization": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-user": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
+        "magento/module-authorization": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/LayeredNavigation/composer.json b/app/code/Magento/LayeredNavigation/composer.json
index a657286e691dff0fd57ed6b15d40610dd9ecdf09..96aa757a73d537b910057ea96e0967855d7857f1 100644
--- a/app/code/Magento/LayeredNavigation/composer.json
+++ b/app/code/Magento/LayeredNavigation/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Log/Model/Shell.php b/app/code/Magento/Log/Model/Shell.php
index f3120fea330492a7d4b3d1865ae1f1c6b8781601..9f35fc1fe731aeae8b3e5441b4665d08c55d1aad 100644
--- a/app/code/Magento/Log/Model/Shell.php
+++ b/app/code/Magento/Log/Model/Shell.php
@@ -36,12 +36,12 @@ class Shell extends \Magento\Framework\App\AbstractShell
     protected $_commandFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $entryPoint
      * @param \Magento\Log\Model\Shell\Command\Factory $commandFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $entryPoint,
         \Magento\Log\Model\Shell\Command\Factory $commandFactory
     ) {
diff --git a/app/code/Magento/Log/Model/Visitor.php b/app/code/Magento/Log/Model/Visitor.php
index ae58e1f065840c7ac1fc91a7c7511ebd5484b68c..915a77c20f65ff1eb46179021574f1445791e8f8 100644
--- a/app/code/Magento/Log/Model/Visitor.php
+++ b/app/code/Magento/Log/Model/Visitor.php
@@ -234,4 +234,33 @@ class Visitor extends \Magento\Framework\Model\AbstractModel
         }
         return $this;
     }
+
+    /**
+     * Save object data
+     *
+     * @return $this
+     * @throws \Exception
+     */
+    public function save()
+    {
+        if ($this->isDeleted()) {
+            return $this->delete();
+        }
+        if (!$this->_hasModelChanged()) {
+            return $this;
+        }
+        try {
+            $this->_validateBeforeSave();
+            $this->_beforeSave();
+            if ($this->_dataSaveAllowed) {
+                $this->_getResource()->save($this);
+                $this->_afterSave();
+            }
+            $this->_hasDataChanges = false;
+        } catch (\Exception $e) {
+            $this->_hasDataChanges = true;
+            throw $e;
+        }
+        return $this;
+    }
 }
diff --git a/app/code/Magento/Log/README.md b/app/code/Magento/Log/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..28fa82899cefc4c818dee8b63ac3660ea01610e3
--- /dev/null
+++ b/app/code/Magento/Log/README.md
@@ -0,0 +1,2 @@
+The Log module is used to track online users, including both registered customers and visitors.
+Information such as customer name (if registered), session start time, time of last activity and last visited URL are recorded.
\ No newline at end of file
diff --git a/app/code/Magento/Log/composer.json b/app/code/Magento/Log/composer.json
index 476ac89353cc0117bb7fb8118795d188ac7b9342..dd51872c27b5c9e55871adc33bad445019ff23fa 100644
--- a/app/code/Magento/Log/composer.json
+++ b/app/code/Magento/Log/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Msrp/composer.json b/app/code/Magento/Msrp/composer.json
index bfeb9c52ac141aeb22d6f75392089b643554fe0a..393cf94bcb9ffe8cb78f62e80c7c78ca57dc81db 100644
--- a/app/code/Magento/Msrp/composer.json
+++ b/app/code/Magento/Msrp/composer.json
@@ -3,21 +3,21 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-bundle": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-configurable-product": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-downloadable": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-grouped-product": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-bundle": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-configurable-product": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-downloadable": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-grouped-product": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Multishipping/README.md b/app/code/Magento/Multishipping/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..207416a09455441670331dc31fad3ad071043000
--- /dev/null
+++ b/app/code/Magento/Multishipping/README.md
@@ -0,0 +1,2 @@
+Magento\Multishipping module provides functionality that allows customer to request shipping to more than one address
+using different carriers. The module provides alternative to standard checkout flow.
\ No newline at end of file
diff --git a/app/code/Magento/Multishipping/composer.json b/app/code/Magento/Multishipping/composer.json
index 7feeefd3abf038ef81392d17d3189c5ef4ec12c5..2afe71ca06bc993466de7d1e26eb09d23c450f66 100644
--- a/app/code/Magento/Multishipping/composer.json
+++ b/app/code/Magento/Multishipping/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportCsv.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportCsv.php
index 264b8c16f0c19ba8a41bca153a8e9f32ef1e84fd..bb09c007d39453c9bee30f57f27b10679cd6756a 100644
--- a/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportCsv.php
+++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Newsletter\Controller\Adminhtml\Subscriber;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCsv extends \Magento\Newsletter\Controller\Adminhtml\Subscriber
@@ -42,7 +43,7 @@ class ExportCsv extends \Magento\Newsletter\Controller\Adminhtml\Subscriber
         return $this->_fileFactory->create(
             $fileName,
             $content->getCsvFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportXml.php b/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportXml.php
index ac4a4f970fc8dcaeced1b6bb04debe0278460c91..780750ce480d034b92da3afd433a79d4f9277d90 100644
--- a/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportXml.php
+++ b/app/code/Magento/Newsletter/Controller/Adminhtml/Subscriber/ExportXml.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Newsletter\Controller\Adminhtml\Subscriber;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportXml extends \Magento\Newsletter\Controller\Adminhtml\Subscriber
@@ -41,7 +42,7 @@ class ExportXml extends \Magento\Newsletter\Controller\Adminhtml\Subscriber
         return $this->_fileFactory->create(
             $fileName,
             $content->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Newsletter/composer.json b/app/code/Magento/Newsletter/composer.json
index b65ce76e9158a62789f311b6000695532976e078..91cd02eaba6e63927dc48b333d43d5eb8b9a39c3 100644
--- a/app/code/Magento/Newsletter/composer.json
+++ b/app/code/Magento/Newsletter/composer.json
@@ -3,20 +3,20 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-widget": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-email": "0.1.0-alpha100",
-        "magento/module-cron": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-widget": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-email": "0.1.0-alpha101",
+        "magento/module-cron": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/OfflinePayments/composer.json b/app/code/Magento/OfflinePayments/composer.json
index 9ac8c14f47a9bd621e7af688bf4bf06babbd2dc5..1296d8eb4dbbe3efe20ddb67128a1aa9a83d3dc0 100644
--- a/app/code/Magento/OfflinePayments/composer.json
+++ b/app/code/Magento/OfflinePayments/composer.json
@@ -3,12 +3,12 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/OfflineShipping/Controller/Adminhtml/System/Config/ExportTablerates.php b/app/code/Magento/OfflineShipping/Controller/Adminhtml/System/Config/ExportTablerates.php
index 4a8cea06b6e59a73cfca67018b584dfefb95bd00..a6da06781136a31c8c3eb28c20da1df1c21c3ac9 100644
--- a/app/code/Magento/OfflineShipping/Controller/Adminhtml/System/Config/ExportTablerates.php
+++ b/app/code/Magento/OfflineShipping/Controller/Adminhtml/System/Config/ExportTablerates.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\OfflineShipping\Controller\Adminhtml\System\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use Magento\Backend\Controller\Adminhtml\System\ConfigSectionChecker;
 
@@ -78,6 +79,6 @@ class ExportTablerates extends \Magento\Backend\Controller\Adminhtml\System\Abst
         }
         $gridBlock->setWebsiteId($website->getId())->setConditionName($conditionName);
         $content = $gridBlock->getCsvFile();
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php
index 57b8b45a52200f45bea78332c8d02ac3e1710b64..e2f7f0b1d131861f4564bc1c4fb92f40e201b6ab 100644
--- a/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php
+++ b/app/code/Magento/OfflineShipping/Model/Resource/Carrier/Tablerate.php
@@ -29,6 +29,9 @@
  */
 namespace Magento\OfflineShipping\Model\Resource\Carrier;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\DirectoryList;
+
 class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb
 {
     /**
@@ -128,7 +131,7 @@ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -140,7 +143,7 @@ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb
      * @param \Magento\OfflineShipping\Model\Carrier\Tablerate $carrierTablerate
      * @param \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory
      * @param \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\App\Resource $resource,
@@ -150,7 +153,7 @@ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb
         \Magento\OfflineShipping\Model\Carrier\Tablerate $carrierTablerate,
         \Magento\Directory\Model\Resource\Country\CollectionFactory $countryCollectionFactory,
         \Magento\Directory\Model\Resource\Region\CollectionFactory $regionCollectionFactory,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         parent::__construct($resource);
         $this->_coreConfig = $coreConfig;
@@ -271,7 +274,7 @@ class Tablerate extends \Magento\Framework\Model\Resource\Db\AbstractDb
         $this->_importErrors = array();
         $this->_importedRows = 0;
 
-        $tmpDirectory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+        $tmpDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::SYS_TMP);
         $path = $tmpDirectory->getRelativePath($csvFile);
         $stream = $tmpDirectory->openFile($path);
 
diff --git a/app/code/Magento/OfflineShipping/composer.json b/app/code/Magento/OfflineShipping/composer.json
index f86e484363a3641adadfc7a2c3cc887b1ccda00c..7e76bd9cad1a1a538137b42a374ab0ad04445c63 100644
--- a/app/code/Magento/OfflineShipping/composer.json
+++ b/app/code/Magento/OfflineShipping/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-sales-rule": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-sales-rule": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Ogone/composer.json b/app/code/Magento/Ogone/composer.json
index 2dd0962186cbde8448571c7de0c5c8f3010dd994..4c0e0a5e85fa33203bed3df76b5972f506ec4444 100644
--- a/app/code/Magento/Ogone/composer.json
+++ b/app/code/Magento/Ogone/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfig.php b/app/code/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfig.php
index 5816ddbd41d59fd80bb78d8ba41c52f852a8b7cb..3bb5161d658660e5336510f612c891b3a0d8a1d6 100644
--- a/app/code/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfig.php
+++ b/app/code/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfig.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\PageCache\Controller\Adminhtml\PageCache;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ExportVarnishConfig extends \Magento\Backend\App\Action
 {
     /**
@@ -60,6 +62,6 @@ class ExportVarnishConfig extends \Magento\Backend\App\Action
     {
         $fileName = 'varnish.vcl';
         $content = $this->config->getVclFile();
-        return $this->fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/PageCache/Model/Config.php b/app/code/Magento/PageCache/Model/Config.php
index a137df12e57b3c4a20be0fe3f6fdeeca7b7eceef..9c340443d98b6dc09a16a4fc10c8e2d642d0076f 100644
--- a/app/code/Magento/PageCache/Model/Config.php
+++ b/app/code/Magento/PageCache/Model/Config.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\PageCache\Model;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Model is responsible for replacing default vcl template
@@ -86,11 +87,11 @@ class Config
      * @param \Magento\Framework\App\Cache\StateInterface $cacheState
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Framework\App\Cache\StateInterface $cacheState
     ) {
-        $this->_modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->_modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->_scopeConfig = $scopeConfig;
         $this->_cacheState = $cacheState;
     }
diff --git a/app/code/Magento/PageCache/README.md b/app/code/Magento/PageCache/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..1b109926fd9f064bbc0b9d86acae7ff18582afba
--- /dev/null
+++ b/app/code/Magento/PageCache/README.md
@@ -0,0 +1,4 @@
+The PageCache module provides functionality of caching full pages content in Magento application. An administrator may switch between built-in caching and Varnish caching. Built-in caching is default and ready to use without the need of any external tools.
+Requests and responses are managed by PageCache plugin. It loads data from cache and returns a response. If data is not present in cache, it passes the request to Magento and waits for the response. Response is then saved in cache.
+Blocks can be set as private blocks by setting the property '_isScopePrivate' to true. These blocks contain personalized information and are not cached in the server. These blocks are being rendered using AJAX call after the page is loaded. Contents are cached in browser instead.
+Blocks can also be set as non-cacheable by setting the 'cacheable' attribute in layout XML files. For example `<block class="Block\Class" name="blockname" cacheable="false" />`. Pages containing such blocks are not cached.
\ No newline at end of file
diff --git a/app/code/Magento/PageCache/composer.json b/app/code/Magento/PageCache/composer.json
index 1ee2ef856d9739b242bb82514ee417272cd57770..a7436ff43866cf07ba2518735b48cc7a2f4b2376 100644
--- a/app/code/Magento/PageCache/composer.json
+++ b/app/code/Magento/PageCache/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/PayPalRecurringPayment/composer.json b/app/code/Magento/PayPalRecurringPayment/composer.json
index a26aa7f6470be30064f160d4be1aa7fd6dd28107..469fa538aaff615ea5fc4ac528c7993632f51fb4 100644
--- a/app/code/Magento/PayPalRecurringPayment/composer.json
+++ b/app/code/Magento/PayPalRecurringPayment/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-paypal": "0.1.0-alpha100",
-        "magento/module-recurring-payment": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-paypal": "0.1.0-alpha101",
+        "magento/module-recurring-payment": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Payment/Helper/Data.php b/app/code/Magento/Payment/Helper/Data.php
index 1dc29b8dccd1f5b626677fdb6c515dd7596a8b5f..f4e6db4ef45f23ec9279b346a8eef083331fef64 100644
--- a/app/code/Magento/Payment/Helper/Data.php
+++ b/app/code/Magento/Payment/Helper/Data.php
@@ -29,6 +29,8 @@ use Magento\Payment\Block\Form;
 use Magento\Payment\Model\Info;
 use Magento\Framework\View\Element\Template;
 use Magento\Framework\View\LayoutInterface;
+use Magento\Payment\Model\Method\AbstractMethod;
+use Magento\Payment\Model\MethodInterface;
 
 /**
  * Payment module base helper
@@ -104,45 +106,53 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
         $this->_initialConfig = $initialConfig;
     }
 
+    /**
+     * @param string $code
+     * @return string
+     */
+    protected function getMethodModelConfigName($code)
+    {
+        return sprintf('%s/%s/model', self::XML_PATH_PAYMENT_METHODS, $code);
+    }
+
     /**
      * Retrieve method model object
      *
      * @param string $code
-     * @return \Magento\Payment\Model\MethodInterface|false
+     * @return MethodInterface|false
      */
     public function getMethodInstance($code)
     {
-        $key = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/model';
-        $class = $this->_scopeConfig->getValue($key, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
+        $class = $this->_scopeConfig->getValue(
+            $this->getMethodModelConfigName($code),
+            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
+        );
         return $class ? $this->_methodFactory->create($class) : false;
     }
 
     /**
      * Get and sort available payment methods for specified or current store
      *
-     * Array structure:
-     *  $index => \Magento\Framework\Simplexml\Element
-     *
      * @param null|string|bool|int|Store $store
      * @param Quote|null $quote
      * @return array
      */
     public function getStoreMethods($store = null, $quote = null)
     {
-        $res = array();
+        $res = [];
         $methods = $this->getPaymentMethods();
 
-        foreach ($methods as $code => $methodConfig) {
-            $prefix = self::XML_PATH_PAYMENT_METHODS . '/' . $code . '/';
-            if (!($model = $this->_scopeConfig->getValue(
-                $prefix . 'model',
+        foreach (array_keys($methods) as $code) {
+            $model = $this->_scopeConfig->getValue(
+                $this->getMethodModelConfigName($code),
                 \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
                 $store
-            ))
-            ) {
+            );
+            if (!$model) {
                 continue;
             }
 
+            /** @var AbstractMethod $methodInstance */
             $methodInstance = $this->_methodFactory->create($model);
             $methodInstance->setStore($store);
             if (!$methodInstance->isAvailable($quote)) {
@@ -162,8 +172,8 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * Sort payments methods
      *
-     * @param \Magento\Payment\Model\MethodInterface $a
-     * @param \Magento\Payment\Model\MethodInterface $b
+     * @param MethodInterface $a
+     * @param MethodInterface $b
      * @return int
      */
     protected function _sortMethods($a, $b)
@@ -176,18 +186,14 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * Retrieve payment method form html
      *
-     * @param \Magento\Payment\Model\MethodInterface $method
-     * @param \Magento\Framework\View\LayoutInterface $layout
+     * @param MethodInterface $method
+     * @param LayoutInterface $layout
      * @return Form
      */
-    public function getMethodFormBlock(\Magento\Payment\Model\MethodInterface $method, LayoutInterface $layout)
+    public function getMethodFormBlock(MethodInterface $method, LayoutInterface $layout)
     {
-        $block = false;
-        $blockType = $method->getFormBlockType();
-        if ($layout) {
-            $block = $layout->createBlock($blockType, $method->getCode());
-            $block->setMethod($method);
-        }
+        $block = $layout->createBlock($method->getFormBlockType(), $method->getCode());
+        $block->setMethod($method);
         return $block;
     }
 
@@ -215,42 +221,26 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getInfoBlockHtml(Info $info, $storeId)
     {
-        $initialEnvironmentInfo = $this->_appEmulation->startEnvironmentEmulation($storeId);
+        $this->_appEmulation->startEnvironmentEmulation($storeId);
 
         try {
             // Retrieve specified view block from appropriate design package (depends on emulated store)
-            $paymentBlock = $info->getBlockMock() ?: $this->getInfoBlock($info);
-            $paymentBlock->setArea(\Magento\Framework\App\Area::AREA_FRONTEND)->setIsSecureMode(true);
-            $paymentBlock->getMethod()->setStore($storeId);
+            $paymentBlock = $this->getInfoBlock($info);
+            $paymentBlock->setArea(\Magento\Framework\App\Area::AREA_FRONTEND)
+                ->setIsSecureMode(true);
+            $paymentBlock->getMethod()
+                ->setStore($storeId);
             $paymentBlockHtml = $paymentBlock->toHtml();
         } catch (\Exception $exception) {
-            $this->_appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
+            $this->_appEmulation->stopEnvironmentEmulation();
             throw $exception;
         }
 
-        $this->_appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
+        $this->_appEmulation->stopEnvironmentEmulation();
 
         return $paymentBlockHtml;
     }
 
-    /**
-     * Retrieve available billing agreement methods
-     *
-     * @param mixed $store
-     * @param \Magento\Sales\Model\Quote $quote
-     * @return array
-     */
-    public function getBillingAgreementMethods($store = null, $quote = null)
-    {
-        $result = array();
-        foreach ($this->getStoreMethods($store, $quote) as $method) {
-            if ($method->canManageBillingAgreements()) {
-                $result[] = $method;
-            }
-        }
-        return $result;
-    }
-
     /**
      * Retrieve all payment methods
      *
diff --git a/app/code/Magento/Payment/composer.json b/app/code/Magento/Payment/composer.json
index 094f7143eef931cb71cc965ed28ac33858d5ac91..21703f3a7c300bf49f66c587e9984e97689d6e74 100644
--- a/app/code/Magento/Payment/composer.json
+++ b/app/code/Magento/Payment/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-centinel": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-centinel": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php
index af66433aba8ffdd487812359d1df04d207b9172e..a0174e2caf8301285432232e5aa4e1be17b9816f 100644
--- a/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php
+++ b/app/code/Magento/Paypal/Block/Adminhtml/Settlement/Details/Form.php
@@ -129,14 +129,14 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic
                 'fields' => array(
                     'fee_debit_or_credit' => array(
                         'label' => $this->_settlement->getFieldLabel('fee_debit_or_credit'),
-                        'value' => $model->getDebitCreditText($model->getData('fee_debit_or_credit'))
+                        'value' => $model->getDebitCreditText($model->getCastedAmount('fee_debit_or_credit'))
                     ),
                     'fee_amount' => array(
                         'label' => $this->_settlement->getFieldLabel('fee_amount'),
                         'value' => $this->_localeCurrency->getCurrency(
                             $model->getData('fee_currency')
                         )->toCurrency(
-                            $model->getData('fee_amount')
+                            $model->getCastedAmount('fee_amount')
                         )
                     )
                 ),
diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php
index 7d6559dbf5a78e0f91f6cf766188298fd05a1a7d..2d78245680de10232bccba4cb1ff4cf342967dde 100644
--- a/app/code/Magento/Paypal/Block/Iframe.php
+++ b/app/code/Magento/Paypal/Block/Iframe.php
@@ -21,9 +21,10 @@
  * @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\Block;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * HSS iframe block
  */
@@ -112,7 +113,7 @@ class Iframe extends \Magento\Payment\Block\Form
             $templatePath = str_replace('_', '', $paymentCode);
             $templateFile = "{$templatePath}/iframe.phtml";
 
-            $directory = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+            $directory = $this->_filesystem->getDirectoryRead(DirectoryList::MODULES);
             $file = $this->_viewFileSystem->getTemplateFileName($templateFile, array('module' => 'Magento_Paypal'));
             if ($file && $directory->isExist($directory->getRelativePath($file))) {
                 $this->setTemplate($templateFile);
diff --git a/app/code/Magento/Paypal/Helper/Data.php b/app/code/Magento/Paypal/Helper/Data.php
index 7e2233f6daee4f2ca6195e2c921871ce0c0f4363..3d8c74953bdbf7a06663c2c39991e763581975f2 100644
--- a/app/code/Magento/Paypal/Helper/Data.php
+++ b/app/code/Magento/Paypal/Helper/Data.php
@@ -93,21 +93,10 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
     {
         $result = array();
         foreach ($this->_paymentData->getStoreMethods($store, $quote) as $method) {
-            if ($this->canManageBillingAgreements($method)) {
+            if ($method instanceof MethodInterface) {
                 $result[] = $method;
             }
         }
         return $result;
     }
-
-    /**
-     * Check whether payment method can manage billing agreements or not
-     *
-     * @param mixed $methodInstance
-     * @return bool
-     */
-    public function canManageBillingAgreements($methodInstance)
-    {
-        return $methodInstance instanceof MethodInterface;
-    }
 }
diff --git a/app/code/Magento/Paypal/Model/Cert.php b/app/code/Magento/Paypal/Model/Cert.php
index b27fa9b4b6f80383cb104b3a55340e3f2e99716f..cb6c4e3e0e2eca47bf9c1168a90355316573b168 100644
--- a/app/code/Magento/Paypal/Model/Cert.php
+++ b/app/code/Magento/Paypal/Model/Cert.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Paypal\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\WriteInterface;
 
 /**
@@ -48,7 +49,7 @@ class Cert extends \Magento\Framework\Model\AbstractModel
     /**
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
@@ -57,13 +58,13 @@ class Cert extends \Magento\Framework\Model\AbstractModel
     public function __construct(
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Encryption\EncryptorInterface $encryptor,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->varDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->varDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $this->encryptor = $encryptor;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
diff --git a/app/code/Magento/Paypal/Model/Payflowlink.php b/app/code/Magento/Paypal/Model/Payflowlink.php
index 48605cadf2c5ae5ebe727bdfa67ee878e9785e45..74ef84603eb5fe95d33ff70addcf389406c92edb 100644
--- a/app/code/Magento/Paypal/Model/Payflowlink.php
+++ b/app/code/Magento/Paypal/Model/Payflowlink.php
@@ -456,12 +456,12 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
             $order->getState() != \Magento\Sales\Model\Order::STATE_PENDING_PAYMENT ||
             !$amountCompared
         ) {
-            throw new \Magento\Framework\Model\Exception($this->_formatStr(self::RESPONSE_ERROR_MSG, 'Order'));
+            throw new \Magento\Framework\Model\Exception(sprintf(self::RESPONSE_ERROR_MSG, 'Order'));
         }
 
         $fetchData = $this->fetchTransactionInfo($order->getPayment(), $response->getPnref());
         if (!isset($fetchData['custref']) || $fetchData['custref'] != $order->getIncrementId()) {
-            throw new \Magento\Framework\Model\Exception($this->_formatStr(self::RESPONSE_ERROR_MSG, 'Transaction'));
+            throw new \Magento\Framework\Model\Exception(sprintf(self::RESPONSE_ERROR_MSG, 'Transaction'));
         }
 
         return $order;
@@ -479,11 +479,11 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
         $request->setCreatesecuretoken(
             'Y'
         )->setSecuretokenid(
-            $this->_generateSecureTokenId()
+            $this->mathRandom->getUniqueHash()
         )->setTrxtype(
             $this->_getTrxTokenType()
         )->setAmt(
-            $this->_formatStr('%.2F', $payment->getOrder()->getBaseTotalDue())
+            sprintf('%.2F', $payment->getOrder()->getBaseTotalDue())
         )->setCurrency(
             $payment->getOrder()->getBaseCurrencyCode()
         )->setInvnum(
@@ -493,11 +493,6 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
         )->setPonum(
             $payment->getOrder()->getId()
         );
-        //This is PaPal issue with taxes and shipping
-        //->setSubtotal($this->_formatStr('%.2F', $payment->getOrder()->getBaseSubtotal()))
-        //->setTaxamt($this->_formatStr('%.2F', $payment->getOrder()->getBaseTaxAmount()))
-        //->setFreightamt($this->_formatStr('%.2F', $payment->getOrder()->getBaseShippingAmount()));
-
 
         $order = $payment->getOrder();
         if (empty($order)) {
@@ -634,28 +629,6 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
         }
     }
 
-    /**
-     * Return unique value for secure token id
-     *
-     * @return string
-     */
-    protected function _generateSecureTokenId()
-    {
-        return $this->mathRandom->getUniqueHash();
-    }
-
-    /**
-     * Format values
-     *
-     * @param mixed $format
-     * @param mixed $string
-     * @return string
-     */
-    protected function _formatStr($format, $string)
-    {
-        return sprintf($format, $string);
-    }
-
     /**
      * If response is failed throw exception
      * Set token data in payment object
@@ -707,104 +680,6 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
         return $secureHash;
     }
 
-    /**
-     * Add transaction with correct transaction Id
-     *
-     * @deprecated since 1.6.2.0
-     * @param \Magento\Framework\Object $payment
-     * @param string $txnId
-     * @return void
-     */
-    protected function _addTransaction($payment, $txnId)
-    {
-    }
-
-    /**
-     * Initialize request
-     *
-     * @deprecated since 1.6.2.0
-     * @param \Magento\Framework\Object $payment
-     * @param mixed $amount
-     * @return $this
-     */
-    protected function _initialize(\Magento\Framework\Object $payment, $amount)
-    {
-        return $this;
-    }
-
-    /**
-     * Check whether order review has enough data to initialize
-     *
-     * @deprecated since 1.6.2.0
-     * @param mixed|null $token
-     * @return void
-     * @throws \Magento\Framework\Model\Exception
-     */
-    public function prepareOrderReview($token = null)
-    {
-    }
-
-    /**
-     * Additional authorization logic for Account Verification
-     *
-     * @deprecated since 1.6.2.0
-     * @param \Magento\Framework\Object $payment
-     * @param mixed $amount
-     * @param \Magento\Paypal\Model\Payment\Transaction $transaction
-     * @param string $txnId
-     * @return $this
-     */
-    protected function _authorize(\Magento\Framework\Object $payment, $amount, $transaction, $txnId)
-    {
-        return $this;
-    }
-
-    /**
-     * Operate with order or quote using information from silent post
-     *
-     * @deprecated since 1.6.2.0
-     * @param \Magento\Framework\Object $document
-     * @return void
-     */
-    protected function _process(\Magento\Framework\Object $document)
-    {
-    }
-
-    /**
-     * Check Transaction
-     *
-     * @deprecated since 1.6.2.0
-     * @param \Magento\Paypal\Model\Payment\Transaction $transaction
-     * @param mixed $amount
-     * @return $this
-     */
-    protected function _checkTransaction($transaction, $amount)
-    {
-        return $this;
-    }
-
-    /**
-     * Check response from Payflow gateway.
-     *
-     * @deprecated since 1.6.2.0
-     * @return \Magento\Sales\Model\AbstractModel in case of validation passed
-     * @throws \Magento\Framework\Model\Exception In other cases
-     */
-    protected function _getDocumentFromResponse()
-    {
-        return null;
-    }
-
-    /**
-     * Get callback controller
-     *
-     * @return string
-     */
-    public function getCallbackController()
-    {
-        return $this->_callbackController;
-    }
-
     /**
      * Get callback url
      *
@@ -835,6 +710,6 @@ class Payflowlink extends \Magento\Paypal\Model\Payflowpro
             $websiteUrl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_LINK, $secure);
         }
 
-        return $websiteUrl . 'paypal/' . $this->getCallbackController() . '/' . $actionName;
+        return $websiteUrl . 'paypal/' . $this->_callbackController . '/' . $actionName;
     }
 }
diff --git a/app/code/Magento/Paypal/Model/Payment/Transaction.php b/app/code/Magento/Paypal/Model/Payment/Transaction.php
deleted file mode 100644
index 06f0db749d1987dd940beb7ff94a74e8bbfe3ab4..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paypal/Model/Payment/Transaction.php
+++ /dev/null
@@ -1,271 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Paypal\Model\Payment;
-
-/**
- * Payment transaction model
- * Tracks transaction history
- *
- * @method string getTxnId()
- * @method string getCreatedAt()
- * @method \Magento\Paypal\Model\Payment\Transaction setCreatedAt(string $value)
- */
-class Transaction extends \Magento\Framework\Model\AbstractModel
-{
-    /**
-     * Whether to throw exceptions on different operations
-     *
-     * @var bool
-     */
-    protected $_isFailsafe = false;
-
-    /**
-     * Event object prefix
-     *
-     * @var string
-     * @see \Magento\Core\Model\Absctract::$_eventPrefix
-     */
-    protected $_eventPrefix = 'paypal_payment_transaction';
-
-    /**
-     * Event object prefix
-     *
-     * @var string
-     * @see \Magento\Core\Model\Absctract::$_eventObject
-     */
-    protected $_eventObject = 'paypal_payment_transaction';
-
-    /**
-     * Order website id
-     *
-     * @var int
-     */
-    protected $_orderWebsiteId;
-
-    /**
-     * @var \Magento\Framework\Stdlib\DateTime\DateTimeFactory
-     */
-    protected $_dateFactory;
-
-    /**
-     * @param \Magento\Framework\Model\Context $context
-     * @param \Magento\Framework\Registry $registry
-     * @param \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory
-     * @param \Magento\Framework\Model\Resource\AbstractResource $resource
-     * @param \Magento\Framework\Data\Collection\Db $resourceCollection
-     * @param array $data
-     */
-    public function __construct(
-        \Magento\Framework\Model\Context $context,
-        \Magento\Framework\Registry $registry,
-        \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateFactory,
-        \Magento\Framework\Model\Resource\AbstractResource $resource = null,
-        \Magento\Framework\Data\Collection\Db $resourceCollection = null,
-        array $data = array()
-    ) {
-        $this->_dateFactory = $dateFactory;
-        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
-    }
-
-    /**
-     * Initialize resource model
-     *
-     * @return null
-     */
-    protected function _construct()
-    {
-        $this->_init('Magento\Paypal\Model\Resource\Payment\Transaction');
-        return parent::_construct();
-    }
-
-    /**
-     * Transaction ID setter
-     *
-     * @param string $txnId
-     * @return $this
-     */
-    public function setTxnId($txnId)
-    {
-        $this->_verifyTxnId($txnId);
-        return $this->setData('txn_id', $txnId);
-    }
-
-    /**
-     * Check object before loading by by specified transaction ID
-     *
-     * @param string $txnId
-     * @return $this
-     */
-    protected function _beforeLoadByTxnId($txnId)
-    {
-        $this->_eventManager->dispatch(
-            $this->_eventPrefix . '_load_by_txn_id_before',
-            $this->_getEventData() + array('txn_id' => $txnId)
-        );
-        return $this;
-    }
-
-    /**
-     * Load self by specified transaction ID. Requires the valid payment object to be set
-     *
-     * @param string $txnId
-     * @return $this
-     */
-    public function loadByTxnId($txnId)
-    {
-        $this->_beforeLoadByTxnId($txnId);
-        $this->getResource()->loadObjectByTxnId($this, $txnId);
-        $this->_afterLoadByTxnId();
-        return $this;
-    }
-
-    /**
-     * Check object after loading by by specified transaction ID
-     *
-     * @return $this
-     */
-    protected function _afterLoadByTxnId()
-    {
-        $this->_eventManager->dispatch($this->_eventPrefix . '_load_by_txn_id_after', $this->_getEventData());
-        return $this;
-    }
-
-    /**
-     * Additional information setter
-     * Updates data inside the 'additional_information' array
-     * Doesn't allow to set arrays
-     *
-     * @param string $key
-     * @param mixed $value
-     * @return $this
-     * @throws \Magento\Framework\Model\Exception
-     */
-    public function setAdditionalInformation($key, $value)
-    {
-        if (is_object($value)) {
-            throw new \Magento\Framework\Model\Exception(__('Payment transactions disallow storing objects.'));
-        }
-        $info = $this->_getData('additional_information');
-        if (!$info) {
-            $info = array();
-        }
-        $info[$key] = $value;
-        return $this->setData('additional_information', $info);
-    }
-
-    /**
-     * Getter for entire additional_information value or one of its element by key
-     * 
-     * @param string|null $key
-     * @return array|null|mixed
-     */
-    public function getAdditionalInformation($key = null)
-    {
-        $info = $this->_getData('additional_information');
-        if (!$info) {
-            $info = array();
-        }
-        if ($key) {
-            return isset($info[$key]) ? $info[$key] : null;
-        }
-        return $info;
-    }
-
-    /**
-     * Unsetter for entire additional_information value or one of its element by key
-     *
-     * @param string|null $key
-     * @return $this
-     */
-    public function unsAdditionalInformation($key = null)
-    {
-        if ($key) {
-            $info = $this->_getData('additional_information');
-            if (is_array($info)) {
-                unset($info[$key]);
-            }
-        } else {
-            $info = array();
-        }
-        return $this->setData('additional_information', $info);
-    }
-
-    /**
-     * Setter/Getter whether transaction is supposed to prevent exceptions on saving
-     *
-     * @param bool|null $setFailsafe
-     * @return $this|bool
-     */
-    public function isFailsafe($setFailsafe = null)
-    {
-        if (null === $setFailsafe) {
-            return $this->_isFailsafe;
-        }
-        $this->_isFailsafe = (bool)$setFailsafe;
-        return $this;
-    }
-
-    /**
-     * Verify data required for saving
-     *
-     * @return $this
-     * @throws \Magento\Framework\Model\Exception
-     */
-    protected function _beforeSave()
-    {
-        if (!$this->getId()) {
-            $this->setCreatedAt($this->_dateFactory->create()->gmtDate());
-        }
-        return parent::_beforeSave();
-    }
-
-    /**
-     * Check whether specified transaction ID is valid
-     *
-     * @param string $txnId
-     * @return void
-     * @throws \Magento\Framework\Model\Exception
-     */
-    protected function _verifyTxnId($txnId)
-    {
-        if (null !== $txnId && 0 == strlen($txnId)) {
-            throw new \Magento\Framework\Model\Exception(__('You need to enter a transaction ID.'));
-        }
-    }
-
-    /**
-     * Make sure this object is a valid transaction
-     *
-     * TODO for more restriction we can check for data consistency
-     *
-     * @return void
-     * @throws \Magento\Framework\Model\Exception
-     */
-    protected function _verifyThisTransactionExists()
-    {
-        if (!$this->getId()) {
-            throw new \Magento\Framework\Model\Exception(__('This operation requires an existing transaction object.'));
-        }
-    }
-}
diff --git a/app/code/Magento/Paypal/Model/Report/Settlement.php b/app/code/Magento/Paypal/Model/Report/Settlement.php
index 131ed0774d7145e5522bcf94cfade81663f5e06d..5be8d99ef961c5493f3170964223933294cd9c9c 100644
--- a/app/code/Magento/Paypal/Model/Report/Settlement.php
+++ b/app/code/Magento/Paypal/Model/Report/Settlement.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Paypal\Model\Report;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\DirectoryList;
+
 /**
  * Paypal Settlement Report model
  *
@@ -176,7 +179,7 @@ class Settlement extends \Magento\Framework\Model\AbstractModel
     /**
     * @param \Magento\Framework\Model\Context $context
     * @param \Magento\Framework\Registry $registry
-    * @param \Magento\Framework\App\Filesystem $filesystem
+    * @param \Magento\Framework\Filesystem $filesystem
     * @param \Magento\Framework\StoreManagerInterface $storeManager
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
     * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -186,14 +189,14 @@ class Settlement extends \Magento\Framework\Model\AbstractModel
     public function __construct(
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
-        $this->_tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+        $this->_tmpDirectory = $filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);
         $this->_storeManager = $storeManager;
         $this->_scopeConfig = $scopeConfig;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
diff --git a/app/code/Magento/Paypal/Model/Report/Settlement/Row.php b/app/code/Magento/Paypal/Model/Report/Settlement/Row.php
index dade863f7cf2868ba6e0577058920f8a737ca2e6..d37d74f0736406d7c7c863a65e51aa43ea74712e 100644
--- a/app/code/Magento/Paypal/Model/Report/Settlement/Row.php
+++ b/app/code/Magento/Paypal/Model/Report/Settlement/Row.php
@@ -30,37 +30,37 @@ namespace Magento\Paypal\Model\Report\Settlement;
  * @method \Magento\Paypal\Model\Resource\Report\Settlement\Row _getResource()
  * @method \Magento\Paypal\Model\Resource\Report\Settlement\Row getResource()
  * @method int getReportId()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setReportId(int $value)
+ * @method Row setReportId(int $value)
  * @method string getTransactionId()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setTransactionId(string $value)
+ * @method Row setTransactionId(string $value)
  * @method string getInvoiceId()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setInvoiceId(string $value)
+ * @method Row setInvoiceId(string $value)
  * @method string getPaypalReferenceId()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setPaypalReferenceId(string $value)
+ * @method Row setPaypalReferenceId(string $value)
  * @method string getPaypalReferenceIdType()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setPaypalReferenceIdType(string $value)
+ * @method Row setPaypalReferenceIdType(string $value)
  * @method string getTransactionEventCode()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setTransactionEventCode(string $value)
+ * @method Row setTransactionEventCode(string $value)
  * @method string getTransactionInitiationDate()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setTransactionInitiationDate(string $value)
+ * @method Row setTransactionInitiationDate(string $value)
  * @method string getTransactionCompletionDate()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setTransactionCompletionDate(string $value)
+ * @method Row setTransactionCompletionDate(string $value)
  * @method string getTransactionDebitOrCredit()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setTransactionDebitOrCredit(string $value)
+ * @method Row setTransactionDebitOrCredit(string $value)
  * @method float getGrossTransactionAmount()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setGrossTransactionAmount(float $value)
+ * @method Row setGrossTransactionAmount(float $value)
  * @method string getGrossTransactionCurrency()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setGrossTransactionCurrency(string $value)
+ * @method Row setGrossTransactionCurrency(string $value)
  * @method string getFeeDebitOrCredit()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setFeeDebitOrCredit(string $value)
+ * @method Row setFeeDebitOrCredit(string $value)
  * @method float getFeeAmount()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setFeeAmount(float $value)
+ * @method Row setFeeAmount(float $value)
  * @method string getFeeCurrency()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setFeeCurrency(string $value)
+ * @method Row setFeeCurrency(string $value)
  * @method string getCustomField()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setCustomField(string $value)
+ * @method Row setCustomField(string $value)
  * @method string getConsumerId()
- * @method \Magento\Paypal\Model\Report\Settlement\Row setConsumerId(string $value)
+ * @method Row setConsumerId(string $value)
  *
  * @author      Magento Core Team <core@magentocommerce.com>
  */
@@ -71,14 +71,17 @@ class Row extends \Magento\Framework\Model\AbstractModel
      *
      * @var array
      */
-    protected static $_eventList = array();
+    private $eventLabelsList = array();
 
     /**
-     * Casted amount keys registry
+     * Cast amount relation
      *
      * @var array
      */
-    protected $_castedAmounts = array();
+    private $castAmountRelation = [
+        'fee_amount' => 'fee_debit_or_credit',
+        'gross_transaction_amount' => 'transaction_debit_or_credit'
+    ];
 
     /**
      * Initialize resource model
@@ -94,25 +97,19 @@ class Row extends \Magento\Framework\Model\AbstractModel
      * Return description of Reference ID Type
      * If no code specified, return full list of codes with their description
      *
-     * @param string|null $code
-     * @return string|array
+     * @param string $code
+     * @return string
      */
-    public function getReferenceType($code = null)
+    public function getReferenceType($code)
     {
         $types = array(
-            'TXN' => __('Transaction ID'),
             'ODR' => __('Order ID'),
+            'PAP' => __('Preapproved Payment ID'),
+            'TXN' => __('Transaction ID'),
             'SUB' => __('Subscription ID'),
-            'PAP' => __('Preapproved Payment ID')
         );
-        if ($code === null) {
-            asort($types);
-            return $types;
-        }
-        if (isset($types[$code])) {
-            return $types[$code];
-        }
-        return $code;
+        return !empty($types[$code]) ? $types[$code] : $code;
+
     }
 
     /**
@@ -123,55 +120,22 @@ class Row extends \Magento\Framework\Model\AbstractModel
      */
     public function getTransactionEvent($code)
     {
-        $this->_generateEventLabels();
-        if (isset(self::$_eventList[$code])) {
-            return self::$_eventList[$code];
-        }
-        return $code;
-    }
+        $events = $this->getTransactionEvents();
 
-    /**
-     * Get full list of codes with their description
-     *
-     * @return &array
-     */
-    public function &getTransactionEvents()
-    {
-        $this->_generateEventLabels();
-        return self::$_eventList;
+        return !empty($events[$code]) ? $events[$code] : $code;
     }
 
     /**
      * Return description of "Debit or Credit" value
-     * If no code specified, return full list of codes with their description
      *
-     * @param string|null $code
-     * @return string|array
+     * @param string $code
+     * @return string
      */
-    public function getDebitCreditText($code = null)
+    public function getDebitCreditText($code)
     {
         $options = array('CR' => __('Credit'), 'DR' => __('Debit'));
-        if ($code === null) {
-            return $options;
-        }
-        if (isset($options[$code])) {
-            return $options[$code];
-        }
-        return $code;
-    }
 
-    /**
-     * Invoke casting some amounts
-     *
-     * @param string $key
-     * @param string|int|null $index
-     * @return mixed
-     */
-    public function getData($key = '', $index = null)
-    {
-        $this->_castAmount('fee_amount', 'fee_debit_or_credit');
-        $this->_castAmount('gross_transaction_amount', 'transaction_debit_or_credit');
-        return parent::getData($key, $index);
+        return !empty($options[$code]) ? $options[$code] : $code;
     }
 
     /**
@@ -181,117 +145,117 @@ class Row extends \Magento\Framework\Model\AbstractModel
      * Also if the "credit" value is detected, it will be casted to negative amount
      *
      * @param string $key
-     * @param string $creditKey
-     * @return void
+     * @return float|null
      */
-    public function _castAmount($key, $creditKey)
+    public function getCastedAmount($key)
     {
-        if (isset($this->_castedAmounts[$key]) || !isset($this->_data[$key]) || !isset($this->_data[$creditKey])) {
-            return;
+        if (empty($this->castAmountRelation[$key])) {
+            return null;
         }
-        if (empty($this->_data[$key])) {
-            return;
+        if (empty($this->_data[$key]) || empty($this->_data[$this->castAmountRelation[$key]])) {
+            return null;
         }
+
         $amount = $this->_data[$key] / 100;
-        if ('CR' === $this->_data[$creditKey]) {
+        if ('CR' == $this->_data[$this->castAmountRelation[$key]]) {
             $amount = -1 * $amount;
         }
-        $this->_data[$key] = $amount;
-        $this->_castedAmounts[$key] = true;
+        return $amount;
     }
 
     /**
-     * Fill/translate and sort all event codes/labels
+     * Get full list of codes with their description
      *
-     * @return void
+     * @return array
      */
-    protected function _generateEventLabels()
+    public function getTransactionEvents()
     {
-        if (!self::$_eventList) {
-            self::$_eventList = array(
-                'T0000' => __('General: received payment of a type not belonging to the other T00xx categories'),
-                'T0001' => __('Mass Pay Payment'),
-                'T0002' => __('Subscription Payment, either payment sent or payment received'),
-                'T0003' => __('Preapproved Payment (BillUser API), either sent or received'),
-                'T0004' => __('eBay Auction Payment'),
+        if (empty($this->eventLabelsList)) {
+            $this->eventLabelsList = array(
+                'T1502' => __('ACH Deposit (Hold for Dispute or Other Investigation)'),
+                'T1104' => __('ACH Deposit (Reversal)'),
+                'T0302' => __('ACH Funding for Funds Recovery from Account Balance'),
+                'T1101' => __('ACH Withdrawal'),
+                'T1106' => __('Account-to-Account Payment, initiated by PayPal'),
+                'T0010' => __('Auction Payment other than through eBay'),
+                'T0401' => __('AutoSweep'),
+                'T1503' => __('Available Balance'),
+                'T0803' => __('Balance Manager Account Bonus'),
+                'T0806' => __('Bonus for first ACH Use'),
+                'T1800' => __('Buyer Credit Payment'),
+                'T1203' => __('Charge-off'),
+                'T1201' => __('Chargeback'),
+                'T0903' => __('Coupon Redemption'),
+                'T0202' => __('Currency Conversion required to cover negative balance'),
+                'T0801' => __('Debit Card Cash Back'),
+                'T1102' => __('Debit Card Transaction'),
                 'T0005' => __('Direct Payment API'),
+                'T0303' => __('EFT Funding (German banking)'),
                 'T0006' => __('Express Checkout APIs'),
-                'T0007' => __('Website Payments Standard Payment'),
-                'T0008' => __('Postage Payment to either USPS or UPS'),
-                'T0009' => __('Gift Certificate Payment: purchase of Gift Certificate'),
-                'T0010' => __('Auction Payment other than through eBay'),
-                'T0011' => __('Mobile Payment (made via a mobile phone)'),
-                'T0012' => __('Virtual Terminal Payment'),
-                'T0100' => __('General: non-payment fee of a type not belonging to the other T01xx categories'),
-                'T0101' => __('Fee: Web Site Payments Pro Account Monthly'),
+                'T1108' => __('Fee Reversal'),
                 'T0102' => __('Fee: Foreign ACH Withdrawal'),
-                'T0103' => __('Fee: WorldLink Check Withdrawal'),
                 'T0104' => __('Fee: Mass Pay Request'),
+                'T0101' => __('Fee: Web Site Payments Pro Account Monthly'),
+                'T0103' => __('Fee: WorldLink Check Withdrawal'),
+                'T1600' => __('Funding'),
+                'T1300' => __('General (Authorization)'),
+                'T1400' => __('General (Dividend)'),
+                'T2000' => __('General (Funds Transfer from PayPal Account to Another)'),
+                'T0700' => __('General (Purchase with a credit card)'),
+                'T1900' => __('General Adjustment without businessrelated event'),
                 'T0200' => __('General Currency Conversion'),
-                'T0201' => __('User-initiated Currency Conversion'),
-                'T0202' => __('Currency Conversion required to cover negative balance'),
                 'T0300' => __('General Funding of PayPal Account '),
-                'T0301' => __('PayPal Balance Manager function of PayPal account'),
-                'T0302' => __('ACH Funding for Funds Recovery from Account Balance'),
-                'T0303' => __('EFT Funding (German banking)'),
+                'T0900' => __('General Redemption'),
                 'T0400' => __('General Withdrawal from PayPal Account'),
-                'T0401' => __('AutoSweep'),
+                'T1000' => __('General. Product no longer supported'),
                 'T0500' => __('General: Use of PayPal account for purchasing as well as receiving payments'),
-                'T0501' => __('Virtual PayPal Debit Card Transaction'),
-                'T0502' => __('PayPal Debit Card Withdrawal from ATM'),
-                'T0503' => __('Hidden Virtual PayPal Debit Card Transaction'),
-                'T0504' => __('PayPal Debit Card Cash Advance'),
                 'T0600' => __('General: Withdrawal from PayPal Account'),
-                'T0700' => __('General (Purchase with a credit card)'),
-                'T0701' => __('Negative Balance'),
+                'T1700' => __('General: Withdrawal to Non-Bank Entity'),
+                'T1200' => __('General: adjustment of a type not belonging to the other T12xx categories'),
                 'T0800' => __('General: bonus of a type not belonging to the other T08xx categories'),
-                'T0801' => __('Debit Card Cash Back'),
+                'T9900' => __('General: event not yet categorized'),
+                'T0100' => __('General: non-payment fee of a type not belonging to the other T01xx categories'),
+                'T0000' => __('General: received payment of a type not belonging to the other T00xx categories'),
+                'T1100' => __('General: reversal of a type not belonging to the other T11xx categories'),
+                'T1500' => __('General: temporary hold of a type not belonging to the other T15xx categories'),
+                'T0009' => __('Gift Certificate Payment: purchase of Gift Certificate'),
+                'T0901' => __('Gift Certificate Redemption'),
+                'T0503' => __('Hidden Virtual PayPal Debit Card Transaction'),
+                'T1110' => __('Hold for Dispute Investigation'),
+                'T1204' => __('Incentive'),
+                'T0001' => __('Mass Pay Payment'),
                 'T0802' => __('Merchant Referral Bonus'),
-                'T0803' => __('Balance Manager Account Bonus'),
+                'T0011' => __('Mobile Payment (made via a mobile phone)'),
+                'T0701' => __('Negative Balance'),
+                'T1501' => __('Open Authorization'),
+                'T0301' => __('PayPal Balance Manager function of PayPal account'),
                 'T0804' => __('PayPal Buyer Warranty Bonus'),
+                'T0504' => __('PayPal Debit Card Cash Advance'),
+                'T0502' => __('PayPal Debit Card Withdrawal from ATM'),
                 'T0805' => __('PayPal Protection Bonus'),
-                'T0806' => __('Bonus for first ACH Use'),
-                'T0900' => __('General Redemption'),
-                'T0901' => __('Gift Certificate Redemption'),
+                'T1107' => __('Payment Refund initiated by merchant'),
                 'T0902' => __('Points Incentive Redemption'),
-                'T0903' => __('Coupon Redemption'),
-                'T0904' => __('Reward Voucher Redemption'),
-                'T1000' => __('General. Product no longer supported'),
-                'T1100' => __('General: reversal of a type not belonging to the other T11xx categories'),
-                'T1101' => __('ACH Withdrawal'),
-                'T1102' => __('Debit Card Transaction'),
-                'T1103' => __('Reversal of Points Usage'),
-                'T1104' => __('ACH Deposit (Reversal)'),
+                'T0008' => __('Postage Payment to either USPS or UPS'),
+                'T0003' => __('Preapproved Payment (BillUser API, either sent or received'),
+                'T1301' => __('Reauthorization'),
+                'T1205' => __('Reimbursement of Chargeback'),
+                'T1202' => __('Reversal'),
                 'T1105' => __('Reversal of General Account Hold'),
-                'T1106' => __('Account-to-Account Payment, initiated by PayPal'),
-                'T1107' => __('Payment Refund initiated by merchant'),
-                'T1108' => __('Fee Reversal'),
-                'T1110' => __('Hold for Dispute Investigation'),
+                'T1103' => __('Reversal of Points Usage'),
                 'T1111' => __('Reversal of hold for Dispute Investigation'),
-                'T1200' => __('General: adjustment of a type not belonging to the other T12xx categories'),
-                'T1201' => __('Chargeback'),
-                'T1202' => __('Reversal'),
-                'T1203' => __('Charge-off'),
-                'T1204' => __('Incentive'),
-                'T1205' => __('Reimbursement of Chargeback'),
-                'T1300' => __('General (Authorization)'),
-                'T1301' => __('Reauthorization'),
+                'T0904' => __('Reward Voucher Redemption'),
+                'T2001' => __('Settlement Consolidation'),
+                'T0002' => __('Subscription Payment, either payment sent or payment received'),
+                'T0201' => __('User-initiated Currency Conversion'),
+                'T0501' => __('Virtual PayPal Debit Card Transaction'),
+                'T0012' => __('Virtual Terminal Payment'),
                 'T1302' => __('Void'),
-                'T1400' => __('General (Dividend)'),
-                'T1500' => __('General: temporary hold of a type not belonging to the other T15xx categories'),
-                'T1501' => __('Open Authorization'),
-                'T1502' => __('ACH Deposit (Hold for Dispute or Other Investigation)'),
-                'T1503' => __('Available Balance'),
-                'T1600' => __('Funding'),
-                'T1700' => __('General: Withdrawal to Non-Bank Entity'),
+                'T0007' => __('Website Payments Standard Payment'),
                 'T1701' => __('WorldLink Withdrawal'),
-                'T1800' => __('Buyer Credit Payment'),
-                'T1900' => __('General Adjustment without businessrelated event'),
-                'T2000' => __('General (Funds Transfer from PayPal Account to Another)'),
-                'T2001' => __('Settlement Consolidation'),
-                'T9900' => __('General: event not yet categorized')
+                'T0004' => __('eBay Auction Payment')
             );
-            asort(self::$_eventList);
         }
+
+        return $this->eventLabelsList;
     }
 }
diff --git a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php b/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php
deleted file mode 100644
index cf14fce0b95500042c6391326db469558bd213bd..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Paypal\Model\Resource\Payment;
-
-/**
- * Paypal transaction resource model
- *
- * @deprecated since 1.6.2.0
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Transaction extends \Magento\Framework\Model\Resource\Db\AbstractDb
-{
-    /**
-     * Serializeable field: additional_information
-     *
-     * @var array
-     */
-    protected $_serializableFields = array('additional_information' => array(null, array()));
-
-    /**
-     * Initialize main table and the primary key field name
-     *
-     * @return void
-     */
-    protected function _construct()
-    {
-        $this->_init('paypal_payment_transaction', 'transaction_id');
-    }
-
-    /**
-     * Load the transaction object by specified txn_id
-     *
-     * @param \Magento\Paypal\Model\Payment\Transaction $transaction
-     * @param string $txnId
-     * @return void
-     */
-    public function loadObjectByTxnId(\Magento\Paypal\Model\Payment\Transaction $transaction, $txnId)
-    {
-        $select = $this->_getLoadByUniqueKeySelect($txnId);
-        $data = $this->_getWriteAdapter()->fetchRow($select);
-        $transaction->setData($data);
-        $this->unserializeFields($transaction);
-        $this->_afterLoad($transaction);
-    }
-
-    /**
-     * Serialize additional information, if any
-     *
-     * @param \Magento\Framework\Model\AbstractModel $transaction
-     * @return $this
-     * @throws \Magento\Framework\Model\Exception
-     */
-    protected function _beforeSave(\Magento\Framework\Model\AbstractModel $transaction)
-    {
-        $txnId = $transaction->getData('txn_id');
-        $idFieldName = $this->getIdFieldName();
-
-        // make sure unique key won't cause trouble
-        if ($transaction->isFailsafe()) {
-            $autoincrementId = (int)$this->_lookupByTxnId($txnId, $idFieldName);
-            if ($autoincrementId) {
-                $transaction->setData($idFieldName, $autoincrementId)->isObjectNew(false);
-            }
-        }
-
-        return parent::_beforeSave($transaction);
-    }
-
-    /**
-     * Load cell/row by specified unique key parts
-     *
-     * @param string $txnId
-     * @param array|string|object $columns
-     * @param bool $isRow
-     * @return array|string
-     */
-    private function _lookupByTxnId($txnId, $columns, $isRow = false)
-    {
-        $select = $this->_getLoadByUniqueKeySelect($txnId, $columns);
-        if ($isRow) {
-            return $this->_getWriteAdapter()->fetchRow($select);
-        }
-        return $this->_getWriteAdapter()->fetchOne($select);
-    }
-
-    /**
-     * Get select object for loading transaction by the unique key of order_id, payment_id, txn_id
-     *
-     * @param string $txnId
-     * @param string|array|Zend_Db_Expr $columns
-     * @return \Magento\Framework\DB\Select
-     */
-    private function _getLoadByUniqueKeySelect($txnId, $columns = '*')
-    {
-        return $this->_getWriteAdapter()->select()->from($this->getMainTable(), $columns)->where('txn_id = ?', $txnId);
-    }
-}
diff --git a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php b/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php
deleted file mode 100644
index 5e8fe675756dc099b90dc66cd766c39d69875600..0000000000000000000000000000000000000000
--- a/app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Paypal\Model\Resource\Payment\Transaction;
-
-/**
- * Payment transactions collection
- *
- * @deprecated since 1.6.2.0
- * @author      Magento Core Team <core@magentocommerce.com>
- */
-class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
-{
-    /**
-     * Created Before filter
-     *
-     * @var string
-     */
-    protected $_createdBefore = "";
-
-    /**
-     * Initialize collection items factory class
-     *
-     * @return void
-     */
-    protected function _construct()
-    {
-        $this->_init('Magento\Paypal\Model\Payment\Transaction', 'Magento\Paypal\Model\Resource\Payment\Transaction');
-        parent::_construct();
-    }
-
-    /**
-     * CreatedAt filter setter
-     *
-     * @param string $date
-     * @return $this
-     */
-    public function addCreatedBeforeFilter($date)
-    {
-        $this->_createdBefore = $date;
-        return $this;
-    }
-
-    /**
-     * Prepare filters
-     *
-     * @return $this
-     */
-    protected function _beforeLoad()
-    {
-        parent::_beforeLoad();
-
-        if ($this->isLoaded()) {
-            return $this;
-        }
-
-        // filters
-        if ($this->_createdBefore) {
-            $this->getSelect()->where('main_table.created_at < ?', $this->_createdBefore);
-        }
-        return $this;
-    }
-
-    /**
-     * Unserialize additional_information in each item
-     *
-     * @return $this
-     */
-    protected function _afterLoad()
-    {
-        foreach ($this->_items as $item) {
-            $this->getResource()->unserializeFields($item);
-        }
-        return parent::_afterLoad();
-    }
-}
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 57abe8c5fcba06348c04a600618f8f65e8a99260..c7d871fb2c8dec1b827c5183e2d2c1049a809593 100644
--- a/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
+++ b/app/code/Magento/Paypal/Model/System/Config/Backend/Cert.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Paypal\Model\System\Config\Backend;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\DirectoryList;
+
 /**
  * Backend model for saving certificate file in case of using certificate based authentication
  */
@@ -49,7 +52,7 @@ class Cert extends \Magento\Framework\App\Config\Value
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
      * @param \Magento\Paypal\Model\CertFactory $certFactory
      * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
      * @param array $data
@@ -60,14 +63,14 @@ class Cert extends \Magento\Framework\App\Config\Value
         \Magento\Framework\App\Config\ScopeConfigInterface $config,
         \Magento\Paypal\Model\CertFactory $certFactory,
         \Magento\Framework\Encryption\EncryptorInterface $encryptor,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $data = array()
     ) {
         $this->_certFactory = $certFactory;
         $this->_encryptor = $encryptor;
-        $this->_tmpDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+        $this->_tmpDirectory = $filesystem->getDirectoryRead(DirectoryList::SYS_TMP);
         parent::__construct($context, $registry, $config, $resource, $resourceCollection, $data);
     }
 
diff --git a/app/code/Magento/Paypal/composer.json b/app/code/Magento/Paypal/composer.json
index dadd399fed558b7a89f8b700c601ae319ae1e734..d729bdac674af682e2ef4aa9cc8dec15543d783e 100644
--- a/app/code/Magento/Paypal/composer.json
+++ b/app/code/Magento/Paypal/composer.json
@@ -3,25 +3,25 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-centinel": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-centinel": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Persistent/Model/Persistent/Config.php b/app/code/Magento/Persistent/Model/Persistent/Config.php
index bce1140466680cfb9bfbde11d8277dc452ab8540..b8d389a8f4e0cb78be85424ca1f93d3be7a4506b 100644
--- a/app/code/Magento/Persistent/Model/Persistent/Config.php
+++ b/app/code/Magento/Persistent/Model/Persistent/Config.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Persistent\Model\Persistent;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Persistent Config Model
  */
@@ -84,7 +86,7 @@ class Config
      * @param \Magento\Framework\View\LayoutInterface $layout
      * @param \Magento\Framework\App\State $appState
      * @param \Magento\Persistent\Model\Factory $persistentFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\Config\DomFactory $domFactory,
@@ -92,14 +94,14 @@ class Config
         \Magento\Framework\View\LayoutInterface $layout,
         \Magento\Framework\App\State $appState,
         \Magento\Persistent\Model\Factory $persistentFactory,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_domFactory = $domFactory;
         $this->_moduleReader = $moduleReader;
         $this->_layout = $layout;
         $this->_appState = $appState;
         $this->_persistentFactory = $persistentFactory;
-        $this->_modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->_modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
     }
 
     /**
diff --git a/app/code/Magento/Persistent/README.md b/app/code/Magento/Persistent/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..7f6e8b3d0e974b78320049b1ef86e9bf957ef99f
--- /dev/null
+++ b/app/code/Magento/Persistent/README.md
@@ -0,0 +1,5 @@
+Magento\Persistent module enables set customer a long-term cookie containing internal id (random hash - to exclude brute
+force) of persistent session. Persistent session data is kept in DB - so it's not deleted in some days and is kept for
+as much time as we need. DB session keeps customerId + some data from real customer session that we want to sync (e.g.
+num items in shopping cart). For registered customer this info is synced to persistent session if choose "Remember me"
+checkbox during first login.
diff --git a/app/code/Magento/Persistent/composer.json b/app/code/Magento/Persistent/composer.json
index 4b00a96a16ea79b70e902fa1e0d3f2bdb0efed50..c00d7821a1b8f8b7f6195cab0cbd10e2b05bb3f7 100644
--- a/app/code/Magento/Persistent/composer.json
+++ b/app/code/Magento/Persistent/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-cron": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-cron": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/ProductAlert/Model/Email.php b/app/code/Magento/ProductAlert/Model/Email.php
index 4877cafbb6d9185974cfb8d13184a2f5fdc3e665..53fb25d782be9e6bf92686bd67aaa46b8c8815c3 100644
--- a/app/code/Magento/ProductAlert/Model/Email.php
+++ b/app/code/Magento/ProductAlert/Model/Email.php
@@ -340,7 +340,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
             return false;
         }
 
-        $initialEnvironmentInfo = $this->_appEmulation->startEnvironmentEmulation($storeId);
+        $this->_appEmulation->startEnvironmentEmulation($storeId);
 
         if ($this->_type == 'price') {
             $this->_getPriceBlock()->setStore($store)->reset();
@@ -372,7 +372,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
             \Magento\Framework\App\Area::AREA_FRONTEND,
             array($block, 'toHtml')
         );
-        $this->_appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
+        $this->_appEmulation->stopEnvironmentEmulation();
 
         $transport = $this->_transportBuilder->setTemplateIdentifier(
             $templateId
diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json
index dc6fa62014d0d5f18fca1ea03d9687ae34301442..6fcaf9d53f00e85283eaa77ab8ab42e35687efed 100644
--- a/app/code/Magento/ProductAlert/composer.json
+++ b/app/code/Magento/ProductAlert/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserver.php b/app/code/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserver.php
index b655c0287a8780bb8be02dfbfb90180f8d7182b4..05e884fda71e8be0e0c28edb90d858c1e99ca925 100644
--- a/app/code/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserver.php
+++ b/app/code/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserver.php
@@ -40,16 +40,22 @@ class CheckoutManagerObserver
      */
     protected $_recurringPayments = null;
 
+    /** @var  \Magento\RecurringPayment\Model\Method\RecurringPaymentSpecification */
+    protected $specification;
+
     /**
      * @param \Magento\Checkout\Model\Session $checkoutSession
      * @param \Magento\RecurringPayment\Model\QuoteImporter $quoteImporter
+     * @param \Magento\RecurringPayment\Model\Method\RecurringPaymentSpecification $specification
      */
     public function __construct(
         \Magento\Checkout\Model\Session $checkoutSession,
-        \Magento\RecurringPayment\Model\QuoteImporter $quoteImporter
+        \Magento\RecurringPayment\Model\QuoteImporter $quoteImporter,
+        \Magento\RecurringPayment\Model\Method\RecurringPaymentSpecification $specification
     ) {
         $this->_checkoutSession = $checkoutSession;
         $this->_quoteImporter = $quoteImporter;
+        $this->specification = $specification;
     }
 
     /**
@@ -61,12 +67,15 @@ class CheckoutManagerObserver
      */
     public function submitRecurringPayments($observer)
     {
-        $this->_recurringPayments = $this->_quoteImporter->import($observer->getEvent()->getQuote());
-        foreach ($this->_recurringPayments as $payment) {
-            if (!$payment->isValid()) {
-                throw new \Magento\Framework\Model\Exception($payment->getValidationErrors());
+        $paymentMethod = $observer->getEvent()->getQuote()->getPayment();
+        if ($this->specification->isSatisfiedBy($paymentMethod->getCode())) {
+            $this->_recurringPayments = $this->_quoteImporter->import($observer->getEvent()->getQuote());
+            foreach ($this->_recurringPayments as $payment) {
+                if (!$payment->isValid()) {
+                    throw new \Magento\Framework\Model\Exception($payment->getValidationErrors());
+                }
+                $payment->submit();
             }
-            $payment->submit();
         }
     }
 
diff --git a/app/code/Magento/RecurringPayment/composer.json b/app/code/Magento/RecurringPayment/composer.json
index 8b0bf5a41a676ffb82b92228775116dab1677ff0..8b43ed5290188035d16251ddcb9c85c42bcc6cb4 100644
--- a/app/code/Magento/RecurringPayment/composer.json
+++ b/app/code/Magento/RecurringPayment/composer.json
@@ -3,22 +3,22 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchCsv.php
index 5fd4c864669e7585a98b518c000d1526f258c107..b55a4afce36b4f915ae43cd564a8e8f0215b717e 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Index;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportSearchCsv extends \Magento\Reports\Controller\Adminhtml\Index
@@ -37,6 +38,6 @@ class ExportSearchCsv extends \Magento\Reports\Controller\Adminhtml\Index
     {
         $this->_view->loadLayout(false);
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
-        return $this->_fileFactory->create('search.csv', $content->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('search.csv', $content->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchExcel.php
index abf2cf1b9a54f01abfa67d2e6eee4f1a51972af6..5222b81fb371cd8e46e78cd4ef563719a06f5410 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Index/ExportSearchExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Index;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportSearchExcel extends \Magento\Reports\Controller\Adminhtml\Index
@@ -37,6 +38,6 @@ class ExportSearchExcel extends \Magento\Reports\Controller\Adminhtml\Index
     {
         $this->_view->loadLayout(false);
         $content = $this->_view->getLayout()->getChildBlock('adminhtml.report.search.grid', 'grid.export');
-        return $this->_fileFactory->create('search.xml', $content->getExcelFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create('search.xml', $content->getExcelFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsCsv.php
index e42698872c9564752da427abaaf91e17af911512..4bca57ee4ed2ce3a8e278b725eea5c1530f94895 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Customer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -43,7 +44,7 @@ class ExportAccountsCsv extends \Magento\Reports\Controller\Adminhtml\Report\Cus
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsExcel.php
index daf72b3ebf9013039468ea4be8391da534ff47e5..3e85564cbb429cfaadd9b878517ab794077a6130 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportAccountsExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Customer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -43,7 +44,7 @@ class ExportAccountsExcel extends \Magento\Reports\Controller\Adminhtml\Report\C
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersCsv.php
index b6e31473540fc804fd0b70b41b59d2d08fc88804..921210b51325ded709b5245539a69f5fbf52105e 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Customer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -43,7 +44,7 @@ class ExportOrdersCsv extends \Magento\Reports\Controller\Adminhtml\Report\Custo
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersExcel.php
index d8d083a1f78713bd8a2020e4aedfbf7e55cc0a58..d0eff51659c1dfa3cbf67346a5110ad479091b6a 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportOrdersExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Customer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -43,7 +44,7 @@ class ExportOrdersExcel extends \Magento\Reports\Controller\Adminhtml\Report\Cus
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsCsv.php
index 11674d03e74612719586bb5806b6bacf4cff2c3d..a070ed2fa1631dbbe1cdca24c0df1a921d7b3d06 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Customer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -43,7 +44,7 @@ class ExportTotalsCsv extends \Magento\Reports\Controller\Adminhtml\Report\Custo
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsExcel.php
index dcc59b3f24c45c51625deec4effe1d42b08a3eaa..1b8027909eab58a3450748bf8bd4d7442b9528ec 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Customer/ExportTotalsExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Customer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -43,7 +44,7 @@ class ExportTotalsExcel extends \Magento\Reports\Controller\Adminhtml\Report\Cus
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockCsv.php
index a05b6e7fa341d116a35addd0b000887e320e448a..c5131fc0180974376c94f76df9f45feedccfa5a0 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportLowstockCsv extends \Magento\Reports\Controller\Adminhtml\Report\Product
@@ -54,7 +55,7 @@ class ExportLowstockCsv extends \Magento\Reports\Controller\Adminhtml\Report\Pro
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockExcel.php
index 63d39bcbaf663ce8e0068820c9d68f3558c2426e..407dde8f021ec328a0fbee9d0b844eefeb5d6010 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportLowstockExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportLowstockExcel extends \Magento\Reports\Controller\Adminhtml\Report\Product
@@ -54,7 +55,7 @@ class ExportLowstockExcel extends \Magento\Reports\Controller\Adminhtml\Report\P
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldCsv.php
index d272676b9902e8c5770f359242ae8dddfed53664..10e9e61613d65d0a8b20e48cc6fff172456178ac 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -53,7 +54,7 @@ class ExportSoldCsv extends \Magento\Reports\Controller\Adminhtml\Report\Product
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldExcel.php
index 2f65a5e33ca1977bf7743aa6002ea1237db1647d..5432f27b2c0fdcfcea3897e3cb82bd06505d07a0 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\Block\Widget\Grid\ExportInterface;
 
@@ -53,7 +54,7 @@ class ExportSoldExcel extends \Magento\Reports\Controller\Adminhtml\Report\Produ
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedCsv.php
index 005a12ab957ee60e36ad19d4f19a7144c4f6541d..45cfc9ea4b61d1169de78020008a2a48e837e456 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportViewedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Product
@@ -48,6 +49,6 @@ class ExportViewedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Produ
         $fileName = 'products_mostviewed.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Product\Viewed\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedExcel.php
index c397944f0338c23ecf0304b2ee63bb63fb52a1f5..9a616bdf274e224073a614518b0b8b4b41e5fc9d 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportViewedExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportViewedExcel extends \Magento\Reports\Controller\Adminhtml\Report\Product
@@ -51,7 +52,7 @@ class ExportViewedExcel extends \Magento\Reports\Controller\Adminhtml\Report\Pro
         return $this->_fileFactory->create(
             $fileName,
             $grid->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerCsv.php
index 19da1836eeee2206cf3a85519d1e21e739129501..dd41de73b780704f0aa608c463d9e9e1400de74c 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Review;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCustomerCsv extends \Magento\Reports\Controller\Adminhtml\Report\Review
@@ -41,6 +42,6 @@ class ExportCustomerCsv extends \Magento\Reports\Controller\Adminhtml\Report\Rev
             'adminhtml.block.report.review.customer.grid',
             'grid.export'
         );
-        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerExcel.php
index f6abf2458b2c8a0519f5656f242211e2de1dae0a..5cdb569f2b51eef59aa3c9dfc02a36ee5bd305a3 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportCustomerExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Review;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCustomerExcel extends \Magento\Reports\Controller\Adminhtml\Report\Review
@@ -41,6 +42,6 @@ class ExportCustomerExcel extends \Magento\Reports\Controller\Adminhtml\Report\R
             'adminhtml.block.report.review.customer.grid',
             'grid.export'
         );
-        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductCsv.php
index 0349563635da1a334a7893c548b86563fa22de60..2b9b1ae273910239a153c274e0d21ee0f764efce 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Review;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportProductCsv extends \Magento\Reports\Controller\Adminhtml\Report\Review
@@ -41,6 +42,6 @@ class ExportProductCsv extends \Magento\Reports\Controller\Adminhtml\Report\Revi
             'adminhtml.block.report.review.product.grid',
             'grid.export'
         );
-        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailCsv.php
index 036316d46fee802790eebe4289f9457df28531f9..d82690fce686e6e2e1f077a90bdc9973db224324 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Review;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportProductDetailCsv extends \Magento\Reports\Controller\Adminhtml\Report\Review
@@ -40,6 +41,6 @@ class ExportProductDetailCsv extends \Magento\Reports\Controller\Adminhtml\Repor
             'Magento\Reports\Block\Adminhtml\Review\Detail\Grid'
         )->getCsv();
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailExcel.php
index 9776446793ec7529e24400e8c4bdeb8d6c232768..81b583e6f9af41044d62becd19ce8cbdaf94c3b1 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductDetailExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Review;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportProductDetailExcel extends \Magento\Reports\Controller\Adminhtml\Report\Review
@@ -42,6 +43,6 @@ class ExportProductDetailExcel extends \Magento\Reports\Controller\Adminhtml\Rep
             $fileName
         );
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductExcel.php
index 5b586573591b1de32b6766569215e313d3245ae4..51d089bdc3a9456c16eedb0f9354f9a37124d727 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Review/ExportProductExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Review;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportProductExcel extends \Magento\Reports\Controller\Adminhtml\Report\Review
@@ -41,6 +42,6 @@ class ExportProductExcel extends \Magento\Reports\Controller\Adminhtml\Report\Re
             'adminhtml.block.report.review.product.grid',
             'grid.export'
         );
-        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getExcelFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersCsv.php
index 1bdf29faffa57cbc912880debecbf70377008c1f..b855b99f1434a2b5ed6e9f538aaf0f115ed918c6 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportBestsellersCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportBestsellersCsv extends \Magento\Reports\Controller\Adminhtml\Report\
         $fileName = 'bestsellers.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Bestsellers\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersExcel.php
index 1f1043b2debb914e4f7b1153dfaefb758592ec0b..894bea9b03609a0597fe8131e4c4d2de453e4333 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportBestsellersExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportBestsellersExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportBestsellersExcel extends \Magento\Reports\Controller\Adminhtml\Repor
         $fileName = 'bestsellers.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Bestsellers\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsCsv.php
index d81476ac913f8a420d80fc4b7b2c5da6bf1e1a9d..1ff05faecf081402966c67453f4a9db32c79aa96 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCouponsCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportCouponsCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sale
         $fileName = 'coupons.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Coupons\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsExcel.php
index 5e18f05d5ea6e3a10db2dcff36640382769d3efb..73da450f987bfcb180da0c921483e99fa8a15c72 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportCouponsExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCouponsExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportCouponsExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sa
         $fileName = 'coupons.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Coupons\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedCsv.php
index 083950a4c15928ec7a6cfcbe4d6ff9ff302a1734..9ccd180aa1eb250b6ca95d3aba97ce335e4f16b3 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportInvoicedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportInvoicedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sal
         $fileName = 'invoiced.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Invoiced\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedExcel.php
index 390c9c9b8b047c1c725791ffea2a18603cabaee8..495d4988b9fa0f868a33f5c2c8ca8a2599167d88 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportInvoicedExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportInvoicedExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportInvoicedExcel extends \Magento\Reports\Controller\Adminhtml\Report\S
         $fileName = 'invoiced.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Invoiced\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedCsv.php
index 45cabd7b88b4afcf8e5577b0464c347f3a4abe0f..7fc2713ff1f9bed746dcf8d917713df745d02bdb 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportRefundedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportRefundedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sal
         $fileName = 'refunded.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Refunded\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedExcel.php
index a4c2df9c4b2e315e6942897338ca3e370c56f3f6..9423bbe2ddaa04c4b40eeb5a595147b081ebdca9 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportRefundedExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportRefundedExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportRefundedExcel extends \Magento\Reports\Controller\Adminhtml\Report\S
         $fileName = 'refunded.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Refunded\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesCsv.php
index 75c1e64f7dd0dccf114e23ad5259cb948c611e29..80c3ab5846a991ea4f504564edc84195456874d4 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportSalesCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportSalesCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
         $fileName = 'sales.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Sales\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesExcel.php
index 3d1417a7717af0eb4f58310292b81bcac9354412..f9ad8e92396c8fce2610cf1314d1d629ae19bfe0 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportSalesExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportSalesExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportSalesExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sale
         $fileName = 'sales.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Sales\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingCsv.php
index 950d54e8f530e44db45cab755d67b0c0b47b41bb..83a42d66c12838e8c11234e82a8443622bf450b5 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportShippingCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportShippingCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sal
         $fileName = 'shipping.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Shipping\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingExcel.php
index ae09cbb8effd7fae9f2eecc264afc736c267c249..ee11ead8696ebd068b27de93d4bda94db6f5f45b 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportShippingExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportShippingExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportShippingExcel extends \Magento\Reports\Controller\Adminhtml\Report\S
         $fileName = 'shipping.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Shipping\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxCsv.php
index a03f0ff106691491d9ae20b0f750443c9ed8c96f..aa4eeb67b356a68c2710085de67ac731c8e5a144 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportTaxCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportTaxCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sales
         $fileName = 'tax.csv';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Tax\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxExcel.php
index a68d066a8d7f4523063a20d3e0819eeb416e0874..373ba48ebaa4a3646efd136c2079c65828ddfe7d 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Sales/ExportTaxExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Sales;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportTaxExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
@@ -38,6 +39,6 @@ class ExportTaxExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sales
         $fileName = 'tax.xml';
         $grid = $this->_view->getLayout()->createBlock('Magento\Reports\Block\Adminhtml\Sales\Tax\Grid');
         $this->_initReportAction($grid);
-        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $grid->getExcelFile($fileName), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedCsv.php
index d3f518bbd7537afb422f26e5345379ea4311ea87..3d273b887fcf5c42f54bcbdaf8a2c7d1772e1d5f 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportAbandonedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
@@ -40,6 +41,6 @@ class ExportAbandonedCsv extends \Magento\Reports\Controller\Adminhtml\Report\Sh
             'Magento\Reports\Block\Adminhtml\Shopcart\Abandoned\Grid'
         )->getCsvFile();
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedExcel.php
index 051450cc8c8684aedfbf0a8c97cf059251fee6bb..1a31281fd71d98528a70ee178eebcc6147f47ace 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportAbandonedExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportAbandonedExcel extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
@@ -42,6 +43,6 @@ class ExportAbandonedExcel extends \Magento\Reports\Controller\Adminhtml\Report\
             $fileName
         );
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductCsv.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductCsv.php
index 761b1e89b6aae81c4ef999b943810abf6e47c359..c223d2e9689551c8cec5efafc13659e8dc055c7f 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductCsv.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportProductCsv extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
@@ -40,6 +41,6 @@ class ExportProductCsv extends \Magento\Reports\Controller\Adminhtml\Report\Shop
             'Magento\Reports\Block\Adminhtml\Shopcart\Product\Grid'
         )->getCsvFile();
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductExcel.php b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductExcel.php
index 432b5a5588a76dfe26fab3de3162cf1fc16ccc33..0b9ebb76df0fdcb8351e99be6a82316f4ab36921 100644
--- a/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductExcel.php
+++ b/app/code/Magento/Reports/Controller/Adminhtml/Report/Shopcart/ExportProductExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Reports\Controller\Adminhtml\Report\Shopcart;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportProductExcel extends \Magento\Reports\Controller\Adminhtml\Report\Shopcart
@@ -42,6 +43,6 @@ class ExportProductExcel extends \Magento\Reports\Controller\Adminhtml\Report\Sh
             $fileName
         );
 
-        return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php
index 95c713cf2b0409326ddd06897e6c5b6e8d50786a..f2a88f11291f7ee2d153f408c77f2526b17ca974 100644
--- a/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php
+++ b/app/code/Magento/Reports/Model/Resource/Report/Product/Viewed/Collection.php
@@ -134,7 +134,7 @@ class Collection extends \Magento\Reports\Model\Resource\Report\Collection\Abstr
      *
      * @return $this
      */
-    protected function _initSelect()
+    protected function _applyAggregatedTable()
     {
         $select = $this->getSelect();
 
diff --git a/app/code/Magento/Reports/composer.json b/app/code/Magento/Reports/composer.json
index 80278009cef4d6b9d8a607f50d754596eaa8c66b..3f4f88a41fbae32f67c30e0757356ecef9e3518a 100644
--- a/app/code/Magento/Reports/composer.json
+++ b/app/code/Magento/Reports/composer.json
@@ -3,27 +3,27 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-widget": "0.1.0-alpha100",
-        "magento/module-log": "0.1.0-alpha100",
-        "magento/module-wishlist": "0.1.0-alpha100",
-        "magento/module-review": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-downloadable": "0.1.0-alpha100",
-        "magento/module-sales-rule": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-widget": "0.1.0-alpha101",
+        "magento/module-log": "0.1.0-alpha101",
+        "magento/module-wishlist": "0.1.0-alpha101",
+        "magento/module-review": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-downloadable": "0.1.0-alpha101",
+        "magento/module-sales-rule": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/RequireJs/Model/FileManager.php b/app/code/Magento/RequireJs/Model/FileManager.php
index d412c33b44f57fde2a24183830b7dcf46f0a9060..158830fa262591e1eb02f51774516cb41a028c30 100644
--- a/app/code/Magento/RequireJs/Model/FileManager.php
+++ b/app/code/Magento/RequireJs/Model/FileManager.php
@@ -21,9 +21,10 @@
  * @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\RequireJs\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * A service for handling RequireJS files in the application
  */
@@ -35,7 +36,7 @@ class FileManager
     private $config;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     private $filesystem;
 
@@ -51,13 +52,13 @@ class FileManager
 
     /**
      * @param \Magento\Framework\RequireJs\Config $config
-     * @param \Magento\Framework\App\Filesystem $appFilesystem
+     * @param \Magento\Framework\Filesystem $appFilesystem
      * @param \Magento\Framework\App\State $appState
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      */
     public function __construct(
         \Magento\Framework\RequireJs\Config $config,
-        \Magento\Framework\App\Filesystem $appFilesystem,
+        \Magento\Framework\Filesystem $appFilesystem,
         \Magento\Framework\App\State $appState,
         \Magento\Framework\View\Asset\Repository $assetRepo
     ) {
@@ -89,7 +90,7 @@ class FileManager
      */
     private function ensureSourceFile($relPath)
     {
-        $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $dir = $this->filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW);
         if ($this->appState->getMode() == \Magento\Framework\App\State::MODE_DEVELOPER || !$dir->isExist($relPath)) {
             $dir->writeFile($relPath, $this->config->getConfig());
         }
diff --git a/app/code/Magento/RequireJs/composer.json b/app/code/Magento/RequireJs/composer.json
index 90077ab2b20b5bc38ae8e3add30e36070abaedbd..2d9694c18af6bb01512cf0165aa6db1dfe630b61 100644
--- a/app/code/Magento/RequireJs/composer.json
+++ b/app/code/Magento/RequireJs/composer.json
@@ -3,11 +3,11 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Review/composer.json b/app/code/Magento/Review/composer.json
index a53815a231195d18c586b8b563eb2d5641ebe163..64d8b592d4362a7a2159f306655480ddf2a02887 100644
--- a/app/code/Magento/Review/composer.json
+++ b/app/code/Magento/Review/composer.json
@@ -3,20 +3,20 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-newsletter": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-newsletter": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Rss/composer.json b/app/code/Magento/Rss/composer.json
index 27c62bd5907a3d7bab12f2a9333825914836e09a..34ba3cb190ded981724c6c0b62a81392b69abf2a 100644
--- a/app/code/Magento/Rss/composer.json
+++ b/app/code/Magento/Rss/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Rule/composer.json b/app/code/Magento/Rule/composer.json
index 48e6984797a6e6f6705033f20aa38b612d702805..448c87f7b4699529c717b4cb25a1813f769e5c20 100644
--- a/app/code/Magento/Rule/composer.json
+++ b/app/code/Magento/Rule/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/Pdfcreditmemos.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/Pdfcreditmemos.php
index 590e3e815565491f43522714b3c12bf38a2800ad..46bfe72cab3140548c1a3eade6afb8052f9b3ca9 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/Pdfcreditmemos.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/Pdfcreditmemos.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Creditmemo\AbstractCreditmemo;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class Pdfcreditmemos extends \Magento\Backend\App\Action
@@ -79,7 +80,7 @@ class Pdfcreditmemos extends \Magento\Backend\App\Action
             return $this->_fileFactory->create(
                 'creditmemo' . $date . '.pdf',
                 $pdf->render(),
-                \Magento\Framework\App\Filesystem::VAR_DIR,
+                DirectoryList::VAR_DIR,
                 'application/pdf'
             );
         }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/PrintAction.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/PrintAction.php
index fa8e77a8031fa9bb3967774dea2b9a77514b8f77..99f7f7c2a3b9c516af8495613ec8971b7704c479 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/PrintAction.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/AbstractCreditmemo/PrintAction.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Creditmemo\AbstractCreditmemo;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class PrintAction extends \Magento\Backend\App\Action
@@ -72,7 +73,7 @@ class PrintAction extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'creditmemo' . $date . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportCsv.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportCsv.php
index 7de7150e602a39f3bf9eff385cd086cf9f51c3ca..6ccc89e61f59793f1a225071ad22739b5e84a4cc 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportCsv.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Creditmemo;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCsv extends \Magento\Backend\App\Action
@@ -64,6 +65,6 @@ class ExportCsv extends \Magento\Backend\App\Action
         $fileName = 'creditmemos.csv';
         $grid = $grid = $this->_view->getLayout()->getChildBlock('sales.creditmemo.grid', 'grid.export');
         $csvFile = $grid->getCsvFile();
-        return $this->_fileFactory->create($fileName, $csvFile, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $csvFile, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportExcel.php b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportExcel.php
index 0d50acc30679abbd57ecc410e6184488f30e874d..771e3c854becbf120dfe8a92981b23bcd8be7d72 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportExcel.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Creditmemo/ExportExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Creditmemo;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportExcel extends \Magento\Backend\App\Action
@@ -66,7 +67,7 @@ class ExportExcel extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $grid->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php
index eeaee956e26e26a2c1b44226506816a337485f6c..3e8267c794cf1e3f8d6d153ed5b69ef2e2cbfa0c 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/Pdfinvoices.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 abstract class Pdfinvoices extends \Magento\Backend\App\Action
@@ -79,7 +80,7 @@ abstract class Pdfinvoices extends \Magento\Backend\App\Action
             return $this->_fileFactory->create(
                 'invoice' . $date . '.pdf',
                 $pdf->render(),
-                \Magento\Framework\App\Filesystem::VAR_DIR,
+                DirectoryList::VAR_DIR,
                 'application/pdf'
             );
         }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/PrintAction.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/PrintAction.php
index cae54d456a478eeb291245c332f5c6c50e81bbc0..733d3ba18b2f18881781d892296a54ba9045dcfa 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/PrintAction.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/AbstractInvoice/PrintAction.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 abstract class PrintAction extends \Magento\Backend\App\Action
@@ -67,7 +68,7 @@ abstract class PrintAction extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'invoice' . $date . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportCsv.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportCsv.php
index 5e7dbaee069857b4745b4c1b8ef0a0c0a8faee29..91741dc208ad3ab7287cd0cbeb60660bd7aaad5d 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportCsv.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Invoice;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCsv extends \Magento\Backend\App\Action
@@ -67,7 +68,7 @@ class ExportCsv extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportExcel.php b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportExcel.php
index 3f80b7abb59ac5ea9943610930f7570a6f32a05c..5d7c9fc78a1c0b5c2a17267c354c28a3b60d346f 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportExcel.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Invoice/ExportExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Invoice;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportExcel extends \Magento\Backend\App\Action
@@ -66,7 +67,7 @@ class ExportExcel extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportCsv.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportCsv.php
index 6c3d97c8a23b45db75dfa09f31062794bcf05f3b..3714622c6ade449b2c003358da0ffcaf4671d87a 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportCsv.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Order;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -40,6 +41,6 @@ class ExportCsv extends \Magento\Sales\Controller\Adminhtml\Order
         $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\Framework\App\Filesystem::VAR_DIR);
+        return $this->_fileFactory->create($fileName, $exportBlock->getCsvFile(), DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportExcel.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportExcel.php
index cad39211128c6837021a355df2101c3200165c9a..6a718b9d25619684989297b9d3bdd23ba97975b9 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportExcel.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/ExportExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Order;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -43,7 +44,7 @@ class ExportExcel extends \Magento\Sales\Controller\Adminhtml\Order
         return $this->_fileFactory->create(
             $fileName,
             $exportBlock->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfcreditmemos.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfcreditmemos.php
index 33c6f6b5e342d7291ed7270c118cb0d681da45fe..1962d4440bc49e711727178c1d97ee8e90de79c6 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfcreditmemos.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfcreditmemos.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Order;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -71,7 +72,7 @@ class Pdfcreditmemos extends \Magento\Sales\Controller\Adminhtml\Order
                         'Y-m-d_H-i-s'
                     ) . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             } else {
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php
index 451454184fdc31ad080db666339be8892b09f9cc..de37ce5a0bbc3fef826bc491c32f470316f9058b 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfdocs.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Order;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -117,7 +118,7 @@ class Pdfdocs extends \Magento\Sales\Controller\Adminhtml\Order
                         'Y-m-d_H-i-s'
                     ) . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             } else {
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfinvoices.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfinvoices.php
index aa64ce9146b74dd37d22a7459fea09fe495886f2..6c103c73bbc7bc6f975efe67a730452c1caa3284 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfinvoices.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfinvoices.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Order;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -71,7 +72,7 @@ class Pdfinvoices extends \Magento\Sales\Controller\Adminhtml\Order
                         'Y-m-d_H-i-s'
                     ) . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             } else {
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfshipments.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfshipments.php
index b5c28bceb75b38829c5cd58fbb96fe8d96b62609..2bbc5eceaa7ccef60c2ed526b0da219671e24327 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfshipments.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Pdfshipments.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Order;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -71,7 +72,7 @@ class Pdfshipments extends \Magento\Sales\Controller\Adminhtml\Order
                         'Y-m-d_H-i-s'
                     ) . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             } else {
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/Pdfshipments.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/Pdfshipments.php
index 11b79cd31fe2ccf78a10252d9d527c3db84763d1..4ea6b9bdee7fb0e218192a92ab49216c3851b643 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/Pdfshipments.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/Pdfshipments.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Shipment\AbstractShipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 abstract class Pdfshipments extends \Magento\Backend\App\Action
@@ -78,7 +79,7 @@ abstract class Pdfshipments extends \Magento\Backend\App\Action
             return $this->_fileFactory->create(
                 'packingslip' . $date . '.pdf',
                 $pdf->render(),
-                \Magento\Framework\App\Filesystem::VAR_DIR,
+                DirectoryList::VAR_DIR,
                 'application/pdf'
             );
         }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/PrintAction.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/PrintAction.php
index db8f296fcca2201fa1e3462addd7db3fe6f88477..2993d623b868c342cd5458748337bf51763da734 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/PrintAction.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/AbstractShipment/PrintAction.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Shipment\AbstractShipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 abstract class PrintAction extends \Magento\Backend\App\Action
@@ -71,7 +72,7 @@ abstract class PrintAction extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'packingslip' . $date . '.pdf',
                     $pdf->render(),
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportCsv.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportCsv.php
index 7e4b653c54c218d0b26eced1786cdfda42e99a67..10c8c4cde939d8cf7fef25b46d93a80e7adfa49f 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportCsv.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Shipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCsv extends \Magento\Backend\App\Action
@@ -66,7 +67,7 @@ class ExportCsv extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $grid->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportExcel.php b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportExcel.php
index e5dcb79e6b4db0c4cdf281e88280756f0ed00cfc..bfbeade33000d2d7c64b54823696b966aef0b56e 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportExcel.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Shipment/ExportExcel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Sales\Controller\Adminhtml\Shipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportExcel extends \Magento\Backend\App\Action
@@ -66,7 +67,7 @@ class ExportExcel extends \Magento\Backend\App\Action
         return $this->_fileFactory->create(
             $fileName,
             $grid->getExcelFile($fileName),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/Sales/Model/Download.php b/app/code/Magento/Sales/Model/Download.php
index e4c7a5508dd37cdffa97a22b218847b2c2384dab..0c3bb1413ca906df821c2961f5d6aa3f794e8a33 100644
--- a/app/code/Magento/Sales/Model/Download.php
+++ b/app/code/Magento/Sales/Model/Download.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Sales\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Download
 {
     /**
@@ -46,18 +48,18 @@ class Download
     protected $_fileFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase
      * @param \Magento\Core\Model\File\Storage\DatabaseFactory $storageDatabaseFactory
      * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase,
         \Magento\Core\Model\File\Storage\DatabaseFactory $storageDatabaseFactory,
         \Magento\Framework\App\Response\Http\FileFactory $fileFactory
     ) {
-        $this->_rootDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_rootDir = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $this->_fileStorageDatabase = $fileStorageDatabase;
         $this->_storageDatabaseFactory = $storageDatabaseFactory;
         $this->_fileFactory = $fileFactory;
@@ -84,7 +86,7 @@ class Download
         $this->_fileFactory->create(
             $info['title'],
             array('value' => $this->_rootDir->getRelativePath($relativePath), 'type' => 'filename'),
-            \Magento\Framework\App\Filesystem::ROOT_DIR
+            DirectoryList::ROOT
         );
     }
 
diff --git a/app/code/Magento/Sales/Model/Order.php b/app/code/Magento/Sales/Model/Order.php
index 2fdf5c29c159b12226ddf9f3bcf15443f343f02e..c08bd2305e77b7c2a5b477b3f7d68d5fe8b8a7d2 100644
--- a/app/code/Magento/Sales/Model/Order.php
+++ b/app/code/Magento/Sales/Model/Order.php
@@ -487,13 +487,6 @@ class Order extends \Magento\Sales\Model\AbstractModel implements EntityInterfac
      */
     protected $_productVisibility;
 
-    /**
-     * Tax helper
-     *
-     * @var \Magento\Tax\Helper\Data
-     */
-    protected $_taxHelper;
-
     /**
      * @var \Magento\Sales\Model\Service\OrderFactory
      */
@@ -559,7 +552,6 @@ class Order extends \Magento\Sales\Model\AbstractModel implements EntityInterfac
      * @param \Magento\Catalog\Model\ProductFactory $productFactory
      * @param Resource\Order\Item\CollectionFactory $orderItemCollectionFactory
      * @param \Magento\Catalog\Model\Product\Visibility $productVisibility
-     * @param \Magento\Tax\Helper\Data $taxHelper
      * @param Service\OrderFactory $serviceOrderFactory
      * @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
      * @param \Magento\Eav\Model\Config $eavConfig
@@ -586,7 +578,6 @@ class Order extends \Magento\Sales\Model\AbstractModel implements EntityInterfac
         \Magento\Catalog\Model\ProductFactory $productFactory,
         \Magento\Sales\Model\Resource\Order\Item\CollectionFactory $orderItemCollectionFactory,
         \Magento\Catalog\Model\Product\Visibility $productVisibility,
-        \Magento\Tax\Helper\Data $taxHelper,
         \Magento\Sales\Model\Service\OrderFactory $serviceOrderFactory,
         \Magento\Directory\Model\CurrencyFactory $currencyFactory,
         \Magento\Eav\Model\Config $eavConfig,
@@ -609,7 +600,6 @@ class Order extends \Magento\Sales\Model\AbstractModel implements EntityInterfac
 
         $this->_orderItemCollectionFactory = $orderItemCollectionFactory;
         $this->_productVisibility = $productVisibility;
-        $this->_taxHelper = $taxHelper;
         $this->_serviceOrderFactory = $serviceOrderFactory;
         $this->_currencyFactory = $currencyFactory;
         $this->_eavConfig = $eavConfig;
@@ -2184,14 +2174,6 @@ class Order extends \Magento\Sales\Model\AbstractModel implements EntityInterfac
         return !$this->getIsVirtual();
     }
 
-    /**
-     * @return array
-     */
-    public function getFullTaxInfo()
-    {
-        return $this->_taxHelper->getCalculatedTaxes($this);
-    }
-
     /**
      * Create new invoice with maximum qty for invoice for each item
      *
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
index 68c63ee63d3dc9836931d69a225a3614742e422a..7f405ed549a4c42b8d09dc9e04da84769ce9726f 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/AbstractPdf.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Sales\Model\Order\Pdf;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Sales Order PDF abstract model
  */
@@ -125,7 +127,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -139,7 +141,7 @@ abstract class AbstractPdf extends \Magento\Framework\Object
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
@@ -151,8 +153,8 @@ abstract class AbstractPdf extends \Magento\Framework\Object
         $this->_localeDate = $localeDate;
         $this->string = $string;
         $this->_scopeConfig = $scopeConfig;
-        $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
-        $this->_rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+        $this->_rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->_pdfConfig = $pdfConfig;
         $this->_pdfTotalFactory = $pdfTotalFactory;
         $this->_pdfItemsFactory = $pdfItemsFactory;
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
index 28430cc641c3722e76a512a88fe45edcaf914e09..a72824e9ee534c97f1e8125302213e187c0f83b2 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Creditmemo.php
@@ -37,7 +37,7 @@ class Creditmemo extends AbstractPdf
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -54,7 +54,7 @@ class Creditmemo extends AbstractPdf
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
index 2221b2510871838297ddac3023e9222ee678f4b4..563034180448ae588a002e1d927f33dcc1451cc7 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Invoice.php
@@ -42,7 +42,7 @@ class Invoice extends AbstractPdf
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -58,7 +58,7 @@ class Invoice extends AbstractPdf
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $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 2ae59f42080f0993b6558cbd9951915778be5a01..180e0ce458e55bbe874aecd507b0b4f5351a22cc 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Items/AbstractItems.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Sales\Model\Order\Pdf\Items;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Sales Order Pdf Items renderer Abstract
  */
@@ -84,7 +86,7 @@ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem ,
+     * @param \Magento\Framework\Filesystem $filesystem ,
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
@@ -94,7 +96,7 @@ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
@@ -102,7 +104,7 @@ abstract class AbstractItems extends \Magento\Framework\Model\AbstractModel
     ) {
         $this->filterManager = $filterManager;
         $this->_taxData = $taxData;
-        $this->_rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         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 fcc3c04b4c879545e1aa304af6344ea93b809c0f..51e51653825695516fa0e37049fb72287c11e1de 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
@@ -39,7 +39,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -50,7 +50,7 @@ class DefaultCreditmemo extends \Magento\Sales\Model\Order\Pdf\Items\AbstractIte
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Model\Resource\AbstractResource $resource = 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 f7b82edb798f8d607fc5cd3ca5824de2231af6cb..94bfa6f980f661c896483cab04a08e6026047fe8 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
@@ -39,7 +39,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -50,7 +50,7 @@ class DefaultInvoice extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Model\Resource\AbstractResource $resource = 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 e4369d0d99de4179c773774d1e2f9f302c4b735a..934771be0a9dbb411cb208e1d0b6f378affc446d 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
@@ -39,7 +39,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
      * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Tax\Helper\Data $taxData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
@@ -50,7 +50,7 @@ class DefaultShipment extends \Magento\Sales\Model\Order\Pdf\Items\AbstractItems
         \Magento\Framework\Model\Context $context,
         \Magento\Framework\Registry $registry,
         \Magento\Tax\Helper\Data $taxData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
diff --git a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
index f6362aea335fe95ed8a568c6a72e2f4ad9f0911b..23ee9c19df1479d7a4ae2047ab8516fb5b580cc9 100644
--- a/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
+++ b/app/code/Magento/Sales/Model/Order/Pdf/Shipment.php
@@ -42,7 +42,7 @@ class Shipment extends AbstractPdf
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param Config $pdfConfig
      * @param \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory
      * @param \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory
@@ -58,7 +58,7 @@ class Shipment extends AbstractPdf
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
diff --git a/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php b/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php
index 8db62816739a81ddb8f5e4a9fe5eef5a4f14fec8..2f4722981e2f2cd77ff83df3bcedc8533a2b81cf 100644
--- a/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php
+++ b/app/code/Magento/Sales/Model/Quote/Address/Total/AbstractTotal.php
@@ -61,13 +61,6 @@ abstract class AbstractTotal
      */
     protected $_itemRowTotalKey = null;
 
-    /**
-     * Static counter
-     *
-     * @var int
-     */
-    protected static $counter = 0;
-
     /**
      * Set total code code name
      *
@@ -277,15 +270,4 @@ abstract class AbstractTotal
     {
         return $config;
     }
-
-    /**
-     * Increment and return static counter. This function is intended to be used to generate temporary
-     * id for an item.
-     *
-     * @return int
-     */
-    protected function getNextIncrement()
-    {
-        return ++self::$counter;
-    }
 }
diff --git a/app/code/Magento/Sales/Model/Quote/Item.php b/app/code/Magento/Sales/Model/Quote/Item.php
index ce285efe13a3927b84980b259bfda8064330dbcb..ce0c5cc93281104c35832fbb57abdef1b06ea232 100644
--- a/app/code/Magento/Sales/Model/Quote/Item.php
+++ b/app/code/Magento/Sales/Model/Quote/Item.php
@@ -292,6 +292,7 @@ class Item extends \Magento\Sales\Model\Quote\Item\AbstractItem
     {
         $this->_quote = $quote;
         $this->setQuoteId($quote->getId());
+        $this->setStoreId($quote->getStoreId());
         return $this;
     }
 
diff --git a/app/code/Magento/Sales/README.md b/app/code/Magento/Sales/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..69068f5bfc5dc1dd07103ec768e18cf7238d3bf8
--- /dev/null
+++ b/app/code/Magento/Sales/README.md
@@ -0,0 +1,19 @@
+# Overview
+## Purpose of module
+
+Magento\Sales module is responsible for order processing and appearance in system,
+Magento\Sales module manages next system entities and flows:
+* order management;
+* invoice management;
+* shipment management (including tracks management);
+* credit memos management;
+Magento\Sales module is required for Magento\Checkout module to perform checkout operations.
+
+# Deployment
+## System requirements
+
+The Magento_Sales module does not have any specific system requirements.
+Depending on how many orders are being placed, there might be consideration for the database size
+
+## Install
+The Magento_Sales module is installed automatically (using the native Magento install mechanism) without any additional actions.
diff --git a/app/code/Magento/Sales/composer.json b/app/code/Magento/Sales/composer.json
index 6f08f6dcf969ec8673c6902d5caf3a477e101e26..a13bc1fea58d5759ec158d425c23ba0c936d4094 100644
--- a/app/code/Magento/Sales/composer.json
+++ b/app/code/Magento/Sales/composer.json
@@ -3,31 +3,31 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-authorization": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-sales-rule": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-widget": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-gift-message": "0.1.0-alpha100",
-        "magento/module-reports": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-wishlist": "0.1.0-alpha100",
-        "magento/module-email": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-authorization": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-sales-rule": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-widget": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-gift-message": "0.1.0-alpha101",
+        "magento/module-reports": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-wishlist": "0.1.0-alpha101",
+        "magento/module-email": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsCsv.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsCsv.php
index cccd4fe1a1b871e27a58e155272e3e5e60ed2fdb..527b6a18f57e3d00a691fed82cc697e192af7220 100644
--- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsCsv.php
+++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsCsv.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\SalesRule\Controller\Adminhtml\Promo\Quote;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ExportCouponsCsv extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote
 {
     /**
@@ -40,7 +42,7 @@ class ExportCouponsCsv extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quo
             $content = $this->_view->getLayout()->createBlock(
                 'Magento\SalesRule\Block\Adminhtml\Promo\Quote\Edit\Tab\Coupons\Grid'
             )->getCsvFile();
-            return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+            return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
         } else {
             $this->_redirect('sales_rule/*/detail', array('_current' => true));
             return;
diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsXml.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsXml.php
index 3229084369bdb6ce32101ebcb6c8b89055a638cc..2d1835995358988218fa909920a0ddc9d93f9b64 100644
--- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsXml.php
+++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote/ExportCouponsXml.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\SalesRule\Controller\Adminhtml\Promo\Quote;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ExportCouponsXml extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quote
 {
     /**
@@ -42,7 +44,7 @@ class ExportCouponsXml extends \Magento\SalesRule\Controller\Adminhtml\Promo\Quo
             )->getExcelFile(
                 $fileName
             );
-            return $this->_fileFactory->create($fileName, $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+            return $this->_fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
         } else {
             $this->_redirect('sales_rule/*/detail', array('_current' => true));
             return;
diff --git a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php
index 9e20e45ad6c9dc622cfe27d7c6340282bb75db76..05aeedaa89c663d2ac24a533ea04ec8e7c5f4584 100644
--- a/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php
+++ b/app/code/Magento/SalesRule/Model/Resource/Report/Collection.php
@@ -131,7 +131,7 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac
      *
      * @return $this
      */
-    protected function _initSelect()
+    protected function _applyAggregatedTable()
     {
         $this->getSelect()->from($this->getResource()->getMainTable(), $this->_getSelectedColumns());
         if ($this->isSubTotals()) {
@@ -145,7 +145,7 @@ class Collection extends \Magento\Sales\Model\Resource\Report\Collection\Abstrac
             );
         }
 
-        return parent::_initSelect();
+        return parent::_applyAggregatedTable();
     }
 
     /**
diff --git a/app/code/Magento/SalesRule/README.md b/app/code/Magento/SalesRule/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..88fb4e2acd45d51c2338ff9b9da1603b458b5693
--- /dev/null
+++ b/app/code/Magento/SalesRule/README.md
@@ -0,0 +1,2 @@
+SalesRule module is responsible for managing and processing Promotion Shopping Cart Rules.
+
diff --git a/app/code/Magento/SalesRule/composer.json b/app/code/Magento/SalesRule/composer.json
index 363b60b1db46ceb99cea6a56ef2388ca23c4d54e..6cce4de8ff6940b715ef01a936e5c42c7f3b88b1 100644
--- a/app/code/Magento/SalesRule/composer.json
+++ b/app/code/Magento/SalesRule/composer.json
@@ -3,26 +3,26 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-rule": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-reports": "0.1.0-alpha100",
-        "magento/module-catalog-rule": "0.1.0-alpha100",
-        "magento/module-widget": "0.1.0-alpha100",
-        "magento/module-cron": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-rule": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-reports": "0.1.0-alpha101",
+        "magento/module-catalog-rule": "0.1.0-alpha101",
+        "magento/module-widget": "0.1.0-alpha101",
+        "magento/module-cron": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/lib/internal/Magento/Framework/Search/AdapterFactory.php b/app/code/Magento/Search/Model/AdapterFactory.php
similarity index 96%
rename from lib/internal/Magento/Framework/Search/AdapterFactory.php
rename to app/code/Magento/Search/Model/AdapterFactory.php
index 3540caf62805e26f86c1c9630f1ee4d27fa922cc..6570702ecebdba31ebb916e9f98b4d8d2d944033 100644
--- a/lib/internal/Magento/Framework/Search/AdapterFactory.php
+++ b/app/code/Magento/Search/Model/AdapterFactory.php
@@ -21,11 +21,8 @@
  * @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\Framework\Search;
+namespace Magento\Search\Model;
 
-/**
- * Adapter Factory
- */
 class AdapterFactory
 {
     /**
@@ -76,7 +73,7 @@ class AdapterFactory
      * Create Adapter instance
      *
      * @param array $data
-     * @return AdapterInterface
+     * @return \Magento\Framework\Search\AdapterInterface
      */
     public function create(array $data = array())
     {
diff --git a/app/code/Magento/Search/Model/Query.php b/app/code/Magento/Search/Model/Query.php
index a73a1f0b37daa111b7b34b72d3fb76c1398c99a4..5bdf1aebb816076dc68f3b29acb53ab33e509e4d 100644
--- a/app/code/Magento/Search/Model/Query.php
+++ b/app/code/Magento/Search/Model/Query.php
@@ -27,7 +27,6 @@ use Magento\Search\Model\Resource\Query\Collection as QueryCollection;
 use Magento\Search\Model\Resource\Query\CollectionFactory as QueryCollectionFactory;
 use Magento\Search\Model\SearchCollectionInterface as Collection;
 use Magento\Search\Model\SearchCollectionFactory as CollectionFactory;
-use Magento\Eav\Model\Entity\Collection\AbstractCollection;
 use Magento\Framework\App\Config\ScopeConfigInterface;
 use Magento\Framework\Data\Collection\Db;
 use Magento\Framework\Model\AbstractModel;
@@ -162,29 +161,6 @@ class Query extends AbstractModel implements QueryInterface
         return $this->_searchCollectionFactory->create();
     }
 
-    /**
-     * Retrieve collection of search results
-     *
-     * @deplecated
-     * @return AbstractCollection
-     */
-    public function getResultCollection()
-    {
-        $collection = $this->getData('result_collection');
-        if (is_null($collection)) {
-            $collection = $this->getSearchCollection();
-
-            $text = $this->getSynonymFor();
-            if (!$text) {
-                $text = $this->getQueryText();
-            }
-
-            $collection->addSearchFilter($text)->addStoreFilter()->addMinimalPrice()->addTaxPercents();
-            $this->setData('result_collection', $collection);
-        }
-        return $collection;
-    }
-
     /**
      * Retrieve collection of suggest queries
      *
diff --git a/app/code/Magento/Search/Model/QueryFactory.php b/app/code/Magento/Search/Model/QueryFactory.php
index 7a8c3d6136228f5d8af57b9540b640605c207f43..0ef499cdc5740d9ca43f063eaff00efc0a633ffb 100644
--- a/app/code/Magento/Search/Model/QueryFactory.php
+++ b/app/code/Magento/Search/Model/QueryFactory.php
@@ -85,26 +85,29 @@ class QueryFactory implements QueryFactoryInterface
     public function get()
     {
         if (!$this->query) {
-            $this->query = $this->create();
+            $maxQueryLength = $this->getMaxQueryLength();
+            $rawQueryText = $this->getRawQueryText();
+            $preparedQueryText = $this->getPreparedQueryText($rawQueryText, $maxQueryLength);
+            /** @var \Magento\Search\Model\Query $query */
+            $query = $this->create()->loadByQuery($preparedQueryText);
+            if (!$query->getId()) {
+                $query->setQueryText($preparedQueryText);
+            }
+            $query->setIsQueryTextExceeded($this->isQueryTooLong($preparedQueryText, $maxQueryLength));
+            $this->query = $query;
         }
         return $this->query;
     }
 
     /**
-     * @return Query
+     * Create new instance
+     *
+     * @param array $data
+     * @return \Magento\Search\Model\Query
      */
-    private function create()
+    public function create(array $data = [])
     {
-        $maxQueryLength = $this->getMaxQueryLength();
-        $rawQueryText = $this->getRawQueryText();
-        $preparedQueryText = $this->getPreparedQueryText($rawQueryText, $maxQueryLength);
-        /** @var \Magento\Search\Model\Query $query */
-        $query = $this->objectManager->create('\Magento\Search\Model\Query')->loadByQuery($preparedQueryText);
-        if (!$query->getId()) {
-            $query->setQueryText($preparedQueryText);
-        }
-        $query->setIsQueryTextExceeded($this->isQueryTooLong($preparedQueryText, $maxQueryLength));
-        return $query;
+        return $this->objectManager->create('Magento\Search\Model\Query', $data);
     }
 
     /**
diff --git a/app/code/Magento/Search/Model/Resource/Helper.php b/app/code/Magento/Search/Model/Resource/Helper.php
index 07ca65b8ad031b9e85733feb06f5726cdc1eacc2..9cdb6bd24a2845e83fb04542d5f2d49d50249d07 100644
--- a/app/code/Magento/Search/Model/Resource/Helper.php
+++ b/app/code/Magento/Search/Model/Resource/Helper.php
@@ -25,10 +25,8 @@ namespace Magento\Search\Model\Resource;
 
 /**
  * Search Mysql resource helper model
- *
- * @author      Magento Core Team <core@magentocommerce.com>
  */
-class Helper extends \Magento\Eav\Model\Resource\Helper
+class Helper extends \Magento\Framework\DB\Helper
 {
     /**
      * @param \Magento\Framework\App\Resource $resource
@@ -39,21 +37,6 @@ class Helper extends \Magento\Eav\Model\Resource\Helper
         parent::__construct($resource, $modulePrefix);
     }
 
-    /**
-     * Join information for usin full text search
-     *
-     * @param string $table
-     * @param string $alias
-     * @param \Magento\Framework\DB\Select $select
-     * @return \Zend_Db_Expr
-     */
-    public function chooseFulltext($table, $alias, $select)
-    {
-        $field = new \Zend_Db_Expr('MATCH (' . $alias . '.data_index) AGAINST (:query IN BOOLEAN MODE)');
-        $select->columns(array('relevance' => $field));
-        return $field;
-    }
-
     /**
      * Prepare Terms
      *
diff --git a/app/code/Magento/Search/Model/Resource/Query.php b/app/code/Magento/Search/Model/Resource/Query.php
index 23fdeba483e8c5b400633ec2c819c2ce7f8ba6ed..e3bbade41e2e9c59be629e20b428982d074bae19 100644
--- a/app/code/Magento/Search/Model/Resource/Query.php
+++ b/app/code/Magento/Search/Model/Resource/Query.php
@@ -23,11 +23,13 @@
  */
 namespace Magento\Search\Model\Resource;
 
+use Magento\Framework\DB\Select;
+use Magento\Framework\Model\AbstractModel;
 use Magento\Framework\Model\Resource\Db\AbstractDb;
 
 /**
  * Search query resource model
- *
+
  */
 class Query extends AbstractDb
 {
@@ -59,34 +61,22 @@ class Query extends AbstractDb
     }
 
     /**
-     * Init resource data
-     *
-     * @return void
-     */
-    protected function _construct()
-    {
-        $this->_init('search_query', 'query_id');
-    }
-
-    /**
-     * Custom load model by search query string
+     * Custom load model only by query text (skip synonym for)
      *
-     * @param \Magento\Framework\Model\AbstractModel $object
+     * @param AbstractModel $object
      * @param string $value
      * @return $this
      */
-    public function loadByQuery(\Magento\Framework\Model\AbstractModel $object, $value)
+    public function loadByQueryText(AbstractModel $object, $value)
     {
         $select = $this->_getReadAdapter()->select()->from(
             $this->getMainTable()
         )->where(
-            'synonym_for=? OR query_text=?',
+            'query_text = ?',
             $value
         )->where(
-            'store_id=?',
+            'store_id = ?',
             $object->getStoreId()
-        )->order(
-            'synonym_for ASC'
         )->limit(
             1
         );
@@ -95,63 +85,87 @@ class Query extends AbstractDb
             $object->setData($data);
             $this->_afterLoad($object);
         }
+        return $this;
+    }
 
+    /**
+     * Loading string as a value or regular numeric
+     *
+     * @param AbstractModel $object
+     * @param int|string $value
+     * @param null|string $field
+     * @return $this|\Magento\Framework\Model\Resource\Db\AbstractDb
+     */
+    public function load(AbstractModel $object, $value, $field = null)
+    {
+        if (is_numeric($value)) {
+            return parent::load($object, $value);
+        } else {
+            $this->loadByQuery($object, $value);
+        }
         return $this;
     }
 
     /**
-     * Custom load model only by query text (skip synonym for)
+     * Custom load model by search query string
      *
-     * @param \Magento\Framework\Model\AbstractModel $object
+     * @param AbstractModel $object
      * @param string $value
      * @return $this
      */
-    public function loadByQueryText(\Magento\Framework\Model\AbstractModel $object, $value)
+    public function loadByQuery(AbstractModel $object, $value)
     {
-        $select = $this->_getReadAdapter()->select()->from(
-            $this->getMainTable()
-        )->where(
-            'query_text = ?',
-            $value
-        )->where(
-            'store_id = ?',
-            $object->getStoreId()
-        )->limit(
-            1
-        );
+        $readAdapter = $this->_getReadAdapter();
+        $select = $readAdapter->select();
+
+        $synonymSelect = $this->getQuerySelect($object, 'query_text', $value);
+        $querySelect = $this->getQuerySelect($object, 'synonym_for', $value);
+
+        $select->union(array("($synonymSelect)", "($querySelect)"), Select::SQL_UNION_ALL)
+            ->limit(1);
+
         $data = $this->_getReadAdapter()->fetchRow($select);
         if ($data) {
             $object->setData($data);
             $this->_afterLoad($object);
         }
+
         return $this;
     }
 
     /**
-     * Loading string as a value or regular numeric
-     *
-     * @param \Magento\Framework\Model\AbstractModel $object
-     * @param int|string $value
-     * @param null|string $field
-     * @return $this|\Magento\Framework\Model\Resource\Db\AbstractDb
+     * @param AbstractModel $object
+     * @param string $field
+     * @param string $value
+     * @return Select
      */
-    public function load(\Magento\Framework\Model\AbstractModel $object, $value, $field = null)
+    private function getQuerySelect(AbstractModel $object, $field, $value)
     {
-        if (is_numeric($value)) {
-            return parent::load($object, $value);
-        } else {
-            $this->loadByQuery($object, $value);
-        }
-        return $this;
+        $select = $this->_getReadAdapter()->select();
+        $select->from($this->getMainTable())
+            ->where($field . ' = ?', $value)
+            ->where('store_id = ?', $object->getStoreId())
+            ->limit(1);
+        return $select;
     }
 
     /**
-     * @param \Magento\Framework\Model\AbstractModel $object
+     * @param AbstractModel $object
      * @return $this
      */
-    public function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
+    public function _beforeSave(AbstractModel $object)
     {
         $object->setUpdatedAt($this->dateTime->formatDate($this->_date->gmtTimestamp()));
         return $this;
     }
+
+    /**
+     * Init resource data
+     *
+     * @return void
+     */
+    protected function _construct()
+    {
+        $this->_init('search_query', 'query_id');
+    }
 }
diff --git a/app/code/Magento/Search/Model/Resource/Query/Collection.php b/app/code/Magento/Search/Model/Resource/Query/Collection.php
index 81a7ea3a71df2dc482ffd622fe743b29b6621f52..6c3bb69b1217eff33734178d8009905b871e734e 100644
--- a/app/code/Magento/Search/Model/Resource/Query/Collection.php
+++ b/app/code/Magento/Search/Model/Resource/Query/Collection.php
@@ -164,7 +164,7 @@ class Collection extends \Magento\Framework\Model\Resource\Db\Collection\Abstrac
             true
         )->from(
             array('main_table' => $this->getTable('search_query')),
-            array('name' => $ifSynonymFor, 'num_results', 'popularity')
+            array('name' => $ifSynonymFor, 'num_results', 'popularity', 'query_id')
         );
         if ($storeIds) {
             $this->addStoreFilter($storeIds);
diff --git a/lib/internal/Magento/Framework/Search/SearchEngine.php b/app/code/Magento/Search/Model/SearchEngine.php
similarity index 84%
rename from lib/internal/Magento/Framework/Search/SearchEngine.php
rename to app/code/Magento/Search/Model/SearchEngine.php
index 6fee0377130125ce2f4ffc5272640e56ac2d80cc..ac0713d4187b5f513fe97d04b03c3b2db1b73d08 100644
--- a/lib/internal/Magento/Framework/Search/SearchEngine.php
+++ b/app/code/Magento/Search/Model/SearchEngine.php
@@ -21,7 +21,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\Framework\Search;
+namespace Magento\Search\Model;
+
+use Magento\Framework\Search\AdapterInterface;
+use Magento\Framework\Search\RequestInterface;
+use Magento\Framework\Search\SearchEngineInterface;
 
 /**
  * Search Engine
@@ -36,9 +40,8 @@ class SearchEngine implements SearchEngineInterface
     /**
      * @param AdapterFactory $adapterFactory
      */
-    public function __construct(
-        AdapterFactory $adapterFactory
-    ) {
+    public function __construct(AdapterFactory $adapterFactory)
+    {
         $this->adapter = $adapterFactory->create();
     }
 
diff --git a/app/code/Magento/Search/composer.json b/app/code/Magento/Search/composer.json
index 430437277ef551e7cf87839a0b24494ebfe40524..c155cfc008a369475b406f699f07d472542f05b9 100644
--- a/app/code/Magento/Search/composer.json
+++ b/app/code/Magento/Search/composer.json
@@ -3,14 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/framework": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Search/etc/config.xml b/app/code/Magento/Search/etc/config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1a712f39fb400cf32825a6472ee007eaa72c4150
--- /dev/null
+++ b/app/code/Magento/Search/etc/config.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)
+ */
+-->
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Core/etc/config.xsd">
+    <default>
+        <catalog>
+            <search>
+                <adapter>Magento\Framework\Search\Adapter\Mysql\Adapter</adapter>
+            </search>
+        </catalog>
+    </default>
+</config>
\ No newline at end of file
diff --git a/app/code/Magento/Search/etc/di.xml b/app/code/Magento/Search/etc/di.xml
index e62186fc9d006904fa5e78dfa8a94733f98d24b4..f352247bb3a3fd00cf9a28dca79b52a54773cbca 100644
--- a/app/code/Magento/Search/etc/di.xml
+++ b/app/code/Magento/Search/etc/di.xml
@@ -44,6 +44,12 @@
             <argument name="title" xsi:type="string">Did you mean</argument>
         </arguments>
     </type>
+    <type name="Magento\Search\Model\AdapterFactory">
+        <arguments>
+            <argument name="path" xsi:type="string">catalog/search/adapter</argument>
+            <argument name="scopeType" xsi:type="const">\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT</argument>
+        </arguments>
+    </type>
     <preference for="Magento\Search\Model\QueryFactoryInterface" type="Magento\Search\Model\QueryFactory" />
     <preference for="Magento\Search\Model\QueryInterface" type="Magento\Search\Model\Query" />
 </config>
diff --git a/app/code/Magento/Search/etc/module.xml b/app/code/Magento/Search/etc/module.xml
index 1b9192004bfbd8cd3d72d289204ff53c4ccdc16d..d1ba5b13f80fa5e50d6b7ced5f99586f62508516 100644
--- a/app/code/Magento/Search/etc/module.xml
+++ b/app/code/Magento/Search/etc/module.xml
@@ -31,7 +31,6 @@
         </sequence>
         <depends>
             <module name="Magento_Backend" />
-            <module name="Magento_Eav" />
             <module name="Magento_Store" />
         </depends>
     </module>
diff --git a/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php b/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php
index fa2668376037962983fa7d74ed5009e6cbdb3f33..dc72c579abc3f0e45cf8b9dbcfc3c72d79756c81 100644
--- a/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php
+++ b/app/code/Magento/Search/sql/search_setup/install-1.6.0.0.php
@@ -104,6 +104,9 @@ $table = $installer->getConnection()
 )->addIndex(
     $installer->getIdxName('search_query', 'store_id'),
     'store_id'
+)->addIndex(
+    $installer->getIdxName('search_query', 'synonym_for'),
+    'synonym_for'
 )->addForeignKey(
     $installer->getFkName('search_query', 'store_id', 'store', 'store_id'),
     'store_id',
diff --git a/app/code/Magento/Sendfriend/composer.json b/app/code/Magento/Sendfriend/composer.json
index c163bf514e2cc69912ff405c2d6220827ef3d41e..d2026c84fddae16278860da09426cb085f79167f 100644
--- a/app/code/Magento/Sendfriend/composer.json
+++ b/app/code/Magento/Sendfriend/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php
index 764bce4d25d2630fc0fdb522f09dfde9c926163c..7a4745900334d527c434180dba8d1b1358d8e788 100644
--- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php
+++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/MassPrintShippingLabel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -115,7 +116,7 @@ class MassPrintShippingLabel extends \Magento\Backend\App\Action
             return $this->_fileFactory->create(
                 'ShippingLabels.pdf',
                 $outputPdf->render(),
-                \Magento\Framework\App\Filesystem::VAR_DIR,
+                DirectoryList::VAR_DIR,
                 'application/pdf'
             );
         }
diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintLabel.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintLabel.php
index f0ca7adc66b7bb4910cf3d96ec3af045dd1ca7a4..c88c0fe14d7dd73e35f7b456a3e1746adaf4436f 100644
--- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintLabel.php
+++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintLabel.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -106,7 +107,7 @@ class PrintLabel extends \Magento\Backend\App\Action
                 return $this->_fileFactory->create(
                     'ShippingLabel(' . $shipment->getIncrementId() . ').pdf',
                     $pdfContent,
-                    \Magento\Framework\App\Filesystem::VAR_DIR,
+                    DirectoryList::VAR_DIR,
                     'application/pdf'
                 );
             }
diff --git a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackage.php b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackage.php
index 149ecef4d196622554168d856ba0758784bfb32b..37de81fa153c04a6272bb3dfcb5b8d8c9739d554 100644
--- a/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackage.php
+++ b/app/code/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackage.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 use \Magento\Backend\App\Action;
 
@@ -85,7 +86,7 @@ class PrintPackage extends \Magento\Backend\App\Action
                     'Y-m-d_H-i-s'
                 ) . '.pdf',
                 $pdf->render(),
-                \Magento\Framework\App\Filesystem::VAR_DIR,
+                DirectoryList::VAR_DIR,
                 'application/pdf'
             );
         } else {
diff --git a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php
index 19ff4bf44a4304734ebdce11220cbb658ecd152e..b72f69942a1c5d3df89956c87d8a855a16a9738d 100644
--- a/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php
+++ b/app/code/Magento/Shipping/Model/Order/Pdf/Packaging.php
@@ -53,7 +53,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
      * @param \Magento\Payment\Helper\Data $paymentData
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\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,7 +71,7 @@ class Packaging extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
         \Magento\Payment\Helper\Data $paymentData,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Sales\Model\Order\Pdf\Config $pdfConfig,
         \Magento\Sales\Model\Order\Pdf\Total\Factory $pdfTotalFactory,
         \Magento\Sales\Model\Order\Pdf\ItemsFactory $pdfItemsFactory,
diff --git a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php
index a723d6df8ccc70f0347519bce69c20493bef6870..262895eb50d2c0c3e6f21393c286cda31182f95e 100644
--- a/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php
+++ b/app/code/Magento/Shipping/Model/Shipping/LabelGenerator.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Shipping\Model\Shipping;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\RequestInterface;
 
 class LabelGenerator
@@ -49,7 +50,7 @@ class LabelGenerator
     protected $trackFactory;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -58,14 +59,14 @@ class LabelGenerator
      * @param LabelsFactory $labelFactory
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Sales\Model\Order\Shipment\TrackFactory $trackFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Shipping\Model\CarrierFactory $carrierFactory,
         \Magento\Shipping\Model\Shipping\LabelsFactory $labelFactory,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Sales\Model\Order\Shipment\TrackFactory $trackFactory,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_carrierFactory = $carrierFactory;
         $this->labelFactory = $labelFactory;
@@ -158,7 +159,7 @@ class LabelGenerator
     {
         /** @var \Magento\Framework\Filesystem\Directory\Write $directory */
         $directory = $this->filesystem->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::TMP_DIR
+            DirectoryList::TMP
         );
         $directory->create();
         $image = imagecreatefromstring($imageString);
diff --git a/app/code/Magento/Shipping/composer.json b/app/code/Magento/Shipping/composer.json
index 1a2090b2d66f50a9f03ce9825ea621f6f004f6f4..6eff5fb3b845719a80f99f310e82a4286b7420c7 100644
--- a/app/code/Magento/Shipping/composer.json
+++ b/app/code/Magento/Shipping/composer.json
@@ -3,23 +3,23 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-contact": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-payment": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-contact": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-payment": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "ext-gd": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
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 cabbee65dec84d85e2dba14e72c95dc40ccebfbd..821ba449ca0ec8ea20d59f028727decd31a9d1c4 100644
--- a/app/code/Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php
+++ b/app/code/Magento/Sitemap/Block/Adminhtml/Grid/Renderer/Link.php
@@ -28,10 +28,12 @@
  */
 namespace Magento\Sitemap\Block\Adminhtml\Grid\Renderer;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Link extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
 {
     /**
-     * @var \Magento\Framework\App\Filesystem $filesystem
+     * @var \Magento\Framework\Filesystem $filesystem
      */
     protected $_filesystem;
 
@@ -43,13 +45,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\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param array $data
      */
     public function __construct(
         \Magento\Backend\Block\Context $context,
         \Magento\Sitemap\Model\SitemapFactory $sitemapFactory,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         array $data = array()
     ) {
         $this->_sitemapFactory = $sitemapFactory;
@@ -70,7 +72,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\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $this->_filesystem->getDirectoryRead(DirectoryList::ROOT);
         if ($directory->isFile($fileName)) {
             return sprintf('<a href="%1$s">%1$s</a>', $url);
         }
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php
index 2d1c25ac838ef9fdc5a86f7bfb957fba6b5bc171..5cde11d3546cf9cce2ca0a0856a60ea2cdc674dc 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Delete.php
@@ -25,6 +25,7 @@
 namespace Magento\Sitemap\Controller\Adminhtml\Sitemap;
 
 use \Magento\Backend\App\Action;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class Delete extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
 {
@@ -37,9 +38,9 @@ class Delete extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
     {
         /** @var \Magento\Framework\Filesystem\Directory\Write $directory */
         $directory = $this->_objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
+            DirectoryList::ROOT
         );
 
         // check if we know what should be deleted
diff --git a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php
index f7a5909ced6e7c1865a4e24f35184716bb730a81..7707cb93c5d1089b4b149a57ac647f46342aef9a 100644
--- a/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php
+++ b/app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Save.php
@@ -25,6 +25,7 @@
 namespace Magento\Sitemap\Controller\Adminhtml\Sitemap;
 
 use \Magento\Backend\App\Action;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class Save extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
 {
@@ -68,9 +69,9 @@ class Save extends \Magento\Sitemap\Controller\Adminhtml\Sitemap
 
             /** @var \Magento\Framework\Filesystem\Directory\Write $directory */
             $directory = $this->_objectManager->get(
-                'Magento\Framework\App\Filesystem'
+                'Magento\Framework\Filesystem'
             )->getDirectoryWrite(
-                \Magento\Framework\App\Filesystem::ROOT_DIR
+                DirectoryList::ROOT
             );
 
             if ($this->getRequest()->getParam('sitemap_id')) {
diff --git a/app/code/Magento/Sitemap/Model/Sitemap.php b/app/code/Magento/Sitemap/Model/Sitemap.php
index 49850bc6a97301b8a90e33f6a4c44763bfd2a312..36182126fbbd6686ab669c94549176404f19e2fe 100644
--- a/app/code/Magento/Sitemap/Model/Sitemap.php
+++ b/app/code/Magento/Sitemap/Model/Sitemap.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Sitemap\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Sitemap model
  *
@@ -162,7 +164,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Framework\Escaper $escaper
      * @param \Magento\Sitemap\Helper\Data $sitemapData
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\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
@@ -179,7 +181,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel
         \Magento\Framework\Registry $registry,
         \Magento\Framework\Escaper $escaper,
         \Magento\Sitemap\Helper\Data $sitemapData,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Sitemap\Model\Resource\Catalog\CategoryFactory $categoryFactory,
         \Magento\Sitemap\Model\Resource\Catalog\ProductFactory $productFactory,
         \Magento\Sitemap\Model\Resource\Cms\PageFactory $cmsFactory,
@@ -193,7 +195,7 @@ class Sitemap extends \Magento\Framework\Model\AbstractModel
     ) {
         $this->_escaper = $escaper;
         $this->_sitemapData = $sitemapData;
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $this->_categoryFactory = $categoryFactory;
         $this->_productFactory = $productFactory;
         $this->_cmsFactory = $cmsFactory;
diff --git a/app/code/Magento/Sitemap/composer.json b/app/code/Magento/Sitemap/composer.json
index e18f63819dd52e170a3f0f2dbabf1036d7fab5e5..78bdfbe9be600630bd01b7e73fd72c65d829cb97 100644
--- a/app/code/Magento/Sitemap/composer.json
+++ b/app/code/Magento/Sitemap/composer.json
@@ -3,18 +3,18 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog-url-rewrite": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog-url-rewrite": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Store/Model/Storage/Db.php b/app/code/Magento/Store/Model/Storage/Db.php
index 111554471a323c277fffa67b998521d0a4c0a2d1..26060925153ae28303e8b6ae4fd44d00e00c3f3d 100644
--- a/app/code/Magento/Store/Model/Storage/Db.php
+++ b/app/code/Magento/Store/Model/Storage/Db.php
@@ -125,11 +125,29 @@ class Db implements \Magento\Framework\StoreManagerInterface
      */
     protected $_scopeConfig;
 
+    /**
+     * @var \Magento\Store\Model\Resource\Website\CollectionFactory
+     */
+    protected $_websiteCollectionFactory;
+
+    /**
+     * @var \Magento\Store\Model\Resource\Group\CollectionFactory
+     */
+    protected $_groupCollectionFactory;
+
+    /**
+     * @var \Magento\Store\Model\Resource\Store\CollectionFactory
+     */
+    protected $_storeCollectionFactory;
+
     /**
      * @param StoreFactory $storeFactory
      * @param WebsiteFactory $websiteFactory
      * @param \Magento\Store\Model\GroupFactory $groupFactory
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
+     * @param \Magento\Store\Model\Resource\Website\CollectionFactory $websiteCollectionFactory
+     * @param \Magento\Store\Model\Resource\Group\CollectionFactory $groupCollectionFactory
+     * @param \Magento\Store\Model\Resource\Store\CollectionFactory $storeCollectionFactory
      * @param State $appState
      * @param bool $isSingleStoreAllowed
      * @param null $currentStore
@@ -139,6 +157,9 @@ class Db implements \Magento\Framework\StoreManagerInterface
         WebsiteFactory $websiteFactory,
         \Magento\Store\Model\GroupFactory $groupFactory,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
+        \Magento\Store\Model\Resource\Website\CollectionFactory $websiteCollectionFactory,
+        \Magento\Store\Model\Resource\Group\CollectionFactory $groupCollectionFactory,
+        \Magento\Store\Model\Resource\Store\CollectionFactory $storeCollectionFactory,
         State $appState,
         $isSingleStoreAllowed,
         $currentStore = null
@@ -150,6 +171,9 @@ class Db implements \Magento\Framework\StoreManagerInterface
         $this->_isSingleStoreAllowed = $isSingleStoreAllowed;
         $this->_appState = $appState;
         $this->_currentStore = $currentStore;
+        $this->_websiteCollectionFactory = $websiteCollectionFactory;
+        $this->_groupCollectionFactory = $groupCollectionFactory;
+        $this->_storeCollectionFactory = $storeCollectionFactory;
     }
 
     /**
@@ -182,22 +206,22 @@ class Db implements \Magento\Framework\StoreManagerInterface
         $this->_websites = array();
 
         $this->_website = null;
-
         /** @var $websiteCollection \Magento\Store\Model\Resource\Website\Collection */
-        $websiteCollection = $this->_websiteFactory->create()->getCollection();
+        $websiteCollection = $this->_websiteCollectionFactory->create();
         $websiteCollection->setLoadDefault(true);
 
         /** @var $groupCollection \Magento\Store\Model\Resource\Group\Collection */
-        $groupCollection = $this->_groupFactory->create()->getCollection();
+        $groupCollection = $this->_groupCollectionFactory->create();
         $groupCollection->setLoadDefault(true);
 
         /** @var $storeCollection \Magento\Store\Model\Resource\Store\Collection */
-        $storeCollection = $this->_storeFactory->create()->getCollection();
+        $storeCollection = $this->_storeCollectionFactory->create();
         $storeCollection->setLoadDefault(true);
 
         $this->_hasSingleStore = false;
-        if ($this->_isSingleStoreAllowed) {
-            $this->_hasSingleStore = $storeCollection->count() < 3;
+        if ($this->_isSingleStoreAllowed && $storeCollection->count() < 3) {
+            $this->_hasSingleStore = true;
+            $this->_store = $storeCollection->getLastItem();
         }
 
         $websiteStores = array();
@@ -205,18 +229,10 @@ class Db implements \Magento\Framework\StoreManagerInterface
         $groupStores = array();
         foreach ($storeCollection as $store) {
             /** @var $store Store */
-            $store->setWebsite($websiteCollection->getItemById($store->getWebsiteId()));
-            $store->setGroup($groupCollection->getItemById($store->getGroupId()));
-
             $this->_stores[$store->getId()] = $store;
             $this->_stores[$store->getCode()] = $store;
-
             $websiteStores[$store->getWebsiteId()][$store->getId()] = $store;
             $groupStores[$store->getGroupId()][$store->getId()] = $store;
-
-            if ($this->_hasSingleStore) {
-                $this->_store = $store;
-            }
         }
 
         foreach ($groupCollection as $group) {
@@ -225,10 +241,7 @@ class Db implements \Magento\Framework\StoreManagerInterface
                 $groupStores[$group->getId()] = array();
             }
             $group->setStores($groupStores[$group->getId()]);
-            $group->setWebsite($websiteCollection->getItemById($group->getWebsiteId()));
-
             $websiteGroups[$group->getWebsiteId()][$group->getId()] = $group;
-
             $this->_groups[$group->getId()] = $group;
         }
 
@@ -471,7 +484,7 @@ class Db implements \Magento\Framework\StoreManagerInterface
      */
     public function getDefaultStoreView()
     {
-        foreach ($this->getWebsites() as $_website) {
+        foreach ($this->getWebsites(true) as $_website) {
             /** @var $_website Website */
             if ($_website->getIsDefault()) {
                 $_defaultStore = $this->getGroup($_website->getDefaultGroupId())->getDefaultStore();
diff --git a/app/code/Magento/Store/Model/Store.php b/app/code/Magento/Store/Model/Store.php
index 798a0d19d2598954bbc0c416b382a6bb2300a692..70132280dd560e6f9a41c4448abc942cdc520fb4 100644
--- a/app/code/Magento/Store/Model/Store.php
+++ b/app/code/Magento/Store/Model/Store.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Store\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Model\AbstractModel;
 
 /**
@@ -273,7 +274,7 @@ class Store extends AbstractModel implements
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -323,7 +324,7 @@ class Store extends AbstractModel implements
      * @param \Magento\Framework\UrlInterface $url
      * @param \Magento\Framework\App\RequestInterface $request
      * @param \Magento\Core\Model\Resource\Config\Data $configDataResource
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\App\Config\ReinitableConfigInterface $config
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Framework\Session\SidResolverInterface $sidResolver
@@ -346,7 +347,7 @@ class Store extends AbstractModel implements
         \Magento\Framework\UrlInterface $url,
         \Magento\Framework\App\RequestInterface $request,
         \Magento\Core\Model\Resource\Config\Data $configDataResource,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\App\Config\ReinitableConfigInterface $config,
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Framework\Session\SidResolverInterface $sidResolver,
@@ -578,7 +579,7 @@ class Store extends AbstractModel implements
                             \Magento\Framework\UrlInterface::URL_TYPE_WEB,
                             $secure
                         ) . $this->filesystem->getUri(
-                            \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR
+                            DirectoryList::STATIC_VIEW
                         );
                     }
                     break;
@@ -593,7 +594,7 @@ class Store extends AbstractModel implements
                                 \Magento\Framework\UrlInterface::URL_TYPE_WEB,
                                 $secure
                             ) . $this->filesystem->getUri(
-                                \Magento\Framework\App\Filesystem::MEDIA_DIR
+                                DirectoryList::MEDIA
                             );
                         }
                     }
@@ -649,18 +650,18 @@ class Store extends AbstractModel implements
      * 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\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param bool $secure
      * @return string|bool
      */
-    protected function _getMediaScriptUrl(\Magento\Framework\App\Filesystem $filesystem, $secure)
+    protected function _getMediaScriptUrl(\Magento\Framework\Filesystem $filesystem, $secure)
     {
         if (!$this->_getConfig(self::XML_PATH_USE_REWRITES) && $this->_coreFileStorageDatabase->checkDbUsage()) {
             return $this->getBaseUrl(
                 \Magento\Framework\UrlInterface::URL_TYPE_WEB,
                 $secure
             ) . $filesystem->getUri(
-                \Magento\Framework\App\Filesystem::PUB_DIR
+                DirectoryList::PUB
             ) . '/' . self::MEDIA_REWRITE_SCRIPT;
         }
         return false;
diff --git a/app/code/Magento/Store/Model/StoreManager.php b/app/code/Magento/Store/Model/StoreManager.php
index 6ab4d20352c212cb0216aba6c611398601b98367..da09bf2c17f33c6b37a1776b85c4714fdc8671aa 100644
--- a/app/code/Magento/Store/Model/StoreManager.php
+++ b/app/code/Magento/Store/Model/StoreManager.php
@@ -96,6 +96,11 @@ class StoreManager implements \Magento\Framework\StoreManagerInterface
      */
     protected $_scopeConfig;
 
+    /**
+     * @var \Magento\Framework\StoreManagerInterface
+     */
+    protected $_storage;
+
     /**
      * @param \Magento\Store\Model\StorageFactory $factory
      * @param \Magento\Framework\App\RequestInterface $request
@@ -124,13 +129,16 @@ class StoreManager implements \Magento\Framework\StoreManagerInterface
      */
     protected function _getStorage()
     {
-        $arguments = array(
-            'isSingleStoreAllowed' => $this->_isSingleStoreAllowed,
-            'currentStore' => $this->_currentStore,
-            'scopeCode' => $this->_scopeCode,
-            'scopeType' => $this->_scopeType
-        );
-        return $this->_factory->get($arguments);
+        if (!$this->_storage instanceof \Magento\Framework\StoreManagerInterface) {
+            $arguments = array(
+                'isSingleStoreAllowed' => $this->_isSingleStoreAllowed,
+                'currentStore' => $this->_currentStore,
+                'scopeCode' => $this->_scopeCode,
+                'scopeType' => $this->_scopeType
+            );
+            $this->_storage = $this->_factory->get($arguments);
+        }
+        return $this->_storage;
     }
 
     /**
diff --git a/app/code/Magento/Store/README.md b/app/code/Magento/Store/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..877dd4a3cab2572d0f350e3859eedd1365d70bc7
--- /dev/null
+++ b/app/code/Magento/Store/README.md
@@ -0,0 +1,4 @@
+The Store module provides one of the basic and major features of a content management system for e-commerce web
+sites by creating and managing a store for the customers to conduct online-shopping. Stores can be combined in groups,
+and are linked to a specific website. All store related configurations (currency, locale, scope etc.), management and
+storage maintenance are covered under this module.
\ No newline at end of file
diff --git a/app/code/Magento/Store/composer.json b/app/code/Magento/Store/composer.json
index 2b1fd964817ba41eb9d90dd982f13d0b77cdf619..a9a392271aed7e4a64745b4a55b05e1506190ca2 100644
--- a/app/code/Magento/Store/composer.json
+++ b/app/code/Magento/Store/composer.json
@@ -3,14 +3,14 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-ui": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-ui": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php
index af3eff5a727248f877e8fba8ac2dd83271629d53..159c354a0beb2ec676daaa9f3cca3efda0cf27f1 100644
--- a/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php
+++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/CommonTaxCollector.php
@@ -107,6 +107,13 @@ class CommonTaxCollector extends AbstractTotal
      */
     protected $_config;
 
+    /**
+     * Counter that is used to construct temporary ids for taxable items
+     *
+     * @var int
+     */
+    protected $counter = 0;
+
     /**
      * Tax calculation service, the collector will call the service which performs the actual calculation
      *
@@ -796,4 +803,15 @@ class CommonTaxCollector extends AbstractTotal
     {
         return false;
     }
+
+    /**
+     * Increment and return counter. This function is intended to be used to generate temporary
+     * id for an item.
+     *
+     * @return int
+     */
+    protected function getNextIncrement()
+    {
+        return ++$this->counter;
+    }
 }
diff --git a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php
index fec4df73dbde60c7fa445c52acd087f0aa0be002..055a9ee65fcd788c2d51362348907c52ce980e22 100644
--- a/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php
+++ b/app/code/Magento/Tax/Model/Sales/Total/Quote/Tax.php
@@ -41,11 +41,11 @@ use Magento\Tax\Service\V1\Data\TaxDetails;
 class Tax extends CommonTaxCollector
 {
     /**
-     * Static counter
+     * Counter
      *
      * @var int
      */
-    protected static $counter = 0;
+    protected $counter = 0;
 
     /**
      * Tax module helper
diff --git a/app/code/Magento/Tax/README.md b/app/code/Magento/Tax/README.md
index 7950a10897033112ee759ce78af7bcc426caf8ab..f449b1c6c6cba9522d99cdb72ac2ff8abb28eb20 100644
--- a/app/code/Magento/Tax/README.md
+++ b/app/code/Magento/Tax/README.md
@@ -1 +1,32 @@
-The Tax module provides the calculations needed to compute the consumption tax on goods and services.
+# Overview
+## Purpose of module
+The Magento_Tax module provides the calculations needed to compute the consumption tax on goods and services.
+
+The Magento_Tax module includes the following:
+* configuration of the tax rates and rules to apply
+* configuration of tax classes that apply to:
+** taxation on products
+** taxation on shipping charges
+** taxation on gift options (example: gift wrapping)
+* specification whether the consumption tax is "sales & use" (typically product prices are loaded without any tax) or "VAT" (typically product prices are loaded including tax)
+* specification of whether the tax total line can be toggled to display the tax details/subtotals
+* display of prices (presented with tax, without tax, or both with and without)
+
+The Magento_Tax module also handles special cases when computing tax, such as:
+* determining the tax on an individual item (for example, one that is being returned) when the original tax has been computed on the entire shopping cart
+** example country: United States
+* being able to handle 2 or more tax rates that are applied separately (examples include a "luxury tax" on exclusive items)
+* being able to handle a subsequent tax rate that is applied after a previous one is applied (a "tax on tax" situation, which recently was a part of Canadian tax law)
+
+# Deployment
+## System requirements
+The Magento_Tax module does not have any specific system requirements.
+
+Depending on how many tax rates and tax rules are being used, there might be consideration for the database size
+Depending on the frequency of updating tax rates and tax rules, there might be consideration for the scheduling of these updates
+
+## Install
+The Magento_Tax module is installed automatically (using the native Magento install mechanism) without any additional actions.
+
+## Uninstall
+The Magento_Tax module should not be uninstalled; it is a required module.
\ No newline at end of file
diff --git a/app/code/Magento/Tax/composer.json b/app/code/Magento/Tax/composer.json
index 751bb8361df1fce76363125a9a83391703b4efcb..d1ec4f8766c4f1c54516a5a1df2aa64b75722c1b 100644
--- a/app/code/Magento/Tax/composer.json
+++ b/app/code/Magento/Tax/composer.json
@@ -3,23 +3,23 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-reports": "0.1.0-alpha100",
-        "magento/module-configurable-product": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-reports": "0.1.0-alpha101",
+        "magento/module-configurable-product": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml
index a73333e0c8e1de3d2fa7abe6e72759142d8e4539..ae970975d1243ef31962051117e9ad4694f2d5ef 100644
--- a/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml
+++ b/app/code/Magento/Tax/view/frontend/templates/order/tax.phtml
@@ -25,7 +25,7 @@
 <?php
     $_order  = $this->getOrder();
     $_source = $this->getSource();
-    $_fullInfo = $_order->getFullTaxInfo();
+    $_fullInfo = $this->helper('Magento\Tax\Helper\Data')->getCalculatedTaxes($_source);
     global $taxIter; $taxIter++;
 ?>
 
diff --git a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportCsv.php b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportCsv.php
index 83fb86752544bbe3635f5e8cda1e63354481a81a..179d760a80960b4f88b3e2c913fee032d0f617a0 100644
--- a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportCsv.php
+++ b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportCsv.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\TaxImportExport\Controller\Adminhtml\Rate;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportCsv extends \Magento\TaxImportExport\Controller\Adminhtml\Rate
@@ -40,7 +41,7 @@ class ExportCsv extends \Magento\TaxImportExport\Controller\Adminhtml\Rate
         return $this->fileFactory->create(
             'rates.csv',
             $content->getCsvFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php
index 5f6481da900334e5c528eae8de79122b70bcd690..5a5b33101a197968d7f37688f9cd5493d2919aee 100644
--- a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php
+++ b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportPost.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\TaxImportExport\Controller\Adminhtml\Rate;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportPost extends \Magento\TaxImportExport\Controller\Adminhtml\Rate
@@ -100,6 +101,6 @@ class ExportPost extends \Magento\TaxImportExport\Controller\Adminhtml\Rate
             $content .= $rate->toString($template) . "\n";
         }
         $this->_view->loadLayout();
-        return $this->fileFactory->create('tax_rates.csv', $content, \Magento\Framework\App\Filesystem::VAR_DIR);
+        return $this->fileFactory->create('tax_rates.csv', $content, DirectoryList::VAR_DIR);
     }
 }
diff --git a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportXml.php b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportXml.php
index 19a3a4f7b9a3ad746a7f99b37f4243fb2331e87e..7fa082a253b19a41e48f97652b6fa49f89516aeb 100644
--- a/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportXml.php
+++ b/app/code/Magento/TaxImportExport/Controller/Adminhtml/Rate/ExportXml.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\TaxImportExport\Controller\Adminhtml\Rate;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class ExportXml extends \Magento\TaxImportExport\Controller\Adminhtml\Rate
@@ -40,7 +41,7 @@ class ExportXml extends \Magento\TaxImportExport\Controller\Adminhtml\Rate
         return $this->fileFactory->create(
             'rates.xml',
             $content->getExcelFile(),
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
     }
 }
diff --git a/app/code/Magento/TaxImportExport/composer.json b/app/code/Magento/TaxImportExport/composer.json
index c36f859dc828bbc116c949dc5b01c924bb914030..4869de1a5cd9fcff0baf7121733b0f911f570b5b 100644
--- a/app/code/Magento/TaxImportExport/composer.json
+++ b/app/code/Magento/TaxImportExport/composer.json
@@ -3,15 +3,15 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
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 522ee68089621452f20789d815e00d9d7e76f4da..45d6ec1032cf8a77c22917dbc1799ba3b4b974b9 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme.php
@@ -47,7 +47,7 @@ class Theme extends \Magento\Backend\App\Action
     protected $_assetRepo;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_appFileSystem;
 
@@ -56,14 +56,14 @@ class Theme extends \Magento\Backend\App\Action
      * @param \Magento\Framework\Registry $coreRegistry
      * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
-     * @param \Magento\Framework\App\Filesystem $appFileSystem
+     * @param \Magento\Framework\Filesystem $appFileSystem
      */
     public function __construct(
         \Magento\Backend\App\Action\Context $context,
         \Magento\Framework\Registry $coreRegistry,
         \Magento\Framework\App\Response\Http\FileFactory $fileFactory,
         \Magento\Framework\View\Asset\Repository $assetRepo,
-        \Magento\Framework\App\Filesystem $appFileSystem
+        \Magento\Framework\Filesystem $appFileSystem
     ) {
         $this->_coreRegistry = $coreRegistry;
         $this->_fileFactory = $fileFactory;
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCss.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCss.php
index 7d4816d5b449988f201e53fd4507bf1f7eb9b644..d26022a49c30bf47bc161e42138aba7404dcbd43 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCss.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCss.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Theme\Controller\Adminhtml\System\Design\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class DownloadCss extends \Magento\Theme\Controller\Adminhtml\System\Design\Theme
@@ -48,7 +49,7 @@ class DownloadCss extends \Magento\Theme\Controller\Adminhtml\System\Design\Them
                 throw new \InvalidArgumentException(sprintf('Theme not found: "%1".', $themeId));
             }
             $asset = $this->_assetRepo->createAsset($fileId, array('themeModel' => $theme));
-            $relPath = $this->_appFileSystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            $relPath = $this->_appFileSystem->getDirectoryRead(DirectoryList::ROOT)
                 ->getRelativePath($asset->getSourceFile());
             return $this->_fileFactory->create(
                 $relPath,
@@ -56,7 +57,7 @@ class DownloadCss extends \Magento\Theme\Controller\Adminhtml\System\Design\Them
                     'type'  => 'filename',
                     'value' => $relPath
                 ),
-                \Magento\Framework\App\Filesystem::ROOT_DIR
+                DirectoryList::ROOT
             );
         } catch (\Exception $e) {
             $this->messageManager->addException($e, __('File not found: "%1".', $fileId));
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCustomCss.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCustomCss.php
index 9440c09857020752eb3588a88871d8fb669a17b2..d35b2916283c470e0488197ca26dc805e0cea96f 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCustomCss.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Theme/DownloadCustomCss.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Theme\Controller\Adminhtml\System\Design\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class DownloadCustomCss extends \Magento\Theme\Controller\Adminhtml\System\Design\Theme
@@ -53,7 +54,7 @@ class DownloadCustomCss extends \Magento\Theme\Controller\Adminhtml\System\Desig
                 return $this->_fileFactory->create(
                     $customCssFile->getFileName(),
                     array('type' => 'filename', 'value' => $customCssFile->getFullPath()),
-                    \Magento\Framework\App\Filesystem::ROOT_DIR
+                    DirectoryList::ROOT
                 );
             }
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files/PreviewImage.php b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files/PreviewImage.php
index f2ccce01d65ee638f701f084009af34186142555..7a6c405b397a17fe6b626a9f24dcab03909e72c5 100644
--- a/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files/PreviewImage.php
+++ b/app/code/Magento/Theme/Controller/Adminhtml/System/Design/Wysiwyg/Files/PreviewImage.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\App\ResponseInterface;
 
 class PreviewImage extends \Magento\Theme\Controller\Adminhtml\System\Design\Wysiwyg\Files
@@ -42,7 +43,7 @@ class PreviewImage extends \Magento\Theme\Controller\Adminhtml\System\Design\Wys
             return $this->_fileFactory->create(
                 $file,
                 array('type' => 'filename', 'value' => $helper->getThumbnailPath($file)),
-                \Magento\Framework\App\Filesystem::MEDIA_DIR
+                DirectoryList::MEDIA
             );
         } catch (\Exception $e) {
             $this->_objectManager->get('Magento\Framework\Logger')->logException($e);
diff --git a/app/code/Magento/Theme/Helper/Storage.php b/app/code/Magento/Theme/Helper/Storage.php
index 98ada5862ccd7e4d14286c22b25f7091dc01274f..68d8194f6a079ee1f689c6fe4a8d06e4ee2b9677 100644
--- a/app/code/Magento/Theme/Helper/Storage.php
+++ b/app/code/Magento/Theme/Helper/Storage.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Theme\Helper;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Storage extends \Magento\Framework\App\Helper\AbstractHelper
 {
     /**
@@ -81,7 +83,7 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper
     /**
      * Magento filesystem
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -102,13 +104,13 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper
 
     /**
      * @param \Magento\Framework\App\Helper\Context $context
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Backend\Model\Session $session
      * @param \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory
      */
     public function __construct(
         \Magento\Framework\App\Helper\Context $context,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Backend\Model\Session $session,
         \Magento\Framework\View\Design\Theme\FlyweightFactory $themeFactory
     ) {
@@ -116,7 +118,7 @@ class Storage extends \Magento\Framework\App\Helper\AbstractHelper
         $this->filesystem = $filesystem;
         $this->_session = $session;
         $this->_themeFactory = $themeFactory;
-        $this->mediaDirectoryWrite = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->mediaDirectoryWrite = $this->filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->mediaDirectoryWrite->create($this->mediaDirectoryWrite->getRelativePath($this->getStorageRoot()));
     }
 
diff --git a/app/code/Magento/Theme/Model/CopyService.php b/app/code/Magento/Theme/Model/CopyService.php
index a5058ffedc666063061a4e75209c753548e4c949..c167924bbc6af829f9b056f2012688751574157e 100644
--- a/app/code/Magento/Theme/Model/CopyService.php
+++ b/app/code/Magento/Theme/Model/CopyService.php
@@ -27,6 +27,7 @@
  */
 namespace Magento\Theme\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\ThemeInterface;
 
 class CopyService
@@ -62,7 +63,7 @@ class CopyService
     protected $_customizationPath;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Design\Theme\FileFactory $fileFactory
      * @param \Magento\Core\Model\Layout\Link $link
      * @param \Magento\Core\Model\Layout\UpdateFactory $updateFactory
@@ -70,14 +71,14 @@ class CopyService
      * @param \Magento\Framework\View\Design\Theme\Customization\Path $customization
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Design\Theme\FileFactory $fileFactory,
         \Magento\Core\Model\Layout\Link $link,
         \Magento\Core\Model\Layout\UpdateFactory $updateFactory,
         \Magento\Framework\Event\ManagerInterface $eventManager,
         \Magento\Framework\View\Design\Theme\Customization\Path $customization
     ) {
-        $this->_directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_fileFactory = $fileFactory;
         $this->_link = $link;
         $this->_updateFactory = $updateFactory;
diff --git a/app/code/Magento/Theme/Model/Favicon/Favicon.php b/app/code/Magento/Theme/Model/Favicon/Favicon.php
index bcf5b496ca1431365c8093f80188f80f31b50836..fedf40268640bf1867907350d853cc0d5581d36d 100644
--- a/app/code/Magento/Theme/Model/Favicon/Favicon.php
+++ b/app/code/Magento/Theme/Model/Favicon/Favicon.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Theme\Model\Favicon;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Favicon implementation
  */
@@ -57,18 +59,18 @@ class Favicon implements \Magento\Framework\View\Page\FaviconInterface
      * @param \Magento\Framework\StoreManagerInterface $storeManager
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\StoreManagerInterface $storeManager,
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Core\Helper\File\Storage\Database $fileStorageDatabase,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->storeManager = $storeManager;
         $this->scopeConfig = $scopeConfig;
         $this->fileStorageDatabase = $fileStorageDatabase;
-        $this->mediaDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->mediaDirectory = $filesystem->getDirectoryRead(DirectoryList::MEDIA);
     }
 
     /**
diff --git a/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php b/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php
index 1d3350dc01e399a312faba2449ddb0f290fea4e3..4f9caf569bdfd2cfed9093961c2bd1abf8c7b7d4 100644
--- a/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php
+++ b/app/code/Magento/Theme/Model/Layout/Config/SchemaLocator.php
@@ -25,7 +25,8 @@
  */
 namespace Magento\Theme\Model\Layout\Config;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
 {
@@ -37,11 +38,11 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
     protected $_schema;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $appFilesystem
+     * @param Filesystem $appFilesystem
      */
     public function __construct(Filesystem $appFilesystem)
     {
-        $this->_schema = $appFilesystem->getPath(Filesystem::LIB_INTERNAL)
+        $this->_schema = $appFilesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL)->getAbsolutePath()
             . '/Magento/Framework/View/PageLayout/etc/layouts.xsd';
     }
 
diff --git a/app/code/Magento/Theme/Model/Uploader/Service.php b/app/code/Magento/Theme/Model/Uploader/Service.php
index 09386c0da926fae651d017a07cd7c7a299fd558c..acdb79cbb3c5675d84779b090b42032fc73c12d5 100644
--- a/app/code/Magento/Theme/Model/Uploader/Service.php
+++ b/app/code/Magento/Theme/Model/Uploader/Service.php
@@ -25,6 +25,9 @@
  */
 namespace Magento\Theme\Model\Uploader;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\DirectoryList;
+
 class Service
 {
     /**
@@ -71,18 +74,18 @@ class Service
     /**
      * Constructor
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\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\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\File\Size $fileSize,
         \Magento\Core\Model\File\UploaderFactory $uploaderFactory,
         array $uploadLimits = array()
     ) {
-        $this->_tmpDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::SYS_TMP_DIR);
+        $this->_tmpDirectory = $filesystem->getDirectoryRead(DirectoryList::SYS_TMP);
         $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 132ffa1d5e1dcaa0e8d5f9fd28138e52adcb462d..dbb327e2a9aa0a9abe3a979d09d738197a53c413 100644
--- a/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
+++ b/app/code/Magento/Theme/Model/Wysiwyg/Storage.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Theme\Model\Wysiwyg;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Storage
 {
     /**
@@ -84,18 +86,18 @@ class Storage
     /**
      * Initialize dependencies
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Theme\Helper\Storage $helper
      * @param \Magento\Framework\ObjectManager $objectManager
      * @param \Magento\Framework\Image\AdapterFactory $imageFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Theme\Helper\Storage $helper,
         \Magento\Framework\ObjectManager $objectManager,
         \Magento\Framework\Image\AdapterFactory $imageFactory
     ) {
-        $this->mediaWriteDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        $this->mediaWriteDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $this->_helper = $helper;
         $this->_objectManager = $objectManager;
         $this->_imageFactory = $imageFactory;
diff --git a/app/code/Magento/Theme/composer.json b/app/code/Magento/Theme/composer.json
index 94fa4dc1459b5375be6583981549f5c278e7f6ce..08c4a580d3e538fe304b67b1528ae98083cd3b4c 100644
--- a/app/code/Magento/Theme/composer.json
+++ b/app/code/Magento/Theme/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-translation": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-translation": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Theme/etc/di.xml b/app/code/Magento/Theme/etc/di.xml
index 8d9285d8e08cbbde365222991b50c42360de2963..93644313573000821d1bd2473ef6f09852980498 100644
--- a/app/code/Magento/Theme/etc/di.xml
+++ b/app/code/Magento/Theme/etc/di.xml
@@ -65,7 +65,7 @@
     <preference for="Magento\Framework\App\View\Deployment\Version\GeneratorInterface" type="Magento\Framework\App\View\Deployment\Version\Generator\Timestamp"/>
     <type name="Magento\Framework\App\View\Deployment\Version\Storage\File">
         <arguments>
-            <argument name="directoryCode" xsi:type="const">Magento\Framework\App\Filesystem::STATIC_VIEW_DIR</argument>
+            <argument name="directoryCode" xsi:type="const">Magento\Framework\App\Filesystem\DirectoryList::STATIC_VIEW</argument>
             <argument name="fileName" xsi:type="string">deployed_version.txt</argument>
         </arguments>
     </type>
diff --git a/app/code/Magento/Translation/composer.json b/app/code/Magento/Translation/composer.json
index 7f5f3eddee1bb51a77ec6a96d814a1fe8878284b..3b75c0d8e27d151ae89d5a8cb6623505bd6ef8e8 100644
--- a/app/code/Magento/Translation/composer.json
+++ b/app/code/Magento/Translation/composer.json
@@ -3,14 +3,14 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json
index c8cf4d2ee27d199f63284b55be14c9f496453f05..1e67498761367817b83fd41d040757310e1f4d24 100644
--- a/app/code/Magento/Ui/composer.json
+++ b/app/code/Magento/Ui/composer.json
@@ -3,13 +3,13 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Ups/composer.json b/app/code/Magento/Ups/composer.json
index 3f23befedde6752408820da514f9d81aa21838ff..bb6c52f7e06d8e1d2f65ba85fe155f4f38619810 100644
--- a/app/code/Magento/Ups/composer.json
+++ b/app/code/Magento/Ups/composer.json
@@ -3,18 +3,18 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/UrlRewrite/composer.json b/app/code/Magento/UrlRewrite/composer.json
index 399b6157ea8bade8306a5c6b3cfacf57121a8be4..3946a9f2ae49ae203b8c3ee16075f526295b9bd4 100644
--- a/app/code/Magento/UrlRewrite/composer.json
+++ b/app/code/Magento/UrlRewrite/composer.json
@@ -3,18 +3,18 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog-url-rewrite": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-cms-url-rewrite": "0.1.0-alpha100",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog-url-rewrite": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-cms-url-rewrite": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/User/README.md b/app/code/Magento/User/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..afce8e3cb9c99d826797362b2e76fbb47023b124
--- /dev/null
+++ b/app/code/Magento/User/README.md
@@ -0,0 +1,5 @@
+# User
+
+**User** provides the ability to manage administrators and other non-customer users. Different roles can be assigned to
+each user to limit what permissions each user has. User passwords can be reset and access tokens can be invalidated
+using this module.
diff --git a/app/code/Magento/User/composer.json b/app/code/Magento/User/composer.json
index 07b6273e679fd0800a9c1b6524ed947f4985016d..e56f90a71f9b3136ce18aa883aef7e8fb20e5a05 100644
--- a/app/code/Magento/User/composer.json
+++ b/app/code/Magento/User/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-authorization": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-integration": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-authorization": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-integration": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Usps/composer.json b/app/code/Magento/Usps/composer.json
index 664270d7e52a1a223c9a92d1845288cdeaf42ecf..4720de63b18141c54618ee34f0867863ffc4343d 100644
--- a/app/code/Magento/Usps/composer.json
+++ b/app/code/Magento/Usps/composer.json
@@ -3,19 +3,19 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-shipping": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-shipping": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "lib-libxml": "*",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Webapi/Controller/ErrorProcessor.php b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
index 0e90195ea51a5e25d30bbe8221607e8f6bcac58c..28182fdb83c06d559377a5709e17b2d1201436cd 100644
--- a/app/code/Magento/Webapi/Controller/ErrorProcessor.php
+++ b/app/code/Magento/Webapi/Controller/ErrorProcessor.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Webapi\Controller;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\State;
 use Magento\Framework\Exception\AbstractAggregateException;
 use Magento\Framework\Exception\AuthenticationException;
@@ -73,7 +74,7 @@ class ErrorProcessor
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -86,19 +87,19 @@ class ErrorProcessor
      * @param \Magento\Core\Helper\Data $helper
      * @param \Magento\Framework\App\State $appState
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Core\Helper\Data $helper,
         \Magento\Framework\App\State $appState,
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_coreHelper = $helper;
         $this->_appState = $appState;
         $this->_logger = $logger;
         $this->_filesystem = $filesystem;
-        $this->directoryWrite = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->directoryWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $this->registerShutdownFunction();
     }
 
diff --git a/app/code/Magento/Webapi/Controller/Rest.php b/app/code/Magento/Webapi/Controller/Rest.php
index af6fe32e7492a7191e87aaf358b86941a377b6ea..56a19d27bb111fad8245a2f84d90d9ebb5544dca 100644
--- a/app/code/Magento/Webapi/Controller/Rest.php
+++ b/app/code/Magento/Webapi/Controller/Rest.php
@@ -26,9 +26,9 @@ namespace Magento\Webapi\Controller;
 use Magento\Authorization\Model\UserContextInterface;
 use Magento\Framework\AuthorizationInterface;
 use Magento\Framework\Exception\AuthorizationException;
-use Magento\Framework\Service\SimpleDataObjectConverter;
 use Magento\Webapi\Controller\Rest\Request as RestRequest;
 use Magento\Webapi\Controller\Rest\Response as RestResponse;
+use Magento\Webapi\Controller\Rest\Response\DataObjectConverter;
 use Magento\Webapi\Controller\Rest\Response\PartialResponseProcessor;
 use Magento\Webapi\Controller\Rest\Router;
 use Magento\Webapi\Controller\Rest\Router\Route;
@@ -96,7 +96,7 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface
     protected $userContext;
 
     /**
-     * @var SimpleDataObjectConverter $dataObjectConverter
+     * @var DataObjectConverter $dataObjectConverter
      */
     protected $dataObjectConverter;
 
@@ -115,7 +115,7 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface
      * @param \Magento\Framework\App\AreaList $areaList
      * @param PartialResponseProcessor $partialResponseProcessor
      * @param UserContextInterface $userContext
-     * @param SimpleDataObjectConverter $dataObjectConverter
+     * @param DataObjectConverter $dataObjectConverter
      *
      * TODO: Consider removal of warning suppression
      * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -133,7 +133,7 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface
         \Magento\Framework\App\AreaList $areaList,
         PartialResponseProcessor $partialResponseProcessor,
         UserContextInterface $userContext,
-        SimpleDataObjectConverter $dataObjectConverter
+        DataObjectConverter $dataObjectConverter
     ) {
         $this->_router = $router;
         $this->_request = $request;
@@ -177,7 +177,11 @@ class Rest implements \Magento\Framework\App\FrontControllerInterface
             $service = $this->_objectManager->get($serviceClassName);
             /** @var \Magento\Framework\Service\Data\AbstractExtensibleObject $outputData */
             $outputData = call_user_func_array([$service, $serviceMethodName], $inputParams);
-            $outputData = $this->dataObjectConverter->processServiceOutput($outputData);
+            $outputData = $this->dataObjectConverter->processServiceOutput(
+                $outputData,
+                $serviceClassName,
+                $serviceMethodName
+            );
             if ($this->_request->getParam(PartialResponseProcessor::FILTER_PARAMETER) && is_array($outputData)) {
                 $outputData = $this->partialResponseProcessor->filter($outputData);
             }
diff --git a/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php b/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php
new file mode 100644
index 0000000000000000000000000000000000000000..5b8db14e58ca073bb903cd608c406d500fd169e8
--- /dev/null
+++ b/app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php
@@ -0,0 +1,112 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Webapi\Controller\Rest\Response;
+
+use Magento\Framework\Service\Data\AbstractExtensibleObject;
+use Magento\Framework\Service\ExtensibleDataObjectConverter;
+use Magento\Webapi\Model\DataObjectProcessor;
+
+/**
+ * Data object converter for REST
+ */
+class DataObjectConverter
+{
+    /**
+     * @var DataObjectProcessor
+     */
+    protected $dataObjectProcessor;
+
+    /**
+     * @param DataObjectProcessor $dataObjectProcessor
+     */
+    public function __construct(DataObjectProcessor $dataObjectProcessor)
+    {
+        $this->dataObjectProcessor = $dataObjectProcessor;
+    }
+
+    /**
+     * Converts the incoming data into scalar or an array of scalars format.
+     *
+     * If the data provided is null, then an empty array is returned.  Otherwise, if the data is an object, it is
+     * assumed to be a Data Object and converted to an associative array with keys representing the properties of the
+     * Data Object.
+     * Nested Data Objects are also converted.  If the data provided is itself an array, then we iterate through the
+     * contents and convert each piece individually.
+     *
+     * @param mixed $data
+     * @param string $serviceClassName
+     * @param string $serviceMethodName
+     * @return array|int|string|bool|float Scalar or array of scalars
+     */
+    public function processServiceOutput($data, $serviceClassName, $serviceMethodName)
+    {
+        /** @var string $dataType */
+        $dataType = $this->dataObjectProcessor->getMethodReturnType($serviceClassName, $serviceMethodName);
+        if (is_array($data)) {
+            $result = [];
+            $arrayElementType = substr($dataType, 0, -2);
+            foreach ($data as $datum) {
+                if (is_object($datum)) {
+                    $datum = $this->processDataObject(
+                        $this->dataObjectProcessor->buildOutputDataArray($datum, $arrayElementType)
+                    );
+                }
+                $result[] = $datum;
+            }
+            return $result;
+        } else if (is_object($data)) {
+            return $this->processDataObject(
+                $this->dataObjectProcessor->buildOutputDataArray($data, $dataType)
+            );
+        } else if (is_null($data)) {
+            return [];
+        } else {
+            /** No processing is required for scalar types */
+            return $data;
+        }
+    }
+
+    /**
+     * Convert data object to array and process available custom attributes
+     *
+     * @param array $dataObjectArray
+     * @return array
+     */
+    protected function processDataObject($dataObjectArray)
+    {
+        if (isset($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY])) {
+            $dataObjectArray = ExtensibleDataObjectConverter::convertCustomAttributesToSequentialArray(
+                $dataObjectArray
+            );
+        }
+        //Check for nested custom_attributes
+        foreach ($dataObjectArray as $key => $value) {
+            if (is_array($value)) {
+                $dataObjectArray[$key] = $this->processDataObject($value);
+            }
+        }
+        return $dataObjectArray;
+    }
+}
diff --git a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php
index 8ab2e7811260f1be4444159fff3174f28058f7c8..c0a91eb2dc4740ef9b9b2f639cd5a962b01e1a48 100644
--- a/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php
+++ b/app/code/Magento/Webapi/Controller/ServiceArgsSerializer.php
@@ -26,15 +26,22 @@
 namespace Magento\Webapi\Controller;
 
 use Magento\Framework\ObjectManager;
+use Magento\Framework\ObjectManager\Config as ObjectManagerConfig;
 use Magento\Framework\Service\Config\Reader as ServiceConfigReader;
 use Magento\Framework\Service\Data\AttributeValue;
 use Magento\Framework\Service\Data\AttributeValueBuilder;
 use Magento\Webapi\Model\Config\ClassReflector\TypeProcessor;
+use Magento\Webapi\Model\DataObjectProcessor;
 use Zend\Code\Reflection\ClassReflection;
 use Zend\Code\Reflection\MethodReflection;
 use Zend\Code\Reflection\ParameterReflection;
 use Magento\Framework\Service\SimpleDataObjectConverter;
 
+/**
+ * Deserializes arguments from API requests.
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
 class ServiceArgsSerializer
 {
     /** @var \Magento\Webapi\Model\Config\ClassReflector\TypeProcessor */
@@ -49,6 +56,9 @@ class ServiceArgsSerializer
     /** @var AttributeValueBuilder */
     protected $attributeValueBuilder;
 
+    /** @var \Magento\Framework\ObjectManager\Config */
+    protected $objectManagerConfig;
+
     /**
      * Initialize dependencies.
      *
@@ -56,17 +66,20 @@ class ServiceArgsSerializer
      * @param ObjectManager $objectManager
      * @param ServiceConfigReader $serviceConfigReader
      * @param AttributeValueBuilder $attributeValueBuilder
+     * @param ObjectManagerConfig $objectManagerConfig
      */
     public function __construct(
         TypeProcessor $typeProcessor,
         ObjectManager $objectManager,
         ServiceConfigReader $serviceConfigReader,
-        AttributeValueBuilder $attributeValueBuilder
+        AttributeValueBuilder $attributeValueBuilder,
+        ObjectManagerConfig $objectManagerConfig
     ) {
         $this->_typeProcessor = $typeProcessor;
         $this->_objectManager = $objectManager;
         $this->serviceConfigReader = $serviceConfigReader;
         $this->attributeValueBuilder = $attributeValueBuilder;
+        $this->objectManagerConfig = $objectManagerConfig;
     }
 
     /**
@@ -151,8 +164,10 @@ class ServiceArgsSerializer
     {
         $className = is_string($class) ? $class : $class->getName();
         $data = is_array($data) ? $data : [];
-        $builder = $this->_objectManager->create($className . "Builder");
         $class = new ClassReflection($className);
+
+        $builder = $this->getBuilder($className);
+
         foreach ($data as $propertyName => $value) {
             // Converts snake_case to uppercase CamelCase to help form getter/setter method names
             // This use case is for REST only. SOAP request data is already camel cased
@@ -173,6 +188,25 @@ class ServiceArgsSerializer
         return $builder->create();
     }
 
+    /**
+     * Returns a builder for a given classname.
+     *
+     * @param string $className
+     * @return object a builder instance
+     */
+    protected function getBuilder($className)
+    {
+        $paramInstanceClassName = $this->objectManagerConfig->getPreference($className);
+        if (is_subclass_of($paramInstanceClassName, '\\' . DataObjectProcessor::BASE_MODEL_CLASS)) {
+            // By convention, need to lookup the concrete class preference for the data interface type and
+            // gets its builder.
+            return $this->_objectManager->create($paramInstanceClassName . "DataBuilder");
+        }
+        // By convention, for complex parameters that don't inherit from the data interface,
+        // create the name of the builder type by appending Builder to the end
+        return $this->_objectManager->create($className . "Builder");
+    }
+
     /**
      * Convert custom attribute data array to array of AttributeValue Data Object
      *
diff --git a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
index 89bb7ea06863020ab0e17e2584ae950c3c543241..6e59823cdbd69effd0d9d48ffea5b3812e3b7210 100644
--- a/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
+++ b/app/code/Magento/Webapi/Controller/Soap/Request/Handler.php
@@ -23,14 +23,16 @@
  */
 namespace Magento\Webapi\Controller\Soap\Request;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
 use Magento\Framework\AuthorizationInterface;
 use Magento\Framework\Exception\AuthorizationException;
-use Magento\Framework\Service\Data\AbstractSimpleObject;
+use Magento\Webapi\Model\DataObjectProcessor;
 use Magento\Framework\Service\SimpleDataObjectConverter;
 use Magento\Webapi\Controller\ServiceArgsSerializer;
 use Magento\Webapi\Controller\Soap\Request as SoapRequest;
 use Magento\Webapi\Exception as WebapiException;
 use Magento\Webapi\Model\Soap\Config as SoapConfig;
+use Zend\Code\Reflection\ClassReflection;
 
 /**
  * Handler of requests to SOAP server.
@@ -61,6 +63,9 @@ class Handler
     /** @var ServiceArgsSerializer */
     protected $_serializer;
 
+    /** @var DataObjectProcessor */
+    protected $_dataObjectProcessor;
+
     /**
      * Initialize dependencies.
      *
@@ -70,6 +75,7 @@ class Handler
      * @param AuthorizationInterface $authorization
      * @param SimpleDataObjectConverter $dataObjectConverter
      * @param ServiceArgsSerializer $serializer
+     * @param DataObjectProcessor $dataObjectProcessor
      */
     public function __construct(
         SoapRequest $request,
@@ -77,7 +83,8 @@ class Handler
         SoapConfig $apiConfig,
         AuthorizationInterface $authorization,
         SimpleDataObjectConverter $dataObjectConverter,
-        ServiceArgsSerializer $serializer
+        ServiceArgsSerializer $serializer,
+        DataObjectProcessor $dataObjectProcessor
     ) {
         $this->_request = $request;
         $this->_objectManager = $objectManager;
@@ -85,6 +92,7 @@ class Handler
         $this->_authorization = $authorization;
         $this->_dataObjectConverter = $dataObjectConverter;
         $this->_serializer = $serializer;
+        $this->_dataObjectProcessor = $dataObjectProcessor;
     }
 
     /**
@@ -127,7 +135,7 @@ class Handler
         $service = $this->_objectManager->get($serviceClass);
         $inputData = $this->_prepareRequestData($serviceClass, $serviceMethod, $arguments);
         $outputData = call_user_func_array(array($service, $serviceMethod), $inputData);
-        return $this->_prepareResponseData($outputData);
+        return $this->_prepareResponseData($outputData, $serviceClass, $serviceMethod);
     }
 
     /**
@@ -150,18 +158,25 @@ class Handler
      * Convert service response into format acceptable by SoapServer.
      *
      * @param object|array|string|int|float|null $data
+     * @param string $serviceClassName
+     * @param string $serviceMethodName
      * @return array
      * @throws \InvalidArgumentException
      */
-    protected function _prepareResponseData($data)
+    protected function _prepareResponseData($data, $serviceClassName, $serviceMethodName)
     {
+        /** @var string $dataType */
+        $dataType = $this->_dataObjectProcessor->getMethodReturnType($serviceClassName, $serviceMethodName);
         $result = null;
-        if ($data instanceof AbstractSimpleObject) {
-            $result = $this->_dataObjectConverter->convertKeysToCamelCase($data->__toArray());
+        if ($data instanceof ExtensibleDataInterface) {
+            $result = $this->_dataObjectConverter
+                ->convertKeysToCamelCase($this->_dataObjectProcessor->buildOutputDataArray($data, $dataType));
         } elseif (is_array($data)) {
+            $dataType = substr($dataType, 0, -2);
             foreach ($data as $key => $value) {
-                if ($value instanceof AbstractSimpleObject) {
-                    $result[] = $this->_dataObjectConverter->convertKeysToCamelCase($value->__toArray());
+                if ($value instanceof ExtensibleDataInterface) {
+                    $result[] = $this->_dataObjectConverter
+                        ->convertKeysToCamelCase($this->_dataObjectProcessor->buildOutputDataArray($value, $dataType));
                 } else {
                     $result[$key] = $value;
                 }
diff --git a/app/code/Magento/Webapi/Model/Config.php b/app/code/Magento/Webapi/Model/Config.php
index 260da516f1fa6728e58f99090c113306046794ea..065fcea3c779ab68c36cc76729f0ee89c8b2f08b 100644
--- a/app/code/Magento/Webapi/Model/Config.php
+++ b/app/code/Magento/Webapi/Model/Config.php
@@ -21,15 +21,17 @@
  * @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\Webapi\Model;
 
-use Magento\Webapi\Model\Cache\Type;
 use Magento\Webapi\Model\Config\Reader;
+use Zend\Code\Reflection\ClassReflection;
+use Magento\Webapi\Model\Cache\Type as WebapiCache;
 
 /**
  * Web API Config Model.
  *
- * This is a parent class for storing information about Web API. Most of it is needed by REST.
+ * This is a parent class for storing information about service configuration.
  */
 class Config
 {
@@ -41,35 +43,30 @@ class Config
     const SERVICE_CLASS_PATTERN = '/^(.+?)\\\\(.+?)\\\\Service\\\\(V\d+)+(\\\\.+)Interface$/';
 
     /**
-     * @var \Magento\Framework\App\Cache\Type\Config
+     * @var WebapiCache
      */
-    protected $_configCacheType;
+    protected $cache;
 
     /**
      * @var Reader
      */
-    protected $_configReader;
-
-    /**
-     * Module configuration reader
-     *
-     * @var \Magento\Framework\Module\Dir\Reader
-     */
-    protected $_moduleReader;
+    protected $configReader;
 
     /**
      * @var array
      */
-    protected $_services;
+    protected $services;
 
     /**
-     * @param Type $configCacheType
+     * Initialize dependencies.
+     *
+     * @param WebapiCache $cache
      * @param Reader $configReader
      */
-    public function __construct(Type $configCacheType, Reader $configReader)
+    public function __construct(WebapiCache $cache, Reader $configReader)
     {
-        $this->_configCacheType = $configCacheType;
-        $this->_configReader = $configReader;
+        $this->cache = $cache;
+        $this->configReader = $configReader;
     }
 
     /**
@@ -79,37 +76,15 @@ class Config
      */
     public function getServices()
     {
-        if (null === $this->_services) {
-            $services = $this->_loadFromCache();
+        if (null === $this->services) {
+            $services = $this->cache->load(self::CACHE_ID);
             if ($services && is_string($services)) {
-                $this->_services = unserialize($services);
+                $this->services = unserialize($services);
             } else {
-                $this->_services = $this->_configReader->read();
-                $this->_saveToCache(serialize($this->_services));
+                $this->services = $this->configReader->read();
+                $this->cache->save(serialize($this->services), self::CACHE_ID);
             }
         }
-        return $this->_services;
-    }
-
-    /**
-     * Load services from cache
-     *
-     * @return string|bool
-     */
-    protected function _loadFromCache()
-    {
-        return $this->_configCacheType->load(self::CACHE_ID);
-    }
-
-    /**
-     * Save services into the cache
-     *
-     * @param string $data serialized version of the webapi registry
-     * @return $this
-     */
-    protected function _saveToCache($data)
-    {
-        $this->_configCacheType->save($data, self::CACHE_ID, array(\Magento\Webapi\Model\Cache\Type::CACHE_TAG));
-        return $this;
+        return $this->services;
     }
 }
diff --git a/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php b/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php
index 84c029afdab4233c59957608dc1d27dff9489388..e71a9a49f177c75fac118221be0efaeee06b58a7 100644
--- a/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php
+++ b/app/code/Magento/Webapi/Model/Config/ClassReflector/TypeProcessor.php
@@ -179,6 +179,9 @@ class TypeProcessor
             $this->_types[$typeName]['documentation'] = $docBlock ? $this->_getDescription($docBlock) : '';
             /** @var \Zend\Code\Reflection\MethodReflection $methodReflection */
             foreach ($reflection->getMethods(\ReflectionMethod::IS_PUBLIC) as $methodReflection) {
+                if ($methodReflection->class === "Magento\Framework\Model\AbstractModel") {
+                    continue;
+                }
                 $this->_processMethod($methodReflection, $typeName);
             }
         }
@@ -294,7 +297,8 @@ class TypeProcessor
         return [
             'type' => $returnType,
             'isRequired' => $isRequired,
-            'description' => $returnAnnotation->getDescription()
+            'description' => $returnAnnotation->getDescription(),
+            'parameterCount' => $methodReflection->getNumberOfParameters()
         ];
     }
 
@@ -460,7 +464,7 @@ class TypeProcessor
                 throw new WebapiException(sprintf($invalidTypeMsg, $value, $type));
             }
         } else {
-            throw new WebapiException(sprintf($invalidTypeMsg, $value, $type));
+            throw new WebapiException(sprintf($invalidTypeMsg, (string)$value, $type));
         }
         return $value;
     }
diff --git a/app/code/Magento/Webapi/Model/DataObjectProcessor.php b/app/code/Magento/Webapi/Model/DataObjectProcessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..33c56024594d06fe10cd4d7900ac706947c43154
--- /dev/null
+++ b/app/code/Magento/Webapi/Model/DataObjectProcessor.php
@@ -0,0 +1,314 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Webapi\Model;
+
+use Zend\Code\Reflection\ClassReflection;
+use Zend\Code\Reflection\MethodReflection;
+use Magento\Framework\Service\SimpleDataObjectConverter;
+use Magento\Framework\Service\Data\AttributeValue;
+use Magento\Framework\Model\AbstractExtensibleModel;
+use Magento\Framework\ObjectManager;
+use Magento\Webapi\Model\Config\ClassReflector\TypeProcessor;
+use Magento\Webapi\Model\Cache\Type as WebapiCache;
+
+/**
+ * Data object processor for de-serialization using class reflection
+ */
+class DataObjectProcessor
+{
+    const IS_METHOD_PREFIX = 'is';
+    const HAS_METHOD_PREFIX = 'has';
+    const GETTER_PREFIX = 'get';
+    const SERVICE_INTERFACE_METHODS_CACHE_PREFIX = 'serviceInterfaceMethodsMap';
+    const BASE_MODEL_CLASS = 'Magento\Framework\Model\AbstractExtensibleModel';
+
+    /**
+     * @var WebapiCache
+     */
+    protected $cache;
+
+    /**
+     * @var TypeProcessor
+     */
+    protected $typeProcessor;
+
+    /**
+     * @var array
+     */
+    protected $dataInterfaceMethodsMap = [];
+
+    /**
+     * @var array
+     */
+    protected $serviceInterfaceMethodsMap = [];
+
+    /**
+     * Initialize dependencies.
+     *
+     * @param WebapiCache $cache
+     * @param TypeProcessor $typeProcessor
+     */
+    public function __construct(WebapiCache $cache, TypeProcessor $typeProcessor)
+    {
+        $this->cache = $cache;
+        $this->typeProcessor = $typeProcessor;
+    }
+
+    /**
+     * Use class reflection on given data interface to build output data array
+     *
+     * @param mixed $dataObject
+     * @param string $dataObjectType
+     * @return array
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
+     */
+    public function buildOutputDataArray($dataObject, $dataObjectType)
+    {
+        $methods = $this->getMethodsMap($dataObjectType);
+        $outputData = [];
+
+        /** @var MethodReflection $method */
+        foreach ($methods as $methodName => $methodReflectionData) {
+            // any method with parameter(s) gets ignored because we do not know the type and value of
+            // the parameter(s), so we are not able to process
+            if ($methodReflectionData['parameterCount'] > 0) {
+                continue;
+            }
+            $returnType = $methodReflectionData['type'];
+            if (substr($methodName, 0, 2) === self::IS_METHOD_PREFIX) {
+                $value = $dataObject->{$methodName}();
+                if ($value === null && !$methodReflectionData['isRequired']) {
+                    continue;
+                }
+                $key = SimpleDataObjectConverter::camelCaseToSnakeCase(substr($methodName, 2));
+                $outputData[$key] = $this->castValueToType($value, $returnType);
+            } else if (substr($methodName, 0, 3) === self::HAS_METHOD_PREFIX) {
+                $value = $dataObject->{$methodName}();
+                if ($value === null && !$methodReflectionData['isRequired']) {
+                    continue;
+                }
+                $key = SimpleDataObjectConverter::camelCaseToSnakeCase(substr($methodName, 3));
+                $outputData[$key] = $this->castValueToType($value, $returnType);
+            } else if (substr($methodName, 0, 3) === self::GETTER_PREFIX) {
+                $value = $dataObject->{$methodName}();
+                if ($methodName === 'getCustomAttributes' && $value === []) {
+                    continue;
+                }
+                if ($value === null && !$methodReflectionData['isRequired']) {
+                    continue;
+                }
+                $key = SimpleDataObjectConverter::camelCaseToSnakeCase(substr($methodName, 3));
+                if ($key === AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY) {
+                    $value = $this->convertCustomAttributes($value);
+                } else if (is_object($value)) {
+                    $value = $this->buildOutputDataArray($value, $returnType);
+                } else if (is_array($value)) {
+                    $valueResult = array();
+                    $arrayElementType = substr($returnType, 0, -2);
+                    foreach ($value as $singleValue) {
+                        if (is_object($singleValue)) {
+                            $singleValue = $this->buildOutputDataArray($singleValue, $arrayElementType);
+                        }
+                        $valueResult[] = $this->castValueToType($singleValue, $arrayElementType);
+                    }
+                    $value = $valueResult;
+                }
+                $outputData[$key] = $this->castValueToType($value, $returnType);
+            }
+        }
+        return $outputData;
+    }
+
+    /**
+     * Cast the output type to the documented type. This helps for output purposes.
+     *
+     * @param mixed $value
+     * @param string $type
+     * @return mixed
+     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
+     * @SuppressWarnings(PHPMD.NPathComplexity)
+     */
+    protected function castValueToType($value, $type)
+    {
+        if ($value === null) {
+            return null;
+        }
+
+        if ($type === "int" || $type === "integer") {
+            return (int)$value;
+        }
+
+        if ($type === "string") {
+            return (string)$value;
+        }
+
+        if ($type === "bool" || $type === "boolean" || $type === "true" || $type == "false") {
+            return (bool)$value;
+        }
+
+        if ($type === "float") {
+            return (float)$value;
+        }
+
+        if ($type === "double") {
+            return (double)$value;
+        }
+
+        return $value;
+    }
+
+    /**
+     * Get return type by interface name and method
+     *
+     * @param string $interfaceName
+     * @param string $methodName
+     * @return string
+     */
+    public function getMethodReturnType($interfaceName, $methodName)
+    {
+        return $this->getMethodsMap($interfaceName)[$methodName]['type'];
+    }
+
+    /**
+     * Convert array of custom_attributes to use flat array structure
+     *
+     * @param \Magento\Framework\Api\AttributeInterface[] $customAttributes
+     * @return array
+     */
+    protected function convertCustomAttributes($customAttributes)
+    {
+        $result = array();
+        foreach ((array)$customAttributes as $customAttribute) {
+            $result[] = $this->convertCustomAttribute($customAttribute);
+        }
+        return $result;
+    }
+
+    /**
+     * Convert custom_attribute object to use flat array structure
+     *
+     * @param \Magento\Framework\Api\AttributeInterface $customAttribute
+     * @return array
+     */
+    protected function convertCustomAttribute($customAttribute)
+    {
+        $data = array();
+        $data[AttributeValue::ATTRIBUTE_CODE] = $customAttribute->getAttributeCode();
+        $value = $customAttribute->getValue();
+        if (is_object($value)) {
+            $value = $this->buildOutputDataArray($value, get_class($value));
+        } else if (is_array($value)) {
+            $valueResult = array();
+            foreach ($value as $singleValue) {
+                if (is_object($singleValue)) {
+                    $elementType = get_class($singleValue);
+                    $singleValue = $this->buildOutputDataArray($singleValue, $elementType);
+                }
+                // Cannot cast to a type because the type is unknown
+                $valueResult[] = $singleValue;
+            }
+            $value = $valueResult;
+        }
+        $data[AttributeValue::VALUE] = $value;
+        return $data;
+    }
+
+    /**
+     * Return service interface or Data interface methods loaded from cache
+     *
+     * @param string $interfaceName
+     * @return array
+     * <pre>
+     * Service methods' reflection data stored in cache as 'methodName' => 'returnType'
+     * ex.
+     * [
+     *  'create' => '\Magento\Customer\Api\Data\Customer',
+     *  'validatePassword' => 'boolean'
+     * ]
+     * </pre>
+     */
+    public function getMethodsMap($interfaceName)
+    {
+        $key = self::SERVICE_INTERFACE_METHODS_CACHE_PREFIX . "-" . md5($interfaceName);
+        if (!isset($this->serviceInterfaceMethodsMap[$key])) {
+            $methodMap = $this->cache->load($key);
+            if ($methodMap) {
+                $this->serviceInterfaceMethodsMap[$key] = unserialize($methodMap);
+            } else {
+                $methodMap = $this->getMethodMapViaReflection($interfaceName);
+                $this->serviceInterfaceMethodsMap[$key] = $methodMap;
+                $this->cache->save(serialize($this->serviceInterfaceMethodsMap[$key]), $key);
+            }
+        }
+        return $this->serviceInterfaceMethodsMap[$key];
+    }
+
+    /**
+     * Use reflection to load the method information
+     *
+     * @param string $interfaceName
+     * @return array
+     */
+    protected function getMethodMapViaReflection($interfaceName)
+    {
+        $methodMap = [];
+        $class = new ClassReflection($interfaceName);
+        $baseClassMethods = false;
+        foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) {
+            // Include all the methods of classes inheriting from AbstractExtensibleObject.
+            // Ignore all the methods of AbstractExtensibleModel's parent classes
+            if ($method->class === self::BASE_MODEL_CLASS) {
+                $baseClassMethods = true;
+            } elseif ($baseClassMethods) {
+                // ReflectionClass::getMethods() sorts the methods by class (lowest in inheritance tree first)
+                // then by the order they are defined in the class definition
+                break;
+            }
+
+            if ($this->isSuitableMethod($method)) {
+                $methodMap[$method->getName()] = $this->typeProcessor->getGetterReturnType($method);
+            }
+        }
+        return $methodMap;
+    }
+
+    /**
+     * Determines if the method is suitable to be used by the processor.
+     *
+     * @param \ReflectionMethod $method
+     * @return bool
+     */
+    protected function isSuitableMethod($method)
+    {
+        $isSuitableMethodType = !($method->isConstructor() || $method->isFinal()
+            || $method->isStatic() || $method->isDestructor());
+
+        $isExcludedMagicMethod = in_array(
+            $method->getName(),
+            ['__sleep', '__wakeup', '__clone']
+        );
+        return $isSuitableMethodType && !$isExcludedMagicMethod;
+    }
+}
diff --git a/app/code/Magento/Webapi/Model/Soap/Config.php b/app/code/Magento/Webapi/Model/Soap/Config.php
index 2857b810b613df8a5d0c694e56afa883fa6aec01..f8a109e797c0992741876e76c9c3abd3c0ee5dfb 100644
--- a/app/code/Magento/Webapi/Model/Soap/Config.php
+++ b/app/code/Magento/Webapi/Model/Soap/Config.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Webapi\Model\Soap;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Webapi\Model\Config\Converter;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 
@@ -82,20 +83,20 @@ class Config
      * Initialize dependencies.
      *
      * @param \Magento\Framework\ObjectManager $objectManager
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Webapi\Model\Config $config
      * @param \Magento\Webapi\Model\Config\ClassReflector $classReflector
      * @param \Magento\Webapi\Helper\Data $helper
      */
     public function __construct(
         \Magento\Framework\ObjectManager $objectManager,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Webapi\Model\Config $config,
         \Magento\Webapi\Model\Config\ClassReflector $classReflector,
         \Magento\Webapi\Helper\Data $helper
     ) {
         // TODO: Check if Service specific XSD is already cached
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->_config = $config;
         $this->_objectManager = $objectManager;
         $this->_helper = $helper;
diff --git a/app/code/Magento/Webapi/README.md b/app/code/Magento/Webapi/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..26f7ad9f09ebd9810bfe6f46a5b72e96330bc685
--- /dev/null
+++ b/app/code/Magento/Webapi/README.md
@@ -0,0 +1,5 @@
+# Webapi
+
+**Webapi** provides the framework for the application to expose REST and SOAP web services. It exposes an area for REST
+and another area for SOAP services and routes requests based on the Webapi configuration. It also handles
+deserialization of requests and serialization of responses. 
diff --git a/app/code/Magento/Webapi/composer.json b/app/code/Magento/Webapi/composer.json
index 8a945dd19d1978f39a3db51a48b5433683a291ea..a3f63e1b46d7bfd81df399bd555c98a86d0b62c4 100644
--- a/app/code/Magento/Webapi/composer.json
+++ b/app/code/Magento/Webapi/composer.json
@@ -3,17 +3,17 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-authorization": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-integration": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-user": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-authorization": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-integration": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-user": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Weee/Block/Item/Price/Renderer.php b/app/code/Magento/Weee/Block/Item/Price/Renderer.php
index d3ace4045b0e8fae19d429db26f52bf128159d21..3111d16dd809c8a1b537fed1a50105544df1c7a2 100644
--- a/app/code/Magento/Weee/Block/Item/Price/Renderer.php
+++ b/app/code/Magento/Weee/Block/Item/Price/Renderer.php
@@ -67,7 +67,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
      */
     public function displayPriceWithWeeeDetails()
     {
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return false;
         }
 
@@ -112,7 +112,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $priceInclTax = $this->getItem()->getPriceInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $priceInclTax;
         }
 
@@ -133,7 +133,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $basePriceInclTax = $this->getItem()->getBasePriceInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $basePriceInclTax;
         }
 
@@ -154,7 +154,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $rowTotalInclTax = $this->getItem()->getRowTotalInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $rowTotalInclTax;
         }
 
@@ -175,7 +175,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $baseRowTotalInclTax = $this->getItem()->getBaseRowTotalInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $baseRowTotalInclTax;
         }
 
@@ -196,7 +196,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $priceExclTax = $this->getItemDisplayPriceExclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $priceExclTax;
         }
 
@@ -217,7 +217,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $basePriceExclTax = $this->getItem()->getBasePrice();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $basePriceExclTax;
         }
 
@@ -238,7 +238,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $rowTotalExclTax = $this->getItem()->getRowTotal();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $rowTotalExclTax;
         }
 
@@ -259,7 +259,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $baseRowTotalExclTax = $this->getItem()->getBaseRowTotal();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $baseRowTotalExclTax;
         }
 
@@ -279,7 +279,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $priceInclTax = $this->getItem()->getPriceInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $priceInclTax;
         }
 
@@ -295,7 +295,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $basePriceInclTax = $this->getItem()->getBasePriceInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $basePriceInclTax;
         }
 
@@ -311,7 +311,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $rowTotalInclTax = $this->getItem()->getRowTotalInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $rowTotalInclTax;
         }
 
@@ -327,7 +327,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $baseRowTotalInclTax = $this->getItem()->getBaseRowTotalInclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $baseRowTotalInclTax;
         }
 
@@ -343,7 +343,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $priceExclTax = $this->getItemDisplayPriceExclTax();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $priceExclTax;
         }
 
@@ -359,7 +359,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $basePriceExclTax = $this->getItem()->getBasePrice();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $basePriceExclTax;
         }
 
@@ -375,7 +375,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $rowTotalExclTax = $this->getItem()->getRowTotal();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $rowTotalExclTax;
         }
 
@@ -391,7 +391,7 @@ class Renderer extends \Magento\Tax\Block\Item\Price\Renderer
     {
         $baseRowTotalExclTax = $this->getItem()->getBaseRowTotal();
 
-        if (!$this->weeeHelper->isEnabled()) {
+        if (!$this->weeeHelper->isEnabled($this->getStoreId())) {
             return $baseRowTotalExclTax;
         }
 
diff --git a/app/code/Magento/Weee/Helper/Data.php b/app/code/Magento/Weee/Helper/Data.php
index fd61ec10a11d627a06326e45f0106591b092d45c..7fb3729b99b7785fcbc1cdda456b1f2b728da8ea 100644
--- a/app/code/Magento/Weee/Helper/Data.php
+++ b/app/code/Magento/Weee/Helper/Data.php
@@ -231,7 +231,14 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getAmount($product, $website = null)
     {
-        if ($this->isEnabled()) {
+        /** @var \Magento\Store\Model\Store $store */
+        if ($website) {
+            $store = $this->_storeManager->getWebsite($website)->getDefaultGroup()->getDefaultStore();
+        } else {
+            $store = $product->getStore();
+        }
+
+        if ($this->isEnabled($store)) {
             return $this->_weeeTax->getWeeeAmount($product, null, null, $website, false);
         }
         return 0;
@@ -366,7 +373,10 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getProductWeeeAttributesForDisplay($product)
     {
-        if ($this->isEnabled()) {
+        /** @var \Magento\Store\Model\Store $store */
+        $store = $product->getStore();
+
+        if ($this->isEnabled($store)) {
             return $this->getProductWeeeAttributes($product, null, null, null, $this->typeOfDisplay(1));
         }
         return array();
@@ -389,7 +399,14 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
         $website = null,
         $calculateTaxes = false
     ) {
-        if ($this->isEnabled()) {
+        /** @var \Magento\Store\Model\Store $store */
+        if ($website) {
+            $store = $this->_storeManager->getWebsite($website)->getDefaultGroup()->getDefaultStore();
+        } else {
+            $store = $product->getStore();
+        }
+
+        if ($this->isEnabled($store)) {
             return $this->getProductWeeeAttributes(
                 $product,
                 $shipping,
@@ -409,7 +426,10 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getAmountForDisplay($product)
     {
-        if ($this->isEnabled()) {
+        /** @var \Magento\Store\Model\Store $store */
+        $store = $product->getStore();
+
+        if ($this->isEnabled($store)) {
             return $this->_weeeTax->getWeeeAmount($product, null, null, null, $this->typeOfDisplay(1));
         }
         return 0;
@@ -423,7 +443,10 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
      */
     public function getOriginalAmount($product)
     {
-        if ($this->isEnabled()) {
+        /** @var \Magento\Store\Model\Store $store */
+        $store = $product->getStore();
+
+        if ($this->isEnabled($store)) {
             return $this->_weeeTax->getWeeeAmount($product, null, null, null, false, true);
         }
         return 0;
diff --git a/app/code/Magento/Weee/Model/Config.php b/app/code/Magento/Weee/Model/Config.php
index e832c4940b5199f937a9fcbe4fa4cf254e3c9565..568083e40554c0a0bdf215d03dafcf26e6b65b87 100644
--- a/app/code/Magento/Weee/Model/Config.php
+++ b/app/code/Magento/Weee/Model/Config.php
@@ -194,8 +194,8 @@ class Config
     /**
      * Check if fixed taxes are used in system
      *
-     * @param Store $store
-     * @return bool
+     * @param   null|string|bool|int|Store $store
+     * @return  bool
      */
     public function isEnabled($store = null)
     {
diff --git a/app/code/Magento/Weee/Model/Observer.php b/app/code/Magento/Weee/Model/Observer.php
index 6a887bb730e6b0820bb893abb614d15abc760077..2bdbd0203da1f97a0eb768880e194e1ecfdaaaf6 100644
--- a/app/code/Magento/Weee/Model/Observer.php
+++ b/app/code/Magento/Weee/Model/Observer.php
@@ -217,16 +217,16 @@ class Observer extends \Magento\Framework\Model\AbstractModel
      */
     public function updateDiscountPercents(\Magento\Framework\Event\Observer $observer)
     {
-        if (!$this->_weeeData->isEnabled()) {
-            return $this;
-        }
-
         $productCondition = $observer->getEvent()->getProductCondition();
         if ($productCondition) {
             $eventProduct = $productCondition;
         } else {
             $eventProduct = $observer->getEvent()->getProduct();
         }
+
+        if (!$this->_weeeData->isEnabled($eventProduct->getStore())) {
+            return $this;
+        }
         $this->_weeeTax->updateProductsDiscountPercent($eventProduct);
 
         return $this;
@@ -240,10 +240,6 @@ class Observer extends \Magento\Framework\Model\AbstractModel
      */
     public function updateProductOptions(\Magento\Framework\Event\Observer $observer)
     {
-        if (!$this->_weeeData->isEnabled()) {
-            return $this;
-        }
-
         $response = $observer->getEvent()->getResponseObject();
         $options = $response->getAdditionalOptions();
 
@@ -251,6 +247,9 @@ class Observer extends \Magento\Framework\Model\AbstractModel
         if (!$_product) {
             return $this;
         }
+        if (!$this->_weeeData->isEnabled($_product->getStore())) {
+            return $this;
+        }
 
         $options['oldPlusDisposition'] = $this->_weeeData->getOriginalAmount($_product);
         $options['plusDisposition'] = $this->_weeeData->getAmount($_product);
@@ -273,10 +272,6 @@ class Observer extends \Magento\Framework\Model\AbstractModel
      */
     public function updateBundleProductOptions(\Magento\Framework\Event\Observer $observer)
     {
-        if (!$this->_weeeData->isEnabled()) {
-            return $this;
-        }
-
         $response = $observer->getEvent()->getResponseObject();
         $selection = $observer->getEvent()->getSelection();
         $options = $response->getAdditionalOptions();
@@ -287,6 +282,9 @@ class Observer extends \Magento\Framework\Model\AbstractModel
         if (!$_product || $_product->getPriceType() != $typeDynamic) {
             return $this;
         }
+        if (!$this->_weeeData->isEnabled($_product->getStore())) {
+            return $this;
+        }
 
         $amount = $this->_weeeData->getAmount($selection);
         $attributes = $this->_weeeData->getProductWeeeAttributes($_product, null, null, null, $this->_weeeData->isTaxable());
diff --git a/app/code/Magento/Weee/Model/Tax.php b/app/code/Magento/Weee/Model/Tax.php
index a523978089febcebd32d1e79d86e35f45c9b3904..664502c723977fdd4fd3b6d4e0174cf0eda89c36 100644
--- a/app/code/Magento/Weee/Model/Tax.php
+++ b/app/code/Magento/Weee/Model/Tax.php
@@ -194,18 +194,19 @@ class Tax extends \Magento\Framework\Model\AbstractModel
      */
     public function getWeeeAttributeCodes($forceEnabled = false)
     {
-        return $this->getWeeeTaxAttributeCodes($forceEnabled);
+        return $this->getWeeeTaxAttributeCodes(null, $forceEnabled);
     }
 
     /**
      * Retrieve Wee tax attribute codes
      *
-     * @param bool $forceEnabled
+     * @param  null|string|bool|int|Store $store
+     * @param  bool $forceEnabled
      * @return array
      */
-    public function getWeeeTaxAttributeCodes($forceEnabled = false)
+    public function getWeeeTaxAttributeCodes($store = null, $forceEnabled = false)
     {
-        if (!$forceEnabled && !$this->weeeConfig->isEnabled()) {
+        if (!$forceEnabled && !$this->weeeConfig->isEnabled($store)) {
             return array();
         }
 
@@ -233,15 +234,16 @@ class Tax extends \Magento\Framework\Model\AbstractModel
         $ignoreDiscount = false
     ) {
         $result = array();
-        $allWeee = $this->getWeeeTaxAttributeCodes();
-        if (!$allWeee) {
-            return $result;
-        }
 
         $websiteId = $this->_storeManager->getWebsite($website)->getId();
         /** @var \Magento\Store\Model\Store $store */
         $store = $this->_storeManager->getWebsite($website)->getDefaultGroup()->getDefaultStore();
 
+        $allWeee = $this->getWeeeTaxAttributeCodes($store);
+        if (!$allWeee) {
+            return $result;
+        }
+
         /** @var \Magento\Tax\Model\Calculation $calculator */
         $calculator = $this->_calculationFactory->create();
 
diff --git a/app/code/Magento/Weee/Model/Total/Quote/Weee.php b/app/code/Magento/Weee/Model/Total/Quote/Weee.php
index b2b5a9857474da6062fba4ae10a9defe1af22abe..e6a83cade6f4dc081f10ba175ba894645b102bda 100644
--- a/app/code/Magento/Weee/Model/Total/Quote/Weee.php
+++ b/app/code/Magento/Weee/Model/Total/Quote/Weee.php
@@ -51,11 +51,11 @@ class Weee extends AbstractTotal
     protected $_store;
 
     /**
-     * Static counter
+     * Counter
      *
      * @var int
      */
-    protected static $counter = 0;
+    protected $counter = 0;
 
     /**
      * Array to keep track of weee taxable item code to quote item
@@ -170,7 +170,15 @@ class Weee extends AbstractTotal
         $associatedTaxables = $item->getAssociatedTaxables();
         if (!$associatedTaxables) {
             $associatedTaxables = [];
+        } else {
+            // remove existing weee associated taxables
+            foreach ($associatedTaxables as $iTaxable => $taxable) {
+                if ($taxable[CommonTaxCollector::KEY_ASSOCIATED_TAXABLE_TYPE] == self::ITEM_TYPE) {
+                    unset($associatedTaxables[$iTaxable]);
+                }
+            }
         }
+
         foreach ($attributes as $key => $attribute) {
             $title          = $attribute->getName();
 
@@ -206,9 +214,10 @@ class Weee extends AbstractTotal
             );
 
             if ($this->weeeData->isTaxable($this->_store)) {
-                $itemTaxCalculationId = $item->getTaxCalculationItemId();
+
                 $weeeItemCode = self::ITEM_CODE_WEEE_PREFIX . $this->getNextIncrement();
                 $weeeItemCode .= '-' . $title;
+
                 $associatedTaxables[] = [
                     CommonTaxCollector::KEY_ASSOCIATED_TAXABLE_TYPE => self::ITEM_TYPE,
                     CommonTaxCollector::KEY_ASSOCIATED_TAXABLE_CODE => $weeeItemCode,
@@ -272,14 +281,14 @@ class Weee extends AbstractTotal
     }
 
     /**
-     * Increment and return static counter. This function is intended to be used to generate temporary
+     * Increment and return counter. This function is intended to be used to generate temporary
      * id for an item.
      *
      * @return int
      */
     protected function getNextIncrement()
     {
-        return ++self::$counter;
+        return ++$this->counter;
     }
 
     /**
diff --git a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php
index 1552118f9420229fc3ca47612852041698564a97..4ead20764acbcc81b6b2e98920280b20cbe2c863 100644
--- a/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php
+++ b/app/code/Magento/Weee/Model/Total/Quote/WeeeTax.php
@@ -39,7 +39,7 @@ class WeeeTax extends Weee
     public function collect(\Magento\Sales\Model\Quote\Address $address)
     {
         \Magento\Sales\Model\Quote\Address\Total\AbstractTotal::collect($address);
-        $this->store = $address->getQuote()->getStore();
+        $this->_store = $address->getQuote()->getStore();
         if (!$this->weeeData->isEnabled($this->_store)) {
             return $this;
         }
diff --git a/app/code/Magento/Weee/README.md b/app/code/Magento/Weee/README.md
index baa8bbf95bae15f344035acf02b7a3be704b2eb1..3fda5bbc12bb038acf560c52d48571ecfd587b4d 100644
--- a/app/code/Magento/Weee/README.md
+++ b/app/code/Magento/Weee/README.md
@@ -1 +1,25 @@
-The WEEE module enables the application of fees / fixed product taxes (FPT) on certain types of products, usually related to electronic devices and recycling.
+# Overview
+The Magento_Weee module enables the application of fees/fixed product taxes (FPT) on certain types of products, usually related to electronic devices and recycling.
+Fixed product taxes can be used to setup a WEEE tax that is a fixed amount, rather than a percentage of the product price. FPT can be configured to be displayed at various places in Magento. Rules, amounts, and display options can be configured in the backend. This module extends the existing functionality of Magento_Tax.
+
+The Magento_Wee module includes the following:
+
+* ability to add different number of fixed product taxes to product. They are treated as a product attribute;
+* configuration of where Weee appears (on category, product, sales, invoice, or credit memo pages) and whether FPT should be taxed;
+* a new line item in the totals section.
+
+# System requirements
+The Magento_Weee module does not have any specific system requirements.
+
+## Install
+Magento_Weee module can be installed automatically (using native Magento install mechanism) without any additional actions
+
+## Uninstall
+Magento installation with existing products with FPT:
+* Disable FPT on the backend
+* Remove all products with FPT
+* Remove all FPT attributes from product templates
+* Delete all FPT attributes
+* Remove module directory from the code base
+* New Magento installation:
+* Can be removed without additional actions
\ No newline at end of file
diff --git a/app/code/Magento/Weee/composer.json b/app/code/Magento/Weee/composer.json
index 47638113a828f3c893bd0330a8e1b418630f908e..77e4d7ee44189f673d62bffcc603f15d32c517a9 100644
--- a/app/code/Magento/Weee/composer.json
+++ b/app/code/Magento/Weee/composer.json
@@ -3,21 +3,21 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-tax": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-directory": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-eav": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-bundle": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-tax": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-directory": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-eav": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-bundle": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Widget/Model/Config/FileResolver.php b/app/code/Magento/Widget/Model/Config/FileResolver.php
index 4f9ef44a50f2e56002e9a0369f0d59bef45d72ee..a742b0f280fa19010833c923dc9f33677eafffca 100644
--- a/app/code/Magento/Widget/Model/Config/FileResolver.php
+++ b/app/code/Magento/Widget/Model/Config/FileResolver.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Widget\Model\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileResolver implements \Magento\Framework\Config\FileResolverInterface
 {
     /**
@@ -50,17 +52,17 @@ class FileResolver implements \Magento\Framework\Config\FileResolverInterface
     protected $modulesDirectory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem                   $filesystem
+     * @param \Magento\Framework\Filesystem                   $filesystem
      * @param \Magento\Framework\Module\Dir\Reader            $moduleReader
      * @param \Magento\Framework\Config\FileIteratorFactory   $iteratorFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Module\Dir\Reader $moduleReader,
         \Magento\Framework\Config\FileIteratorFactory $iteratorFactory
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::THEMES_DIR);
-        $this->modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->themesDirectory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $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 5887285b1b90b924736d1216a56ce447848d4bb2..582a39d26aed7b90f69bd9d935185c8e9bba9382 100644
--- a/app/code/Magento/Widget/Model/Widget/Instance.php
+++ b/app/code/Magento/Widget/Model/Widget/Instance.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Widget\Model\Widget;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Widget Instance Model
  *
@@ -128,7 +130,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel
      * @param \Magento\Widget\Model\Widget $widgetModel
      * @param \Magento\Widget\Model\NamespaceResolver $namespaceResolver
      * @param \Magento\Framework\Math\Random $mathRandom
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
      * @param string[] $relatedCacheTypes
@@ -145,7 +147,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel
         \Magento\Widget\Model\Widget $widgetModel,
         \Magento\Widget\Model\NamespaceResolver $namespaceResolver,
         \Magento\Framework\Math\Random $mathRandom,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Model\Resource\AbstractResource $resource = null,
         \Magento\Framework\Data\Collection\Db $resourceCollection = null,
         array $relatedCacheTypes = array(),
@@ -159,7 +161,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel
         $this->_reader = $reader;
         $this->_widgetModel = $widgetModel;
         $this->mathRandom = $mathRandom;
-        $this->_directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_directory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->_namespaceResolver = $namespaceResolver;
         parent::__construct($context, $registry, $resource, $resourceCollection, $data);
     }
diff --git a/app/code/Magento/Widget/composer.json b/app/code/Magento/Widget/composer.json
index ba81cbdab95e5ab99e16799ee602a702ad6f7142..ee31ea45b453fd5dd090d64b28bfb5a6114991d2 100644
--- a/app/code/Magento/Widget/composer.json
+++ b/app/code/Magento/Widget/composer.json
@@ -3,16 +3,16 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-cms": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-cms": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php
index 9227ca996c81d546a457f1b7e1494eb8f3fa82cb..021dd7eea29d1ddbb222ca36f45e40ca2c894d89 100644
--- a/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php
+++ b/app/code/Magento/Wishlist/Controller/Index/DownloadCustomOption.php
@@ -24,6 +24,7 @@
  */
 namespace Magento\Wishlist\Controller\Index;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Wishlist\Controller\IndexInterface;
 use Magento\Framework\App\Action;
 
@@ -86,18 +87,13 @@ class DownloadCustomOption extends Action\Action implements IndexInterface
 
         try {
             $info = unserialize($option->getValue());
-            $filePath = $this->_objectManager->get(
-                'Magento\Framework\App\Filesystem'
-            )->getPath(
-                \Magento\Framework\App\Filesystem::ROOT_DIR
-            ) . $info['quote_path'];
             $secretKey = $this->getRequest()->getParam('key');
 
             if ($secretKey == $info['secret_key']) {
                 $this->_fileResponseFactory->create(
                     $info['title'],
-                    array('value' => $filePath, 'type' => 'filename'),
-                    \Magento\Framework\App\Filesystem::ROOT_DIR
+                    array('value' => $info['quote_path'], 'type' => 'filename'),
+                    DirectoryList::ROOT
                 );
             }
         } catch (\Exception $e) {
diff --git a/app/code/Magento/Wishlist/composer.json b/app/code/Magento/Wishlist/composer.json
index ca7ed6010472f268dadb8131809e765430087c80..1e26e1d47936d74df9e725c5305ff0111ca8355b 100644
--- a/app/code/Magento/Wishlist/composer.json
+++ b/app/code/Magento/Wishlist/composer.json
@@ -3,25 +3,25 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/module-store": "0.1.0-alpha100",
-        "magento/module-customer": "0.1.0-alpha100",
-        "magento/module-catalog": "0.1.0-alpha100",
-        "magento/module-core": "0.1.0-alpha100",
-        "magento/module-checkout": "0.1.0-alpha100",
-        "magento/module-theme": "0.1.0-alpha100",
-        "magento/module-catalog-inventory": "0.1.0-alpha100",
-        "magento/module-rss": "0.1.0-alpha100",
-        "magento/module-backend": "0.1.0-alpha100",
-        "magento/module-bundle": "0.1.0-alpha100",
-        "magento/module-sales": "0.1.0-alpha100",
-        "magento/module-grouped-product": "0.1.0-alpha100",
-        "magento/module-configurable-product": "0.1.0-alpha100",
-        "magento/module-downloadable": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/module-store": "0.1.0-alpha101",
+        "magento/module-customer": "0.1.0-alpha101",
+        "magento/module-catalog": "0.1.0-alpha101",
+        "magento/module-core": "0.1.0-alpha101",
+        "magento/module-checkout": "0.1.0-alpha101",
+        "magento/module-theme": "0.1.0-alpha101",
+        "magento/module-catalog-inventory": "0.1.0-alpha101",
+        "magento/module-rss": "0.1.0-alpha101",
+        "magento/module-backend": "0.1.0-alpha101",
+        "magento/module-bundle": "0.1.0-alpha101",
+        "magento/module-sales": "0.1.0-alpha101",
+        "magento/module-grouped-product": "0.1.0-alpha101",
+        "magento/module-configurable-product": "0.1.0-alpha101",
+        "magento/module-downloadable": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-module",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/design/adminhtml/Magento/backend/composer.json b/app/design/adminhtml/Magento/backend/composer.json
index 63fa35ed9562e955ab457810f19e8bdc8f039cef..2cece03aef04696ae693d2a4643d2972b3885160 100644
--- a/app/design/adminhtml/Magento/backend/composer.json
+++ b/app/design/adminhtml/Magento/backend/composer.json
@@ -3,11 +3,11 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-theme",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/design/adminhtml/Magento/backend/theme.xml b/app/design/adminhtml/Magento/backend/theme.xml
index de93b622831a61fc28eadd52e49788efcb3c36b5..ffc2c17d0100df95b9229489c5c0d5f38a79692c 100644
--- a/app/design/adminhtml/Magento/backend/theme.xml
+++ b/app/design/adminhtml/Magento/backend/theme.xml
@@ -24,5 +24,5 @@
 -->
 <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
     <title>Magento 2 backend</title>
-    <version>0.1.0-alpha100</version>
+    <version>0.1.0-alpha101</version>
 </theme>
diff --git a/app/design/frontend/Magento/blank/composer.json b/app/design/frontend/Magento/blank/composer.json
index e4f07c27fa999494aea874cd96d5fccddef8c0cf..0587e31ff58adca76379901380fc439c41b9f341 100644
--- a/app/design/frontend/Magento/blank/composer.json
+++ b/app/design/frontend/Magento/blank/composer.json
@@ -3,11 +3,11 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-theme",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/design/frontend/Magento/blank/theme.xml b/app/design/frontend/Magento/blank/theme.xml
index 253ad49461b912617b8408ae9e6181b7183ba270..bef4c22e8ccff2a53191b73f431c4a581f4dc6f4 100644
--- a/app/design/frontend/Magento/blank/theme.xml
+++ b/app/design/frontend/Magento/blank/theme.xml
@@ -24,7 +24,7 @@
 -->
 <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
     <title>Magento Blank</title>
-    <version>0.1.0-alpha100</version>
+    <version>0.1.0-alpha101</version>
     <media>
         <preview_image>media/preview.jpg</preview_image>
     </media>
diff --git a/app/design/frontend/Magento/plushe/composer.json b/app/design/frontend/Magento/plushe/composer.json
index 3277ffd526ef016f3bc1dcd9ddebbf4f540dbdc2..414a86f35d5d5660b7f963bfa309d741e0033db6 100644
--- a/app/design/frontend/Magento/plushe/composer.json
+++ b/app/design/frontend/Magento/plushe/composer.json
@@ -3,12 +3,12 @@
     "description": "N/A",
     "require": {
         "php": "~5.4.11|~5.5.0",
-        "magento/theme-frontend-blank": "0.1.0-alpha100",
-        "magento/framework": "0.1.0-alpha100",
+        "magento/theme-frontend-blank": "0.1.0-alpha101",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-theme",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "extra": {
         "map": [
             [
diff --git a/app/design/frontend/Magento/plushe/theme.xml b/app/design/frontend/Magento/plushe/theme.xml
index 1bcaa3cd2ac86a8467665cc84fa27645066c7cf9..d3863710ee832177fa5b9dacbb208c24fedcc9d3 100644
--- a/app/design/frontend/Magento/plushe/theme.xml
+++ b/app/design/frontend/Magento/plushe/theme.xml
@@ -24,7 +24,7 @@
 -->
 <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
     <title>Magento Plushe</title>
-    <version>0.1.0-alpha100</version>
+    <version>0.1.0-alpha101</version>
     <parent>Magento/blank</parent>
     <media>
         <preview_image>media/preview.jpg</preview_image>
diff --git a/app/design/install/Magento/basic/theme.xml b/app/design/install/Magento/basic/theme.xml
index 80a2a4efda16cf59379d5f2ede8ee6f234d3a0f2..1af71cdef8db8031471b5831039342a8acf0175c 100644
--- a/app/design/install/Magento/basic/theme.xml
+++ b/app/design/install/Magento/basic/theme.xml
@@ -24,5 +24,5 @@
 -->
 <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
     <title>Magento Basic</title>
-    <version>0.1.0-alpha100</version>
+    <version>0.1.0-alpha101</version>
 </theme>
diff --git a/app/etc/di.xml b/app/etc/di.xml
index 07f4a8f5bbac6cc5c4b74e84729c3753f01d4bf3..a77cb7c628fb4bac9027ae309a15d69ee6fc489e 100644
--- a/app/etc/di.xml
+++ b/app/etc/di.xml
@@ -24,6 +24,8 @@
  */
 -->
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
+    <preference for="Magento\Framework\Search\Adapter\Mysql\Filter\PreprocessorInterface" type="Magento\Framework\Search\Adapter\Mysql\Filter\Preprocessor" />
+    <preference for="Magento\Framework\Search\Adapter\Mysql\Field\ResolverInterface" type="Magento\Framework\Search\Adapter\Mysql\Field\Resolver" />
     <preference for="Magento\Framework\App\RequestInterface" type="Magento\Framework\App\Request\Http" />
     <preference for="Magento\Framework\App\Request\PathInfoProcessorInterface" type="Magento\Store\App\Request\PathInfoProcessor" />
     <preference for="Magento\Framework\App\ResponseInterface" type="Magento\Framework\App\Response\Http" />
@@ -268,12 +270,6 @@
             <argument name="session" xsi:type="object">Magento\Framework\Session\Generic\Proxy</argument>
         </arguments>
     </type>
-    <type name="Magento\Framework\App\Filesystem">
-        <arguments>
-            <argument name="fileReadFactory" xsi:type="object">Magento\Framework\Filesystem\File\ReadFactory</argument>
-            <argument name="fileWriteFactory" xsi:type="object">Magento\Framework\Filesystem\File\WriteFactory</argument>
-        </arguments>
-    </type>
     <virtualType name="layoutArgumentInterpreterInternal" type="Magento\Framework\Data\Argument\Interpreter\Composite">
         <arguments>
             <argument name="interpreters" xsi:type="array">
diff --git a/app/i18n/magento/de_de/composer.json b/app/i18n/magento/de_de/composer.json
index 9c4992e1db67b9eb73c25e84449e7514de131993..7edb862a4cddac711553d37a724f693a1055b718 100644
--- a/app/i18n/magento/de_de/composer.json
+++ b/app/i18n/magento/de_de/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-de_de",
     "description": "German (Germany) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/app/i18n/magento/en_us/composer.json b/app/i18n/magento/en_us/composer.json
index 0b621cc2341f9baa5f1d18d9d157e1541513455c..720bbf2ee72f0e1247d7c13c4d23f495c4b66a93 100644
--- a/app/i18n/magento/en_us/composer.json
+++ b/app/i18n/magento/en_us/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-en_us",
     "description": "English (United States) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/app/i18n/magento/es_es/composer.json b/app/i18n/magento/es_es/composer.json
index e9ba06bc09d006e1e6e3511c7a35d5f6008e4ec8..c88686b4d7d2441f15c11bc21c8ff7c67fdcfe92 100644
--- a/app/i18n/magento/es_es/composer.json
+++ b/app/i18n/magento/es_es/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-es_es",
     "description": "Spanish (Spain) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/app/i18n/magento/fr_fr/composer.json b/app/i18n/magento/fr_fr/composer.json
index 78e17ebd4574d7670b1b7f53a0ac21417848ad98..adee97fc7b09a8ce653f53c7b05189650e7de2cd 100644
--- a/app/i18n/magento/fr_fr/composer.json
+++ b/app/i18n/magento/fr_fr/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-fr_fr",
     "description": "French (France) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/app/i18n/magento/nl_nl/composer.json b/app/i18n/magento/nl_nl/composer.json
index 1d4f58e6decb651fc8005ee5ee23c586758fda56..de4c770dc60fd0c5dbb4638ae83832569f33553b 100644
--- a/app/i18n/magento/nl_nl/composer.json
+++ b/app/i18n/magento/nl_nl/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-nl_nl",
     "description": "Dutch (Netherlands) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/app/i18n/magento/pt_br/composer.json b/app/i18n/magento/pt_br/composer.json
index acf248feedbe3bf1e8974e8dc526bc203662278d..ce14b41eec2527803788f766b945a15a9fa88cc4 100644
--- a/app/i18n/magento/pt_br/composer.json
+++ b/app/i18n/magento/pt_br/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-pt_br",
     "description": "Portuguese (Brazil) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/app/i18n/magento/zh_cn/composer.json b/app/i18n/magento/zh_cn/composer.json
index 4852b48a899594134b1baa5ee91d81ccf37ffab8..694f1f684bd3534415d30233785daa9835c4f514 100644
--- a/app/i18n/magento/zh_cn/composer.json
+++ b/app/i18n/magento/zh_cn/composer.json
@@ -1,9 +1,9 @@
 {
     "name": "magento/language-zh_cn",
     "description": "Chinese (China) language",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
-        "magento/framework": "0.1.0-alpha100",
+        "magento/framework": "0.1.0-alpha101",
         "magento/magento-composer-installer": "*"
     },
     "type": "magento2-language",
diff --git a/composer.json b/composer.json
index a1c75d0a375fb12ebe4ce87c9a1b129f3c10929a..218249b198da7faef1968a0ae52777837bc5ed08 100644
--- a/composer.json
+++ b/composer.json
@@ -2,7 +2,7 @@
     "name": "magento/project-community-edition",
     "description": "Magento project (Community Edition)",
     "type": "project",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
         "php": "~5.4.11|~5.5.0",
         "zendframework/zend-stdlib": "2.0.3"
diff --git a/dev/tests/functional/lib/Mtf/ObjectManagerFactory.php b/dev/tests/functional/lib/Mtf/ObjectManagerFactory.php
index ba02099344becc18ed7c018a6fff7bf6e17360d4..08d789294b382a066b49f2af5a82e18631dcab09 100644
--- a/dev/tests/functional/lib/Mtf/ObjectManagerFactory.php
+++ b/dev/tests/functional/lib/Mtf/ObjectManagerFactory.php
@@ -24,6 +24,8 @@
 
 namespace Mtf;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Stdlib\BooleanUtils;
 use Mtf\System\Config as SystemConfig;
 use Mtf\ObjectManager\Factory;
@@ -75,15 +77,15 @@ class ObjectManagerFactory
         $configuration = $systemConfig->getConfigParam();
         $diConfig->extend($configuration);
 
-        $directories = isset($arguments[\Magento\Framework\App\Filesystem::PARAM_APP_DIRS])
-            ? $arguments[\Magento\Framework\App\Filesystem::PARAM_APP_DIRS]
+        $directories = isset($arguments[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS])
+            ? $arguments[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS]
             : array();
         $directoryList = new \Magento\Framework\App\Filesystem\DirectoryList(
             realpath(MTF_BP . '../../../../'),
             $directories
         );
         (new \Magento\Framework\Autoload\IncludePath())->addIncludePath(
-            array($directoryList->getDir(\Magento\Framework\App\Filesystem::GENERATION_DIR))
+            array($directoryList->getPath(DirectoryList::GENERATION))
         );
 
         $factory = new Factory($diConfig);
diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php
index ecaa287d4edbf0b6b70cbf24b4a0465c78b4ad75..6a3dc743dfb0094a92c2f92d1ef5c0b5af957178 100644
--- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php
@@ -206,6 +206,13 @@ abstract class Grid extends Block
      */
     protected $actionNextPageDisabled = '.pager .action-next.disabled';
 
+    /**
+     * First row selector
+     *
+     * @var string
+     */
+    protected $firstRowSelector = '';
+
     /**
      * Get backend abstract block
      *
@@ -472,6 +479,13 @@ abstract class Grid extends Block
         $button = $this->_rootElement->find($this->filterButton);
         if ($button->isVisible() && !$this->_rootElement->find($this->filterButton . $this->active)->isVisible()) {
             $button->click();
+            $browser = $this->_rootElement;
+            $selector = $this->searchButton;
+            $browser->waitUntil(
+                function () use ($browser, $selector) {
+                    return $browser->find($selector)->isVisible() ? true : null;
+                }
+            );
         }
     }
 
@@ -489,4 +503,24 @@ abstract class Grid extends Block
         $this->waitLoader();
         return true;
     }
+
+    /**
+     * Check whether first row is visible
+     *
+     * @return bool
+     */
+    public function isFirstRowVisible()
+    {
+        return $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->isVisible();
+    }
+
+    /**
+     * Open first item in grid
+     *
+     * @return void
+     */
+    public function openFirstRow()
+    {
+        $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->click();
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php
new file mode 100644
index 0000000000000000000000000000000000000000..826a7d5a1423d4987de4e3c0e1726725deac3056
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.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.
+ *
+ * @spi
+ * @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\Test\Block\Adminhtml\Product\Composite;
+
+use Mtf\Fixture\FixtureInterface;
+
+/**
+ * Class Configure
+ * Adminhtml bundle product composite configure block
+ */
+class Configure extends \Magento\Catalog\Test\Block\Adminhtml\Product\Composite\Configure
+{
+    /**
+     * Option selector
+     *
+     * @var string
+     */
+    protected $option = '//div[@class="fields options"]//label[.="%option_name%"]//following-sibling::*//%selector%';
+
+    /**
+     * Fill options for the product
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function fillOptions(FixtureInterface $product)
+    {
+        $data = $this->prepareData($product->getData());
+        $this->_fill($data);
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param array $fields
+     * @return array
+     */
+    protected function prepareData(array $fields)
+    {
+        $productOptions = [];
+        $checkoutData = $fields['checkout_data']['options'];
+
+        if (!empty($checkoutData['bundle_options'])) {
+            foreach ($checkoutData['bundle_options'] as $key => $option) {
+                $type = strtolower(preg_replace('/[^a-zA-Z]/', '', $option['type']));
+                $optionMapping = $this->dataMapping([$type => '']);
+
+                $optionMapping[$type]['selector'] = str_replace(
+                    '%selector%',
+                    str_replace('%product_name%', $option['value']['name'], $optionMapping[$type]['selector']),
+                    str_replace('%option_name%', $option['title'], $this->option)
+                );
+
+                $optionMapping[$type]['value'] = ($type == 'checkbox' || $type == 'radiobutton')
+                    ? 'Yes'
+                    : $option['value']['name'];
+
+                $productOptions['option_' . $key] = $optionMapping[$type];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.xml
new file mode 100644
index 0000000000000000000000000000000000000000..51e1191a5fc4f08fe5f069540757945127941301
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.xml
@@ -0,0 +1,50 @@
+<?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)
+ */
+-->
+<mapping strict="0">
+    <fields>
+        <qty />
+        <checkbox>
+            <selector>div[contains(@class,"field choice") and label[contains(.,"%product_name%")]]//input</selector>
+            <strategy>xpath</strategy>
+            <input>checkbox</input>
+        </checkbox>
+        <dropdown>
+            <selector>select</selector>
+            <strategy>xpath</strategy>
+            <input>select</input>
+        </dropdown>
+        <multiple>
+            <selector>select</selector>
+            <strategy>xpath</strategy>
+            <input>multiselect</input>
+        </multiple>
+        <radiobutton>
+            <selector>div[contains(@class,"field choice") and label[contains(.,"%product_name%")]]//input</selector>
+            <strategy>xpath</strategy>
+            <input>checkbox</input>
+        </radiobutton>
+    </fields>
+</mapping>
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..07daa9e5bb213c3f59f6d49e22e2c951aad45705
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Test\Constraint;
+
+use Mtf\Fixture\FixtureInterface;
+use Magento\Bundle\Test\Fixture\BundleProduct;
+use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid;
+
+/**
+ * Class AssertBundleProductInCustomerWishlistOnBackendGrid
+ * Assert that bundle product is present in grid on customer's wish list tab with configure option and qty
+ */
+class AssertBundleProductInCustomerWishlistOnBackendGrid extends AssertProductInCustomerWishlistOnBackendGrid
+{
+    /**
+     * Prepare options
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareOptions(FixtureInterface $product)
+    {
+        /** @var BundleProduct $product */
+        $productOptions = parent::prepareOptions($product);
+        $checkoutData = $product->getCheckoutData()['options'];
+        if (!empty($checkoutData['bundle_options'])) {
+            foreach ($checkoutData['bundle_options'] as $optionData) {
+                $productOptions[] = [
+                    'option_name' => $optionData['title'],
+                    'value' => $optionData['value']['name']
+                ];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml
index 446c8c679c2f5c2f35a1a974e1c2ba201b2e7ae5..6a7e3892b49d7e9fb5c9368638ca3b6762819bb3 100644
--- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct.xml
@@ -434,7 +434,7 @@
         <custom_options>
             <attribute_code>custom_options</attribute_code>
             <backend_type>virtual</backend_type>
-            <group>product_info_tabs_customer_options</group>
+            <group>customer-options</group>
             <is_required>0</is_required>
             <source>Magento\Catalog\Test\Fixture\CatalogProductSimple\CustomOptions</source>
         </custom_options>
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php
index 7467f1d2bd0bc893da8db186b78dfe9d9e023cbd..7a49920da14c334e6ee7ee77b5f8fd9b692ffe9d 100644
--- a/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Fixture/BundleProduct/CheckoutData.php
@@ -68,8 +68,8 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
                             ]
                         ]
                     ],
-                    'qty' => 2
                 ],
+                'qty' => 2,
                 'cartItem' => [
                     'price' => 100,
                     'qty' => 2,
@@ -87,8 +87,8 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
                             ]
                         ]
                     ],
-                    'qty' => 2
                 ],
+                'qty' => 2,
                 'cartItem' => [
                     'price' => 756,
                     'qty' => 2,
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/CustomerIndexEdit.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/CustomerIndexEdit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e054635317cd0d2d7ceaffcba7ee82cdbfc3a1eb
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/CustomerIndexEdit.xml
@@ -0,0 +1,36 @@
+<?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 mca="customer/index/edit">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <bundle>
+                    <class>Magento\Bundle\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </bundle>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/OrderCreateIndex.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/OrderCreateIndex.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7b2533af13440c4ec3b39f888a1acc78f42c5c7b
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/OrderCreateIndex.xml
@@ -0,0 +1,36 @@
+<?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 mca="sales/order_create/index">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <bundle>
+                    <class>Magento\Bundle\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </bundle>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/Bundle/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Bundle/Test/etc/constraint.xml
index b5cd03775724c943142b29db80eeb4d56e84ff81..f3f31ade99e53bd3a8ea704f3874e4cdf5ea7ca4 100644
--- a/dev/tests/functional/tests/app/Magento/Bundle/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/Bundle/Test/etc/constraint.xml
@@ -57,4 +57,7 @@
     <assertProductCustomOptionsOnBundleProductPage module="Magento_Bundle">
         <severeness>low</severeness>
     </assertProductCustomOptionsOnBundleProductPage>
+    <assertBundleProductInCustomerWishlistOnBackendGrid module="Magento_Bundle">
+        <severeness>low</severeness>
+    </assertBundleProductInCustomerWishlistOnBackendGrid>
 </constraint>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php
new file mode 100644
index 0000000000000000000000000000000000000000..a7a227b0ce82c31606df3d0d1d922cffe302de51
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php
@@ -0,0 +1,131 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Test\Block;
+
+use Mtf\Block\Form;
+use Mtf\Fixture\FixtureInterface;
+use Mtf\Fixture\InjectableFixture;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\Catalog\Test\Block\Product\View\CustomOptions;
+
+/**
+ * Class AbstractConfigureBlock
+ * Product configure block
+ */
+abstract class AbstractConfigureBlock extends Form
+{
+    /**
+     * Custom options CSS selector
+     *
+     * @var string
+     */
+    protected $customOptionsSelector;
+
+    /**
+     * This method returns the custom options block
+     *
+     * @return CustomOptions
+     */
+    public function getCustomOptionsBlock()
+    {
+        return $this->blockFactory->create(
+            'Magento\Catalog\Test\Block\Product\View\CustomOptions',
+            ['element' => $this->_rootElement->find($this->customOptionsSelector)]
+        );
+    }
+
+    /**
+     * Fill in the option specified for the product
+     *
+     * @param FixtureInterface $product
+     * @return void
+     *
+     * @SuppressWarnings(PHPMD.NPathComplexity)
+     */
+    public function fillOptions(FixtureInterface $product)
+    {
+        $dataConfig = $product->getDataConfig();
+        $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
+        $checkoutData = null;
+
+        if ($product instanceof InjectableFixture) {
+            /** @var CatalogProductSimple $product */
+            $checkoutData = $product->getCheckoutData();
+            $checkoutCustomOptions = isset($checkoutData['options']['custom_options'])
+                ? $checkoutData['options']['custom_options']
+                : [];
+            $customOptions = $product->hasData('custom_options')
+                ? $product->getDataFieldConfig('custom_options')['source']->getCustomOptions()
+                : [];
+
+            $checkoutCustomOptions = $this->prepareCheckoutData($customOptions, $checkoutCustomOptions);
+            $this->getCustomOptionsBlock()->fillCustomOptions($checkoutCustomOptions);
+        }
+
+        /** @var CatalogProductSimple $product */
+        if ($this->hasRender($typeId)) {
+            $this->callRender($typeId, 'fillOptions', ['product' => $product]);
+        }
+    }
+
+    /**
+     * Set quantity
+     *
+     * @param int $qty
+     * @return void
+     */
+    abstract public function setQty($qty);
+
+    /**
+     * Replace index fields to name fields in checkout data
+     *
+     * @param array $options
+     * @param array $checkoutData
+     * @return array
+     */
+    protected function prepareCheckoutData(array $options, array $checkoutData)
+    {
+        $result = [];
+
+        foreach ($checkoutData as $checkoutOption) {
+            $attribute = str_replace('attribute_key_', '', $checkoutOption['title']);
+            $option = str_replace('option_key_', '', $checkoutOption['value']);
+
+            if (isset($options[$attribute])) {
+                $result[] = [
+                    'type' => strtolower(preg_replace('/[^a-z]/i', '', $options[$attribute]['type'])),
+                    'title' => isset($options[$attribute]['title'])
+                        ? $options[$attribute]['title']
+                        : $attribute,
+                    'value' => isset($options[$attribute]['options'][$option]['title'])
+                        ? $options[$attribute]['options'][$option]['title']
+                        : $option
+                ];
+            }
+        }
+
+        return $result;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php
index cf7b8faf9422d8c64f95a8f78cd3dfaedde87fd0..95a4d8736fade8579aef26b56a2ef730139b9e39 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.php
@@ -25,63 +25,72 @@
 
 namespace Magento\Catalog\Test\Block\Adminhtml\Product\Composite;
 
-use Mtf\Block\Form;
 use Mtf\Client\Element\Locator;
 use Mtf\Fixture\FixtureInterface;
+use Mtf\Fixture\InjectableFixture;
+use Magento\Backend\Test\Block\Template;
+use Magento\Catalog\Test\Block\AbstractConfigureBlock;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
 
 /**
  * Class Configure
  * Adminhtml catalog product composite configure block
- *
  */
-class Configure extends Form
+class Configure extends AbstractConfigureBlock
 {
     /**
-     * Selector for quantity field
+     * Custom options CSS selector
      *
      * @var string
      */
-    protected $qty = '[name="qty"]';
+    protected $customOptionsSelector = '#product_composite_configure_fields_options';
 
     /**
-     * Fill options for the product
+     * Selector for "Ok" button
      *
-     * @param FixtureInterface $product
+     * @var string
+     */
+    protected $okButton = '.ui-dialog-buttonset button:nth-of-type(2)';
+
+    /**
+     * Set quantity
+     *
+     * @param int $qty
      * @return void
      */
-    public function fillOptions(FixtureInterface $product)
+    public function setQty($qty)
     {
-        $productOptions = $product->getCheckoutData();
-        if (!empty($productOptions['options']['configurable_options'])) {
-            $configurableAttributesData = $product->getData('fields/configurable_attributes_data/value');
-            $checkoutData = [];
-
-            foreach ($productOptions['options']['configurable_options'] as $optionData) {
-                $titleKey = $optionData['title'];
-                $valueKey = $optionData['value'];
-
-                $checkoutData[] = [
-                    'title' => $configurableAttributesData[$titleKey]['label']['value'],
-                    'value' => $configurableAttributesData[$titleKey][$valueKey]['option_label']['value']
-                ];
-            }
+        $this->_fill($this->dataMapping(['qty' => $qty]));
+    }
 
-            foreach ($checkoutData as $option) {
-                $select = $this->_rootElement->find(
-                    '//div[@class="product-options"]//label[text()="' .
-                    $option['title'] .
-                    '"]//following-sibling::*//select',
-                    Locator::SELECTOR_XPATH,
-                    'select'
-                );
-                $select->setValue($option['value']);
-            }
+    /**
+     * Fill in the option specified for the product
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function configProduct(FixtureInterface $product)
+    {
+        $checkoutData = null;
+        if ($product instanceof InjectableFixture) {
+            /** @var CatalogProductSimple $product */
+            $checkoutData = $product->getCheckoutData();
         }
 
-        if (isset($productOptions['options']['qty'])) {
-            $this->_rootElement->find($this->qty)->setValue($productOptions['options']['qty']);
+        $this->fillOptions($product);
+        if (isset($checkoutData['qty'])) {
+            $this->setQty($checkoutData['qty']);
         }
+        $this->clickOk();
+    }
 
-        $this->_rootElement->find('.ui-dialog-buttonset button:nth-of-type(2)')->click();
+    /**
+     * Click "Ok" button
+     *
+     * @return void
+     */
+    public function clickOk()
+    {
+        $this->_rootElement->find($this->okButton)->click();
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7e592d4b75d13927fa45c2706e8069bffd31f434
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.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)
+ */
+-->
+<mapping strict="0">
+    <fields>
+        <qty />
+    </fields>
+</mapping>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php
index b1a3c5c52d15a53ce421766546455bebcc09ff7c..db7bd7297e1bb930f85530bf6d09def13cc7f356 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/Price.php
@@ -153,6 +153,20 @@ class Price extends Block
         return $this->getTypePrice('special_price', $currency);
     }
 
+    /**
+     * Price excluding tax
+     *
+     * @var string
+     */
+    protected $priceExcludingTax = '.price-excluding-tax span.price';
+
+    /**
+     * Price including tax
+     *
+     * @var string
+     */
+    protected $priceIncludingTax = '.price-including-tax span.price';
+
     /**
      * Get price from
      *
@@ -293,4 +307,26 @@ class Price extends Block
     {
         return str_replace([',', $currency], '', $price);
     }
+
+    /**
+     * Get price excluding tax
+     *
+     * @param string $currency
+     * @return string
+     */
+    public function getPriceExcludingTax($currency = '$')
+    {
+        return trim($this->_rootElement->find($this->priceExcludingTax)->getText(), $currency);
+    }
+
+    /**
+     * Get price including tax
+     *
+     * @param string $currency
+     * @return string
+     */
+    public function getPriceIncludingTax($currency = '$')
+    {
+        return trim($this->_rootElement->find($this->priceIncludingTax)->getText(), $currency);
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php
index ea5dadf6dbbbc71f0c9f82986c1b070fcb28419c..aa7f5516ee44efb22500bd5b2de583aeecd41986 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View.php
@@ -24,11 +24,11 @@
 
 namespace Magento\Catalog\Test\Block\Product;
 
-use Mtf\Block\Block;
 use Mtf\Client\Element\Locator;
 use Mtf\Fixture\FixtureInterface;
 use Mtf\Fixture\InjectableFixture;
 use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\Catalog\Test\Block\AbstractConfigureBlock;
 
 /**
  * Class View
@@ -38,7 +38,7 @@ use Magento\Catalog\Test\Fixture\CatalogProductSimple;
  * @SuppressWarnings(PHPMD.ExcessivePublicCount)
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
-class View extends Block
+class View extends AbstractConfigureBlock
 {
     /**
      * XPath selector for tab
@@ -165,19 +165,6 @@ class View extends Block
         );
     }
 
-    /**
-     * This method returns the custom options block.
-     *
-     * @return \Magento\Catalog\Test\Block\Product\View\CustomOptions
-     */
-    public function getCustomOptionsBlock()
-    {
-        return $this->blockFactory->create(
-            'Magento\Catalog\Test\Block\Product\View\CustomOptions',
-            ['element' => $this->_rootElement->find($this->customOptionsSelector)]
-        );
-    }
-
     /**
      * Add product to shopping cart
      *
@@ -193,8 +180,8 @@ class View extends Block
         }
 
         $this->fillOptions($product);
-        if (isset($checkoutData['options']['qty'])) {
-            $this->_rootElement->find($this->qty)->setValue($checkoutData['options']['qty']);
+        if (isset($checkoutData['qty'])) {
+            $this->setQty($checkoutData['qty']);
         }
         $this->clickAddToCart();
     }
@@ -272,6 +259,26 @@ class View extends Block
         return $this->_rootElement->find($this->productSku, Locator::SELECTOR_CSS)->getText();
     }
 
+    /**
+     * Return product price excluding tax displayed on page
+     *
+     * @return string
+     */
+    public function getProductPriceExcludingTax()
+    {
+        return $this->getPriceBlock()->getPriceExcludingTax();
+    }
+
+    /**
+     * Return product price including tax displayed on page
+     *
+     * @return string
+     */
+    public function getProductPriceIncludingTax()
+    {
+        return $this->getPriceBlock()->getPriceIncludingTax();
+    }
+
     /**
      * Return product short description on page
      *
@@ -315,72 +322,6 @@ class View extends Block
             : $this->getCustomOptionsBlock()->getOptions($product);
     }
 
-    /**
-     * Fill in the option specified for the product
-     *
-     * @param FixtureInterface $product
-     * @return void
-     */
-    public function fillOptions(FixtureInterface $product)
-    {
-        $dataConfig = $product->getDataConfig();
-        $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
-        $checkoutData = null;
-
-        /** @var CatalogProductSimple $product */
-        if ($this->hasRender($typeId)) {
-            $this->callRender($typeId, 'fillOptions', ['product' => $product]);
-        } else {
-            $checkoutCustomOptions = [];
-
-            if ($product instanceof InjectableFixture) {
-                /** @var CatalogProductSimple $product */
-                $checkoutData = $product->getCheckoutData();
-                $checkoutCustomOptions = isset($checkoutData['options']['custom_options'])
-                    ? $checkoutData['options']['custom_options']
-                    : [];
-                $customOptions = $product->hasData('custom_options')
-                    ? $product->getDataFieldConfig('custom_options')['source']->getCustomOptions()
-                    : [];
-
-                $checkoutCustomOptions = $this->prepareCheckoutData($customOptions, $checkoutCustomOptions);
-            }
-
-            $this->getCustomOptionsBlock()->fillCustomOptions($checkoutCustomOptions);
-        }
-    }
-
-    /**
-     * Replace index fields to name fields in checkout data
-     *
-     * @param array $options
-     * @param array $checkoutData
-     * @return array
-     */
-    protected function prepareCheckoutData(array $options, array $checkoutData)
-    {
-        $result = [];
-
-        foreach ($checkoutData as $checkoutOption) {
-            $attribute = str_replace('attribute_key_', '', $checkoutOption['title']);
-            $option = str_replace('option_key_', '', $checkoutOption['value']);
-
-            if (isset($options[$attribute])) {
-                $result[] = [
-                    'type' => strtolower(preg_replace('/[^a-z]/i', '', $options[$attribute]['type'])),
-                    'title' => isset($options[$attribute]['title'])
-                            ? $options[$attribute]['title']
-                            : $attribute,
-                    'value' => isset($options[$attribute]['options'][$option]['title'])
-                            ? $options[$attribute]['options'][$option]['title']
-                            : $option
-                ];
-            }
-        }
-
-        return $result;
-    }
-
     /**
      * This method return array tier prices
      *
@@ -446,14 +387,31 @@ class View extends Block
         $this->_rootElement->find($this->clickAddToCompare, Locator::SELECTOR_CSS)->click();
     }
 
+    /**
+     * Add product to Wishlist
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function addToWishlist(FixtureInterface $product)
+    {
+        /** @var CatalogProductSimple $product */
+        $checkoutData = $product->getCheckoutData();
+        $this->fillOptions($product);
+        if (isset($checkoutData['qty'])) {
+            $this->setQty($checkoutData['qty']);
+        }
+        $this->clickAddToWishlist();
+    }
+
     /**
      * Click "Add to Wishlist" button
      *
      * @return void
      */
-    public function addToWishlist()
+    public function clickAddToWishlist()
     {
-        $this->_rootElement->find($this->addToWishlist, Locator::SELECTOR_CSS)->click();
+        $this->_rootElement->find($this->addToWishlist)->click();
     }
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php
index 709ec32bc36aaaab10833eb59160a89466cf1b63..745ebf963583a9492a2d2302aeb4d625b055d835 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/View/CustomOptions.php
@@ -125,7 +125,7 @@ class CustomOptions extends Form
      *
      * @var string
      */
-    protected $optionByName = '//*[label//span[contains(.,"%s")]]';
+    protected $optionByName = '//*[label[contains(.,"%s")]]';
 
     /**
      * Get product options
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php
index 7544902d30fc1e6813e0271e9dd27c64ed9bfd01..36c16cc0bb5d37ad0685e0c81e0fd127da3a5713 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertAddedProductAttributeOnProductForm.php
@@ -61,8 +61,7 @@ class AssertAddedProductAttributeOnProductForm extends AbstractConstraint
      * @param CatalogProductAttribute|null $productAttribute
      * @return void
      */
-    public function processAssert
-    (
+    public function processAssert(
         FixtureFactory $fixtureFactory,
         CatalogProductSetIndex $productSet,
         CatalogProductSetEdit $productSetEdit,
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php
index 0d780437103713ca9242dd88d625a7004fd3682b..23352e23d3842750418fe8ffd431c8af3b0b8665 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductAttributeAbsenceInSearchOnProductForm.php
@@ -50,8 +50,7 @@ class AssertProductAttributeAbsenceInSearchOnProductForm extends AbstractConstra
      * @param CatalogProductNew $newProductPage
      * @return void
      */
-    public function processAssert
-    (
+    public function processAssert(
         CatalogProductAttribute $productAttribute,
         CatalogProductIndex $productGrid,
         CatalogProductNew $newProductPage
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php
index 5a8a6b80c4da33c8fd9460ebe1302756aef8edf4..b2fdd0dc5f3535e778104be582d985cbe6576b93 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateForm.php
@@ -54,8 +54,7 @@ class AssertProductTemplateForm extends AbstractConstraint
      * @param CatalogProductAttribute $productAttribute
      * @return void
      */
-    public function processAssert
-    (
+    public function processAssert(
         CatalogProductSetIndex $productSet,
         CatalogProductSetEdit $productSetEdit,
         CatalogAttributeSet $attributeSet,
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php
index 690e7d2045ae92992840239cdfc7fbe74c3c7114..c777c6b493e17d9a5cce3286f81913eb623df798 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateGroupOnProductForm.php
@@ -60,8 +60,7 @@ class AssertProductTemplateGroupOnProductForm extends AbstractConstraint
      * @param CatalogProductAttribute $productAttributeOriginal
      * @return void
      */
-    public function processAssert
-    (
+    public function processAssert(
         FixtureFactory $fixtureFactory,
         CatalogProductEdit $productEdit,
         CatalogProductIndex $productGrid,
@@ -69,7 +68,6 @@ class AssertProductTemplateGroupOnProductForm extends AbstractConstraint
         CatalogProductNew $newProductPage,
         CatalogProductAttribute $productAttributeOriginal
     ) {
-
         $productGrid->open();
         $productGrid->getGridPageActionBlock()->addProduct('simple');
         $productBlockForm = $newProductPage->getProductForm();
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php
index 3c902550d6d1bb91f6670eb22a098262ef3ee672..53274b901838f0329850fb90849ab481a0b60100 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertProductTemplateOnProductForm.php
@@ -60,8 +60,7 @@ class AssertProductTemplateOnProductForm extends AbstractConstraint
      * @param CatalogProductAttribute $productAttribute
      * @return void
      */
-    public function processAssert
-    (
+    public function processAssert(
         FixtureFactory $fixtureFactory,
         CatalogProductEdit $productEdit,
         CatalogProductIndex $productGrid,
@@ -70,7 +69,6 @@ class AssertProductTemplateOnProductForm extends AbstractConstraint
         CatalogProductAttribute $productAttribute,
         CatalogAttributeSet $attributeSetOriginal = null
     ) {
-
         $productGrid->open();
         $productGrid->getGridPageActionBlock()->addProduct('simple');
         $productBlockForm = $newProductPage->getProductForm();
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php
index ea2967a46fa1849ad77924f2cc345bfd4d81908e..d79baaab3ffef3114a3234e3a589bbbc81ec3240 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Cart/Item.php
@@ -77,8 +77,8 @@ class Item implements FixtureInterface
         $cartItem['options'] = isset($cartItem['options'])
             ? $cartItem['options'] + $checkoutCustomOptions
             : $checkoutCustomOptions;
-        $cartItem['qty'] = isset($checkoutData['options']['qty'])
-                ? $checkoutData['options']['qty']
+        $cartItem['qty'] = isset($checkoutData['qty'])
+                ? $checkoutData['qty']
                 : 1;
 
         $this->data = $cartItem;
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php
index 94d22714463438b0fbb8b208fac15fb910d2817d..357fe6c9172ad0dc2ac494320b861f0530a58a92 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.php
@@ -624,6 +624,12 @@ class CatalogProductSimple extends InjectableFixture
         'source' => 'Magento\Catalog\Test\Fixture\CatalogProductSimple\RelatedProducts'
     ];
 
+    protected $recurring_payment = [
+        'attribute_code' => 'recurring_payment',
+        'backend_type' => 'virtual',
+        'group' => 'advanced-pricing'
+    ];
+
     public function getCategoryIds()
     {
         return $this->getData('category_ids');
@@ -938,4 +944,9 @@ class CatalogProductSimple extends InjectableFixture
     {
         return $this->getData('related_products');
     }
+
+    public function getRecurringPayment()
+    {
+        return $this->getData('recurring_payment');
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml
index ce01bc394d0a535f4a45a338f36033239f84fcc7..228348ab7e9cf2dece2141e6e210f5161d8ee8f5 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple.xml
@@ -433,7 +433,6 @@
         <custom_options>
             <attribute_code>custom_options</attribute_code>
             <backend_type>virtual</backend_type>
-            <group>product_info_tabs_customer_options</group>
             <is_required>0</is_required>
             <group>customer-options</group>
             <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\CustomOptions</fixture>
@@ -481,6 +480,11 @@
             <group>related-products</group>
             <source>Magento\Catalog\Test\Fixture\CatalogProductSimple\RelatedProducts</source>
         </related_products>
+        <recurring_payment>
+            <attribute_code>recurring_payment</attribute_code>
+            <backend_type>virtual</backend_type>
+            <group>advanced-pricing</group>
+        </recurring_payment>
     </fields>
     <data_set>
         <sku></sku>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php
index 8c6b6e9823288c09047dbd430fd8b4d47fe3de0d..2f56ec5b9437714487fd18f362babfeee08bdd4b 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/CheckoutData.php
@@ -118,8 +118,8 @@ class CheckoutData implements FixtureInterface
                             'value' => 'Content option %isolation%',
                         ]
                     ],
-                    'qty' => 1
                 ],
+                'qty' => 1,
                 'cartItem' => [
                     'price' => 340,
                     'subtotal' => 340
@@ -168,15 +168,11 @@ class CheckoutData implements FixtureInterface
                 ]
             ],
             'order_default' => [
-                'options' => [
-                    'qty' => 1
-                ],
+                'qty' => 1,
                 'cartItem' => []
             ],
             'two_products' => [
-                'options' => [
-                    'qty' => 2
-                ],
+                'qty' => 2,
                 'cartItem' => [
                     'price' => 100,
                     'subtotal' => 200
@@ -186,8 +182,8 @@ class CheckoutData implements FixtureInterface
                 'qty' => 900
             ],
             'order_custom_price' => [
+                'qty' => 3,
                 'checkout_data' => [
-                    'qty' => 3,
                     'use_custom_price' => "Yes",
                     'custom_price' => 100,
                 ],
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php
index f1c1639040e7bbe204dbec6badd47d0accf3b55d..6764e6185b1d09d654740566debf2214e04b35bd 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductSimple/GroupPriceOptions.php
@@ -112,6 +112,13 @@ class GroupPriceOptions implements FixtureInterface
                     'price' => 20,
                     'website' => 'All Websites [USD]',
                     'customer_group' => 'NOT LOGGED IN'
+                ],
+            ],
+            'tax_calculation' => [
+                [
+                    'price' => 90.99,
+                    'website' => 'All Websites [USD]',
+                    'customer_group' => 'General'
                 ]
             ],
         ];
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml
index d3e4f7ade690aa817dcc18887a432dea2bb1bef6..d1dc9198058352b4eef7c2b6bc8c62ad38e9a485 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual.xml
@@ -431,7 +431,6 @@
         <custom_options>
             <attribute_code>custom_options</attribute_code>
             <backend_type>virtual</backend_type>
-            <group>product_info_tabs_customer_options</group>
             <is_required>0</is_required>
             <group>customer-options</group>
             <fixture>Magento\Catalog\Test\Fixture\CatalogProductSimple\CustomOptions</fixture>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php
index 89095fbc193f1357c7bd5f5de1ff7b45eafba3e5..2f14aef068145c298214c77a84ff2e9a298e06f1 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/CatalogProductVirtual/CheckoutData.php
@@ -43,11 +43,10 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
     {
         $presets = [
             'order_default' => [
-                'options' => [
-                    'qty' => 1
-                ]
+                'qty' => 1
             ],
             '50_dollar_product' => [
+                'qty' => 1,
                 'cartItem' => [
                     'price' => 50,
                     'qty' => 1,
@@ -55,8 +54,8 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
                 ]
             ],
             'order_custom_price' => [
+                'qty' => 3,
                 'checkout_data' => [
-                    'qty' => 3,
                     'use_custom_price' => "Yes",
                     'custom_price' => 100,
                 ],
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php
index 09b71b1168cb44aab1561907705af846c6449ac3..2b1b5b38dd5950cfcdff4e8c9c1b221432c251f3 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Curl.php
@@ -99,7 +99,21 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface
         'is_require' => [
             'Yes' => 1,
             'No' => 0
-        ]
+        ],
+        'is_recurring' => [
+            'Yes' => 1,
+            'No' => 0
+        ],
+        'msrp_display_actual_price_type' => [
+            'Use config' => 0,
+            'On Gesture' => 1,
+            'In Cart' => 2,
+            'Before Order Confirmation' => 3
+        ],
+        'enable_qty_increments' => [
+            'Yes' => 1,
+            'No' => 0,
+        ],
     ];
 
     /**
@@ -118,7 +132,8 @@ class Curl extends AbstractCurl implements CatalogProductSimpleInterface
             'name' => 'cust_group',
             'data' => [
                 'ALL GROUPS' => 32000,
-                'NOT LOGGED IN' => 0
+                'NOT LOGGED IN' => 0,
+                'General' => 1
             ]
         ]
     ];
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryView.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryView.xml
index 6fea5f301b14eb3a3404f0d8ea7defb851b6a83a..bc2fd6057cd6a4a523fcdf821359a3df10b9fbaa 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryView.xml
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Page/Category/CatalogCategoryView.xml
@@ -57,7 +57,7 @@
         </titleBlock>
         <viewBlock>
             <class>Magento\Catalog\Test\Block\Category\View</class>
-            <locator>.column.main</locator>
+            <locator>#maincontent</locator>
             <strategy>css selector</strategy>
         </viewBlock>
     </blocks>
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php
index f42af6bc00447ecae18ddeab1aaeef430079cebf..2e052c113e04ee0bef52d30140b53fb8e715f534 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.php
@@ -317,6 +317,18 @@ class CatalogProductSimple extends AbstractRepository
             'group_price' => ['preset' => 'default'],
         ];
 
+        $this->_data['simple_with_group_price_and_category'] = [
+            'type_id' => 'simple',
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product %isolation%',
+            'sku' => 'sku_simple_product_%isolation%',
+            'price' => ['value' => 100, 'preset' => '-'],
+            'weight' => 1,
+            'group_price' => ['preset' => 'tax_calculation'],
+            'category_ids' => ['presets' => 'default_subcategory'],
+            'website_ids' => ['Main Website'],
+        ];
+
         $this->_data['simple_with_tier_price'] = [
             'type_id' => 'simple',
             'attribute_set_id' => ['dataSet' => 'default'],
@@ -327,6 +339,18 @@ class CatalogProductSimple extends AbstractRepository
             'tier_price' => ['preset' => 'default'],
         ];
 
+        $this->_data['simple_with_tier_price_and_category'] = [
+            'type_id' => 'simple',
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product %isolation%',
+            'sku' => 'sku_simple_product_%isolation%',
+            'price' => ['value' => 300, 'preset' => '-'],
+            'weight' => 1,
+            'tier_price' => ['preset' => 'default'],
+            'category_ids' => ['presets' => 'default_subcategory'],
+            'website_ids' => ['Main Website'],
+        ];
+
         $this->_data['with_two_custom_option'] = [
             'type_id' => 'simple',
             'attribute_set_id' => ['dataSet' => 'default'],
@@ -365,5 +389,173 @@ class CatalogProductSimple extends AbstractRepository
             'price' => ['value' => 100, 'preset' => '-'],
             'website_ids' => ['Main Website'],
         ];
+
+        $this->_data['out_of_stock'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product out of stock %isolation%',
+            'sku' => 'sku_simple_product_out_of_stock%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'Out of Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Catalog, Search',
+            'checkout_data' => ['preset' => 'order_default'],
+        ];
+
+        $this->_data['offline'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product offline %isolation%',
+            'sku' => 'sku_simple_product_offline_%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Catalog, Search',
+            'checkout_data' => ['preset' => 'order_default'],
+            'status' => 'Product offline',
+        ];
+
+        $this->_data['not_visible_individually'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product not visible %isolation%',
+            'sku' => 'sku_simple_product_not_visible_%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Not Visible Individually',
+            'checkout_data' => ['preset' => 'order_default'],
+        ];
+
+        $this->_data['simple_with_cart_limits'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product with cart limit %isolation%',
+            'sku' => 'sku_simple_product_with_cart_limit_%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Catalog, Search',
+            'checkout_data' => ['preset' => 'order_default'],
+            'stock_data' => [
+                'min_sale_qty' => '2',
+                'max_sale_qty' => '5',
+            ],
+        ];
+
+        $this->_data['with_one_custom_option'] = [
+            'type_id' => 'simple',
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product %isolation%',
+            'sku' => 'sku_simple_product_%isolation%',
+            'price' => ['value' => 300, 'preset' => '-'],
+            'weight' => 1,
+            'custom_options' => ['preset' => 'drop_down_with_one_option_percent_price'],
+            'checkout_data' => ['preset' => 'drop_down_with_one_option_percent_price'],
+            'website_ids' => ['Main Website']
+        ];
+
+        $this->_data['simple_with_qty_increments'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product with qty increments %isolation%',
+            'sku' => 'sku_simple_product_with_qty_increments_%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Catalog, Search',
+            'checkout_data' => ['preset' => 'order_default'],
+            'stock_data' => [
+                'enable_qty_increments' => 'Yes',
+                'qty_increments' => '2',
+            ],
+        ];
+
+        $this->_data['simple_with_tier_price_and_qty'] = [
+            'type_id' => 'simple',
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product %isolation%',
+            'sku' => 'sku_simple_product_%isolation%',
+            'price' => ['value' => 300, 'preset' => '-'],
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'tier_price' => ['preset' => 'default'],
+            'website_ids' => ['Main Website']
+        ];
+
+        $this->_data['with_recurring_payment'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product with recurring payment %isolation%',
+            'sku' => 'sku_simple_product_with_recurring_payment_%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Catalog, Search',
+            'checkout_data' => ['preset' => 'order_default'],
+            'is_recurring' => "Yes",
+            'recurring_payment' => [
+                'period_unit' => 'week',
+                'period_frequency' => 1
+            ]
+        ];
+
+        $this->_data['with_msrp'] = [
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product with msrp %isolation%',
+            'sku' => 'sku_simple_product_with_msrp_%isolation%',
+            'weight' => 1,
+            'quantity_and_stock_status' => [
+                'qty' => 25.0000,
+                'is_in_stock' => 'In Stock',
+            ],
+            'price' => ['value' => 560.00, 'preset' => '-'],
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'website_ids' => ['Main Website'],
+            'visibility' => 'Catalog, Search',
+            'checkout_data' => ['preset' => 'order_default'],
+            'msrp' => 500.00,
+            'msrp_display_actual_price_type' => 'Before Order Confirmation'
+        ];
+
+        $this->_data['with_one_custom_option_and_category'] = [
+            'type_id' => 'simple',
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'name' => 'Simple Product %isolation%',
+            'sku' => 'sku_simple_product_%isolation%',
+            'price' => ['value' => 300, 'preset' => '-'],
+            'weight' => 1,
+            'custom_options' => ['preset' => 'drop_down_with_one_option_percent_price'],
+            'checkout_data' => ['preset' => 'drop_down_with_one_option_percent_price'],
+            'website_ids' => ['Main Website'],
+            'category_ids' => ['presets' => 'default_subcategory'],
+        ];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest/test.csv
index 8f02c0a6472da8da7cb48e0590000cff37ed4c14..a4833dc45d02955da8d47d66a06a25f6d94e77f7 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest/test.csv
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/DeleteCategoryEntityTest/test.csv
@@ -1,3 +1,3 @@
 "category/dataSet";"constraint"
 "root_category";"assertCategorySuccessDeleteMessage, assertCategoryAbsenceOnBackend"
-"root_subcategory";"assertCategorySuccessDeleteMessage, assertCategoryAbsenceOnBackend, assertCategoryAbsenceOnFrontend"
+"root_subcategory";"assertCategorySuccessDeleteMessage, assertUrlRewriteCategoryNotInGrid, assertCategoryAbsenceOnBackend, assertCategoryAbsenceOnFrontend"
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest/test.csv
index 712790b63786a3d90713408eaac061b86bc284f4..0be231009ddcaca3eb97a9575b86b65bd3dd3158 100644
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest/test.csv
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Category/UpdateCategoryEntityTest/test.csv
@@ -1,4 +1,4 @@
 "category/data/name";"category/data/is_active";"category/data/url_key";"category/data/description";"category/data/meta_title";"category/data/include_in_menu";"category/data/available_product_listing_config";"category/data/available_sort_by/sort_2";"category/data/available_sort_by/sort_1";"category/data/default_product_listing_config";"category/data/default_sort_by";"constraint"
 "Name%isolation%";"Yes";"UrlKey%isolation%";"-";"-";"Yes";"Yes";"-";"-";"No";"Name";"assertCategorySaveMessage, assertCategoryForm, assertUrlRewriteCategoryInGrid, assertCategoryRedirect, assertCategoryPage"
-"Name%isolation%";"Yes";"UrlKey%isolation%";"Category Description";"Category Title";"Yes";"No";"Position";"Price";"Yes";"-";"assertCategorySaveMessage, assertCategoryForm, assertCategoryPage"
+"Name%isolation%";"Yes";"UrlKey%isolation%";"Category Description";"Category Title";"Yes";"No";"Position";"Price";"Yes";"-";"assertCategorySaveMessage, assertCategoryForm, assertUrlRewriteCategoryInGrid, assertCategoryPage"
 "Name%isolation%";"No";"-";"-";"-";"-";"-";"-";"-";"-";"-";"assertCategorySaveMessage, assertCategoryForm"
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..c69d4fbf25b95b0537c149854eba7876977bc09a
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest.php
@@ -0,0 +1,120 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Catalog\Test\TestCase\Product;
+
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Mtf\Fixture\FixtureFactory;
+use Mtf\ObjectManager;
+use Mtf\TestCase\Injectable;
+
+/**
+ * Test Creation for ManageProductsStock
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Set Configuration:
+ *      - Display OutOfStock = Yes
+ *      - Backorders - Allow Qty below = 0
+ * 2. Create products according to dataSet
+ *
+ * Steps:
+ * 1. Open product on frontend
+ * 2. Add product to cart
+ * 3. Perform all assertions
+ *
+ * @group Inventory_(MX)
+ * @ZephyrId MAGETWO-29543
+ */
+class ManageProductsStockTest extends Injectable
+{
+    /**
+     * Fixture factory
+     *
+     * @var FixtureFactory
+     */
+    protected $fixtureFactory;
+
+    /**
+     * Object manager
+     *
+     * @var ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * Setup configuration
+     *
+     * @param ObjectManager $objectManager
+     * @param FixtureFactory $fixtureFactory
+     * @return void
+     */
+    public function __prepare(ObjectManager $objectManager, FixtureFactory $fixtureFactory)
+    {
+        $this->objectManager = $objectManager;
+        $this->fixtureFactory = $fixtureFactory;
+        $setupConfigurationStep = $objectManager->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => "display_out_of_stock,backorders_allow_qty_below"]
+        );
+        $setupConfigurationStep->run();
+    }
+
+    /**
+     * Manage products stock
+     *
+     * @param CatalogProductSimple $product
+     * @return array
+     */
+    public function test(CatalogProductSimple $product)
+    {
+        // Preconditions
+        $product->persist();
+
+        // Steps
+        $addProductsToTheCartStep = $this->objectManager->create(
+            'Magento\Checkout\Test\TestStep\AddProductsToTheCartStep',
+            ['products' => [$product]]
+        );
+        $addProductsToTheCartStep->run();
+
+        $cart['data']['items'] = ['products' => [$product]];
+        return ['cart' => $this->fixtureFactory->createByCode('cart', $cart)];
+    }
+
+    /**
+     * Set default configuration
+     *
+     * @return void
+     */
+    public static function tearDownAfterClass()
+    {
+        $setupConfigurationStep = ObjectManager::getInstance()->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => "display_out_of_stock,backorders_allow_qty_below", 'rollback' => true]
+        );
+        $setupConfigurationStep->run();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest/test.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..550c34dec21c456d1ded2b9e5c530458b28aeb1e
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest/test.csv
@@ -0,0 +1,2 @@
+"description";"product/dataSet";"product/data/qty_and_stock_status/is_in_stock";"constraint"
+"add out of stock product to cart";"default";"Out of Stock";"assertAddedProductToCartSuccessMessage, assertProductQtyInShoppingCart"
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php
index bdd824444589e662407e7f3aae6f116a82d50cb9..45498b8313bebb29da77850fe7dc11a051a4254c 100755
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest.php
@@ -58,7 +58,7 @@ class UpdateSimpleProductEntityTest extends Injectable
      *
      * @var CatalogProductSimple
      */
-    protected $product;
+    protected $initialProduct;
 
     /**
      * Product page with a grid
@@ -103,7 +103,7 @@ class UpdateSimpleProductEntityTest extends Injectable
         CatalogCategory $category,
         FixtureFactory $fixtureFactory
     ) {
-        $this->product = $fixtureFactory->createByCode(
+        $this->initialProduct = $fixtureFactory->createByCode(
             'catalogProductSimple',
             [
                 'dataSet' => 'default',
@@ -114,7 +114,7 @@ class UpdateSimpleProductEntityTest extends Injectable
                 ]
             ]
         );
-        $this->product->persist();
+        $this->initialProduct->persist();
 
         $this->productGrid = $productGrid;
         $this->editProductPage = $editProductPage;
@@ -124,13 +124,15 @@ class UpdateSimpleProductEntityTest extends Injectable
      * Run update product simple entity test
      *
      * @param CatalogProductSimple $product
-     * @return void
+     * @return array
      */
-    public function testUpdate(CatalogProductSimple $product)
+    public function test(CatalogProductSimple $product)
     {
-        $filter = ['sku' => $this->product->getSku()];
+        $filter = ['sku' => $this->initialProduct->getSku()];
         $this->productGrid->open()->getProductGrid()->searchAndOpen($filter);
         $this->editProductPage->getProductForm()->fill($product);
         $this->editProductPage->getFormPageActions()->save();
+
+        return ['initialProduct' => $this->initialProduct];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..95db56c64bb9d41fdaa2d2738284f6ec29cf28cd
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/test.csv
@@ -0,0 +1,8 @@
+"product/data/category_ids/presets";"product/data/name";"product/data/sku";"product/data/price/value";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/url_key";"product/data/weight";"product/data/visibility";"product/data/status";"constraint"
+"-";"Test simple product %isolation%";"test_simple_product_%isolation%";"245.00";"200.0000";"-";"test-simple-product-%isolation%";"120.0000";"Catalog, Search";"-";"assertProductSaveMessage, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage"
+"-";"Test simple product %isolation%";"test_simple_product_%isolation%";"325.00";"123.0000";"-";"test-simple-product-%isolation%";"129.0000";"Not Visible Individually";"-";"assertProductSaveMessage, assertProductForm, assertProductIsNotDisplayingOnFrontend"
+"-";"Test simple product %isolation%";"test_simple_product_%isolation%";"325.01";"125.0000";"-";"test-simple-product-%isolation%";"25.0000";"Catalog";"-";"assertProductSaveMessage, assertProductInStock, assertProductForm, assertProductSearchableBySku, assertProductVisibleInCategory, assertProductPage"
+"-";"Test simple product %isolation%";"test_simple_product_%isolation%";"325.02";"89.0000";"-";"test-simple-product-%isolation%";"89.0000";"Search";"-";"assertProductSaveMessage, assertProductInStock, assertProductForm, assertProductVisibleInCategory, assertProductPage, assertProductSearchableBySku, assertProductPage"
+"-";"Test simple product %isolation%";"test_simple_product_%isolation%";"325.03";"25.0000";"Out of Stock";"test-simple-product-%isolation%";"125.0000";"-";"-";"assertProductSaveMessage, assertProductForm, assertProductOutOfStock, assertProductPage, assertProductVisibleInCategory, assertProductSearchableBySku"
+"-";"Test simple product %isolation%";"test_simple_product_%isolation%";"74.00";"87.0000";"-";"test-simple-product-%isolation%";"333.0000";"-";"Product offline";"assertProductSaveMessage, assertProductForm, assertProductIsNotDisplayingOnFrontend"
+"default";"Test simple product %isolation%";"test_simple_product_%isolation%";"74.00";"87.0000";"-";"test-simple-product-%isolation%";"333.0000";"-";"-";"assertProductSaveMessage, assertProductForm, assertUrlRewriteUpdatedProductInGrid, assertProductVisibleInCategory"
diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/testUpdate.csv b/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/testUpdate.csv
deleted file mode 100644
index 26fb9198a5ccf49d548a1cd968e7400879d3f425..0000000000000000000000000000000000000000
--- a/dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/testUpdate.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"product/data/name";"product/data/sku";"product/data/price/value";"product/data/quantity_and_stock_status/qty";"product/data/quantity_and_stock_status/is_in_stock";"product/data/url_key";"product/data/weight";"product/data/visibility";"product/data/status";"constraint"
-"Test simple product %isolation%";"test_simple_product_%isolation%";"245.00";"200.0000";"-";"test-simple-product-%isolation%";"120.0000";"Catalog, Search";"-";"assertProductSaveMessage, assertProductForm, assertProductInStock, assertProductVisibleInCategory, assertProductPage"
-"Test simple product %isolation%";"test_simple_product_%isolation%";"325.00";"123.0000";"-";"test-simple-product-%isolation%";"129.0000";"Not Visible Individually";"-";"assertProductSaveMessage, assertProductForm, assertProductIsNotDisplayingOnFrontend"
-"Test simple product %isolation%";"test_simple_product_%isolation%";"325.01";"125.0000";"-";"test-simple-product-%isolation%";"25.0000";"Catalog";"-";"assertProductSaveMessage, assertProductInStock, assertProductForm, assertProductSearchableBySku, assertProductVisibleInCategory, assertProductPage"
-"Test simple product %isolation%";"test_simple_product_%isolation%";"325.02";"89.0000";"-";"test-simple-product-%isolation%";"89.0000";"Search";"-";"assertProductSaveMessage, assertProductInStock, assertProductForm, assertProductVisibleInCategory, assertProductPage, assertProductSearchableBySku, assertProductPage"
-"Test simple product %isolation%";"test_simple_product_%isolation%";"325.03";"25.0000";"Out of Stock";"test-simple-product-%isolation%";"125.0000";"-";"-";"assertProductSaveMessage, assertProductForm, assertProductOutOfStock, assertProductPage, assertProductVisibleInCategory, assertProductSearchableBySku"
-"Test simple product %isolation%";"test_simple_product_%isolation%";"74.00";"87.0000";"-";"test-simple-product-%isolation%";"333.0000";"-";"Product offline";"assertProductSaveMessage, assertProductForm, assertProductIsNotDisplayingOnFrontend"
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php
index 018a42b6c05de7a382f9a5ddab13dfa724d44b9d..671e2d53970dda05cb17f40ea266b234b2915e1a 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php
@@ -30,6 +30,7 @@ use Mtf\Factory\Factory;
 use Mtf\Client\Element\Locator;
 use Magento\Checkout\Test\Block\Onepage\Link;
 use Mtf\Fixture\FixtureInterface;
+use Magento\Checkout\Test\Block\Cart\CartItem;
 
 /**
  * Class Cart
@@ -67,11 +68,18 @@ class Cart extends Block
      */
     protected $updateShoppingCart = '[name="update_cart_action"]';
 
+    /**
+     * Cart empty block selector
+     *
+     * @var string
+     */
+    protected $cartEmpty = '.cart-empty';
+
     /**
      * Get cart item block
      *
      * @param FixtureInterface $product
-     * @return \Magento\Checkout\Test\Block\Cart\CartItem
+     * @return CartItem
      */
     public function getCartItem(FixtureInterface $product)
     {
@@ -170,4 +178,14 @@ class Cart extends Block
     {
         $this->_rootElement->find($this->updateShoppingCart, Locator::SELECTOR_CSS)->click();
     }
+
+    /**
+     * Check that cart is empty
+     *
+     * @return bool
+     */
+    public function cartIsEmpty()
+    {
+        return $this->_rootElement->find($this->cartEmpty, Locator::SELECTOR_CSS)->isVisible();
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php
index bbb3face4db2daecb01dc6a42a2e095d454e876e..c7cc450d3714821f852e6e84ec25bad39ce2b204 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/AbstractCartItem.php
@@ -21,7 +21,7 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
- 
+
 namespace Magento\Checkout\Test\Block\Cart;
 
 use Mtf\Block\Block;
@@ -46,6 +46,13 @@ class AbstractCartItem extends Block
      */
     protected $price = './/td[@class="col price"]/*[@class="price-excluding-tax"]/span';
 
+    /**
+     * Selector for unit price including tax
+     *
+     * @var string
+     */
+    protected $priceInclTax = './/td[@class="col price"]/*[@class="price-including-tax"]/span';
+
     /**
      * Quantity input selector
      *
@@ -60,6 +67,15 @@ class AbstractCartItem extends Block
      */
     protected $subtotalPrice = './/td[@class="col subtotal"]//*[@class="price-excluding-tax"]//span[@class="price"]';
 
+    // @codingStandardsIgnoreStart
+    /**
+     * Cart item sub-total including tax xpath selector
+     *
+     * @var string
+     */
+    protected $subTotalPriceInclTax = '//td[@class="col subtotal"]//*[@class="price-including-tax"]//span[@class="price"]';
+    // @codingStandardsIgnoreEnd
+
     /**
      *  Selector for options block
      *
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php
index 01b0d7a87eee3b132eab0c966da31822986d111c..169854ace9580380b56d8657d2ed5d7e96d3f815 100755
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/CartItem.php
@@ -53,6 +53,27 @@ class CartItem extends AbstractCartItem
      */
     protected $bundleOptions = './/dl[contains(@class, "cart-item-options")]/dd[%d]/span[@class="price"][%d]';
 
+    /**
+     * 'Move to Wishlist' button
+     *
+     * @var string
+     */
+    protected $wishlistButton = '.actions .towishlist';
+
+    /**
+     * Quantity input selector
+     *
+     * @var string
+     */
+    protected $name = '.product-item-name a';
+
+    /**
+     * Cart item sub-total xpath selector
+     *
+     * @var string
+     */
+    protected $subtotalPrice = './/td[@class="col subtotal"]//*[@class="price-excluding-tax"]//span[@class="price"]';
+
     /**
      * Get product name
      *
@@ -62,7 +83,7 @@ class CartItem extends AbstractCartItem
     {
         $this->_rootElement->find($this->productName)->getText();
     }
-
+    
     /**
      * Get product price
      *
@@ -74,6 +95,17 @@ class CartItem extends AbstractCartItem
         return str_replace(',', '', $this->escapeCurrency($cartProductPrice));
     }
 
+    /**
+     * Get product price including tax
+     *
+     * @return string
+     */
+    public function getPriceInclTax()
+    {
+        $cartProductPrice = $this->_rootElement->find($this->priceInclTax, Locator::SELECTOR_XPATH)->getText();
+        return str_replace(',', '', $this->escapeCurrency($cartProductPrice));
+    }
+
     /**
      * Set product quantity
      *
@@ -106,6 +138,17 @@ class CartItem extends AbstractCartItem
         return str_replace(',', '', $this->escapeCurrency($price));
     }
 
+    /**
+     * Get sub-total including tax for the specified item in the cart
+     *
+     * @return string
+     */
+    public function getSubtotalPriceInclTax()
+    {
+        $price = $this->_rootElement->find($this->subTotalPriceInclTax, Locator::SELECTOR_XPATH)->getText();
+        return str_replace(',', '', $this->escapeCurrency($price));
+    }
+
     /**
      * Get product options in the cart
      *
@@ -174,6 +217,16 @@ class CartItem extends AbstractCartItem
         return trim($this->_rootElement->find($formatPrice, Locator::SELECTOR_XPATH)->getText(), $currency);
     }
 
+    /**
+     * Get product name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->_rootElement->find($this->name, Locator::SELECTOR_CSS)->getText();
+    }
+
     /**
      * Edit product item in cart
      *
@@ -204,4 +257,24 @@ class CartItem extends AbstractCartItem
     {
         return preg_replace('/^(\d+) x (\w+) \W([\d\.,]+)$/', '$1 x $2 $3', $label);
     }
+
+    /**
+     * Click on move to wishlist button
+     *
+     * @return void
+     */
+    public function moveToWishlist()
+    {
+        $this->_rootElement->find($this->wishlistButton)->click();
+    }
+
+    /**
+     * Check that edit button visible
+     *
+     * @return bool
+     */
+    public function isEditButtonVisible()
+    {
+        return $this->_rootElement->find($this->edit)->isVisible();
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php
index 64f5c607393ee54ded441c8e9011aee4f74a2d1a..90e20f54fc97fbdd91b13b5a3ed152f03f65729c 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart/Totals.php
@@ -41,6 +41,20 @@ class Totals extends Block
      */
     protected $grandTotal = '//tr[normalize-space(td)="Grand Total"]//span';
 
+    /**
+     * Grand total search mask
+     *
+     * @var string
+     */
+    protected $grandTotalExclTax = '.totals.grand.excl span';
+
+    /**
+     * Grand total search mask
+     *
+     * @var string
+     */
+    protected $grandTotalInclTax = '.totals.grand.incl span';
+
     /**
      * Subtotal search mask
      *
@@ -48,12 +62,26 @@ class Totals extends Block
      */
     protected $subtotal = '//tr[normalize-space(td)="Subtotal"]//span';
 
+    /**
+     * Subtotal search mask
+     *
+     * @var string
+     */
+    protected $subtotalExclTax = '.totals.sub.excl span';
+
+    /**
+     * Subtotal search mask
+     *
+     * @var string
+     */
+    protected $subtotalInclTax = '.totals.sub.incl span';
+
     /**
      * Tax search mask
      *
      * @var string
      */
-    protected $tax = '//tr[normalize-space(td)="Tax"]//span';
+    protected $tax = '.totals-tax span';
 
     /**
      * Get shipping price selector
@@ -62,6 +90,20 @@ class Totals extends Block
      */
     protected $shippingPriceSelector = '.shipping.excl .price';
 
+    /**
+     * Get discount
+     *
+     * @var string
+     */
+    protected $discount = '//tr[normalize-space(td)="Discount"]//span';
+
+    /**
+     * Get shipping price including tax selector
+     *
+     * @var string
+     */
+    protected $shippingPriceInclTaxSelector = '.shipping.incl .price';
+
     /**
      * Get shipping price block selector
      *
@@ -80,6 +122,28 @@ class Totals extends Block
         return $this->escapeCurrency($grandTotal);
     }
 
+    /**
+     * Get Grand Total Text
+     *
+     * @return string
+     */
+    public function getGrandTotalIncludingTax()
+    {
+        $grandTotal = $this->_rootElement->find($this->grandTotalInclTax, Locator::SELECTOR_CSS)->getText();
+        return $this->escapeCurrency($grandTotal);
+    }
+
+    /**
+     * Get Grand Total Text
+     *
+     * @return string
+     */
+    public function getGrandTotalExcludingTax()
+    {
+        $grandTotal = $this->_rootElement->find($this->grandTotalExclTax, Locator::SELECTOR_CSS)->getText();
+        return $this->escapeCurrency($grandTotal);
+    }
+
     /**
      * Get Tax text from Order Totals
      *
@@ -87,7 +151,7 @@ class Totals extends Block
      */
     public function getTax()
     {
-        $taxPrice = $this->_rootElement->find($this->tax, Locator::SELECTOR_XPATH)->getText();
+        $taxPrice = $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS)->getText();
         return $this->escapeCurrency($taxPrice);
     }
 
@@ -98,7 +162,7 @@ class Totals extends Block
      */
     public function isTaxVisible()
     {
-        return $this->_rootElement->find($this->tax, Locator::SELECTOR_XPATH)->isVisible();
+        return $this->_rootElement->find($this->tax, Locator::SELECTOR_CSS)->isVisible();
     }
 
     /**
@@ -112,6 +176,28 @@ class Totals extends Block
         return $this->escapeCurrency($subTotal);
     }
 
+    /**
+     * Get Subtotal text
+     *
+     * @return string
+     */
+    public function getSubtotalIncludingTax()
+    {
+        $subTotal = $this->_rootElement->find($this->subtotalInclTax, Locator::SELECTOR_CSS)->getText();
+        return $this->escapeCurrency($subTotal);
+    }
+
+    /**
+     * Get Subtotal text
+     *
+     * @return string
+     */
+    public function getSubtotalExcludingTax()
+    {
+        $subTotal = $this->_rootElement->find($this->subtotalExclTax, Locator::SELECTOR_CSS)->getText();
+        return $this->escapeCurrency($subTotal);
+    }
+
     /**
      * Method that escapes currency symbols
      *
@@ -124,6 +210,17 @@ class Totals extends Block
         return (isset($matches[1])) ? $matches[1] : null;
     }
 
+    /**
+     * Get discount
+     *
+     * @return string
+     */
+    public function getDiscount()
+    {
+        $discount = $this->_rootElement->find($this->discount, Locator::SELECTOR_XPATH)->getText();
+        return $this->escapeCurrency($discount);
+    }
+
     /**
      * Get shipping price
      *
@@ -135,6 +232,18 @@ class Totals extends Block
         return $this->escapeCurrency($shippingPrice);
     }
 
+    /**
+     * Get shipping price
+     *
+     * @return string
+     */
+    public function getShippingPriceInclTax()
+    {
+        $shippingPrice = $this->_rootElement
+            ->find($this->shippingPriceInclTaxSelector, Locator::SELECTOR_CSS)->getText();
+        return $this->escapeCurrency($shippingPrice);
+    }
+
     /**
      * Is visible shipping price block
      *
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php
new file mode 100644
index 0000000000000000000000000000000000000000..b264dd3daa078a9b2c8255992e7c9450e565c023
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.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\Checkout\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Mtf\Fixture\FixtureInterface;
+
+/**
+ * Class AssertAddedProductToCartSuccessMessage
+ * Assert success message is appeared on Shopping Cart page
+ */
+class AssertAddedProductToCartSuccessMessage extends AbstractConstraint
+{
+    /**
+     * Success add to cart message
+     */
+    const SUCCESS_MESSAGE = 'You added %s to your shopping cart.';
+
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert success message is appeared on Shopping Cart page
+     *
+     * @param CheckoutCart $checkoutCart
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function processAssert(CheckoutCart $checkoutCart, FixtureInterface $product)
+    {
+        \PHPUnit_Framework_Assert::assertEquals(
+            sprintf(self::SUCCESS_MESSAGE, $product->getName()),
+            $checkoutCart->getMessagesBlock()->getSuccessMessages()
+        );
+    }
+
+    /**
+     * Returns string representation of successful assertion
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Add to cart success message is present on Shopping Cart page.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php
new file mode 100644
index 0000000000000000000000000000000000000000..f2ed2d75c05083688d63b2d63b9c4dca24dc1200
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.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\Checkout\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Checkout\Test\Page\CheckoutCart;
+
+/**
+ * Class AssertProductIsNotEditable
+ * Assert that after adding products by sku to shopping cart products are not editable
+ */
+class AssertProductIsNotEditable extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that after adding products by sku to shopping cart products are not editable
+     *
+     * @param CheckoutCart $checkoutCart
+     * @param array $products
+     * @return void
+     */
+    public function processAssert(CheckoutCart $checkoutCart, array $products)
+    {
+        foreach ($products as $product) {
+            \PHPUnit_Framework_Assert::assertFalse(
+                $checkoutCart->getCartBlock()->getCartItem($product)->isEditButtonVisible(),
+                'Added product is editable.'
+            );
+        }
+    }
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Added products by sku to shopping cart are not editable';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php
new file mode 100644
index 0000000000000000000000000000000000000000..5c2d17f6ca166da8714851a30823f3cd20273acd
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Checkout\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Checkout\Test\Page\CheckoutCart;
+
+/**
+ * Class AssertProductPresentInShoppingCart
+ * Assert that products are present in shopping cart
+ */
+class AssertProductPresentInShoppingCart extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that products are present in shopping cart
+     *
+     * @param CheckoutCart $checkoutCart
+     * @param array $products
+     * @return void
+     */
+    public function processAssert(CheckoutCart $checkoutCart, array $products)
+    {
+        $checkoutCart->open();
+        foreach ($products as $product) {
+            \PHPUnit_Framework_Assert::assertTrue(
+                $checkoutCart->getCartBlock()->getCartItem($product)->isVisible(),
+                'Product ' . $product->getName() . ' is absent in shopping cart.'
+            );
+        }
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'All expected products are present in shopping cart.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php
index 690367d7954abca9f303e60e097ce93cda26b6c7..7414ae043745621a906bf9f487092943e2590ec8 100755
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductQtyInShoppingCart.php
@@ -51,10 +51,8 @@ class AssertProductQtyInShoppingCart extends AbstractAssertForm
      * @param Cart $cart
      * @return void
      */
-    public function processAssert(
-        CheckoutCart $checkoutCart,
-        Cart $cart
-    ) {
+    public function processAssert(CheckoutCart $checkoutCart, Cart $cart)
+    {
         $checkoutCart->open();
         /** @var Items $sourceProducts */
         $sourceProducts = $cart->getDataFieldConfig('items')['source'];
diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/constraint.xml
index 5e1462297e1d23a93b3a1025733bff7b15ffb594..c954f35e537439be62e1e9a26d979ee07e3ceb6b 100644
--- a/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/etc/constraint.xml
@@ -51,10 +51,22 @@
     <assertCartItemsOptions module="Magento_Checkout">
         <severeness>low</severeness>
     </assertCartItemsOptions>
+    <assertCartProductName module="Magento_Checkout">
+        <severeness>low</severeness>
+    </assertCartProductName>
     <assertProductAbsentInMiniShoppingCart module="Magento_Checkout">
         <severeness>low</severeness>
     </assertProductAbsentInMiniShoppingCart>
     <assertProductPresentInMiniShoppingCart module="Magento_Checkout">
         <severeness>low</severeness>
     </assertProductPresentInMiniShoppingCart>
+    <assertAddedProductToCartSuccessMessage module="Magento_Checkout">
+        <severeness>low</severeness>
+    </assertAddedProductToCartSuccessMessage>
+    <assertProductPresentInShoppingCart module="Magento_Checkout">
+        <severeness>low</severeness>
+    </assertProductPresentInShoppingCart>
+    <assertProductIsNotEditable module="Magento_Checkout">
+        <severeness>low</severeness>
+    </assertProductIsNotEditable>
 </constraint>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/AgreementGrid.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/AgreementGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..5372505307a81acfaf97d7ec0d5723f50431fcad
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/AgreementGrid.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\CheckoutAgreements\Test\Block\Adminhtml;
+
+use Magento\Backend\Test\Block\Widget\Grid;
+
+/**
+ * Class AgreementGrid
+ * Backend Agreement grid
+ */
+class AgreementGrid extends Grid
+{
+    /**
+     * Locator value for link in action column
+     *
+     * @var string
+     */
+    protected $editLink = 'td[class*=col-name]';
+
+    /**
+     * First row selector
+     *
+     * @var string
+     */
+    protected $firstRowSelector = '//tr[./td[contains(@class, "col-name")]][1]';
+
+    /**
+     * Filters array mapping
+     *
+     * @var array
+     */
+    protected $filters = [
+        'name' => [
+            'selector' => 'input[name="name"]',
+        ],
+    ];
+}
diff --git a/setup/module/Magento/Filesystem/src/FilesystemException.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.php
similarity index 81%
rename from setup/module/Magento/Filesystem/src/FilesystemException.php
rename to dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.php
index 4dff3de719c7313135ae8de47187801e1e6e99cc..aaa98e64f8490688c33d78be2d53116f355cb83b 100644
--- a/setup/module/Magento/Filesystem/src/FilesystemException.php
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Magento filesystem exception
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,8 +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\Filesystem;
 
-class FilesystemException extends \Exception
+namespace Magento\CheckoutAgreements\Test\Block\Adminhtml\Block\Agreement\Edit;
+
+use Mtf\Block\Form;
+
+/**
+ * Class AgreementsForm
+ * Form for creation of the term
+ */
+class AgreementsForm extends Form
 {
+    //
 }
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.xml
new file mode 100644
index 0000000000000000000000000000000000000000..74eefc137f2a79081f50579ddb212bc1b4f2a3d3
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.xml
@@ -0,0 +1,43 @@
+<?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)
+ */
+-->
+<mapping strict="0">
+    <fields>
+        <name />
+        <is_active>
+            <input>select</input>
+        </is_active>
+        <is_html>
+            <input>select</input>
+        </is_html>
+        <stores>
+            <selector>[name="stores[]"]</selector>
+            <input>multiselectgrouplist</input>
+        </stores>
+        <checkbox_text />
+        <content />
+        <content_height />
+    </fields>
+</mapping>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Onepage/AgreementReview.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Onepage/AgreementReview.php
new file mode 100644
index 0000000000000000000000000000000000000000..d189c8d00d1d5c0f47fb037bdd49383fff83c62e
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Onepage/AgreementReview.php
@@ -0,0 +1,90 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\CheckoutAgreements\Test\Block\Onepage;
+
+use Mtf\Client\Element\Locator;
+use Magento\Checkout\Test\Block\Onepage\Review;
+use Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement;
+
+/**
+ * Class AgreementReview
+ * One page checkout order review block
+ */
+class AgreementReview extends Review
+{
+    /**
+     * Notification agreements locator
+     *
+     * @var string
+     */
+    protected $notification = 'div.mage-error';
+
+    /**
+     * Agreement locator
+     *
+     * @var string
+     */
+    protected $agreement = './/div[contains(@id, "checkout-review-submit")]//label[.="%s"]';
+
+    /**
+     * Agreement checkbox locator
+     *
+     * @var string
+     */
+    protected $agreementCheckbox = './/input[contains(@id, "agreement")]';
+
+    /**
+     * Get notification massage
+     *
+     * @return string
+     */
+    public function getNotificationMassage()
+    {
+        return $this->_rootElement->find($this->notification)->getText();
+    }
+
+    /**
+     * Set agreement
+     *
+     * @param string $value
+     * @return void
+     */
+    public function setAgreement($value)
+    {
+        $this->_rootElement->find($this->agreementCheckbox, Locator::SELECTOR_XPATH, 'checkbox')->setValue($value);
+    }
+
+    /**
+     * Check agreement
+     *
+     * @param CheckoutAgreement $agreement
+     * @return bool
+     */
+    public function checkAgreement(CheckoutAgreement $agreement)
+    {
+        return $this->_rootElement
+            ->find(sprintf($this->agreement, $agreement->getCheckboxText()), Locator::SELECTOR_XPATH)->isVisible();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsAbsentOnCheckout.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsAbsentOnCheckout.php
new file mode 100644
index 0000000000000000000000000000000000000000..a7c3f2be69880b436ca51bff4291a674c0121eeb
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsAbsentOnCheckout.php
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\CheckoutAgreements\Test\Constraint;
+
+use Mtf\ObjectManager;
+use Mtf\Client\Browser;
+use Mtf\Fixture\FixtureFactory;
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Magento\Checkout\Test\Page\CheckoutOnepage;
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\Catalog\Test\Page\Product\CatalogProductView;
+use Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement;
+
+/**
+ * Class AssertTermsAbsentOnCheckout
+ * Check that Checkout Agreement is absent in the Place order tab
+ */
+class AssertTermsAbsentOnCheckout extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Place order and verify there is no checkbox Terms and Conditions
+     *
+     * @param FixtureFactory $fixtureFactory
+     * @param ObjectManager $objectManager
+     * @param string $product
+     * @param Browser $browser
+     * @param CatalogProductView $catalogProductView
+     * @param CheckoutCart $checkoutCart
+     * @param CheckoutOnepage $checkoutOnepage
+     * @param CheckoutAgreement $agreement
+     * @param array $shipping
+     * @param array $payment
+     * @return void
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function processAssert(
+        FixtureFactory $fixtureFactory,
+        ObjectManager $objectManager,
+        $product,
+        Browser $browser,
+        CatalogProductView $catalogProductView,
+        CheckoutCart $checkoutCart,
+        CheckoutOnepage $checkoutOnepage,
+        CheckoutAgreement $agreement,
+        $shipping,
+        $payment
+    ) {
+        $createProductsStep = $objectManager->create(
+            'Magento\Catalog\Test\TestStep\CreateProductsStep',
+            ['products' => $product]
+        );
+        $product = $createProductsStep->run();
+
+        $billingAddress = $fixtureFactory->createByCode('addressInjectable', ['dataSet' => 'default']);
+
+        $browser->open($_ENV['app_frontend_url'] . $product['products'][0]->getUrlKey() . '.html');
+        $catalogProductView->getViewBlock()->clickAddToCartButton();
+        $checkoutCart->getCartBlock()->getOnepageLinkBlock()->proceedToCheckout();
+        $checkoutOnepage->getLoginBlock()->guestCheckout();
+        $checkoutOnepage->getLoginBlock()->clickContinue();
+        $checkoutOnepage->getBillingBlock()->fill($billingAddress);
+        $checkoutOnepage->getBillingBlock()->clickContinue();
+        $checkoutOnepage->getShippingMethodBlock()->selectShippingMethod($shipping);
+        $checkoutOnepage->getShippingMethodBlock()->clickContinue();
+        $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod($payment);
+        $checkoutOnepage->getPaymentMethodsBlock()->clickContinue();
+
+        \PHPUnit_Framework_Assert::assertFalse(
+            $checkoutOnepage->getAgreementReview()->checkAgreement($agreement),
+            'Checkout Agreement \'' . $agreement->getName() . '\' is present in the Place order step.'
+        );
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Checkout Agreement is absent in the Place order step.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsInGrid.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsInGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..f8a80c7b3db0e83845508970595e0425fdf2f9b3
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsInGrid.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\CheckoutAgreements\Test\Constraint;
+
+use Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex;
+use Mtf\Constraint\AbstractConstraint;
+
+/**
+ * Class AssertTermsInGrid
+ * Check that checkout agreement is present in agreement grid
+ */
+class AssertTermsInGrid extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that checkout agreement is present in agreement grid
+     *
+     * @param CheckoutAgreementIndex $agreementIndex
+     * @param CheckoutAgreement $agreement
+     * @return void
+     */
+    public function processAssert(CheckoutAgreementIndex $agreementIndex, CheckoutAgreement $agreement)
+    {
+        $agreementIndex->open();
+        \PHPUnit_Framework_Assert::assertTrue(
+            $agreementIndex->getAgreementGridBlock()->isRowVisible(['name' => $agreement->getName()]),
+            'Checkout Agreement \'' . $agreement->getName() . '\' is absent in agreement grid.'
+        );
+    }
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Checkout Agreement is present in agreement grid.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsOnCheckout.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsOnCheckout.php
new file mode 100644
index 0000000000000000000000000000000000000000..6e69cad7f44cd55bb60ebac30835e8f5ee629b7d
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsOnCheckout.php
@@ -0,0 +1,132 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\CheckoutAgreements\Test\Constraint;
+
+use Mtf\ObjectManager;
+use Mtf\Client\Browser;
+use Mtf\Fixture\FixtureFactory;
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Magento\Checkout\Test\Page\CheckoutOnepage;
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Magento\Checkout\Test\Page\CheckoutOnepageSuccess;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\Catalog\Test\Page\Product\CatalogProductView;
+use Magento\Checkout\Test\Constraint\AssertOrderSuccessPlacedMessage;
+
+/**
+ * Class AssertTermsOnCheckout
+ * Check that Terms and Conditions is present on the last checkout step - Order Review.
+ */
+class AssertTermsOnCheckout extends AbstractConstraint
+{
+    /**
+     * Notification message
+     */
+    const NOTIFICATION_MESSAGE = 'This is a required field.';
+
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Check that checkbox is present on the last checkout step - Order Review.
+     * Check that after Place order without click on checkbox "Terms and Conditions" order was not successfully placed.
+     * Check that after clicking on "Terms and Conditions" checkbox and "Place Order" button success place order message
+     * appears.
+     *
+     * @param FixtureFactory $fixtureFactory
+     * @param ObjectManager $objectManager
+     * @param string $product
+     * @param Browser $browser
+     * @param CatalogProductView $catalogProductView
+     * @param CheckoutCart $checkoutCart
+     * @param CheckoutOnepage $checkoutOnepage
+     * @param CheckoutOnepageSuccess $checkoutOnepageSuccess
+     * @param AssertOrderSuccessPlacedMessage $assertOrderSuccessPlacedMessage
+     * @param array $shipping
+     * @param array $payment
+     * @return void
+     *
+     * @SuppressWarnings(PHPMD.ExcessiveParameterList)
+     */
+    public function processAssert(
+        FixtureFactory $fixtureFactory,
+        ObjectManager $objectManager,
+        $product,
+        Browser $browser,
+        CatalogProductView $catalogProductView,
+        CheckoutCart $checkoutCart,
+        CheckoutOnepage $checkoutOnepage,
+        CheckoutOnepageSuccess $checkoutOnepageSuccess,
+        AssertOrderSuccessPlacedMessage $assertOrderSuccessPlacedMessage,
+        $shipping,
+        $payment
+    ) {
+        $createProductsStep = $objectManager->create(
+            'Magento\Catalog\Test\TestStep\CreateProductsStep',
+            ['products' => $product]
+        );
+        $product = $createProductsStep->run();
+
+        $billingAddress = $fixtureFactory->createByCode('addressInjectable', ['dataSet' => 'default']);
+
+        $browser->open($_ENV['app_frontend_url'] . $product['products'][0]->getUrlKey() . '.html');
+        $catalogProductView->getViewBlock()->clickAddToCartButton();
+        $checkoutCart->getCartBlock()->getOnepageLinkBlock()->proceedToCheckout();
+        $checkoutOnepage->getLoginBlock()->guestCheckout();
+        $checkoutOnepage->getLoginBlock()->clickContinue();
+        $checkoutOnepage->getBillingBlock()->fill($billingAddress);
+        $checkoutOnepage->getBillingBlock()->clickContinue();
+        $checkoutOnepage->getShippingMethodBlock()->selectShippingMethod($shipping);
+        $checkoutOnepage->getShippingMethodBlock()->clickContinue();
+        $checkoutOnepage->getPaymentMethodsBlock()->selectPaymentMethod($payment);
+        $checkoutOnepage->getPaymentMethodsBlock()->clickContinue();
+        $checkoutOnepage->getAgreementReview()->placeOrder();
+
+        \PHPUnit_Framework_Assert::assertEquals(
+            self::NOTIFICATION_MESSAGE,
+            $checkoutOnepage->getAgreementReview()->getNotificationMassage(),
+            'Notification required message of Terms and Conditions is absent.'
+        );
+
+        $checkoutOnepage->getAgreementReview()->setAgreement('Yes');
+        $checkoutOnepage->getAgreementReview()->placeOrder();
+        $assertOrderSuccessPlacedMessage->processAssert($checkoutOnepageSuccess);
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Order was placed with checkout agreement successfully.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsSuccessSaveMessage.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsSuccessSaveMessage.php
new file mode 100644
index 0000000000000000000000000000000000000000..10d50064dc1d4142f80523bbe73dd523d389712a
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsSuccessSaveMessage.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\CheckoutAgreements\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex;
+
+/**
+ * Class AssertTermsSuccessSaveMessage
+ * Check that after save block successful message appears
+ */
+class AssertTermsSuccessSaveMessage extends AbstractConstraint
+{
+    /**
+     * Success terms and conditions save message
+     */
+    const SUCCESS_SAVE_MESSAGE = 'The condition has been saved.';
+
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'high';
+
+    /**
+     * Assert that after save block successful message appears
+     *
+     * @param CheckoutAgreementIndex $agreementIndex
+     * @return void
+     */
+    public function processAssert(CheckoutAgreementIndex $agreementIndex)
+    {
+        \PHPUnit_Framework_Assert::assertEquals(
+            self::SUCCESS_SAVE_MESSAGE,
+            $agreementIndex->getMessagesBlock()->getSuccessMessages(),
+            'Wrong success message is displayed.'
+        );
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Terms and Conditions success create message is present.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.php
new file mode 100644
index 0000000000000000000000000000000000000000..e6f21ecdcf85416d924f755a79101a4bad7a4bda
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.php
@@ -0,0 +1,157 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\CheckoutAgreements\Test\Fixture;
+
+use Mtf\Fixture\InjectableFixture;
+
+/**
+ * Class CheckoutAgreement
+ * Checkout agreement fixture.
+ */
+class CheckoutAgreement extends InjectableFixture
+{
+    /**
+     * @var string
+     */
+    protected $repositoryClass = 'Magento\CheckoutAgreements\Test\Repository\CheckoutAgreement';
+
+    /**
+     * @var string
+     */
+    // @codingStandardsIgnoreStart
+    protected $handlerInterface = 'Magento\CheckoutAgreements\Test\Handler\CheckoutAgreement\CheckoutAgreementInterface';
+    // @codingStandardsIgnoreEnd
+
+    protected $defaultDataSet = [
+        'name' => 'DefaultName%isolation%',
+        'is_active' => 'Enabled',
+        'is_html' => 'Text',
+        'stores' => ['dataSet' => 'default_store_view'],
+        'checkbox_text' => 'test_checkbox%isolation%',
+        'content' => 'TestMessage%isolation%',
+    ];
+
+    protected $agreement_id = [
+        'attribute_code' => 'agreement_id',
+        'backend_type' => 'int',
+        'is_required' => '1',
+        'default_value' => '',
+        'input' => '',
+    ];
+
+    protected $name = [
+        'attribute_code' => 'name',
+        'backend_type' => 'varchar',
+        'is_required' => '',
+        'default_value' => '',
+        'input' => '',
+    ];
+
+    protected $content = [
+        'attribute_code' => 'content',
+        'backend_type' => 'text',
+        'is_required' => '',
+        'default_value' => '',
+        'input' => '',
+    ];
+
+    protected $content_height = [
+        'attribute_code' => 'content_height',
+        'backend_type' => 'varchar',
+        'is_required' => '',
+        'default_value' => '',
+        'input' => '',
+    ];
+
+    protected $checkbox_text = [
+        'attribute_code' => 'checkbox_text',
+        'backend_type' => 'text',
+        'is_required' => '',
+        'default_value' => '',
+        'input' => '',
+    ];
+
+    protected $is_active = [
+        'attribute_code' => 'is_active',
+        'backend_type' => 'smallint',
+        'is_required' => '',
+        'default_value' => '0',
+        'input' => '',
+    ];
+
+    protected $is_html = [
+        'attribute_code' => 'is_html',
+        'backend_type' => 'smallint',
+        'is_required' => '',
+        'default_value' => '0',
+        'input' => '',
+    ];
+
+    protected $stores = [
+        'attribute_code' => 'store_ids',
+        'backend_type' => 'virtual',
+        'source' => 'Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement\Stores',
+    ];
+
+    public function getAgreementId()
+    {
+        return $this->getData('agreement_id');
+    }
+
+    public function getName()
+    {
+        return $this->getData('name');
+    }
+
+    public function getContent()
+    {
+        return $this->getData('content');
+    }
+
+    public function getContentHeight()
+    {
+        return $this->getData('content_height');
+    }
+
+    public function getCheckboxText()
+    {
+        return $this->getData('checkbox_text');
+    }
+
+    public function getIsActive()
+    {
+        return $this->getData('is_active');
+    }
+
+    public function getIsHtml()
+    {
+        return $this->getData('is_html');
+    }
+
+    public function getStores()
+    {
+        return $this->getData('stores');
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3753d28b41f570db649d4911fde9541e6a55ce66
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml
@@ -0,0 +1,92 @@
+<?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)
+ */
+-->
+<fixture class="Magento\CheckoutAgreements\Test\Fixture\Term">
+    <module>Magento_CheckoutAgreements</module>
+    <type>flat</type>
+    <entity_type>checkout_agreement</entity_type>
+    <collection>Magento\CheckoutAgreements\Model\Resource\Agreement\Collection</collection>
+    <fields>
+        <agreement_id>
+            <attribute_code>agreement_id</attribute_code>
+            <backend_type>int</backend_type>
+            <is_required>1</is_required>
+            <default_value></default_value>
+            <input></input>
+        </agreement_id>
+        <name>
+            <attribute_code>name</attribute_code>
+            <backend_type>varchar</backend_type>
+            <is_required></is_required>
+            <default_value></default_value>
+            <input></input>
+        </name>
+        <content>
+            <attribute_code>content</attribute_code>
+            <backend_type>text</backend_type>
+            <is_required></is_required>
+            <default_value></default_value>
+            <input></input>
+        </content>
+        <content_height>
+            <attribute_code>content_height</attribute_code>
+            <backend_type>varchar</backend_type>
+            <is_required></is_required>
+            <default_value></default_value>
+            <input></input>
+        </content_height>
+        <checkbox_text>
+            <attribute_code>checkbox_text</attribute_code>
+            <backend_type>text</backend_type>
+            <is_required></is_required>
+            <default_value></default_value>
+            <input></input>
+        </checkbox_text>
+        <is_active>
+            <attribute_code>is_active</attribute_code>
+            <backend_type>smallint</backend_type>
+            <is_required></is_required>
+            <default_value>0</default_value>
+            <input></input>
+        </is_active>
+        <is_html>
+            <attribute_code>is_html</attribute_code>
+            <backend_type>smallint</backend_type>
+            <is_required></is_required>
+            <default_value>0</default_value>
+            <input></input>
+        </is_html>
+        <stores>
+            <attribute_code>store_ids</attribute_code>
+            <backend_type>virtual</backend_type>
+            <is_required>1</is_required>
+            <default_value>0</default_value>
+            <input>multiselectgrouplist</input>
+            <spurce>Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement\Stores</spurce>
+        </stores>
+    </fields>
+    <repository_class>Magento\CheckoutAgreements\Test\Repository\Term</repository_class>
+    <handler_interface>Magento\CheckoutAgreements\Test\Handler\Term\TermInterface</handler_interface>
+</fixture>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php
new file mode 100644
index 0000000000000000000000000000000000000000..d98e1c21949770fff261e202291c19157cebaeb2
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php
@@ -0,0 +1,123 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\CheckoutAgreements\Test\Fixture\CheckoutAgreement;
+
+use Mtf\Fixture\FixtureFactory;
+use Mtf\Fixture\FixtureInterface;
+use Magento\Store\Test\Fixture\Store;
+
+/**
+ * Class Stores
+ * Prepare Stores
+ */
+class Stores implements FixtureInterface
+{
+    /**
+     * Prepared dataSet data
+     *
+     * @var array
+     */
+    protected $data;
+
+    /**
+     * Data set configuration settings
+     *
+     * @var array
+     */
+    protected $params;
+
+    /**
+     * Store fixture
+     *
+     * @var Store[]
+     */
+    public $stores;
+
+    /**
+     * Constructor
+     *
+     * @param FixtureFactory $fixtureFactory
+     * @param array $data
+     * @param array $params [optional]
+     */
+    public function __construct(FixtureFactory $fixtureFactory, array $data, array $params = [])
+    {
+        $this->params = $params;
+        if (isset($data['dataSet'])) {
+            foreach ($data['dataSet'] as $store) {
+                $store = $fixtureFactory->createByCode('store', ['dataSet' => $store]);
+                /** @var Store $store */
+                if (!$store->getStoreId()) {
+                    $store->persist();
+                }
+                $this->stores[] = $store;
+                $this->data[] = $store->getGroupId() . '/' . $store->getName();
+            }
+        }
+    }
+
+    /**
+     * Persist stores
+     *
+     * @return void
+     */
+    public function persist()
+    {
+        //
+    }
+
+    /**
+     * Return prepared data set
+     *
+     * @param string|null $key [optional]
+     * @return mixed
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function getData($key = null)
+    {
+        return $this->data;
+    }
+
+    /**
+     * Return data set configuration settings
+     *
+     * @return array
+     */
+    public function getDataConfig()
+    {
+        return $this->params;
+    }
+
+    /**
+     * Return array
+     *
+     * @return Store[]
+     */
+    public function getStores()
+    {
+        return $this->stores;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/CheckoutAgreementInterface.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/CheckoutAgreementInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..9c6cdca3c80eda4edc1a8bdb66f5078108df659d
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/CheckoutAgreementInterface.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\CheckoutAgreements\Test\Handler\CheckoutAgreement;
+
+use Mtf\Handler\HandlerInterface;
+
+/**
+ * Interface CheckoutAgreementInterface
+ */
+interface CheckoutAgreementInterface extends HandlerInterface
+{
+    //
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php
new file mode 100644
index 0000000000000000000000000000000000000000..0c5164158dbb17f0b2ee1f4eef880adb2b59587c
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.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\CheckoutAgreements\Test\Handler\CheckoutAgreement;
+
+use Mtf\System\Config;
+use Mtf\Fixture\FixtureInterface;
+use Mtf\Util\Protocol\CurlInterface;
+use Mtf\Util\Protocol\CurlTransport;
+use Mtf\Handler\Curl as AbstractCurl;
+use Mtf\Util\Protocol\CurlTransport\BackendDecorator;
+
+/**
+ * Class Curl
+ * Curl handler for creating Checkout Agreement
+ */
+class Curl extends AbstractCurl implements CheckoutAgreementInterface
+{
+    /**
+     * Mapping values for data.
+     *
+     * @var array
+     */
+    protected $mappingData = [
+        'is_active' => [
+            'Enabled' => 1,
+            'Disabled' => 0
+        ],
+        'is_html' => [
+            'HTML' => 1,
+            'Text' => 0
+        ],
+    ];
+
+    /**
+     * Url for save checkout agreement
+     *
+     * @var string
+     */
+    protected $url = 'checkout/agreement/save/';
+
+    /**
+     * Post request for creating new checkout agreement
+     *
+     * @param FixtureInterface|null $fixture
+     * @return array
+     * @throws \Exception
+     */
+    public function persist(FixtureInterface $fixture = null)
+    {
+        $url = $_ENV['app_backend_url'] . $this->url;
+        $data = $this->prepareData($fixture);
+        $curl = new BackendDecorator(new CurlTransport(), new Config());
+        $curl->write(CurlInterface::POST, $url, '1.1', [], $data);
+        $response = $curl->read();
+        $curl->close();
+        if (!strpos($response, 'data-ui-id="messages-message-success"')) {
+            throw new \Exception("Checkout agreement creating by curl handler was not successful! Response: $response");
+        }
+        preg_match('~id\/(\d*?)\/~', $response, $matches);
+        $id = isset($matches[1]) ? $matches[1] : null;
+
+        return ['agreement_id' => $id];
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param FixtureInterface $fixture
+     * @return array
+     */
+    protected function prepareData($fixture)
+    {
+        $data = [];
+        /** @var \Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement $fixture */
+        $stores = $fixture->getDataFieldConfig('stores')['source']->getStores();
+        foreach ($stores as $store) {
+            /** @var \Magento\Store\Test\Fixture\Store $store */
+            $data['stores'][] = $store->getStoreId();
+        }
+        $data = $this->replaceMappingData(array_merge($fixture->getData(), $data));
+
+        return $data;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteIndex.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementIndex.xml
similarity index 81%
rename from dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteIndex.xml
rename to dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementIndex.xml
index 6747e249752d3494a9be1ae5dc97205ffb1f340e..2b9b84a476c64e6cdef4ad0d093c05791b4bf512 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteIndex.xml
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementIndex.xml
@@ -23,22 +23,22 @@
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  */
 -->
-<page mca="admin/url_rewrite/index" module="Magento_UrlRewrite">
+<page mca="checkout/agreement/index" module="Magento_CheckoutAgreements">
     <blocks>
+        <messagesBlock>
+            <class>Magento\Core\Test\Block\Messages</class>
+            <locator>#messages</locator>
+            <strategy>css selector</strategy>
+        </messagesBlock>
         <pageActionsBlock>
             <class>Magento\Backend\Test\Block\GridPageActions</class>
             <locator>.page-main-actions</locator>
             <strategy>css selector</strategy>
         </pageActionsBlock>
-        <urlRedirectGrid>
-            <class>Magento\UrlRewrite\Test\Block\Adminhtml\Catalog\Category\Grid</class>
-            <locator>#urlrewriteGrid</locator>
+        <agreementGridBlock>
+            <class>Magento\CheckoutAgreements\Test\Block\Adminhtml\AgreementGrid</class>
+            <locator>#agreementGrid</locator>
             <strategy>css selector</strategy>
-        </urlRedirectGrid>
-        <messagesBlock>
-            <class>Magento\Core\Test\Block\Messages</class>
-            <locator>.messages .messages</locator>
-            <strategy>css selector</strategy>
-        </messagesBlock>
+        </agreementGridBlock>
     </blocks>
 </page>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementNew.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementNew.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a3d10a2565f385cfe426d4c975b69803d9b9afb9
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementNew.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<page mca="checkout/agreement/new" module="Magento_CheckoutAgreements">
+    <blocks>
+        <pageActionsBlock>
+            <class>Magento\Backend\Test\Block\FormPageActions</class>
+            <locator>.page-main-actions</locator>
+            <strategy>css selector</strategy>
+        </pageActionsBlock>
+        <agreementsForm>
+            <class>Magento\CheckoutAgreements\Test\Block\Adminhtml\Block\Agreement\Edit\AgreementsForm</class>
+            <locator>#edit_form</locator>
+            <strategy>css selector</strategy>
+        </agreementsForm>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/CheckoutOnepage.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/CheckoutOnepage.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ebef49638ab78fb00d41ecd01edf984be22c578e
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/CheckoutOnepage.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)
+ */
+-->
+<page mca="checkout/onepage">
+    <blocks>
+        <agreementReview>
+            <class>Magento\CheckoutAgreements\Test\Block\Onepage\AgreementReview</class>
+            <locator>#checkout-step-review</locator>
+            <strategy>css selector</strategy>
+        </agreementReview>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.php
new file mode 100644
index 0000000000000000000000000000000000000000..e18fde696c50bbbfa6e6d1801ac68477906c768f
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.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\CheckoutAgreements\Test\Repository;
+
+use Mtf\Repository\AbstractRepository;
+
+/**
+ * Class CheckoutAgreement
+ * Checkout agreement repository
+ */
+class CheckoutAgreement extends AbstractRepository
+{
+    /**
+     * @construct
+     * @param array $defaultConfig
+     * @param array $defaultData
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
+    public function __construct(array $defaultConfig = [], array $defaultData = [])
+    {
+        $this->_data['term_disabled_text'] = [
+            'name' => 'TermDisabledTextName%isolation%',
+            'is_active' => 'Disabled',
+            'is_html' => 'Text',
+            'stores' => ['dataSet' => ['default']],
+            'checkbox_text' => 'test_checkbox%isolation%',
+            'content' => 'TestMessage%isolation%',
+            'content_height' => '',
+        ];
+
+        $this->_data['term_disabled_html'] = [
+            'name' => 'TermDisabledHtml%isolation%',
+            'is_active' => 'Disabled',
+            'is_html' => 'HTML',
+            'stores' => ['dataSet' => ['default']],
+            'checkbox_text' => 'test_checkbox%isolation%',
+            'content' => 'TestMessage%isolation%',
+            'content_height' => '',
+        ];
+
+        $this->_data['term_enabled_text'] = [
+            'name' => 'TermEnabledTextName%isolation%',
+            'is_active' => 'Enabled',
+            'is_html' => 'Text',
+            'stores' => ['dataSet' => ['default']],
+            'checkbox_text' => 'test_checkbox%isolation%',
+            'content' => 'TestMessage%isolation%',
+            'content_height' => '',
+        ];
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..fc1b89572cb6950e80eb0655e7601185eb48ac8a
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.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\CheckoutAgreements\Test\TestCase;
+
+use Mtf\TestCase\Injectable;
+use Mtf\ObjectManager;
+use Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementNew;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex;
+
+/**
+ * Test creation for CreateTermEntity
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Enable "Terms and Conditions": Stores > Configuration > Sales > Checkout > Checkout Options
+ *
+ * Steps:
+ * 1. Open Backend Stores > Terms and Conditions
+ * 2. Create new "Terms and Conditions"
+ * 3. Fill data from dataSet
+ * 4. Save
+ * 5. Perform all assertions
+ *
+ * @group Terms_and_Conditions_(CS)
+ * @ZephyrId MAGETWO-29586
+ */
+class CreateTermEntityTest extends Injectable
+{
+    /**
+     * Set up configuration
+     *
+     * @return void
+     */
+    public function __prepare()
+    {
+        $this->objectManager->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => 'checkout_term_condition']
+        )->run();
+    }
+
+    /**
+     * Create Term Entity test
+     *
+     * @param CheckoutAgreementNew $agreementNew
+     * @param CheckoutAgreementIndex $agreementIndex
+     * @param CheckoutAgreement $agreement
+     * @return void
+     */
+    public function test(
+        CheckoutAgreementNew $agreementNew,
+        CheckoutAgreementIndex $agreementIndex,
+        CheckoutAgreement $agreement
+    ) {
+        // Steps
+        $agreementIndex->open();
+        $agreementIndex->getPageActionsBlock()->addNew();
+        $agreementNew->getAgreementsForm()->fill($agreement);
+        $agreementNew->getPageActionsBlock()->save();
+    }
+
+    /**
+     * Delete all terms on backend
+     *
+     * @return void
+     */
+    public function tearDown()
+    {
+        $this->objectManager->create('Magento\CheckoutAgreements\Test\TestStep\DeleteAllTermsEntityStep')->run();
+    }
+
+    /**
+     * Set default configuration
+     *
+     * @return void
+     */
+    public static function tearDownAfterClass()
+    {
+        $setupConfigurationStep = ObjectManager::getInstance()->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => 'checkout_term_condition', 'rollback' => true]
+        );
+        $setupConfigurationStep->run();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..94adb80e4ae6660fa8612d31cfe7e6384388253c
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest/test.csv
@@ -0,0 +1,5 @@
+"product";"agreement/data/name";"agreement/data/is_active";"agreement/data/is_html";"agreement/data/stores/dataSet/0";"agreement/data/checkbox_text";"agreement/data/content";"shipping/shipping_service";"shipping/shipping_method";"payment/method";"constraint"
+"catalogProductSimple::default";"name%isolation%";"Enabled";"Text";"default";"test_checkbox%isolation%";"TestMessage%isolation%";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsOnCheckout"
+"catalogProductSimple::default";"name%isolation%";"Enabled";"HTML";"default";"test_checkbox%isolation%";"<html>";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsOnCheckout"
+"catalogProductSimple::default";"name%isolation%";"Enabled";"Text";"default";"test_checkbox%isolation%";"TestMessage%isolation%";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsOnCheckout"
+"catalogProductSimple::default";"name%isolation%";"Disabled";"Text";"default";"test_checkbox%isolation%";"TestMessage%isolation%";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsAbsentOnCheckout"
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6232a24f02b93353704abb564485d5b0491ef6c5
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\CheckoutAgreements\Test\TestCase;
+
+use Mtf\TestCase\Injectable;
+use Mtf\ObjectManager;
+use Magento\CheckoutAgreements\Test\Fixture\CheckoutAgreement;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementNew;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex;
+
+/**
+ * Test creation for UpdateTermEntityTest
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Enable "Terms and Conditions": Stores > Configuration > Sales > Checkout > Checkout Options
+ * 2. Create term according to dataSet
+ *
+ * Steps:
+ * 1. Open Backend Stores > Terms and Conditions
+ * 2. Open created Term from preconditions
+ * 3. Fill data from dataSet
+ * 4. Save
+ * 5. Perform all assertions
+ *
+ * @group Terms_and_Conditions_(CS)
+ * @ZephyrId MAGETWO-29635
+ */
+class UpdateTermEntityTest extends Injectable
+{
+    /**
+     * Set up configuration
+     *
+     * @return void
+     */
+    public function __prepare()
+    {
+        $this->objectManager->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => 'checkout_term_condition']
+        )->run();
+    }
+
+    /**
+     * Update Term Entity test
+     *
+     * @param CheckoutAgreementNew $agreementNew
+     * @param CheckoutAgreementIndex $agreementIndex
+     * @param CheckoutAgreement $agreement
+     * @param CheckoutAgreement $agreementOrigin
+     * @return void
+     */
+    public function test(
+        CheckoutAgreementNew $agreementNew,
+        CheckoutAgreementIndex $agreementIndex,
+        CheckoutAgreement $agreement,
+        CheckoutAgreement $agreementOrigin
+    ) {
+        // Precondition
+        $agreementOrigin->persist();
+
+        // Steps
+        $agreementIndex->open();
+        $agreementIndex->getAgreementGridBlock()->searchAndOpen(['name' => $agreementOrigin->getName()]);
+        $agreementNew->getAgreementsForm()->fill($agreement);
+        $agreementNew->getPageActionsBlock()->save();
+    }
+
+    /**
+     * Delete all terms on backend
+     *
+     * @return void
+     */
+    public function tearDown()
+    {
+        $this->objectManager->create('Magento\CheckoutAgreements\Test\TestStep\DeleteAllTermsEntityStep')->run();
+    }
+
+    /**
+     * Set default configuration
+     *
+     * @return void
+     */
+    public static function tearDownAfterClass()
+    {
+        ObjectManager::getInstance()->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => 'checkout_term_condition', 'rollback' => true]
+        )->run();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..7911ad0d0817517ecb47b53756f02cf241a09d6f
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest/test.csv
@@ -0,0 +1,4 @@
+"product";"agreementOrigin/dataSet";"agreement/data/name";"agreement/data/is_active";"agreement/data/is_html";"agreement/data/stores/dataSet/0";"agreement/data/checkbox_text";"agreement/data/content";"shipping/shipping_service";"shipping/shipping_method";"payment/method";"constraint"
+"catalogProductSimple::default";"term_disabled_text";"name%isolation%";"Enabled";"HTML";"default";"test_checkbox%isolation%";"TestMessage%isolation%";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsOnCheckout"
+"catalogProductSimple::default";"term_disabled_html";"name%isolation%";"Enabled";"Text";"default";"test_checkbox%isolation%";"<html>";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsOnCheckout"
+"catalogProductSimple::default";"term_enabled_text";"name%isolation%";"Disabled";"HTML";"default";"test_checkbox%isolation%";"TestMessage%isolation%";"Flat Rate";"Fixed";"checkmo";"assertTermsSuccessSaveMessage, assertTermsInGrid, assertTermsAbsentOnCheckout"
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestStep/DeleteAllTermsEntityStep.php b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestStep/DeleteAllTermsEntityStep.php
new file mode 100644
index 0000000000000000000000000000000000000000..91c7067f7709a1c104578b585fd95192a872b658
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestStep/DeleteAllTermsEntityStep.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\CheckoutAgreements\Test\TestStep;
+
+use Mtf\TestStep\TestStepInterface;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex;
+use Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementNew;
+
+/**
+ * Class DeleteAllTermsEntityStep
+ * Delete all terms on backend
+ */
+class DeleteAllTermsEntityStep implements TestStepInterface
+{
+    /**
+     * Checkout agreement index page
+     *
+     * @var CheckoutAgreementIndex
+     */
+    protected $agreementIndex;
+
+    /**
+     * Checkout agreement new and edit page
+     *
+     * @var CheckoutAgreementNew
+     */
+    protected $agreementNew;
+
+    /**
+     * @construct
+     * @param CheckoutAgreementNew $agreementNew
+     * @param CheckoutAgreementIndex $agreementIndex
+     */
+    public function __construct(
+        CheckoutAgreementNew $agreementNew,
+        CheckoutAgreementIndex $agreementIndex
+    ) {
+        $this->agreementNew = $agreementNew;
+        $this->agreementIndex = $agreementIndex;
+    }
+
+    /**
+     * Delete terms on backend
+     *
+     * @return void
+     */
+    public function run()
+    {
+        $this->agreementIndex->open();
+        while ($this->agreementIndex->getAgreementGridBlock()->isFirstRowVisible()) {
+            $this->agreementIndex->getAgreementGridBlock()->openFirstRow();
+            $this->agreementNew->getPageActionsBlock()->delete();
+        }
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/constraint.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0625ce00faf3ccbe129dc842a3f0253862690e9a
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/constraint.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<constraint>
+    <assertTermsSuccessSaveMessage module="Magento_CheckoutAgreements">
+        <severeness>low</severeness>
+    </assertTermsSuccessSaveMessage>
+    <assertTermsOnCheckout module="Magento_CheckoutAgreements">
+        <severeness>low</severeness>
+    </assertTermsOnCheckout>
+    <assertTermsAbsentOnCheckout module="Magento_CheckoutAgreements">
+        <severeness>low</severeness>
+    </assertTermsAbsentOnCheckout>
+    <assertTermsInGrid module="Magento_CheckoutAgreements">
+        <severeness>low</severeness>
+    </assertTermsInGrid>
+</constraint>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml
new file mode 100644
index 0000000000000000000000000000000000000000..bc21743fe9ad836b18fb065c588952d99df4fef6
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
+    <preference for="\Magento\CheckoutAgreements\Test\Handler\CheckoutAgreement\CheckoutAgreementInterface" type="\Magento\CheckoutAgreements\Test\Handler\CheckoutAgreement\Curl" />
+</config>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/fixture.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/fixture.xml
new file mode 100644
index 0000000000000000000000000000000000000000..15e9ccb4e72954d24b5672a9d097afe9a9179608
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/fixture.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<fixture>
+    <checkoutAgreement module="Magento_CheckoutAgreements">
+        <type>flat</type>
+        <entity_type>checkout_agreement</entity_type>
+        <collection>Magento\CheckoutAgreements\Model\Resource\Agreement\Collection</collection>
+    </checkoutAgreement>
+</fixture>
diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/page.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/page.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f8371f64da12931295c39a913053791144935004
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/page.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<page module="Magento_CheckoutAgreements">
+    <checkoutAgreementIndex>
+        <mca>checkout/agreement/index</mca>
+        <area>adminhtml</area>
+        <class>Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementIndex</class>
+    </checkoutAgreementIndex>
+    <checkoutAgreementNew>
+        <mca>checkout/agreement/new</mca>
+        <area>adminhtml</area>
+        <class>Magento\CheckoutAgreements\Test\Page\Adminhtml\CheckoutAgreementNew</class>
+    </checkoutAgreementNew>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php
new file mode 100644
index 0000000000000000000000000000000000000000..2fa86b083dea957ea44260e82f5a3a6b4b76e101
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.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.
+ *
+ * @spi
+ * @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\ConfigurableProduct\Test\Block\Adminhtml\Product\Composite;
+
+use Mtf\Fixture\FixtureInterface;
+
+/**
+ * Class Configure
+ * Adminhtml configurable product composite configure block
+ */
+class Configure extends \Magento\Catalog\Test\Block\Adminhtml\Product\Composite\Configure
+{
+    /**
+     * Fill options for the product
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function fillOptions(FixtureInterface $product)
+    {
+        $data = $this->prepareData($product->getData());
+        $this->_fill($data);
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param array $fields
+     * @return array
+     */
+    protected function prepareData(array $fields)
+    {
+        $productOptions = [];
+        $checkoutData = $fields['checkout_data']['options'];
+
+        if (!empty($checkoutData['configurable_options'])) {
+            $configurableAttributesData = $fields['configurable_attributes_data']['attributes_data'];
+            $attributeMapping = $this->dataMapping(['attribute' => '']);
+            $selector = $attributeMapping['attribute']['selector'];
+            foreach ($checkoutData['configurable_options'] as $key => $optionData) {
+                $attribute = $configurableAttributesData[$optionData['title']];
+                $attributeMapping['attribute']['selector'] = sprintf($selector, $attribute['label']);
+                $attributeMapping['attribute']['value'] = $attribute['options'][$optionData['value']]['label'];
+                $productOptions['attribute_' . $key] = $attributeMapping['attribute'];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0345a1417929c3427b8353b285e3ba7b95d3d439
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<mapping strict="0">
+    <fields>
+        <qty />
+        <attribute>
+            <selector>//div[@class="product-options"]//label[.="%s"]//following-sibling::*//select</selector>
+            <strategy>xpath</strategy>
+            <input>select</input>
+        </attribute>
+    </fields>
+</mapping>
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..21ad00b660e83bc29882040de504fd6c1ac3d692
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.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\ConfigurableProduct\Test\Constraint;
+
+use Mtf\Fixture\FixtureInterface;
+use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProductInjectable;
+use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid;
+
+/**
+ * Class AssertConfigurableProductInCustomerWishlistOnBackendGrid
+ * Assert that configurable product is present in grid on customer's wish list tab with configure option and qty
+ */
+class AssertConfigurableProductInCustomerWishlistOnBackendGrid extends AssertProductInCustomerWishlistOnBackendGrid
+{
+    /**
+     * Prepare options
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareOptions(FixtureInterface $product)
+    {
+        /** @var ConfigurableProductInjectable $product */
+        $productOptions = parent::prepareOptions($product);
+        $checkoutData = $product->getCheckoutData()['options'];
+        if (!empty($checkoutData['configurable_options'])) {
+            $configurableAttributesData = $product->getConfigurableAttributesData()['attributes_data'];
+            foreach ($checkoutData['configurable_options'] as $optionData) {
+                $attribute = $configurableAttributesData[$optionData['title']];
+                $productOptions[] = [
+                    'option_name' => $attribute['label'],
+                    'value' => $attribute['options'][$optionData['value']]['label']
+                ];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.xml
index ca37435b5abb4d4de6da621af3ef4e5c3973ac48..0e0e344f39348f9c16e33b810911cf149afa0330 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.xml
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable.xml
@@ -451,7 +451,7 @@
         <custom_options>
             <attribute_code>custom_options</attribute_code>
             <backend_type>virtual</backend_type>
-            <group>product_info_tabs_customer_options</group>
+            <group>customer-options</group>
             <is_required>0</is_required>
             <source>Magento\Catalog\Test\Fixture\CatalogProductSimple\CustomOptions</source>
         </custom_options>
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php
index 6ee26d3486c65b5dc91bd0554cc3e08c6d803c84..cf5789fef462c0481ee60ae6a7b431bc7aeb472d 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/CheckoutData.php
@@ -54,8 +54,8 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
                             'value' => 'option_key_1',
                         ]
                     ],
-                    'qty' => 3
                 ],
+                'qty' => 3,
                 'cartItem' => [
                     'price' => 172,
                     'qty' => 3,
@@ -114,6 +114,17 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
                     'price' => 101,
                 ]
             ],
+            'with_one_option' => [
+                'options' => [
+                    'configurable_options' => [
+                        [
+                            'title' => 'attribute_key_0',
+                            'value' => 'option_key_0',
+                        ],
+                    ],
+                ],
+                'qty' => 1,
+            ],
         ];
         return isset($presets[$name]) ? $presets[$name] : null;
     }
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php
index c38fe3940cacb5a18e05c857564766fb03492afd..ed17c18f973f10e03fe07c6961e175fe85d11fb6 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Fixture/ConfigurableProductInjectable/ConfigurableAttributesData.php
@@ -450,9 +450,81 @@ class ConfigurableAttributesData implements FixtureInterface
                 ],
             ]
         ],
+        'with_one_option' => [
+            'attributes_data' => [
+                'attribute_key_0' => [
+                    'options' => [
+                        'option_key_0' => [
+                            'pricing_value' => 1,
+                            'include' => 'Yes',
+                            'is_percent' => 'No'
+                        ],
+                        'option_key_1' => [
+                            'pricing_value' => 2,
+                            'include' => 'Yes',
+                            'is_percent' => 'No'
+                        ],
+                        'option_key_2' => [
+                            'pricing_value' => 3,
+                            'include' => 'Yes',
+                            'is_percent' => 'No'
+                        ]
+                    ]
+                ]
+            ],
+            'products' => [],
+            'attributes' => [
+                'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown',
+            ],
+            'matrix' => [
+                'attribute_key_0:option_key_0' => [
+                    'quantity_and_stock_status' => [
+                        'qty' => 10
+                    ],
+                    'weight' => 1
+                ],
+                'attribute_key_0:option_key_1' => [
+                    'quantity_and_stock_status' => [
+                        'qty' => 10
+                    ],
+                    'weight' => 1
+                ],
+                'attribute_key_0:option_key_2' => [
+                    'quantity_and_stock_status' => [
+                        'qty' => 10
+                    ],
+                    'weight' => 1
+                ],
+            ]
+        ],
+        'with_out_of_stock_item' => [
+            'attributes_data' => [
+                'attribute_key_0' => [
+                    'options' => [
+                        'option_key_0' => [
+                            'pricing_value' => 12.00,
+                            'include' => 'Yes',
+                            'is_percent' => 'No'
+                        ]
+                    ]
+                ]
+            ],
+            'products' => [],
+            'attributes' => [
+                'attribute_key_0' => 'catalogProductAttribute::attribute_type_dropdown_one_option'
+            ],
+            'matrix' => [
+                'attribute_key_0:option_key_0' => [
+                    'display' => 'Yes',
+                    'quantity_and_stock_status' => [
+                        'qty' => 0
+                    ],
+                    'weight' => 1
+                ]
+            ]
+        ],
     ];
 
-
     /**
      * Source constructor
      *
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..80eaaea6f96e5043e0d28933f3c52a8ed25f7cca
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml
@@ -0,0 +1,36 @@
+<?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 mca="customer/index/edit">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <configurable>
+                    <class>Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </configurable>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/OrderCreateIndex.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/OrderCreateIndex.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e5dd37663e301cd5ef0ec19cb403f61a218f2c19
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/OrderCreateIndex.xml
@@ -0,0 +1,36 @@
+<?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 mca="sales/order_create/index">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <configurable>
+                    <class>Magento\ConfigurableProduct\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </configurable>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php
index 958b4227b087a5b8d1dbdb2daeaa9fd808c7e732..ceda29abf333249ddd6018734aa2f253045a5b30 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Repository/ConfigurableProductInjectable.php
@@ -39,6 +39,7 @@ class ConfigurableProductInjectable extends AbstractRepository
      * @param array $defaultData [optional]
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
     public function __construct(array $defaultConfig = [], array $defaultData = [])
     {
@@ -131,5 +132,40 @@ class ConfigurableProductInjectable extends AbstractRepository
             'attribute_set_id' => ['dataSet' => 'default'],
             'checkout_data' => ['preset' => 'default']
         ];
+
+        $this->_data['with_one_option'] = [
+            'name' => 'Test configurable product %isolation%',
+            'sku' => 'sku_test_configurable_product_%isolation%',
+            'price' => ['value' => 10.00],
+            'weight' => 30.0000,
+            'status' => 'Product online',
+            'visibility' => 'Catalog, Search',
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'url_key' => 'configurable-product-%isolation%',
+            'configurable_attributes_data' => ['preset' => 'with_one_option'],
+            'quantity_and_stock_status' => [
+                'is_in_stock' => 'In Stock',
+            ],
+            'website_ids' => ['Main Website'],
+            'attribute_set_id' => ['dataSet' => 'default'],
+            'checkout_data' => ['preset' => 'with_one_option']
+        ];
+
+        $this->_data['with_out_of_stock_item'] = [
+            'name' => 'Test configurable product %isolation%',
+            'sku' => 'sku_test_configurable_product_%isolation%',
+            'price' => ['value' => 120.00],
+            'weight' => 30.0000,
+            'status' => 'Product online',
+            'visibility' => 'Catalog, Search',
+            'tax_class_id' => ['dataSet' => 'Taxable Goods'],
+            'url_key' => 'test-configurable-product-%isolation%',
+            'configurable_attributes_data' => ['preset' => 'with_out_of_stock_item'],
+            'quantity_and_stock_status' => [
+                'is_in_stock' => 'In Stock',
+            ],
+            'website_ids' => ['Main Website'],
+            'attribute_set_id' => ['dataSet' => 'default'],
+        ];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml
index 83557c27bcaa1e5bfb25cce1529bbbf57c0a6752..96743be520ff7d4bd7862b9137afc1fa7c230644 100644
--- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/constraint.xml
@@ -51,4 +51,7 @@
     <assertProductAttributeIsConfigurable module="Magento_ConfigurableProduct">
         <severeness>high</severeness>
     </assertProductAttributeIsConfigurable>
+    <assertConfigurableProductInCustomerWishlistOnBackendGrid module="Magento_ConfigurableProduct">
+        <severeness>low</severeness>
+    </assertConfigurableProductInCustomerWishlistOnBackendGrid>
 </constraint>
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php
index eae09259a1c8fe2d1b1f70a38e0142c4d630f377..23a9c6d24c4e961e9790c1b232e5049e37510811 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Handler/CustomerInjectable/Curl.php
@@ -58,8 +58,10 @@ class Curl extends AbstractCurl implements CustomerInjectableInterface
             'United States' => 'US'
         ],
         'region_id' => [
-            'California' => 12
-        ]
+            'California' => 12,
+            'New York' => 43,
+            'Texas' => 57,
+        ],
     ];
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerIndexEdit.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerIndexEdit.xml
index 903c8a5a4fcfba5a1ce32621ee9d788115664049..d2b022d3505ee5e6699c2dfb0ca7a98dd358242a 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerIndexEdit.xml
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Page/Adminhtml/CustomerIndexEdit.xml
@@ -45,5 +45,10 @@
             <locator>[id="page:main-container"]</locator>
             <strategy>css selector</strategy>
         </customerForm>
+        <configureProductBlock>
+            <class>Magento\Catalog\Test\Block\Adminhtml\Product\Composite\Configure</class>
+            <locator>//*[@role="dialog" and ./*[@id="product_composite_configure"] and contains(@style,"display: block")]</locator>
+            <strategy>xpath</strategy>
+        </configureProductBlock>
     </blocks>
 </page>
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php
index 025f97c03119aa4412b918587b0707f670c883ab..6a7fdebf86ce0d3b6ee535b924d71041935db18b 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/AddressInjectable.php
@@ -124,6 +124,37 @@ class AddressInjectable extends AbstractRepository
             'country_id' => 'United States',
             'telephone' => '555-55-555-55',
         ];
+
+        $this->_data['US_address_NY'] = [
+            'firstname' => 'John',
+            'lastname' => 'Doe',
+            'email' => 'John.Doe%isolation%@example.com',
+            'company' => 'Magento %isolation%',
+            'street' => '3222 Cliffside Drive',
+            'city' => 'Binghamton',
+            'region_id' => 'New York',
+            'postcode' => '13901',
+            'country_id' => 'United States',
+            'telephone' => '607-481-7802',
+            'default_billing' => 'Yes',
+            'default_shipping' => 'Yes'
+        ];
+
+        $this->_data['US_address_TX'] = [
+            'firstname' => 'John',
+            'lastname' => 'Doe',
+            'email' => 'John.Doe%isolation%@example.com',
+            'company' => 'Magento %isolation%',
+            'street' => '7700 W. Parmer Lane Bldg. D',
+            'city' => 'Austin',
+            'region_id' => 'Texas',
+            'postcode' => '78729 ',
+            'country_id' => 'United States',
+            'telephone' => '512-691-4400',
+            'default_billing' => 'Yes',
+            'default_shipping' => 'Yes'
+        ];
+
         $this->_data['customer_US'] = [
             'firstname' => 'John',
             'lastname' => 'Doe',
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php
index ba8c863d01e9a8cff407d4aa33a34ba25a6bb638..ecad86d3f0e3252526c8dc250fd82d5b89c16d50 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/Repository/CustomerInjectable.php
@@ -121,6 +121,17 @@ class CustomerInjectable extends AbstractRepository
             'email' => 'JohnDoe_%isolation%@example.com',
             'password' => '123123q',
             'password_confirmation' => '123123q',
+            'address' => ['presets' => 'US_address_NY']
+        ];
+
+        $this->_data['johndoe_unique_TX'] = [
+            'firstname' => 'John',
+            'lastname' => 'Doe%isolation%',
+            'group_id' => ['dataSet' => 'General'],
+            'email' => 'JohnDoe_%isolation%@example.com',
+            'password' => '123123q',
+            'password_confirmation' => '123123q',
+            'address' => ['presets' => 'US_address_TX']
         ];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php
index 1e23a248d8f30cd3c52c758f91e1550ea69d8e00..37a06d318efcc7077a315b28dc514a1f1645d92e 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestStep/LoginCustomerOnFrontendStep.php
@@ -91,6 +91,7 @@ class LoginCustomerOnFrontendStep implements TestStepInterface
     public function run()
     {
         $this->customerAccountLogout->open();
+        $this->cmsIndex->open();
         $this->cmsIndex->getLinksBlock()->openLink("Log In");
         $this->customerAccountLogin->getLoginBlock()->login($this->customer);
     }
diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/constraint.xml
index 7899c1d05139914bf2b52415278dca0616e89c1e..05e6f9547f04478f7ff8f71cb62b2e43a0ee2ab6 100644
--- a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/constraint.xml
@@ -123,26 +123,21 @@
     </assertCustomerDefaultAddresses>
     <assertCustomerMassDeleteSuccessMessage module="Magento_Customer">
         <severeness>low</severeness>
-        <require />
     </assertCustomerMassDeleteSuccessMessage>
     <assertCustomerMassDeleteNotInGrid module="Magento_Customer">
         <severeness>low</severeness>
-        <require />
     </assertCustomerMassDeleteNotInGrid>
     <assertCustomerMassDeleteInGrid module="Magento_Customer">
         <severeness>low</severeness>
-        <require />
     </assertCustomerMassDeleteInGrid>
     <assertMassActionSuccessUpdateMessage module="Magento_Customer">
         <severeness>low</severeness>
     </assertMassActionSuccessUpdateMessage>
     <assertAddressDeletedFrontend module="Magento_Customer">
         <severeness>low</severeness>
-        <require />
     </assertAddressDeletedFrontend>
     <assertAddressDeletedBackend module="Magento_Customer">
         <severeness>low</severeness>
-        <require />
     </assertAddressDeletedBackend>
     <assertCustomerPasswordChanged module="Magento_Customer">
         <severeness>low</severeness>
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php
new file mode 100644
index 0000000000000000000000000000000000000000..6735a01277f26714b63b0c2d8ae924dcd374184c
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.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.
+ *
+ * @spi
+ * @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\Test\Block\Adminhtml\Product\Composite;
+
+use Mtf\Fixture\FixtureInterface;
+
+/**
+ * Class Configure
+ * Adminhtml downloadable product composite configure block
+ */
+class Configure extends \Magento\Catalog\Test\Block\Adminhtml\Product\Composite\Configure
+{
+    /**
+     * Fill options for the product
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function fillOptions(FixtureInterface $product)
+    {
+        $data = $this->prepareData($product->getData());
+        $this->_fill($data);
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param array $fields
+     * @return array
+     */
+    protected function prepareData(array $fields)
+    {
+        $productOptions = [];
+        $checkoutData = $fields['checkout_data']['options'];
+        $productLinks = $fields['downloadable_links']['downloadable']['link'];
+
+        if (!empty($checkoutData['links'])) {
+            $linkMapping = $this->dataMapping(['link' => '']);
+            $selector = $linkMapping['link']['selector'];
+            foreach ($checkoutData['links'] as $key => $link) {
+                $link['label'] = $productLinks[str_replace('link_', '', $link['label'])]['title'];
+                $linkMapping['link']['selector'] = str_replace('%link_name%', $link['label'], $selector);
+                $linkMapping['link']['value'] = $link['value'];
+                $productOptions['link_' . $key] = $linkMapping['link'];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f1da967f0f0aa26b5a163ab9cc62358b1f2e895d
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" ?>
+<!--
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Academic Free License (AFL 3.0)
+ * that is bundled with this package in the file LICENSE_AFL.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/afl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
+ */
+-->
+<mapping strict="0">
+    <fields>
+        <qty />
+        <link>
+            <selector>//*[@id="downloadable-links-list"]/*[contains(.,"%link_name%")]//input</selector>
+            <strategy>xpath</strategy>
+            <input>checkbox</input>
+        </link>
+    </fields>
+</mapping>
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php
index b55efa62251842a30892b798c878856db4a2430f..0e8648a36687871c1e644d2c2576b06d4edf637b 100644
--- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Catalog/Product/View/Links.php
@@ -54,7 +54,7 @@ class Links extends Block
      *
      * @var string
      */
-    protected $choiceLink = './/*[contains(@class,"choice")]';
+    protected $choiceLink = './/*[contains(@class,"choice") and @data-role="link"]';
 
     /**
      * Checkbox selector item links
@@ -137,8 +137,8 @@ class Links extends Block
 
             $linkData = [
                 'links_purchased_separately' => $choiceLink->find($this->separatelyForChoice)->isVisible()
-                        ? 'Yes'
-                        : 'No',
+                    ? 'Yes'
+                    : 'No',
                 'title' => $link->isVisible() ? $link->getText() : null,
                 'sample' => $sample->isVisible() ? $sample->getText() : null,
                 'price' => $price->isVisible() ? $this->escapePrice($price->getText()) : null,
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..b9b43db00e06ab8fca2f4aa7e3095a2d9191abd3
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.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\Downloadable\Test\Constraint;
+
+use Mtf\Fixture\FixtureInterface;
+use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable;
+use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid;
+
+/**
+ * Class AssertDownloadableProductInCustomerWishlistOnBackendGrid
+ * Assert that downloadable product is present in grid on customer's wish list tab with configure option and qty
+ */
+class AssertDownloadableProductInCustomerWishlistOnBackendGrid extends AssertProductInCustomerWishlistOnBackendGrid
+{
+    /**
+     * Prepare options
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareOptions(FixtureInterface $product)
+    {
+        /** @var DownloadableProductInjectable $product */
+        $productOptions = parent::prepareOptions($product);
+        $checkoutData = $product->getCheckoutData()['options'];
+        if (!empty($checkoutData['links'])) {
+            $downloadableLinks = $product->getDownloadableLinks();
+            foreach ($checkoutData['links'] as $optionData) {
+                $linkKey = str_replace('link_', '', $optionData['label']);
+                $productOptions[] = [
+                    'option_name' => 'Links',
+                    'value' => $downloadableLinks['downloadable']['link'][$linkKey]['title']
+                ];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php
index bc9dc5a2a2c20cc018faeb1f877fc255c9215073..146a2c019fb8b5ef5d989bc71a78672fddab8c94 100644
--- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/Cart/Item.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Downloadable\Test\Fixture\Cart;
 
+use Mtf\Fixture\FixtureInterface;
 use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable;
 
 /**
@@ -35,5 +36,26 @@ use Magento\Downloadable\Test\Fixture\DownloadableProductInjectable;
  */
 class Item extends \Magento\Catalog\Test\Fixture\Cart\Item
 {
-    //
+    /**
+     * @constructor
+     * @param FixtureInterface $product
+     */
+    public function __construct(FixtureInterface $product)
+    {
+        parent::__construct($product);
+
+        /** @var DownloadableProductInjectable $product */
+        $checkoutDownloadableOptions = [];
+        $checkoutData = $product->getCheckoutData();
+        $downloadableOptions = $product->getDownloadableLinks();
+        foreach ($checkoutData['options']['links'] as $link) {
+            $keyLink = str_replace('link_', '', $link['label']);
+            $checkoutDownloadableOptions[] = [
+                'title' => 'Links',
+                'value' => $downloadableOptions['downloadable']['link'][$keyLink]['title']
+            ];
+        }
+
+        $this->data['options'] += $checkoutDownloadableOptions;
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php
index e67019c0a499c39a065df1a61ae4307ad773ce82..89be5bfa577ebb60edb653dfcd048976d36350e8 100644
--- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Fixture/DownloadableProductInjectable/CheckoutData.php
@@ -50,7 +50,6 @@ class CheckoutData extends \Magento\Catalog\Test\Fixture\CatalogProductSimple\Ch
                             'value' => 'Yes'
                         ]
                     ],
-                    'qty' => 2,
                 ],
                 'cartItem' => [
                     'price' => 23,
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/CustomerIndexEdit.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/CustomerIndexEdit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..03df667bcceedca086a6183eb991a3dec2d693e7
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/CustomerIndexEdit.xml
@@ -0,0 +1,36 @@
+<?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 mca="customer/index/edit">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <downloadable>
+                    <class>Magento\Downloadable\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </downloadable>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/OrderCreateIndex.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/OrderCreateIndex.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d55c5d7ec32d3c13f41b21d58f7eb5168c4946d4
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/OrderCreateIndex.xml
@@ -0,0 +1,36 @@
+<?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 mca="sales/order_create/index">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <downloadable>
+                    <class>Magento\Downloadable\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </downloadable>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml
index 2e24ac40083a775527f6c575c7a7b3a7ae0812ff..c403b1933a3ef7943149083ebaf9377a8c45c62f 100644
--- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/constraint.xml
@@ -41,4 +41,7 @@
             <product class="Mtf\Fixture\FixtureInterface" />
         </require>
     </assertDownloadableDuplicateForm>
+    <assertDownloadableProductInCustomerWishlistOnBackendGrid module="Magento_Downloadable">
+        <severeness>low</severeness>
+    </assertDownloadableProductInCustomerWishlistOnBackendGrid>
 </constraint>
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php
new file mode 100644
index 0000000000000000000000000000000000000000..78bf0deed7458915bd491075613b74a815866a73
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @spi
+ * @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\Test\Block\Adminhtml\Product\Composite;
+
+use Mtf\Fixture\FixtureInterface;
+
+/**
+ * Class Configure
+ * Adminhtml grouped product composite configure block
+ */
+class Configure extends \Magento\Catalog\Test\Block\Adminhtml\Product\Composite\Configure
+{
+    /**
+     * Fill options for the product
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function fillOptions(FixtureInterface $product)
+    {
+        $data = $this->prepareData($product->getData());
+        $this->_fill($data);
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param array $fields
+     * @return array
+     */
+    protected function prepareData(array $fields)
+    {
+        $productOptions = [];
+        $checkoutData = $fields['checkout_data']['options'];
+        if (count($checkoutData)) {
+            $qtyMapping = $this->dataMapping(['qty' => '']);
+            $selector = $qtyMapping['qty']['selector'];
+            $assignedProducts = $fields['associated']['assigned_products'];
+            foreach ($checkoutData as $key => $item) {
+                $productName = $assignedProducts[str_replace('product_key_', '', $item['name'])]['name'];
+                $qtyMapping['qty']['selector'] = str_replace('%product_name%', $productName, $selector);
+                $qtyMapping['qty']['value'] = $item['qty'];
+                $productOptions['product_' . $key] = $qtyMapping['qty'];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ef923db9687b51f37c6aae2e3b5529d251b38670
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.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)
+ */
+-->
+<mapping strict="0">
+    <fields>
+        <qty>
+            <selector>//tr[contains(.,"%product_name%")]//input[contains(@class,"qty")]</selector>
+            <strategy>xpath</strategy>
+        </qty>
+    </fields>
+</mapping>
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php
index 432ba599957cf5f3ccdd7eaa459a0cb3588a768f..9ab8111b1393acebadba099abb80ed9deae9f80f 100755
--- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Catalog/Product/View.php
@@ -113,6 +113,5 @@ class View extends ParentView
     public function fillOptions(FixtureInterface $product)
     {
         $this->getGroupedProductBlock()->fill($product);
-        parent::fillOptions($product);
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php
index 774c3fa7be8817e263d4fa9b7dc73080c443a705..7a4a3bae189d1a451bb7bd6af48a1120f6563c2b 100644
--- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Checkout/Cart/CartItem.php
@@ -114,9 +114,12 @@ class CartItem extends AbstractCartItem
     public function getOptions()
     {
         $result = [];
-        foreach ($this->config['associated_cart_items'] as $productSku => $cartItem) {
+        foreach ($this->config['associated_cart_items'] as $cartItem) {
             /** @var CheckoutCartItem $cartItem */
-            $result[$productSku] = $cartItem->getOptions();
+            $result[] = [
+                'title' => $cartItem->getProductName(),
+                'value' => $cartItem->getQty()
+            ];
         }
 
         return $result;
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..c74c6efb5ce7103096b10679ad97da21235b8717
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.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\GroupedProduct\Test\Constraint;
+
+use Mtf\Fixture\FixtureInterface;
+use Magento\GroupedProduct\Test\Fixture\GroupedProductInjectable;
+use Magento\Wishlist\Test\Constraint\AssertProductInCustomerWishlistOnBackendGrid;
+
+/**
+ * Class AssertGroupedProductInCustomerWishlistOnBackendGrid
+ * Assert that grouped product is present in grid on customer's wish list tab with configure option and qty
+ */
+class AssertGroupedProductInCustomerWishlistOnBackendGrid extends AssertProductInCustomerWishlistOnBackendGrid
+{
+    /**
+     * Prepare filter
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareFilter(FixtureInterface $product)
+    {
+        $options = $this->prepareOptions($product);
+
+        return ['product_name' => $product->getName(), 'qty_from' => 1, 'qty_to' => 1, 'options' => $options];
+    }
+
+    /**
+     * Prepare options
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareOptions(FixtureInterface $product)
+    {
+        /** @var GroupedProductInjectable $product */
+        $productOptions = [];
+        $checkoutData = $product->getCheckoutData()['options'];
+        if (count($checkoutData)) {
+            $associated = $product->getAssociated();
+            foreach ($checkoutData as $optionData) {
+                $productKey = str_replace('product_key_', '', $optionData['name']);
+                $productOptions[] = [
+                    'option_name' => $associated['assigned_products'][$productKey]['name'],
+                    'value' => $optionData['qty']
+                ];
+            }
+        }
+
+        return $productOptions;
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..5b940aef244af6c6c56ea703ed8c591968e3b868
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Sales\Test\Page\Adminhtml\OrderCreateIndex;
+use Magento\Sales\Test\Block\Adminhtml\Order\Create\Items;
+
+/**
+ * Class AssertGroupedProductInItemsOrderedGrid
+ * Assert grouped product was added to Items Ordered grid in customer account on Order creation page backend
+ */
+class AssertGroupedProductInItemsOrderedGrid extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Fields for assert
+     *
+     * @var array
+     */
+    protected $fields = ['name' => '', 'price' => '', 'checkout_data' => ['qty' => '']];
+
+    /**
+     * Check configured products
+     *
+     * @var bool
+     */
+    protected $productsIsConfigured;
+
+    /**
+     * Assert product was added to Items Ordered grid in customer account on Order creation page backend
+     *
+     * @param OrderCreateIndex $orderCreateIndex
+     * @param array $entityData
+     * @throws \Exception
+     * @return void
+     */
+    public function processAssert(OrderCreateIndex $orderCreateIndex, array $entityData)
+    {
+        if (!isset($entityData['products'])) {
+            throw new \Exception("No products");
+        }
+        $data = $this->prepareData($entityData, $orderCreateIndex->getCreateBlock()->getItemsBlock());
+
+        \PHPUnit_Framework_Assert::assertEquals(
+            $data['fixtureData'],
+            $data['pageData'],
+            'Grouped product data on order create page not equals to passed from fixture.'
+        );
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param array $data
+     * @param Items $itemsBlock
+     * @return array
+     */
+    protected function prepareData(array $data, Items $itemsBlock)
+    {
+        $fixtureData = [];
+        foreach ($data['products'] as $product) {
+            $products = $product->getAssociated()['products'];
+            foreach ($products as $key => $value) {
+                $fixtureData[$key]['name'] = $value->getName();
+                $fixtureData[$key]['price'] = $value->getPrice();
+            }
+            $options = $product->getCheckoutData()['options'];
+            foreach ($options as $key => $option) {
+                $fixtureData[$key]['checkout_data']['qty'] = $option['qty'];
+            }
+        }
+        $pageData = $itemsBlock->getProductsDataByFields($this->fields);
+
+        return ['fixtureData' => $fixtureData, 'pageData' => $pageData];
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Product is added to Items Ordered grid from "Last Ordered Items" section on Order creation page.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php
index 4451da993073a6d35a0d7419def5953b4ea93ed1..b24f799210dedaf55fd53a98b3fde13e524cdb0f 100644
--- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Fixture/Cart/Item.php
@@ -43,9 +43,9 @@ class Item extends \Magento\Catalog\Test\Fixture\Cart\Item
      */
     public function __construct(FixtureInterface $product)
     {
-        parent::__construct($product);
-
         /** @var GroupedProductInjectable $product */
+        $checkoutData = $product->getCheckoutData();
+        $this->data = isset($checkoutData['cartItem']) ? $checkoutData['cartItem'] : [];
         $associatedProducts = [];
         $cartItem = [];
 
@@ -64,10 +64,13 @@ class Item extends \Magento\Catalog\Test\Fixture\Cart\Item
 
         // Add empty "options" field
         foreach ($associatedProducts as $product) {
-            $cartItem['options'][$product->getSku()] = [];
+            $cartItem['options'][] = [
+                'title' => $product->getName(),
+                'value' => $cartItem['qty'][$product->getSku()]
+            ];
         }
 
-        $this->data = array_replace($this->data, $cartItem);
+        $this->data = $cartItem;
     }
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml
new file mode 100644
index 0000000000000000000000000000000000000000..12528296994498539c7fbf7d2afa2a05731c0ffc
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml
@@ -0,0 +1,36 @@
+<?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 mca="customer/index/edit">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <grouped>
+                    <class>Magento\GroupedProduct\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </grouped>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/OrderCreateIndex.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/OrderCreateIndex.xml
new file mode 100644
index 0000000000000000000000000000000000000000..bb08966dd3a9d256f92cc1f3fd05041fdb970217
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/OrderCreateIndex.xml
@@ -0,0 +1,36 @@
+<?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 mca="sales/order_create/index">
+    <blocks>
+        <configureProductBlock>
+            <renders>
+                <grouped>
+                    <class>Magento\GroupedProduct\Test\Block\Adminhtml\Product\Composite\Configure</class>
+                </grouped>
+            </renders>
+        </configureProductBlock>
+    </blocks>
+</page>
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/constraint.xml
index ee4fcf2cb0c6caacb2d5b491d332bf882a6bd683..4cb89ca95871a703fad1bea86d9918f355f169b0 100644
--- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/constraint.xml
@@ -39,4 +39,10 @@
     <assertGroupedPriceOnGroupedProductPage module="Magento_GroupedProduct">
         <severeness>low</severeness>
     </assertGroupedPriceOnGroupedProductPage>
+    <assertGroupedProductInCustomerWishlistOnBackendGrid module="Magento_GroupedProduct">
+        <severeness>low</severeness>
+    </assertGroupedProductInCustomerWishlistOnBackendGrid>
+    <assertGroupedProductInItemsOrderedGrid module="Magento_GroupedProduct">
+        <severeness>low</severeness>
+    </assertGroupedProductInItemsOrderedGrid>
 </constraint>
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php
index 51efabb92cec08e49e470229099b0c1811166049..c9b4dd9b7d9626f3cad42dbf07a1757c35ad932a 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AbstractAssertSalesReportResult.php
@@ -75,7 +75,7 @@ abstract class AbstractAssertSalesReportResult extends AbstractConstraint
         $invoice = $this->order->getPrice()[0]['grand_invoice_total'];
         $salesTotal = $this->order->getPrice()[0]['grand_order_total'];
         foreach ($this->order->getEntityId()['products'] as $product) {
-            $salesItems += $product->getCheckoutData()['options']['qty'];
+            $salesItems += $product->getCheckoutData()['qty'];
         }
         $expectedSalesData['orders'] += 1;
         $expectedSalesData['sales-items'] += $salesItems;
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php
index 4c7787a34211b371fb830a31b3bc6954dda8a109..7e9048023a4a5a7175e3e74ea142055687e5425f 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertAbandonedCartCustomerInfoResult.php
@@ -58,7 +58,7 @@ class AssertAbandonedCartCustomerInfoResult extends AbstractConstraint
         $abandonedCarts->open();
         $qty = 0;
         foreach ($products as $product) {
-            $qty += $product->getCheckoutData()['options']['qty'];
+            $qty += $product->getCheckoutData()['qty'];
         }
         $filter = [
             'customer_name' => $customer->getFirstname() . " " . $customer->getLastname(),
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php
index 1bda5bb5e91a9890aa3accb40d7b730db250fb76..4be59b9b37994d6332be13ae41e8316f9a0ca9e9 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertBestsellerReportResult.php
@@ -59,7 +59,7 @@ class AssertBestsellerReportResult extends AbstractConstraint
         $productQty = [];
         foreach ($products as $key => $product) {
             /** @var CatalogProductSimple $product*/
-            $productQty[$key] = $product->getCheckoutData()['options']['qty'];
+            $productQty[$key] = $product->getCheckoutData()['qty'];
         }
         \PHPUnit_Framework_Assert::assertEquals($productQty, $totalQuantity);
     }
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php
index e19cf575183a44e9f8f503e4cdb2ddb8c142191d..5fb436aa0abb769607ec060c7aa3dc648d6c43bb 100644
--- a/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Constraint/AssertOrderedProductResult.php
@@ -60,7 +60,7 @@ class AssertOrderedProductResult extends AbstractConstraint
         foreach ($totalQuantity as $key => $value) {
             /** @var CatalogProductSimple $product */
             $product = $products[$key];
-            $productQty[$key] = $product->getCheckoutData()['options']['qty'];
+            $productQty[$key] = $product->getCheckoutData()['qty'];
         }
         \PHPUnit_Framework_Assert::assertEquals($totalQuantity, $productQty);
     }
diff --git a/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/Bestsellers.xml b/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/Bestsellers.xml
new file mode 100644
index 0000000000000000000000000000000000000000..60c537110ec2ff97388e79277fec48b3297ea5e7
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/Bestsellers.xml
@@ -0,0 +1,49 @@
+<?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 mca="reports/report_sales/bestsellers" module="Magento_Reports">
+    <blocks>
+        <messagesBlock>
+            <class>Magento\Core\Test\Block\Messages</class>
+            <locator>#messages .messages</locator>
+            <strategy>css selector</strategy>
+        </messagesBlock>
+        <actionsBlock>
+            <class>Magento\Reports\Test\Block\Adminhtml\Product\Viewed\Action</class>
+            <locator>.page-main-actions</locator>
+            <strategy>css selector</strategy>
+        </actionsBlock>
+        <filterBlock>
+            <class>Magento\Reports\Test\Block\Adminhtml\Product\Viewed\Filter</class>
+            <locator>#filter_form</locator>
+            <strategy>css selector</strategy>
+        </filterBlock>
+        <gridBlock>
+            <class>Magento\Reports\Test\Block\Adminhtml\Product\Viewed\ProductGrid</class>
+            <locator>.grid</locator>
+            <strategy>css selector</strategy>
+        </gridBlock>
+    </blocks>
+</page>
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php
index 80f115c17cd953a17942746fd2a8385ee52276ac..5d795c7b26430e26215f98cfeb44645dd4be7dc5 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Block/Adminhtml/Rule/Grid.php
@@ -70,26 +70,6 @@ class Grid extends GridInterface
      */
     protected $firstRowSelector = '//tr[1]/td[@data-column="code"]';
 
-    /**
-     * Check whether first row is visible
-     *
-     * @return bool
-     */
-    public function isFirstRowVisible()
-    {
-        return $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->isVisible();
-    }
-
-    /**
-     * Open first item in grid
-     *
-     * @return void
-     */
-    public function openFirstRow()
-    {
-        $this->_rootElement->find($this->firstRowSelector, Locator::SELECTOR_XPATH)->click();
-    }
-
     /**
      * Check if specific row exists in grid
      *
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php
new file mode 100644
index 0000000000000000000000000000000000000000..a0433ba716091ffbbc613e054acf0591633a9790
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php
@@ -0,0 +1,216 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Tax\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Cms\Test\Page\CmsIndex;
+use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
+use Magento\Catalog\Test\Page\Product\CatalogProductView;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+
+/**
+ * Class AbstractAssertTaxWithCrossBorderApplying
+ * Abstract class for implementing assert cross border applying
+ */
+abstract class AbstractAssertTaxWithCrossBorderApplying extends AbstractConstraint
+{
+    /**
+     * Cms index page
+     *
+     * @var CmsIndex
+     */
+    protected $cmsIndex;
+
+    /**
+     * Catalog product page
+     *
+     * @var catalogCategoryView
+     */
+    protected $catalogCategoryView;
+
+    /**
+     * Catalog product page
+     *
+     * @var CatalogProductView
+     */
+    protected $catalogProductView;
+
+    /**
+     * Catalog product page
+     *
+     * @var CheckoutCart
+     */
+    protected $checkoutCart;
+
+    /**
+     * Implementation assert
+     *
+     * @param array $actualPrices
+     * @return void
+     */
+    abstract protected function assert($actualPrices);
+
+    /**
+     * 1. Login with each customer and get product price on category, product and cart pages
+     * 2. Implementation assert
+     *
+     * @param CatalogProductSimple $product
+     * @param CmsIndex $cmsIndex
+     * @param CatalogCategoryView $catalogCategoryView
+     * @param CatalogProductView $catalogProductView
+     * @param CheckoutCart $checkoutCart
+     * @param array $customers
+     * @return void
+     */
+    public function processAssert(
+        CatalogProductSimple $product,
+        CmsIndex $cmsIndex,
+        CatalogCategoryView $catalogCategoryView,
+        CatalogProductView $catalogProductView,
+        CheckoutCart $checkoutCart,
+        array $customers
+    ) {
+        $this->cmsIndex = $cmsIndex;
+        $this->catalogCategoryView = $catalogCategoryView;
+        $this->catalogProductView = $catalogProductView;
+        $this->checkoutCart = $checkoutCart;
+        $actualPrices = $this->getPricesForCustomers($product, $customers);
+        $this->assert($actualPrices);
+    }
+
+    /**
+     * Login with each provided customer and get product prices
+     *
+     * @param CatalogProductSimple $product
+     * @param array $customers
+     * @return array
+     */
+    protected function getPricesForCustomers(CatalogProductSimple $product, $customers)
+    {
+        $prices = [];
+        foreach ($customers as $customer) {
+            $this->loginCustomer($customer);
+            $productName = $product->getName();
+            $this->openCategory($product);
+            $actualPrices = [];
+            $actualPrices = $this->getCategoryPrice($productName, $actualPrices);
+            $this->catalogCategoryView->getListProductBlock()->openProductViewPage($productName);
+            $actualPrices = $this->addToCart($product, $actualPrices);
+            $actualPrices = $this->getCartPrice($product, $actualPrices);
+            $prices[] = $actualPrices;
+            $this->clearShoppingCart();
+        }
+        return $prices;
+    }
+
+    /**
+     * Open product category
+     *
+     * @param CatalogProductSimple $product
+     * @return void
+     */
+    protected function openCategory(CatalogProductSimple $product)
+    {
+        $this->cmsIndex->open();
+        $this->cmsIndex->getTopmenu()->selectCategoryByName($product->getCategoryIds()[0]);
+    }
+
+    /**
+     * Get prices on category page
+     *
+     * @param string $productName
+     * @param array $actualPrices
+     * @return array
+     */
+    protected function getCategoryPrice($productName, $actualPrices)
+    {
+        $actualPrices['category_price_incl_tax'] =
+            $this->catalogCategoryView
+                ->getListProductBlock()
+                ->getProductPriceBlock($productName)
+                ->getEffectivePrice();
+        return $actualPrices;
+    }
+
+    /**
+     * Fill options get price and add to cart
+     *
+     * @param CatalogProductSimple $product
+     * @param array $actualPrices
+     * @return array
+     */
+    protected function addToCart(CatalogProductSimple $product, $actualPrices)
+    {
+        $this->catalogProductView->getViewBlock()->fillOptions($product);
+        $actualPrices['product_page_price'] =
+            $this->catalogProductView->getViewBlock()->getPriceBlock()->getEffectivePrice();
+        $this->catalogProductView->getViewBlock()->clickAddToCart();
+        return $actualPrices;
+    }
+
+    /**
+     * Get cart prices
+     *
+     * @param CatalogProductSimple $product
+     * @param array $actualPrices
+     * @return array
+     */
+    protected function getCartPrice(CatalogProductSimple $product, $actualPrices)
+    {
+        $actualPrices['cart_item_price_incl_tax'] =
+            $this->checkoutCart->getCartBlock()->getCartItem($product)->getPriceInclTax();
+        $actualPrices['cart_item_subtotal_incl_tax'] =
+            $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceInclTax();
+        $actualPrices['grand_total'] =
+            $this->checkoutCart->getTotalsBlock()->getGrandTotal();
+        return $actualPrices;
+    }
+
+    /**
+     * Login customer
+     *
+     * @param $customer
+     * @return void
+     */
+    protected function loginCustomer($customer)
+    {
+        $this->objectManager->create(
+            '\Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep',
+            ['customer' => $customer]
+        )->run();
+    }
+
+    /**
+     * Clear shopping cart
+     *
+     * @return void
+     */
+    protected function clearShoppingCart()
+    {
+        $this->checkoutCart->open();
+        $this->checkoutCart->getCartBlock()->clearShoppingCart();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php
new file mode 100644
index 0000000000000000000000000000000000000000..f65ee32d299d739e4bbd14edb8a40f0ce599c452
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php
@@ -0,0 +1,238 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Tax\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Cms\Test\Page\CmsIndex;
+use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
+use Magento\Catalog\Test\Page\Product\CatalogProductView;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Magento\Customer\Test\Fixture\AddressInjectable;
+use Mtf\Fixture\FixtureFactory;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+
+/**
+ * Class AssertTaxRuleIsAppliedToAllPrice
+ * Checks that prices on category, product and cart pages are equal to specified in dataset
+ */
+class AssertTaxRuleIsAppliedToAllPrices extends AbstractConstraint
+{
+    /**
+     * Cms index page
+     *
+     * @var CmsIndex
+     */
+    protected $cmsIndex;
+
+    /**
+     * Catalog product page
+     *
+     * @var catalogCategoryView
+     */
+    protected $catalogCategoryView;
+
+    /**
+     * Catalog product page
+     *
+     * @var CatalogProductView
+     */
+    protected $catalogProductView;
+
+    /**
+     * Catalog product page
+     *
+     * @var CheckoutCart
+     */
+    protected $checkoutCart;
+
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'high';
+
+    /**
+     * Assert that specified prices are actual on category, product and cart pages
+     *
+     * @param CatalogProductSimple $product
+     * @param array $prices
+     * @param CmsIndex $cmsIndex
+     * @param CatalogCategoryView $catalogCategoryView
+     * @param CatalogProductView $catalogProductView
+     * @param CheckoutCart $checkoutCart
+     * @param FixtureFactory $fixtureFactory
+     * @return void
+     */
+    public function processAssert(
+        CatalogProductSimple $product,
+        array $prices,
+        CmsIndex $cmsIndex,
+        CatalogCategoryView $catalogCategoryView,
+        CatalogProductView $catalogProductView,
+        CheckoutCart $checkoutCart,
+        FixtureFactory $fixtureFactory
+    ) {
+        $this->cmsIndex = $cmsIndex;
+        $this->catalogCategoryView = $catalogCategoryView;
+        $this->catalogProductView = $catalogProductView;
+        $this->checkoutCart = $checkoutCart;
+        //Preconditions
+        $address = $fixtureFactory->createByCode('addressInjectable', ['dataSet' => 'US_address_NY']);
+        $shipping = ['carrier' => 'Flat Rate', 'method' => 'Fixed'];
+
+        //Assertion steps
+        $productName = $product->getName();
+        $this->openCategory($product);
+        $actualPrices = [];
+        $actualPrices = $this->getCategoryPrices($productName, $actualPrices);
+        $catalogCategoryView->getListProductBlock()->openProductViewPage($productName);
+        $actualPrices = $this->getProductPagePrices($actualPrices);
+        $catalogProductView->getViewBlock()->setQtyAndClickAddToCart(3);
+        $actualPrices = $this->getCartPrices($product, $actualPrices);
+        $this->fillEstimateBlock($address, $shipping);
+        $actualPrices = $this->getTotals($actualPrices);
+
+        //Prices verification
+        \PHPUnit_Framework_Assert::assertEquals($prices, $actualPrices, 'Arrays should be equal');
+    }
+
+    /**
+     * Open product category
+     *
+     * @param CatalogProductSimple $product
+     * @return void
+     */
+    public function openCategory(CatalogProductSimple $product)
+    {
+        $this->cmsIndex->open();
+        $this->cmsIndex->getTopmenu()->selectCategoryByName($product->getCategoryIds()[0]);
+    }
+
+    /**
+     * Get prices on category page
+     *
+     * @param $productName
+     * @param array $actualPrices
+     * @return array
+     */
+    public function getCategoryPrices($productName, $actualPrices)
+    {
+        $actualPrices['category_price_excl_tax'] =
+            $this->catalogCategoryView
+                ->getListProductBlock()
+                ->getProductPriceBlock($productName)
+                ->getPriceExcludingTax();
+        $actualPrices['category_price_incl_tax'] =
+            $this->catalogCategoryView
+                ->getListProductBlock()
+                ->getProductPriceBlock($productName)
+                ->getPriceIncludingTax();
+        return $actualPrices;
+    }
+
+    /**
+     * Get product view prices
+     *
+     * @param $actualPrices
+     * @return array
+     */
+    public function getProductPagePrices($actualPrices)
+    {
+        $actualPrices['product_view_price_excl_tax'] =
+            $this->catalogProductView
+                ->getViewBlock()
+                ->getProductPriceExcludingTax();
+        $actualPrices['product_view_price_incl_tax'] =
+            $this->catalogProductView
+                ->getViewBlock()
+                ->getProductPriceIncludingTax();
+        return $actualPrices;
+    }
+
+    /**
+     * Get cart prices
+     *
+     * @param CatalogProductSimple $product
+     * @param $actualPrices
+     * @return array
+     */
+    public function getCartPrices(CatalogProductSimple $product, $actualPrices)
+    {
+        $actualPrices['cart_item_price_excl_tax'] =
+            $this->checkoutCart->getCartBlock()->getCartItem($product)->getPrice();
+        $actualPrices['cart_item_price_incl_tax'] =
+            $this->checkoutCart->getCartBlock()->getCartItem($product)->getPriceInclTax();
+        $actualPrices['cart_item_subtotal_excl_tax'] =
+            $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPrice();
+        $actualPrices['cart_item_subtotal_incl_tax'] =
+            $this->checkoutCart->getCartBlock()->getCartItem($product)->getSubtotalPriceInclTax();
+        return $actualPrices;
+    }
+
+    /**
+     * Fill estimate block
+     *
+     * @param AddressInjectable $address
+     * @param array $shipping
+     * @return void
+     */
+    public function fillEstimateBlock(AddressInjectable $address, $shipping)
+    {
+        $this->checkoutCart->getShippingBlock()->fillEstimateShippingAndTax($address);
+        $this->checkoutCart->getShippingBlock()->selectShippingMethod($shipping);
+    }
+
+    /**
+     * Get totals
+     *
+     * @param $actualPrices
+     * @return array
+     */
+    public function getTotals($actualPrices)
+    {
+        $actualPrices['subtotal_excl_tax'] = $this->checkoutCart->getTotalsBlock()->getSubtotalExcludingTax();
+        $actualPrices['subtotal_incl_tax'] = $this->checkoutCart->getTotalsBlock()->getSubtotalIncludingTax();
+        $actualPrices['discount'] = $this->checkoutCart->getTotalsBlock()->getDiscount();
+        $actualPrices['shipping_excl_tax'] = $this->checkoutCart->getTotalsBlock()->getShippingPrice();
+        $actualPrices['shipping_incl_tax'] = $this->checkoutCart->getTotalsBlock()->getShippingPriceInclTax();
+        $actualPrices['tax'] = $this->checkoutCart->getTotalsBlock()->getTax();
+        $actualPrices['grand_total_excl_tax'] =
+            $this->checkoutCart->getTotalsBlock()->getGrandTotalExcludingTax();
+        $actualPrices['grand_total_incl_tax'] =
+            $this->checkoutCart->getTotalsBlock()->getGrandTotalIncludingTax();
+        return $actualPrices;
+    }
+
+    /**
+     * Text of Tax Rule is applied
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Prices on front is correct';
+    }
+}
diff --git a/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderApplied.php
similarity index 52%
rename from dev/tests/integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php
rename to dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderApplied.php
index f306379b4f75bfb25fe16ac0eea4a0d009f81fdf..16fbafb47d64e5c18941638b943980eea7ff7bed 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderApplied.php
@@ -21,38 +21,44 @@
  * @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;
 
-class DirectoryList extends \Magento\Framework\App\Filesystem\DirectoryList
+namespace Magento\Tax\Test\Constraint;
+
+/**
+ * Class AssertTaxWithCrossBorderApplied
+ * Checks that prices on category, product and cart pages are equal for both customers
+ */
+class AssertTaxWithCrossBorderApplied extends AbstractAssertTaxWithCrossBorderApplying
 {
     /**
-     * Check whether configured directory
+     * Constraint severeness
      *
-     * @param string $code
-     * @return bool
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @var string
      */
-    public function isConfigured($code)
-    {
-        return false;
-    }
+    protected $severeness = 'low';
 
     /**
-     * Add directory configuration
+     * Assert prices on category, product and cart pages are equal for both customers
      *
-     * @param string $code
-     * @param array $directoryConfig
+     * @param array $actualPrices
      * @return void
      */
-    public function addDirectory($code, array $directoryConfig)
+    public function assert($actualPrices)
     {
-        if (!isset($directoryConfig['path'])) {
-            $directoryConfig['path'] = null;
-        }
-        if (!$this->isAbsolute($directoryConfig['path'])) {
-            $directoryConfig['path'] = $this->makeAbsolute($directoryConfig['path']);
-        }
+        //Prices verification
+        \PHPUnit_Framework_Assert::assertEmpty(
+            array_diff($actualPrices[0], $actualPrices[1]),
+            'Prices for customers should be equal. Cross border is not applied.'
+        );
+    }
 
-        $this->directories[$code] = $directoryConfig;
+    /**
+     * Text of Cross Border is applied
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Cross border trading is applied on front.';
     }
 }
diff --git a/setup/module/Magento/Filesystem/src/Directory/ReadInterface.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderNotApplied.php
similarity index 52%
rename from setup/module/Magento/Filesystem/src/Directory/ReadInterface.php
rename to dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderNotApplied.php
index 9aad45fe513e80d5ef1a58bdc28013d7bb81f8bc..f0903da42bb52d09b3f4044e9b1eeba2bb459431 100644
--- a/setup/module/Magento/Filesystem/src/Directory/ReadInterface.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderNotApplied.php
@@ -21,49 +21,44 @@
  * @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\Directory;
 
-interface ReadInterface
-{
-    /**
-     * Get absolute path
-     *
-     * @param string $path [optional]
-     * @return string
-     */
-    public function getAbsolutePath($path = null);
-
-    /**
-     * Check a file or directory exists
-     *
-     * @param string $path [optional]
-     * @return bool
-     */
-    public function isExist($path = null);
+namespace Magento\Tax\Test\Constraint;
 
+/**
+ * Class AssertTaxWithCrossBorderNotApplied
+ * Checks that prices on category, product and cart pages are different for each customer
+ */
+class AssertTaxWithCrossBorderNotApplied extends AbstractAssertTaxWithCrossBorderApplying
+{
     /**
-     * Check permissions for reading file or directory
+     * Constraint severeness
      *
-     * @param string $path
-     * @return bool
+     * @var string
      */
-    public function isReadable($path = null);
+    protected $severeness = 'low';
 
     /**
-     * Check whether given path is directory
+     * Assert prices on category, product and cart pages are different for each customer
      *
-     * @param string $path
-     * @return bool
+     * @param array $actualPrices
+     * @return void
      */
-    public function isDirectory($path = null);
+    public function assert($actualPrices)
+    {
+        //Prices verification
+        \PHPUnit_Framework_Assert::assertNotEmpty(
+            array_diff($actualPrices[0], $actualPrices[1]),
+            'Prices for customers should be different.'
+        );
+    }
 
     /**
-     * Retrieve file contents from given path
+     * Text of Cross Border is applied
      *
-     * @param string $path
-     * @param string|null $flag
-     * @param resource|null $context
      * @return string
      */
-    public function readFile($path, $flag = null, $context = null);
+    public function toString()
+    {
+        return 'Cross border trading is not applied on front.';
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php
index 7590ec789725348a657db5c75efdf9bcdfb3e382..04e05f9ec12118314cedd4700868a4c3ec557351 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Handler/TaxRate/Curl.php
@@ -57,6 +57,7 @@ class Curl extends AbstractCurl implements TaxRateInterface
         '0' => '*',
         '12' => 'California',
         '43' => 'New York',
+        '57' => 'Texas',
     ];
 
     /**
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php
index c6dca29436eaaa756bce1c41ac0cb6550450bbd8..48561b2d97809b78294cc06cb57234d87e69d0ed 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRate.php
@@ -77,6 +77,22 @@ class TaxRate extends AbstractRepository
             'tax_region_id' => 'California',
         ];
 
+        $this->_data['us_ca_rate_8_25_no_zip'] = [
+            'code' => 'Tax Rate %isolation%',
+            'rate' => '8.25',
+            'tax_country_id' => 'United States',
+            'tax_postcode' => '*',
+            'tax_region_id' => 'California',
+        ];
+
+        $this->_data['us_ca_rate_8_375'] = [
+            'code' => 'Tax Rate %isolation%',
+            'rate' => '8.375',
+            'tax_country_id' => 'United States',
+            'tax_postcode' => '*',
+            'tax_region_id' => 'California',
+        ];
+
         $this->_data['us_ny_rate_8_375'] = [
             'code' => 'Tax Rate %isolation%',
             'rate' => '8.375',
@@ -85,6 +101,14 @@ class TaxRate extends AbstractRepository
             'tax_postcode' => '*',
         ];
 
+        $this->_data['us_ny_rate_8_25'] = [
+            'code' => 'Tax Rate %isolation%',
+            'rate' => '8.25',
+            'tax_country_id' => 'United States',
+            'tax_region_id' => 'New York',
+            'tax_postcode' => '*',
+        ];
+
         $this->_data['us_ny_rate_8_1'] = [
             'code' => 'US-NY-*-%isolation%',
             'rate' => '8.1',
@@ -140,5 +164,29 @@ class TaxRate extends AbstractRepository
             'tax_region_id' => 'Utah',
             'rate' => '20'
         ];
+
+        $this->_data['tx_rate_10'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_postcode' => '*',
+            'tax_country_id' => 'United States',
+            'tax_region_id' => 'Texas',
+            'rate' => '10'
+        ];
+
+        $this->_data['ny_rate_20'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_postcode' => '*',
+            'tax_country_id' => 'United States',
+            'tax_region_id' => 'New York',
+            'rate' => '20'
+        ];
+
+        $this->_data['ca_rate_30'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_postcode' => '*',
+            'tax_country_id' => 'United States',
+            'tax_region_id' => 'California',
+            'rate' => '30'
+        ];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php
index e006d07610ce1b34823183bcacfbaed6f6410957..9d365e24cb53989c65bce324ea7b2deccb1695f8 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/Repository/TaxRule.php
@@ -36,6 +36,7 @@ class TaxRule extends AbstractRepository
      * @param array $defaultData
      *
      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
      */
     public function __construct(array $defaultConfig = [], array $defaultData = [])
     {
@@ -130,5 +131,54 @@ class TaxRule extends AbstractRepository
             'priority' => '1',
             'position' => '1',
         ];
+
+        $this->_data['customer_equals_store_rate'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_rate' => [
+                'dataSet' => [
+                    0 => 'us_ca_rate_8_25_no_zip',
+                    1 => 'us_ny_rate_8_25',
+                ]
+            ],
+            'priority' => '0',
+            'position' => '0',
+        ];
+
+        $this->_data['customer_less_store_rate'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_rate' => [
+                'dataSet' => [
+                    0 => 'us_ca_rate_8_375',
+                    1 => 'us_ny_rate_8_25',
+                ]
+            ],
+            'priority' => '0',
+            'position' => '0',
+        ];
+
+        $this->_data['customer_greater_store_rate'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_rate' => [
+                'dataSet' => [
+                    0 => 'us_ca_rate_8_25_no_zip',
+                    1 => 'us_ny_rate_8_375',
+                ]
+            ],
+            'priority' => '0',
+            'position' => '0',
+        ];
+
+        $this->_data['cross_border_tax_rule'] = [
+            'code' => 'TaxIdentifier%isolation%',
+            'tax_rate' => [
+                'dataSet' => [
+                    0 => 'tx_rate_10',
+                    1 => 'ny_rate_20',
+                    2 => 'ca_rate_30',
+                ]
+            ],
+            'priority' => '0',
+            'position' => '0',
+        ];
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..4dc749e739eb06af20d1c30d57e53d2e0b8d1a11
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php
@@ -0,0 +1,244 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Tax\Test\TestCase;
+
+use Mtf\TestCase\Injectable;
+use Mtf\Fixture\FixtureFactory;
+use Magento\Cms\Test\Page\CmsIndex;
+use Magento\Customer\Test\Page\CustomerAccountLogin;
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\Core\Test\Fixture\ConfigData;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Magento\SalesRule\Test\Fixture\SalesRuleInjectable;
+use Magento\Tax\Test\Fixture\TaxRule;
+use Mtf\ObjectManager;
+
+/**
+ * Test TaxCalculationTest
+ *
+ * Test Flow:
+ * Steps:
+ * 1. Log in as default admin user.
+ * 2. Go to Stores > Taxes > Tax Rules.
+ * 3. Click 'Add New Tax Rule' button.
+ * 4. Assign default rates to rule.
+ * 5. Save Tax Rate.
+ * 6. Go to Products > Catalog.
+ * 7. Add new product.
+ * 8. Fill data according to dataset.
+ * 9. Save product.
+ * 10. Go to Stores > Configuration.
+ * 11. Fill Tax configuration according to data set.
+ * 12. Save tax configuration.
+ * 13. Perform all assertions.
+ *
+ * @group Tax_(CS)
+ * @ZephyrId MAGETWO-27809
+ */
+class TaxCalculationTest extends Injectable
+{
+    /**
+     * Catalog product page
+     *
+     * @var CheckoutCart
+     */
+    protected $checkoutCart;
+
+    /**
+     * Cms index page
+     *
+     * @var CmsIndex
+     */
+    protected $cmsIndex;
+
+    /**
+     * Customer login page
+     *
+     * @var CustomerAccountLogin
+     */
+    protected $customerAccountLogin;
+
+    /**
+     * Fixture factory
+     *
+     * @var FixtureFactory
+     */
+    protected $fixtureFactory;
+
+    /**
+     * Fixture customer
+     *
+     * @var CustomerInjectable
+     */
+    protected $customer;
+
+    /**
+     * Fixture SalesRule
+     *
+     * @var SalesRuleInjectable
+     */
+    protected $salesRule;
+
+    /**
+     * Sales Rule Id
+     *
+     * @var array
+     */
+    public static $salesRuleName;
+
+    /**
+     * Tax Rule Id
+     *
+     * @var array
+     */
+    public static $taxRuleCode;
+
+    /**
+     * Skip failed tests
+     *
+     * @return void
+     */
+    public static function setUpBeforeClass()
+    {
+        self::markTestIncomplete("MAGETWO-23964, MAGETWO-28454");
+    }
+
+    /**
+     * Prepare data
+     *
+     * @param FixtureFactory $fixtureFactory
+     * @param SalesRuleInjectable $salesRule
+     * @return void
+     */
+    public function __prepare(
+        FixtureFactory $fixtureFactory,
+        SalesRuleInjectable $salesRule
+    ) {
+        $this->fixtureFactory = $fixtureFactory;
+        $customer = $fixtureFactory->createByCode('customerInjectable', ['dataSet' => 'johndoe_unique']);
+        $customer->persist();
+        $this->customer = $customer;
+        $salesRule->persist();
+        $this->salesRule = $salesRule;
+        self::$salesRuleName = $salesRule->getName();
+    }
+
+    /**
+     * Injection data
+     *
+     * @param CmsIndex $cmsIndex
+     * @param CheckoutCart $checkoutCart
+     * @param CustomerAccountLogin $customerAccountLogin
+     * @return void
+     */
+    public function __inject(
+        CmsIndex $cmsIndex,
+        CheckoutCart $checkoutCart,
+        CustomerAccountLogin $customerAccountLogin
+    ) {
+        $this->cmsIndex = $cmsIndex;
+        $this->checkoutCart = $checkoutCart;
+        $this->customerAccountLogin = $customerAccountLogin;
+    }
+
+    /**
+     * Login customer
+     *
+     * @return void
+     */
+    protected function loginCustomer()
+    {
+        if (!$this->cmsIndex->getLinksBlock()->isLinkVisible('Log Out')) {
+            $this->cmsIndex->getLinksBlock()->openLink("Log In");
+            $this->customerAccountLogin->getLoginBlock()->login($this->customer);
+        }
+    }
+
+    /**
+     * Clear shopping cart
+     *
+     * @return void
+     */
+    protected function clearShoppingCart()
+    {
+        $this->checkoutCart->open();
+        $this->checkoutCart->getCartBlock()->clearShoppingCart();
+    }
+
+    /**
+     * Test product prices with tax
+     *
+     * @param CatalogProductSimple $product
+     * @param TaxRule $taxRule
+     * @param ConfigData $config
+     * @return array
+     */
+    public function test(CatalogProductSimple $product, TaxRule $taxRule, ConfigData $config)
+    {
+        //Preconditions
+        $config->persist();
+        $product->persist();
+        $taxRule->persist();
+        self::$taxRuleCode = $taxRule->getData()['code'];
+        //Steps
+        $this->cmsIndex->open();
+        $this->loginCustomer($this->customer);
+        $this->clearShoppingCart();
+    }
+
+    /**
+     * Tear down after each test
+     *
+     * @return void
+     */
+    public function tearDown()
+    {
+        $taxRuleIndex = ObjectManager::getInstance()->create('\Magento\Tax\Test\Page\Adminhtml\TaxRuleIndex');
+        $taxRuleIndex->open();
+        $taxRuleIndex->getTaxRuleGrid()->searchAndOpen(['code' => self::$taxRuleCode]);
+        $taxRuleNewPage = ObjectManager::getInstance()->create('Magento\Tax\Test\Page\Adminhtml\TaxRuleNew');
+        $taxRuleNewPage->getFormPageActions()->delete();
+    }
+
+    /**
+     * Tear down after tests
+     *
+     * @return void
+     */
+    public static function tearDownAfterClass()
+    {
+        $promoQuoteIndex = ObjectManager::getInstance()
+            ->create('Magento\SalesRule\Test\Page\Adminhtml\PromoQuoteIndex');
+        $promoQuoteIndex->open();
+        $promoQuoteIndex->getPromoQuoteGrid()->searchAndOpen(['name' => self::$salesRuleName]);
+        $promoQuoteEdit = ObjectManager::getInstance()
+            ->create('Magento\SalesRule\Test\Page\Adminhtml\PromoQuoteEdit');
+        $promoQuoteEdit->getFormPageActions()->delete();
+        $fixtureFactory = ObjectManager::getInstance()->create('Mtf\Fixture\FixtureFactory');
+        $config = $fixtureFactory->createByCode('configData', ['dataSet' => 'default_tax_configuration']);
+        $config->persist();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest/test.csv b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..3c6255166eea299aa3e82a61ba6b530dd2644181
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest/test.csv
@@ -0,0 +1,11 @@
+"config/dataSet";"product/dataSet";"taxRule/dataSet";"prices/category_price_excl_tax";"prices/category_price_incl_tax";"prices/product_view_price_excl_tax";"prices/product_view_price_incl_tax";"prices/cart_item_subtotal_excl_tax";"prices/cart_item_subtotal_incl_tax";"prices/cart_item_price_excl_tax";"prices/cart_item_price_incl_tax";"prices/subtotal_excl_tax";"prices/subtotal_incl_tax";"prices/discount";"prices/shipping_excl_tax";"prices/shipping_incl_tax";"prices/tax";"prices/grand_total_excl_tax";"prices/grand_total_incl_tax";"constraint"
+"row_cat_incl_ship_excl_after_disc_on_excl";"simple_with_tier_price_and_category";"customer_equals_store_rate";"277.14";"300.00";"277.14";"300.00";"41.57";"45.00";"13.86";"15.00";"41.57";"45.00";"20.79";"15.00";"16.24";"3.09";"37.36";"40.45";"assertTaxRuleIsAppliedToAllPrices"
+"row_cat_excl_ship_incl_before_disc_on_incl";"simple_with_group_price_and_category";"customer_greater_store_rate";"90.99";"98.61";"90.99";"98.61";"272.97";"295.83";"90.99";"98.61";"272.97";"295.83";"147.92";"13.86";"15.02";"24.02";"138.91";"162.93";"assertTaxRuleIsAppliedToAllPrices"
+"total_cat_excl_ship_incl_after_disc_on_excl";"simple_with_group_price_and_category";"customer_less_store_rate";"90.99";"98.50";"90.99";"98.50";"272.97";"295.49";"90.99";"98.50";"272.97";"295.49";"136.49";"13.84";"14.98";"12.40";"150.32";"162.72";"assertTaxRuleIsAppliedToAllPrices"
+"row_cat_incl_ship_excl_before_disc_on_incl";"product_with_special_price_and_category";"customer_less_store_rate";"83.05";"89.90";"83.05";"89.90";"249.15";"269.70";"83.05";"89.90";"249.15";"269.70";"134.85";"15.00";"16.24";"21.79";"129.30";"151.09";"assertTaxRuleIsAppliedToAllPrices"
+"unit_cat_incl_ship_incl_before_disc_on_incl";"simple_with_tier_price_and_category";"customer_less_store_rate";"276.81";"299.65";"276.81";"299.65";"41.52";"44.94";"13.84";"14.98";"41.52";"44.94";"22.47";"13.84";"14.98";"4.56";"32.89";"37.45";"assertTaxRuleIsAppliedToAllPrices"
+"total_cat_excl_ship_incl_before_disc_on_incl";"product_with_special_price_and_category";"customer_equals_store_rate";"90.00";"97.43";"90.00";"97.43";"270.00";"292.28";"90.00";"97.43";"270.00";"292.28";"146.15";"13.86";"15.00";"23.42";"137.71";"161.13";"assertTaxRuleIsAppliedToAllPrices"
+"unit_cat_excl_ship_excl_after_disc_on_excl";"simple_with_group_price_and_category";"customer_equals_store_rate";"90.99";"98.50";"90.99";"98.50";"272.97";"295.50";"90.99";"98.50";"272.97";"295.50";"136.49";"15.00";"16.24";"12.49";"151.48";"163.97";"assertTaxRuleIsAppliedToAllPrices"
+"total_cat_incl_ship_excl_before_disc_on_excl";"simple_with_group_price_and_category";"customer_greater_store_rate";"84.06";"91.10";"84.06";"91.10";"252.18";"273.30";"84.06";"91.10";"252.18";"273.30";"126.09";"15.00";"16.26";"22.38";"141.09";"163.47";"assertTaxRuleIsAppliedToAllPrices"
+"total_cat_excl_ship_incl_after_disc_on_incl";"simple_with_tier_price_and_category";"customer_greater_store_rate";"300.00";"325.13";"300.00";"325.13";"45.00";"48.77";"15.00";"16.26";"45.00";"48.77";"24.39";"13.86";"15.02";"2.89";"34.47";"37.36";"assertTaxRuleIsAppliedToAllPrices"
+"unit_cat_excl_ship_incl_after_disc_on_excl";"product_with_special_price_and_category";"customer_greater_store_rate";"90.00";"97.54";"90.00";"97.54";"270.00";"292.62";"90.00";"97.54";"270.00";"292.62";"135.00";"13.86";"15.02";"12.47";"148.86";"161.33";"assertTaxRuleIsAppliedToAllPrices"
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..5a10f2a8f89598fca479c24765ecdfbd5242e4b6
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php
@@ -0,0 +1,229 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Tax\Test\TestCase;
+
+use Mtf\TestCase\Injectable;
+use Mtf\Fixture\FixtureFactory;
+use Magento\SalesRule\Test\Fixture\SalesRuleInjectable;
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Magento\CatalogRule\Test\Fixture\CatalogRule;
+use Mtf\ObjectManager;
+use Magento\Core\Test\Fixture\ConfigData;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\SalesRule\Test\Page\Adminhtml\PromoQuoteIndex;
+use Magento\SalesRule\Test\Page\Adminhtml\PromoQuoteEdit;
+use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleIndex;
+use Magento\CatalogRule\Test\Page\Adminhtml\CatalogRuleNew;
+
+/**
+ * Test TaxWithCrossBorderTest
+ *
+ * Test Flow:
+ * Steps:
+ * 1. Log in as default admin user.
+ * 2. Go to Stores > Taxes > Tax Rules.
+ * 3. Click 'Add New Tax Rule' button.
+ * 4. Assign 3 different rates for different addresses
+ * 5. Save Tax Rate.
+ * 6. Go to Products > Catalog.
+ * 7. Add new product.
+ * 8. Fill data according to dataset.
+ * 9. Save product.
+ * 10. Go to Stores > Configuration.
+ * 11. Fill Tax configuration according to data set.
+ * 12. Save tax configuration.
+ * 13. Register two customers on front end that will match two different rates
+ * 14. Login with each customer and verify prices
+ *
+ * @group Tax_(CS)
+ * @ZephyrId MAGETWO-29052
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class TaxWithCrossBorderTest extends Injectable
+{
+    /**
+     * Fixture SalesRule
+     *
+     * @var SalesRuleInjectable
+     */
+    protected $salesRule;
+
+    /**
+     * Fixture SalesRule
+     *
+     * @var CatalogRule
+     */
+    protected $catalogRule;
+
+    /**
+     * Fixture factory
+     *
+     * @var FixtureFactory
+     */
+    protected $fixtureFactory;
+
+    /**
+     * PromoQuoteIndex
+     *
+     * @var PromoQuoteIndex
+     */
+    protected $promoQuoteIndex;
+
+    /**
+     * PromoQuoteEdit
+     *
+     * @var PromoQuoteEdit
+     */
+    protected $promoQuoteEdit;
+
+    /**
+     * CatalogRuleIndex
+     *
+     * @var CatalogRuleIndex
+     */
+    protected $catalogRuleIndex;
+
+    /**
+     * CatalogRuleNew
+     *
+     * @var CatalogRuleNew
+     */
+    protected $catalogRuleNew;
+
+    /**
+     * Prepare data
+     *
+     * @param FixtureFactory $fixtureFactory
+     * @return array
+     */
+    public function __prepare(FixtureFactory $fixtureFactory)
+    {
+        $this->fixtureFactory = $fixtureFactory;
+        $taxRule = $fixtureFactory->createByCode('taxRule', ['dataSet' => 'cross_border_tax_rule']);
+        $taxRule->persist();
+        return ['customers' => $this->createCustomers()];
+    }
+
+    /**
+     * Injection data
+     *
+     * @param PromoQuoteIndex $promoQuoteIndex
+     * @param PromoQuoteEdit $promoQuoteEdit
+     * @param CatalogRuleIndex $catalogRuleIndex
+     * @param CatalogRuleNew $catalogRuleNew
+     * @return void
+     */
+    public function __inject(
+        PromoQuoteIndex $promoQuoteIndex,
+        PromoQuoteEdit $promoQuoteEdit,
+        CatalogRuleIndex $catalogRuleIndex,
+        CatalogRuleNew $catalogRuleNew
+    ) {
+        $this->promoQuoteIndex = $promoQuoteIndex;
+        $this->promoQuoteEdit = $promoQuoteEdit;
+        $this->catalogRuleIndex = $catalogRuleIndex;
+        $this->catalogRuleNew = $catalogRuleNew;
+    }
+
+    /**
+     * Create customers
+     *
+     * @return array $customers
+     */
+    protected function createCustomers()
+    {
+        $customersData = ['johndoe_unique_TX', 'johndoe_unique'];
+        $customers = [];
+        foreach ($customersData as $customerData) {
+            $customer = $this->fixtureFactory->createByCode('customerInjectable', ['dataSet' => $customerData]);
+            $customer->persist();
+            $customers[] = $customer;
+        }
+        return $customers;
+    }
+
+    /**
+     * Test product prices with tax
+     *
+     * @param CatalogProductSimple $product
+     * @param ConfigData $config
+     * @param SalesRuleInjectable $salesRule
+     * @param CatalogRule $catalogRule
+     * @return void
+     */
+    public function test(
+        CatalogProductSimple $product,
+        ConfigData $config,
+        SalesRuleInjectable $salesRule,
+        CatalogRule $catalogRule
+    ) {
+        //Preconditions
+        if ($this->currentVariation['arguments']['salesRule']['dataSet'] !== "-") {
+            $salesRule->persist();
+            $this->salesRule = $salesRule;
+        }
+        if ($this->currentVariation['arguments']['catalogRule']['dataSet'] !== "-") {
+            $catalogRule->persist();
+            $this->catalogRule = $catalogRule;
+        }
+        $config->persist();
+        $product->persist();
+    }
+
+    /**
+     * Tear down after test
+     *
+     * @return void
+     */
+    public function tearDown()
+    {
+        if (isset($this->salesRule)) {
+            $this->promoQuoteIndex->open();
+            $this->promoQuoteIndex->getPromoQuoteGrid()->searchAndOpen(['name' => $this->salesRule->getName()]);
+            $this->promoQuoteEdit->getFormPageActions()->delete();
+            $this->salesRule = null;
+        }
+        if (isset($this->catalogRule)) {
+            $this->catalogRuleIndex->open();
+            $this->catalogRuleIndex->getCatalogRuleGrid()->searchAndOpen(['name' => $this->catalogRule->getName()]);
+            $this->catalogRuleNew->getFormPageActions()->delete();
+            $this->catalogRule = null;
+        }
+    }
+
+    /**
+     * Tear down after tests
+     *
+     * @return void
+     */
+    public static function tearDownAfterClass()
+    {
+        ObjectManager::getInstance()->create('\Magento\Tax\Test\TestStep\DeleteAllTaxRulesStep')->run();
+        ObjectManager::getInstance()->create(
+            'Magento\Core\Test\TestStep\SetupConfigurationStep',
+            ['configData' => 'default_tax_configuration']
+        )->run();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest/test.csv b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..225adeebd03d0481f527475c32239c6603b685d6
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest/test.csv
@@ -0,0 +1,6 @@
+"product/dataSet";"catalogRule/dataSet";"salesRule/dataSet";"config/dataSet";"constraint"
+"with_one_custom_option_and_category";"-";"-";"cross_border_enabled_price_incl_tax";"assertTaxWithCrossBorderApplied"
+"product_with_category";"-";"cart_rule";"cross_border_enabled_price_incl_tax";"assertTaxWithCrossBorderApplied"
+"product_with_category";"catalog_price_rule_priority_0";"-";"cross_border_enabled_price_incl_tax";"assertTaxWithCrossBorderApplied"
+"product_with_special_price_and_category";"-";"-";"cross_border_enabled_price_incl_tax";"assertTaxWithCrossBorderApplied"
+"product_with_category";"-";"-";"cross_border_enabled_price_excl_tax";"assertTaxWithCrossBorderNotApplied"
diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml
index 38f3260709d305403df7f447c54b0f32d8a3d954..11fe79bd092c6631b29c556704984b7e03270368 100644
--- a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/constraint.xml
@@ -68,20 +68,25 @@
     </assertTaxRateForm>
     <assertTaxRateIsInCorrectRange module="Magento_Tax">
         <severeness>low</severeness>
-        <require/>
     </assertTaxRateIsInCorrectRange>
     <assertTaxRateInTaxRule module="Magento_Tax">
         <severeness>low</severeness>
-        <require/>
     </assertTaxRateInTaxRule>
     <assertTaxRuleIsApplied module="Magento_Tax">
         <severeness>high</severeness>
-        <require />
     </assertTaxRuleIsApplied>
+    <assertTaxRuleIsAppliedToAllPrices module="Magento_Tax">
+        <severeness>high</severeness>
+    </assertTaxRuleIsAppliedToAllPrices>
+    <assertTaxWithCrossBorderApplied module="Magento_Tax">
+        <severeness>high</severeness>
+    </assertTaxWithCrossBorderApplied>
     <assertTaxRuleIsNotApplied module="Magento_Tax">
         <severeness>high</severeness>
-        <require />
     </assertTaxRuleIsNotApplied>
+    <assertTaxWithCrossBorderNotApplied module="Magento_Tax">
+        <severeness>high</severeness>
+    </assertTaxWithCrossBorderNotApplied>
     <assertTaxRuleSuccessDeleteMessage module="Magento_Tax">
         <severeness>high</severeness>
         <require>
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Grid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Grid.php
index 6e2ec59b8a90eeaee8a2971d49384632b303893e..5cb43421f2644e37466cf9be10ed88816ed9afca 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Grid.php
@@ -41,9 +41,6 @@ class Grid extends ParentGrid
         'request_path' => [
             'selector' => '#urlrewriteGrid_filter_request_path'
         ],
-        'id_path' => [
-            'selector' => '#urlrewriteGrid_filter_id_path'
-        ],
         'target_path' => [
             'selector' => 'input[name="target_path"]'
         ]
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php
index 6bfad738887dc462e4dde48daa356e950d7de285..01c4af142b0d3c23108aef3b64f40cc50e701b11 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Category/Tree.php
@@ -26,6 +26,7 @@ namespace Magento\UrlRewrite\Test\Block\Adminhtml\Catalog\Category;
 
 use Mtf\Block\Block;
 use Mtf\Client\Element\Locator;
+use Magento\Catalog\Test\Fixture\CatalogCategory;
 
 /**
  * Class Tree
@@ -38,17 +39,23 @@ class Tree extends Block
      *
      * @var string
      */
-    protected $skipCategoryButton = '[data-ui-id="urlrewrite-catalog-product-edit-skip-categories"]';
+    protected $skipCategoryButton = '[data-ui-id="catalog-product-edit-skip-categories"]';
 
     /**
      * Select category by its name
      *
-     * @param string $categoryName
+     * @param string|CatalogCategory $category
      * @return void
      */
-    public function selectCategory($categoryName)
+    public function selectCategory($category)
     {
-        $this->_rootElement->find("//a[contains(text(),'{$categoryName}')]", Locator::SELECTOR_XPATH)->click();
+        //TODO Remove this line after old fixture was deleted
+        $categoryName = $category instanceof CatalogCategory ? $category->getName() : $category;
+        if ($categoryName) {
+            $this->_rootElement->find("//a[contains(text(),'{$categoryName}')]", Locator::SELECTOR_XPATH)->click();
+        } else {
+            $this->skipCategorySelection();
+        }
     }
 
     /**
@@ -56,7 +63,7 @@ class Tree extends Block
      *
      * @return void
      */
-    public function skipCategorySelection()
+    protected function skipCategorySelection()
     {
         $this->_rootElement->find($this->skipCategoryButton, Locator::SELECTOR_CSS)->click();
     }
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php
index cec8de81e554e8a96840e4f4a98d8968c9ae55ad..99f8eaf8936631c0ffa74516c776ffdf20166206 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php
@@ -48,16 +48,16 @@ class UrlRewriteForm extends Form
         array $replace = []
     ) {
         $data = $fixture->getData();
-        if (empty($this->getData()['target_path']) && !isset($data['target_path'])) {
-            $entity = $fixture->getDataFieldConfig('id_path')['source']->getEntity();
+        if (empty($data['entity_type']) && empty($this->getData()['target_path']) && !isset($data['target_path'])) {
+            $entity = $fixture->getDataFieldConfig('target_path')['source']->getEntity();
             $data['target_path'] = $entity->hasData('identifier')
                 ? $entity->getIdentifier()
                 : $entity->getUrlKey() . '.html';
         }
 
-        foreach ($replace as $key => $pairs) {
+        foreach ($replace as $key => $value) {
             if (isset($data[$key])) {
-                $data[$key] = str_replace(array_keys($pairs), $pairs, $data[$key]);
+                $data[$key] = preg_replace('`(\$.*?' . $value['name'] . '\$)`', $value['value'], $data[$key]);
             }
         }
 
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.xml
index 68067a0b9ad3da7c9789117ee8605ae229b904ab..aa65f8c30a195903b7d3be80b7120a7f7b0bba3e 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.xml
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.xml
@@ -25,6 +25,10 @@
 -->
 <mapping strict="0">
     <fields>
+        <entity_type>
+            <selector>#entity-type-selector</selector>
+            <input>select</input>
+        </entity_type>
         <store_id>
             <selector>[name=store_id]</selector>
             <input>selectstore</input>
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..1643c2f6b74d6ea1e285f99b257b3c31814ad973
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\UrlRewrite\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Catalog\Test\Fixture\CatalogCategory;
+use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex;
+
+/**
+ * Class AssertUrlRewriteCategoryNotInGrid
+ * Assert that url rewrite category is absent in grid
+ */
+class AssertUrlRewriteCategoryNotInGrid extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that category url rewrite not in grid
+     *
+     * @param UrlRewriteIndex $urlRewriteIndex
+     * @param CatalogCategory $category
+     * @return void
+     */
+    public function processAssert(UrlRewriteIndex $urlRewriteIndex, CatalogCategory $category)
+    {
+        $urlRewriteIndex->open();
+        $filter = ['request_path' => $category->getUrlKey()];
+        \PHPUnit_Framework_Assert::assertFalse(
+            $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter),
+            "URL Rewrite with request path '{$category->getUrlKey()}' is present in grid."
+        );
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'URL Rewrite is absent in grid.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php
index 7a1dd11246de1546ee0867a515d16b2a102ee56d..80b8800790830c6ccaeffc971e9fe6a7306a3c5e 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomRedirect.php
@@ -53,7 +53,7 @@ class AssertUrlRewriteCustomRedirect extends AbstractConstraint
     public function processAssert(UrlRewrite $urlRewrite, Browser $browser, CmsIndex $cmsIndex)
     {
         $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath());
-        $entity = $urlRewrite->getDataFieldConfig('id_path')['source']->getEntity();
+        $entity = $urlRewrite->getDataFieldConfig('target_path')['source']->getEntity();
         $title = $entity->hasData('name') ? $entity->getName() : $entity->getTitle();
         $pageTitle = $cmsIndex->getTitleBlock()->getTitle();
         \PHPUnit_Framework_Assert::assertEquals(
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php
index 2944bfa47c76854f8bfe9faa0436f0de93f7ef26..01a95fa1da6a9349235e53f8fec83d6f2a35c020 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCustomSearchRedirect.php
@@ -61,7 +61,7 @@ class AssertUrlRewriteCustomSearchRedirect extends AbstractConstraint
             ? $urlRewrite->getRequestPath()
             : $initialRewrite->getRequestPath();
         $browser->open($_ENV['app_frontend_url'] . $urlRequestPath);
-        $entity = $initialRewrite->getDataFieldConfig('id_path')['source']->getEntity()->getName();
+        $entity = $urlRewrite->getDataFieldConfig('target_path')['source']->getEntity()->getName();
 
         \PHPUnit_Framework_Assert::assertTrue(
             $categoryView->getListProductBlock()->isProductVisible($entity),
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php
index 1b0e0ab5543d56d5aaa5511975048d0ddb6cd23e..9ebdfeeb7fe67ede345f004a2478aa47fd975db7 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteProductRedirect.php
@@ -60,7 +60,7 @@ class AssertUrlRewriteProductRedirect extends AbstractConstraint
     ) {
         $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath());
         if ($product === null) {
-            $product = $urlRewrite->getDataFieldConfig('id_path')['source']->getEntity();
+            $product = $urlRewrite->getDataFieldConfig('target_path')['source']->getEntity();
         }
         \PHPUnit_Framework_Assert::assertEquals(
             $catalogProductView->getTitleBlock()->getTitle(),
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..f69a323e7e81c09a621b795372732e607f667d24
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\UrlRewrite\Test\Constraint;
+
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Catalog\Test\Fixture\CatalogProductSimple;
+use Magento\UrlRewrite\Test\Page\Adminhtml\UrlRewriteIndex;
+
+/**
+ * Class AssertUrlRewriteUpdatedProductInGrid
+ * Assert that product url in url rewrite grid..
+ */
+class AssertUrlRewriteUpdatedProductInGrid extends AbstractConstraint
+{
+    /**
+     * Constraint severeness.
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that product url in url rewrite grid.
+     *
+     * @param CatalogProductSimple $product
+     * @param CatalogProductSimple $initialProduct
+     * @param UrlRewriteIndex $urlRewriteIndex
+     * @return void
+     */
+    public function processAssert(
+        CatalogProductSimple $product,
+        CatalogProductSimple $initialProduct,
+        UrlRewriteIndex $urlRewriteIndex
+    ) {
+        $urlRewriteIndex->open();
+        $category = $product->getDataFieldConfig('category_ids')['source']->getCategories()[0];
+        $targetPath = "catalog/product/view/id/{$initialProduct->getId()}/category/{$category->getId()}";
+        $url = strtolower($product->getCategoryIds()[0] . '/' . $product->getUrlKey());
+        $filter = [
+            'request_path' => $url,
+            'target_path' => $targetPath,
+        ];
+        \PHPUnit_Framework_Assert::assertTrue(
+            $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible($filter, true, false),
+            "URL Rewrite with request path '$url' is absent in grid."
+        );
+
+        $categoryInitial = $initialProduct->getDataFieldConfig('category_ids')['source']->getCategories()[0];
+        $targetPath = "catalog/product/view/id/{$initialProduct->getId()}/category/{$categoryInitial->getId()}";
+
+        \PHPUnit_Framework_Assert::assertFalse(
+            $urlRewriteIndex->getUrlRedirectGrid()->isRowVisible(['target_path' => $targetPath], true, false),
+            "URL Rewrite with target path '$targetPath' is present in grid."
+        );
+    }
+
+    /**
+     * Returns a string representation of the object.
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'URL Rewrite for product was changed after assign category.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php
index dfa48c422a77fcfa7acdf10bf10108107401a187..693e65973a0d39b47557494ddc8fd6408a074f9c 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.php
@@ -51,12 +51,6 @@ class UrlRewrite extends InjectableFixture
         'backend_type' => 'virtual',
     ];
 
-    protected $id_path = [
-        'attribute_code' => 'id_path',
-        'backend_type' => 'virtual',
-        'source' => 'Magento\UrlRewrite\Test\Fixture\UrlRewrite\IdPath',
-    ];
-
     protected $store_id = [
         'attribute_code' => 'store_id',
         'backend_type' => 'varchar',
@@ -81,12 +75,21 @@ class UrlRewrite extends InjectableFixture
         'input' => 'text',
     ];
 
+    protected $entity_type = [
+        'attribute_code' => 'entity_type',
+        'backend_type' => 'varchar',
+        'is_required' => '0',
+        'default_value' => '',
+        'input' => 'text',
+    ];
+
     protected $target_path = [
         'attribute_code' => 'target_path',
         'backend_type' => 'varchar',
         'is_required' => '1',
         'default_value' => 'target_path%isolation%',
         'input' => 'text',
+        'source' => 'Magento\UrlRewrite\Test\Fixture\UrlRewrite\TargetPath',
     ];
 
     protected $description = [
@@ -101,11 +104,6 @@ class UrlRewrite extends InjectableFixture
         return $this->getData('id');
     }
 
-    public function getIdPath()
-    {
-        return $this->getData('id_path');
-    }
-
     public function getStoreId()
     {
         return $this->getData('store_id');
@@ -121,6 +119,11 @@ class UrlRewrite extends InjectableFixture
         return $this->getData('request_path');
     }
 
+    public function getEntityType()
+    {
+        return $this->getData('entity_type');
+    }
+
     public function getTargetPath()
     {
         return $this->getData('target_path');
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml
index 1f91f13f2d69ee3175f67d439d0752440d990d66..de5d92962d4776526d2c5e00165e518ca1615930 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite.xml
@@ -51,11 +51,18 @@
             <default_value>request_path%isolation%</default_value>
             <input>text</input>
         </request_path>
+        <entity_type>
+            <attribute_code>entity_type</attribute_code>
+            <backend_type>varchar</backend_type>
+            <is_required>0</is_required>
+            <input>text</input>
+        </entity_type>
         <target_path>
             <attribute_code>target_path</attribute_code>
             <backend_type>varchar</backend_type>
             <is_required>1</is_required>
             <default_value>target_path%isolation%</default_value>
+            <source>Magento\UrlRewrite\Test\Fixture\UrlRewrite\TargetPath</source>
             <input>text</input>
         </target_path>
         <description>
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/IdPath.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php
similarity index 93%
rename from dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/IdPath.php
rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php
index 9c0905a2456f30df5f765b4caca29bff7cd18d94..e30522717a1d1ec50a653d0cf276a46adc91de34 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/IdPath.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/TargetPath.php
@@ -28,10 +28,10 @@ use Mtf\Fixture\FixtureFactory;
 use Mtf\Fixture\FixtureInterface;
 
 /**
- * Class IdPath
- * Prepare ID Path
+ * Class TargetPath
+ * Prepare Target Path
  */
-class IdPath implements FixtureInterface
+class TargetPath implements FixtureInterface
 {
     /**
      * Resource data
@@ -57,13 +57,13 @@ class IdPath implements FixtureInterface
     /**
      * @param FixtureFactory $fixtureFactory
      * @param array $params
-     * @param array $data [optional]
+     * @param string $data [optional]
      */
-    public function __construct(FixtureFactory $fixtureFactory, array $params, array $data = [])
+    public function __construct(FixtureFactory $fixtureFactory, array $params, $data = '')
     {
         $this->params = $params;
         if (!isset($data['entity']) || $data['entity'] === '-') {
-            $this->data = array_shift($data);
+            $this->data = $data;
             return;
         }
         preg_match('`%(.*?)%`', $data['entity'], $dataSet);
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php
index 92c8e9956e4df177b1c8500c06a90f76ec889a59..334a4c05bbae66802924e76866ffa0ba851095a1 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Handler/UrlRewrite/Curl.php
@@ -70,7 +70,7 @@ class Curl extends AbstractCurl implements UrlRewriteInterface
      */
     public function persist(FixtureInterface $fixture = null)
     {
-        $url = $_ENV['app_backend_url'] . $this->url . $fixture->getIdPath();
+        $url = $_ENV['app_backend_url'] . $this->url . $fixture->getTargetPath();
         $data = $this->replaceMappingData($fixture->getData());
         $curl = new BackendDecorator(new CurlTransport(), new Config());
         $curl->write(CurlInterface::POST, $url, '1.0', [], $data);
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteEdit.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteEdit.xml
index a125fae69478829f4031895f23aaf6fe69208982..6fba60eec248faf96eb11c77ca240fd34d093316 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteEdit.xml
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Page/Adminhtml/UrlRewriteEdit.xml
@@ -32,7 +32,7 @@
         </treeBlock>
         <formBlock>
             <class>Magento\UrlRewrite\Test\Block\Adminhtml\Catalog\Edit\UrlRewriteForm</class>
-            <locator>#edit_form</locator>
+            <locator>[id="page:main-container"]</locator>
             <strategy>css selector</strategy>
         </formBlock>
         <messagesBlock>
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php
index 0b511d597078ff04bf7ab98d3bdd8ebbd4779103..ea5932ba4e795955b129221cfd34f052a511a38d 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest.php
@@ -96,12 +96,13 @@ class CreateCategoryRewriteEntityTest extends Injectable
      * @param CatalogCategory $category
      * @return void
      */
-    public function testCreateCategoryRewrite(UrlRewrite $urlRewrite, CatalogCategory $category)
+    public function test(UrlRewrite $urlRewrite, CatalogCategory $category)
     {
         //Steps
         $this->urlRewriteIndex->open();
         $this->urlRewriteIndex->getPageActionsBlock()->addNew();
-        $this->urlRewriteEdit->getTreeBlock()->selectCategory($category->getName());
+        $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite);
+        $this->urlRewriteEdit->getTreeBlock()->selectCategory($category);
         $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite);
         $this->urlRewriteEdit->getPageMainActions()->save();
     }
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..1ef6daada4dae993abce06c36301b887de99c15a
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/test.csv
@@ -0,0 +1,4 @@
+"urlRewrite/data/entity_type";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
+"For category";"Main Website/Main Website Store/Default Store View";"test_request%isolation%";"No";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid"
+"For category";"Main Website/Main Website Store/Default Store View";"request_path%isolation%";"Temporary (302)";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCategoryRedirect"
+"For category";"Main Website/Main Website Store/Default Store View";"request_path%isolation%";"Permanent (301)";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCategoryRedirect"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/testCreateCategoryRewrite.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/testCreateCategoryRewrite.csv
deleted file mode 100644
index 1d4ab32a0f09a1edb402189503ee315f2acc83e4..0000000000000000000000000000000000000000
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/testCreateCategoryRewrite.csv
+++ /dev/null
@@ -1,4 +0,0 @@
-"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
-"Main Website/Main Website Store/Default Store View";"test_request%isolation%";"No";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid"
-"Main Website/Main Website Store/Default Store View";"request_path%isolation%";"Temporary (302)";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCategoryRedirect"
-"Main Website/Main Website Store/Default Store View";"request_path%isolation%";"Permanent (301)";"test description";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCategoryRedirect"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php
index 5edc2e13e79e90ab4f09379c7ea3e4052f21a211..2ab9255ac52a3cb365c05d8a99bb3d64a8d37207 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest.php
@@ -90,7 +90,6 @@ class CreateCustomUrlRewriteEntityTest extends Injectable
     {
         $this->urlRewriteIndex->open();
         $this->urlRewriteIndex->getPageActionsBlock()->addNew();
-        $this->urlRewriteEdit->getUrlRewriteTypeSelectorBlock()->selectType('Custom');
         $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite);
         $this->urlRewriteEdit->getPageMainActions()->save();
     }
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest/test.csv
index d5e9c7b1679fde582b1a35551d94056d663c9a12..680e08b0defcec8ee3a046765ea653a24064152e 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest/test.csv
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCustomUrlRewriteEntityTest/test.csv
@@ -1,5 +1,5 @@
-"urlRewrite/data/store_id";"urlRewrite/data/id_path/entity";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
-"Main Website/Main Website Store/Default Store View";"category/%catalogCategory::default_subcategory%";"category_request_path%isolation%";"Permanent (301)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
-"Main Website/Main Website Store/Default Store View";"product/%catalogProductSimple::default%";"product_request_path%isolation%";"Temporary (302)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
-"Main Website/Main Website Store/Default Store View";"cms_page/%cmsPage::cms-page-test%";"cms_page_request_path%isolation%";"No";"test description_full path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
-"Main Website/Main Website Store/Default Store View";"cms_page/%cmsPage::cms-page-test%";"cms_page_request_path%isolation%";"Temporary (302)";"test description_full path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
+"urlRewrite/data/entity_type";"urlRewrite/data/store_id";"urlRewrite/data/target_path/entity";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
+"Custom";"Main Website/Main Website Store/Default Store View";"catalog/category/view/id/%catalogCategory::default_subcategory%";"category_request_path%isolation%";"Permanent (301)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
+"Custom";"Main Website/Main Website Store/Default Store View";"catalog/product/view/id/%catalogProductSimple::default%";"product_request_path%isolation%";"Temporary (302)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
+"Custom";"Main Website/Main Website Store/Default Store View";"cms/page/view/page_id/%cmsPage::cms-page-test%";"cms_page_request_path%isolation%";"No";"test description_full path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
+"Custom";"Main Website/Main Website Store/Default Store View";"cms/page/view/page_id/%cmsPage::cms-page-test%";"cms_page_request_path%isolation%";"Temporary (302)";"test description_full path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomRedirect"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php
index d582f2986c0cc20fa5ef7a9d4758ff99fce20077..854ccc25b4bf05a73e8af4a631555c0313cdfba3 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest.php
@@ -87,7 +87,7 @@ class CreateProductUrlRewriteEntityTest extends Injectable
      * @param UrlRewrite $urlRewrite
      * @return void
      */
-    public function testProductUrlRewrite(CatalogProductSimple $product, UrlRewrite $urlRewrite)
+    public function test(CatalogProductSimple $product, UrlRewrite $urlRewrite)
     {
         //Precondition
         $product->persist();
@@ -95,9 +95,9 @@ class CreateProductUrlRewriteEntityTest extends Injectable
         //Steps
         $this->urlRewriteIndex->open();
         $this->urlRewriteIndex->getPageActionsBlock()->addNew();
-        $this->urlRewriteEdit->getUrlRewriteTypeSelectorBlock()->selectType('For product');
+        $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite);
         $this->urlRewriteEdit->getProductGridBlock()->searchAndOpen($filter);
-        $this->urlRewriteEdit->getTreeBlock()->skipCategorySelection();
+        $this->urlRewriteEdit->getTreeBlock()->selectCategory($product->getCategoryIds());
         $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite);
         $this->urlRewriteEdit->getPageMainActions()->save();
     }
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..e4e693bf043d1683163de7cf5d48ea5a5a5348be
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/test.csv
@@ -0,0 +1,4 @@
+"urlRewrite/data/entity_type";"product/dataSet";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
+"For product";"default";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"No";"description_%isolation%";"assertUrlRewriteSaveMessage"
+"For product";"default";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"Temporary (302)";"description_%isolation%";"assertUrlRewriteSaveMessage, assertUrlRewriteProductRedirect"
+"For product";"default";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"Permanent (301)";"description_%isolation%";"assertUrlRewriteSaveMessage, assertUrlRewriteProductRedirect"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/testProductUrlRewrite.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/testProductUrlRewrite.csv
deleted file mode 100644
index fdfce8c0919a0c5578747a8db9397f24c99bdc85..0000000000000000000000000000000000000000
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/testProductUrlRewrite.csv
+++ /dev/null
@@ -1,4 +0,0 @@
-"product/dataSet";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
-"default";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"No";"description_%isolation%";"assertUrlRewriteSaveMessage"
-"default";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"Temporary (302)";"description_%isolation%";"assertUrlRewriteSaveMessage, assertUrlRewriteProductRedirect"
-"default";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"Permanent (301)";"description_%isolation%";"assertUrlRewriteSaveMessage, assertUrlRewriteProductRedirect"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php
index bc4565ec8079104ccda64d4dd12bbc6b7fddb2ef..bc82db52d87a7451cd62157cfcf76f692efd990c 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest.php
@@ -82,7 +82,7 @@ class DeleteCategoryUrlRewriteEntityTest extends Injectable
      * @param UrlRewrite $urlRewrite
      * @return void
      */
-    public function testDeleteCategoryUrlRewrite(UrlRewrite $urlRewrite)
+    public function test(UrlRewrite $urlRewrite)
     {
         //Precondition
         $urlRewrite->persist();
@@ -91,7 +91,7 @@ class DeleteCategoryUrlRewriteEntityTest extends Injectable
         if ($urlRewrite->getRequestPath()) {
             $filter = ['request_path' => $urlRewrite->getRequestPath()];
         } else {
-            $filter = ['id_path' => $urlRewrite->getIdPath()];
+            $filter = ['target_path' => $urlRewrite->getTargetPath()];
         }
         $this->urlRewriteIndex->getUrlRedirectGrid()->searchAndOpen($filter);
         $this->urlRewriteEdit->getPageMainActions()->delete();
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..1df1c16a9b87c00603dd0351f6f0365009d2c555
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/test.csv
@@ -0,0 +1,3 @@
+"urlRewrite/data/target_path/entity";"urlRewrite/data/redirect_type";"urlRewrite/data/request_path";"constraint"
+"catalog/category/view/id/%catalogCategory::default%";"No";"-";"assertUrlRewriteDeletedMessage, assertPageByUrlRewriteIsNotFound"
+"catalog/category/view/id/%catalogCategory::default%";"No";"example%isolation%.html";"assertUrlRewriteDeletedMessage, assertPageByUrlRewriteIsNotFound"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/testDeleteCategoryUrlRewrite.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/testDeleteCategoryUrlRewrite.csv
deleted file mode 100644
index 1f9003b2a5f27d92fbbe63660bcdb380fc09b8c6..0000000000000000000000000000000000000000
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/testDeleteCategoryUrlRewrite.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-"urlRewrite/data/id_path/entity";"urlRewrite/data/redirect_type";"urlRewrite/data/request_path";"constraint"
-"category/%catalogCategory::default%";"No";"-";"assertUrlRewriteDeletedMessage, assertPageByUrlRewriteIsNotFound"
-"category/%catalogCategory::default%";"No";"example%isolation%.html";"assertUrlRewriteDeletedMessage, assertPageByUrlRewriteIsNotFound"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php
index 1951b270cf97c2d1f2d0596448d803ff9bf1565e..abb1134863b14baa931b94a5d0fb7621435a9f8f 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest.php
@@ -85,7 +85,7 @@ class DeleteProductUrlRewriteEntityTest extends Injectable
      * @param UrlRewrite $productRedirect
      * @return void
      */
-    public function testDeleteProductUrlRewrite(UrlRewrite $productRedirect)
+    public function test(UrlRewrite $productRedirect)
     {
         // Precondition
         $productRedirect->persist();
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/testDeleteProductUrlRewrite.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/test.csv
similarity index 67%
rename from dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/testDeleteProductUrlRewrite.csv
rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/test.csv
index 4a6a2d8366631290e03102baa8d63edd69502964..d5b350c767936a852f2d8388a5b7921a3095d104 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/testDeleteProductUrlRewrite.csv
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/test.csv
@@ -1,2 +1,2 @@
-"productRedirect/dataSet";"productRedirect/data/id_path/entity";"constraint"
+"productRedirect/dataSet";"productRedirect/data/target_path/entity";"constraint"
 "default_without_target";"product/%catalogProductSimple::100_dollar_product%";"assertUrlRewriteDeletedMessage, assertUrlRewriteNotInGrid, assertPageByUrlRewriteIsNotFound"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php
index ddcba54e68eaa208577c31d255aac2b5d8005327..0bae2353e79979eeb12a0d57d2f015d69e320bbb 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCategoryUrlRewriteEntityTest.php
@@ -89,7 +89,7 @@ class UpdateCategoryUrlRewriteEntityTest extends Injectable
             'urlRewrite',
             [
                 'dataSet' => 'default',
-                'data' => ['id_path' => ['category/' . $category->getId()]]
+                'data' => ['target_path' => $category->getUrlKey() . '.html']
             ]
         );
         $categoryRedirect->persist();
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php
index 19cd6d6c6ad555f1ca40cf31d8c91d92f3ed2ce1..dcee34fbdaa4113354571b0d0ad911e19e8806c0 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest.php
@@ -93,7 +93,7 @@ class UpdateCustomUrlRewriteEntityTest extends Injectable
         //Steps
         $this->urlRewriteIndex->open();
         $filter = ['request_path' => $initialRewrite->getRequestPath()];
-        $replaceData = $this->getReplaceData($initialRewrite);
+        $replaceData = $this->getReplaceData($urlRewrite);
         $this->urlRewriteIndex->getUrlRedirectGrid()->searchAndOpen($filter);
         $this->urlRewriteEdit->getFormBlock()->fill($urlRewrite, null, $replaceData);
         $this->urlRewriteEdit->getPageMainActions()->save();
@@ -108,10 +108,10 @@ class UpdateCustomUrlRewriteEntityTest extends Injectable
     protected function getReplaceData(UrlRewrite $initialRewrite)
     {
         $replaceData = [];
-        $entity = $initialRewrite->getDataFieldConfig('id_path')['source']->getEntity();
+        $entity = $initialRewrite->getDataFieldConfig('target_path')['source']->getEntity();
 
         if ($entity) {
-            $replaceData['target_path'] = ['%name%' => $entity->getName()];
+            $replaceData['target_path'] = ['name' => 'sku', 'value' => $entity->getSku()];
         }
 
         return $replaceData;
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest/test.csv
index c9014c79ec44eb685563405f1ae66c883b5620f9..cb82ccd2b464316e808bdaead696c05528196543 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest/test.csv
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateCustomUrlRewriteEntityTest/test.csv
@@ -1,3 +1,3 @@
-"initialRewrite/dataSet";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/target_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint"
-"default";"Main Website/Main Website Store/Default Store View";"wishlist/%isolation%";"http://www.magentocommerce.com/magento-connect/";"Permanent (301)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteSuccessOutsideRedirect"
-"custom_rewrite_wishlist";"Main Website/Main Website Store/Default Store View";"wishlist/%isolation%";"catalogsearch/result/?q=%name%";"Temporary (302)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomSearchRedirect"
+"initialRewrite/dataSet";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/target_path/entity";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"constraint";"issue"
+"default";"Main Website/Main Website Store/Default Store View";"wishlist/%isolation%";"http://www.magentocommerce.com/magento-connect/";"Permanent (301)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteSuccessOutsideRedirect";"MAGETWO-29618"
+"custom_rewrite_wishlist";"Main Website/Main Website Store/Default Store View";"wishlist/%isolation%";"catalogsearch/result/?q=$%catalogProductSimple::defaul%sku$";"Temporary (302)";"test_description_relative path";"assertUrlRewriteSaveMessage, assertUrlRewriteInGrid, assertUrlRewriteCustomSearchRedirect";""
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php
index 4053cb1c002220fcebe0a3e59787bde5560730ed..75f69da737e9d55f6f3595783ec6a214acf02117 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest.php
@@ -88,16 +88,14 @@ class UpdateProductUrlRewriteEntityTest extends Injectable
      * @param FixtureFactory $fixtureFactory
      * @return void
      */
-    public function testUpdateProductUrlRewrite(
-        UrlRewrite $urlRewrite,
-        FixtureFactory $fixtureFactory
-    ) {
+    public function test(UrlRewrite $urlRewrite, FixtureFactory $fixtureFactory)
+    {
         /** @var UrlRewrite $productRedirect */
         $productRedirect = $fixtureFactory->createByCode(
             'urlRewrite',
             [
                 'dataSet' => 'default',
-                'data' => ['id_path' => [$urlRewrite->getIdPath()]]
+                'data' => ['target_path' => $urlRewrite->getTargetPath()]
             ]
         );
         $productRedirect->persist();
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/testUpdateProductUrlRewrite.csv b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/test.csv
similarity index 57%
rename from dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/testUpdateProductUrlRewrite.csv
rename to dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/test.csv
index 8c5250503db3b200d96f67e5d08ca2cfd09c9969..5baa25f7f6cf3a1d3035ff224c50491926c294af 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/testUpdateProductUrlRewrite.csv
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/test.csv
@@ -1,2 +1,2 @@
-"urlRewrite/data/id_path/entity";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"isRequired";"constraint"
+"urlRewrite/data/target_path/entity";"urlRewrite/data/store_id";"urlRewrite/data/request_path";"urlRewrite/data/redirect_type";"urlRewrite/data/description";"isRequired";"constraint"
 "product/%catalogProductSimple::100_dollar_product%";"Main Website/Main Website Store/Default Store View";"test_%isolation%.html";"Temporary (302)";"description_%isolation%";"Yes";"assertUrlRewriteSaveMessage, assertUrlRewriteProductRedirect"
diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml
index 2ee0efd91ba1ba02a349f585cfd100a39f6f9e92..db3f6387a870c8af06624cb7f3ac5977458fc74e 100644
--- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/constraint.xml
@@ -88,4 +88,10 @@
     <assertUrlRewriteCategoryInGrid module="Magento_UrlRewrite">
         <severeness>low</severeness>
     </assertUrlRewriteCategoryInGrid>
+    <assertUrlRewriteUpdatedProductInGrid module="Magento_UrlRewrite">
+        <severeness>low</severeness>
+    </assertUrlRewriteUpdatedProductInGrid>
+    <assertUrlRewriteCategoryNotInGrid module="Magento_UrlRewrite">
+        <severeness>low</severeness>
+    </assertUrlRewriteCategoryNotInGrid>
 </constraint>
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
index d6a2795732af81451a8080040aac62db61f9c97b..160362b9e3593036b3723ae88b7e38e1cc610643 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Adminhtml/Customer/Edit/Tab/Wishlist/Grid.php
@@ -24,14 +24,14 @@
 
 namespace Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab\Wishlist;
 
-use Magento\Backend\Test\Block\Widget\Grid as ParentGrid;
+use Mtf\Client\Element;
 use Mtf\Client\Element\Locator;
 
 /**
  * Class Grid
  * Grid on Wishlist tab in customer details on backend
  */
-class Grid extends ParentGrid
+class Grid extends \Magento\Backend\Test\Block\Widget\Grid
 {
     /**
      * Grid fields map
@@ -42,6 +42,16 @@ class Grid extends ParentGrid
         'product_name' => [
             'selector' => 'input[name="product_name"]'
         ],
+        'qty_from' => [
+            'selector' => 'input[name="qty[from]"]'
+        ],
+        'qty_to' => [
+            'selector' => 'input[name="qty[to]"]'
+        ],
+        'options' => [
+            'selector' => 'td//*[dt[contains(.,"%option_name%")]/following-sibling::dd[contains(.,"%value%")]]',
+            'strategy' => 'xpath'
+        ]
     ];
 
     /**
@@ -52,17 +62,85 @@ class Grid extends ParentGrid
     protected $deleteLink = 'a[onclick*="removeItem"]';
 
     /**
-     * Search item and delete it
+     * Configure link selector
+     *
+     * @var string
+     */
+    protected $configureLink = 'a[onclick*="configureItem"]';
+
+    /**
+     * Delete product
+     *
+     * @return void
+     */
+    protected function delete()
+    {
+        $this->_rootElement->find($this->rowItem . ' ' . $this->deleteLink)->click();
+        $this->_rootElement->acceptAlert();
+    }
+
+    /**
+     * Configure product
+     *
+     * @return void
+     */
+    protected function configure()
+    {
+        $this->_rootElement->find($this->rowItem . ' ' . $this->configureLink)->click();
+    }
+
+    /**
+     * Search item product and action it
      *
      * @param array $filter
+     * @param string $action
      * @return void
-     * @throws \Exception
      */
-    public function searchAndDelete(array $filter)
+    public function searchAndAction(array $filter, $action)
     {
         $this->search($filter);
-        $rowItem = $this->_rootElement->find($this->rowItem, Locator::SELECTOR_CSS);
-        $rowItem->find($this->deleteLink, Locator::SELECTOR_CSS)->click();
-        $this->_rootElement->acceptAlert();
+        $this->{ucfirst($action)}();
+        $this->waitLoader();
+    }
+
+    /**
+     * Obtain specific row in grid
+     *
+     * @param array $filter
+     * @param bool $isSearchable [optional]
+     * @param bool $isStrict [optional]
+     * @return Element
+     */
+    protected function getRow(array $filter, $isSearchable = true, $isStrict = true)
+    {
+        $options = [];
+        $this->openFilterBlock();
+        if (isset($filter['options'])) {
+            $options = $filter['options'];
+            unset($filter['options']);
+        }
+        if ($isSearchable) {
+            $this->search($filter);
+        }
+        $location = '//div[@class="grid"]//tr[';
+        $rowTemplate = 'td[contains(.,normalize-space("%s"))]';
+        if ($isStrict) {
+            $rowTemplate = 'td[text()[normalize-space()="%s"]]';
+        }
+        $rows = [];
+        foreach ($filter as $value) {
+            $rows[] = sprintf($rowTemplate, $value);
+        }
+        if (!empty($options) && is_array($options)) {
+            foreach ($options as $value) {
+                $rows[] = str_replace(
+                    '%value%',
+                    $value['value'],
+                    str_replace('%option_name%', $value['option_name'], $this->filters['options']['selector'])
+                );
+            }
+        }
+        $location = $location . implode(' and ', $rows) . ']';
+        return $this->_rootElement->find($location, Locator::SELECTOR_XPATH);
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php
index cd36571276d9f2250b1b0ead10fe0717b69e52be..5cbafa4a6837576b01cafd1c7ee1dacdf488f468 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist.php
@@ -28,7 +28,7 @@ use Mtf\Block\Block;
 
 /**
  * Class Wishlist
- * Wish list details block in "My account"
+ * Wish list details block in "My Wish List" page
  */
 class Wishlist extends Block
 {
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php
index b11f0a3d560af184cd3e523d0608c035326b94f1..7e148cb713012fc0f1739bc038c29828304b50b2 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Block/Customer/Wishlist/Items/Product.php
@@ -54,11 +54,25 @@ class Product extends Form
     protected $viewDetails = '.details.tooltip';
 
     /**
-     * Selector for 'Options Details' tooltip
+     * Edit button css selector
      *
      * @var string
      */
-    protected $optionsDetails = '.tooltip.content .values';
+    protected $edit = '.action.edit';
+
+    /**
+     * Selector for option's label
+     *
+     * @var string
+     */
+    protected $optionLabel = '.tooltip.content .label';
+
+    /**
+     * Selector for option's value
+     *
+     * @var string
+     */
+    protected $optionValue = '.tooltip.content .values';
 
     /**
      * Fill item product details
@@ -102,14 +116,29 @@ class Product extends Form
         $viewDetails = $this->_rootElement->find($this->viewDetails);
         if ($viewDetails->isVisible()) {
             $viewDetails->click();
-            $values = $this->_rootElement->find($this->optionsDetails)->getElements();
+            $labels = $this->_rootElement->find($this->optionLabel)->getElements();
+            $values = $this->_rootElement->find($this->optionValue)->getElements();
             $data = [];
-            foreach ($values as $value) {
-                $data[] = $value->getText();
+            foreach ($labels as $key => $label) {
+                $data[] = [
+                    'title' => $label->getText(),
+                    'value' => str_replace('$', '', $values[$key]->getText())
+                ];
             }
+
             return $data;
         } else {
             return null;
         }
     }
+
+    /**
+     * Click edit button
+     *
+     * @return void
+     */
+    public function clickEdit()
+    {
+        $this->_rootElement->find($this->edit)->click();
+    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php
index bba7f2e90f6d970d318a333cbf576e719b699f67..8713215bc0ed4618348fc7f32a368be2338c43e7 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertAddProductToWishlistSuccessMessage.php
@@ -53,7 +53,7 @@ class AssertAddProductToWishlistSuccessMessage extends AbstractConstraint
      * @param InjectableFixture $product
      * @return void
      */
-    public function processAssert(WishlistIndex $wishlistIndex, $product)
+    public function processAssert(WishlistIndex $wishlistIndex, InjectableFixture $product)
     {
         \PHPUnit_Framework_Assert::assertEquals(
             sprintf(self::SUCCESS_MESSAGE, $product->getName()),
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php
new file mode 100644
index 0000000000000000000000000000000000000000..54b3e13b6538b068be239a50985ac38ea71c9b47
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.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\Wishlist\Test\Constraint;
+
+use Magento\Wishlist\Test\Page\WishlistIndex;
+use Mtf\Constraint\AbstractConstraint;
+use Mtf\Fixture\InjectableFixture;
+
+/**
+ * Class AssertAddProductToWishlistSuccessMessage
+ * Assert that success message appears on Checkout Cart page after moving product to wishlist.
+ */
+class AssertMoveProductToWishlistSuccessMessage extends AbstractConstraint
+{
+    /**
+     * Success add message
+     */
+    const SUCCESS_MESSAGE = "%s has been moved to wish list Wish List";
+
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that success message appears on My Wish List page after moving product to wishlist.
+     *
+     * @param WishlistIndex $wishlistIndex
+     * @param InjectableFixture $product
+     * @return void
+     */
+    public function processAssert(WishlistIndex $wishlistIndex, InjectableFixture $product)
+    {
+        \PHPUnit_Framework_Assert::assertEquals(
+            sprintf(self::SUCCESS_MESSAGE, $product->getName()),
+            $wishlistIndex->getMessagesBlock()->getSuccessMessages(),
+            "Expected success move to wish list message doesn't match actual."
+        );
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return 'Success message appears on Checkout Cart page after moving product to wishlist.';
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertBundleProductDetailsInWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php
similarity index 60%
rename from dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertBundleProductDetailsInWishlist.php
rename to dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php
index 6acd6c80e2f85f7cbb6fcff3be19730e340f51a7..2180f8cceb363a537b6b9858b54c3e785f4d388d 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertBundleProductDetailsInWishlist.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductDetailsInWishlist.php
@@ -26,16 +26,15 @@ namespace Magento\Wishlist\Test\Constraint;
 
 use Mtf\Constraint\AbstractConstraint;
 use Magento\Cms\Test\Page\CmsIndex;
-use Magento\Customer\Test\Page\CustomerAccountIndex;
 use Magento\Wishlist\Test\Page\WishlistIndex;
 use Mtf\Fixture\FixtureFactory;
 use Mtf\Fixture\InjectableFixture;
 
 /**
  * Class AssertBundleProductDetailsInWishlist
- * Assert that the correct option details are displayed on the "View Details" tool tip.
+ * Assert that the correct option details are displayed on the "View Details" tool tip
  */
-class AssertBundleProductDetailsInWishlist extends AbstractConstraint
+class AssertProductDetailsInWishlist extends AbstractConstraint
 {
     /**
      * Constraint severeness
@@ -45,10 +44,9 @@ class AssertBundleProductDetailsInWishlist extends AbstractConstraint
     protected $severeness = 'low';
 
     /**
-     * Assert that the correct option details are displayed on the "View Details" tool tip.
+     * Assert that the correct option details are displayed on the "View Details" tool tip
      *
      * @param CmsIndex $cmsIndex
-     * @param CustomerAccountIndex $customerAccountIndex
      * @param WishlistIndex $wishlistIndex
      * @param InjectableFixture $product
      * @param FixtureFactory $fixtureFactory
@@ -56,26 +54,19 @@ class AssertBundleProductDetailsInWishlist extends AbstractConstraint
      */
     public function processAssert(
         CmsIndex $cmsIndex,
-        CustomerAccountIndex $customerAccountIndex,
         WishlistIndex $wishlistIndex,
         InjectableFixture $product,
         FixtureFactory $fixtureFactory
     ) {
-        $cmsIndex->getLinksBlock()->openLink('My Account');
-        $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Wish List');
-        $productBlock = $wishlistIndex->getItemsBlock()->getItemProduct($product);
-        $actualOptions = $this->prepareOptions($productBlock->getOptions());
+        $cmsIndex->getLinksBlock()->openLink('My Wish List');
+        $actualOptions = $wishlistIndex->getItemsBlock()->getItemProduct($product)->getOptions();
         $cartFixture = $fixtureFactory->createByCode('cart', ['data' => ['items' => ['products' => [$product]]]]);
-        $bundleOptions = $cartFixture->getItems()[0]->getData()['options'];
-        $expectedOptions = [];
-        foreach ($bundleOptions as $option) {
-            $expectedOptions[] = $option['value'];
-        }
+        $expectedOptions = $cartFixture->getItems()[0]->getData()['options'];
 
         \PHPUnit_Framework_Assert::assertEquals(
             $expectedOptions,
             $actualOptions,
-            "Expected bundle options are not equals to actual"
+            "Expected product options are not equal to actual."
         );
     }
 
@@ -86,24 +77,6 @@ class AssertBundleProductDetailsInWishlist extends AbstractConstraint
      */
     public function toString()
     {
-        return "Expected bundle options are equal to actual";
-    }
-
-    /**
-     * Prepare bundle options for comparing
-     *
-     * @param array $options
-     * @return array
-     */
-    protected function prepareOptions($options)
-    {
-        foreach ($options as &$option) {
-            $chunks = explode(' ', $option);
-            $lastChunk = array_pop($chunks);
-            $lastChunk = preg_replace("/^\\D*\\s*([\\d,\\.]+)\\s*\\D*$/", '\1', $lastChunk);
-            array_push($chunks, $lastChunk);
-            $option = implode(' ', $chunks);
-        }
-        return $options;
+        return "Expected product options are equal to actual.";
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php
new file mode 100644
index 0000000000000000000000000000000000000000..66f506e61fd3bd44b3f867975b49319febf16309
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Test\Constraint;
+
+use Mtf\Fixture\FixtureInterface;
+use Mtf\Constraint\AbstractConstraint;
+use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
+use Magento\Wishlist\Test\Block\Adminhtml\Customer\Edit\Tab\Wishlist\Grid;
+
+/**
+ * Class AssertProductInCustomerWishlistOnBackendGrid
+ * Assert that product is present in grid on customer's wish list tab with configure option and qty
+ */
+class AssertProductInCustomerWishlistOnBackendGrid extends AbstractConstraint
+{
+    /**
+     * Constraint severeness
+     *
+     * @var string
+     */
+    protected $severeness = 'low';
+
+    /**
+     * Assert that product is present in grid on customer's wish list tab with configure option and qty
+     *
+     * @param CustomerIndexEdit $customerIndexEdit
+     * @param FixtureInterface $product
+     * @return void
+     */
+    public function processAssert(CustomerIndexEdit $customerIndexEdit, FixtureInterface $product)
+    {
+        $filter = $this->prepareFilter($product);
+
+        /** @var Grid $wishlistGrid */
+        $wishlistGrid = $customerIndexEdit->getCustomerForm()->getTabElement('wishlist')->getSearchGridBlock();
+        \PHPUnit_Framework_Assert::assertTrue(
+            $wishlistGrid->isRowVisible($filter, true, false),
+            'Product ' . $product->getName() . ' is absent in grid with configure option.'
+        );
+    }
+
+    /**
+     * Prepare filter
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareFilter(FixtureInterface $product)
+    {
+        $checkoutData = $product->getCheckoutData();
+        $qty = isset($checkoutData['qty']) ? $checkoutData['qty'] : 1;
+        $options = $this->prepareOptions($product);
+
+        return ['product_name' => $product->getName(), 'qty_from' => $qty, 'qty_to' => $qty, 'options' => $options];
+    }
+
+    /**
+     * Prepare options
+     *
+     * @param FixtureInterface $product
+     * @return array
+     */
+    protected function prepareOptions(FixtureInterface $product)
+    {
+        $productOptions = [];
+        $checkoutData = $product->getCheckoutData()['options'];
+        $customOptions = $product->getCustomOptions();
+        if (isset($checkoutData['custom_options'])) {
+            foreach ($checkoutData['custom_options'] as $option) {
+                $optionKey = str_replace('attribute_key_', '', $option['title']);
+                $valueKey = str_replace('option_key_', '', $option['value']);
+                $productOptions[] = [
+                    'option_name' => $customOptions[$optionKey]['title'],
+                    'value' => isset($customOptions[$optionKey]['options'][$valueKey]['title'])
+                        ? $customOptions[$optionKey]['options'][$valueKey]['title']
+                        : $valueKey
+                ];
+            }
+        }
+
+        return $productOptions;
+    }
+
+    /**
+     * Returns a string representation of the object
+     *
+     * @return string
+     */
+    public function toString()
+    {
+        return "Product is visible in customer wishlist on backend.";
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php
index 2628e40b9e1c84823cbc3c03aeccfa6cd10edb29..deff5cc550fcf932e7e23d11cd5f68db75d0c17e 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductIsPresentInWishlist.php
@@ -74,6 +74,6 @@ class AssertProductIsPresentInWishlist extends AbstractConstraint
      */
     public function toString()
     {
-        return 'Product is present in default wishlist';
+        return 'Product is present in default wishlist.';
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistOnFrontend.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php
similarity index 82%
rename from dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistOnFrontend.php
rename to dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php
index 65e05ac75bcadf46a1933ae1497b35475132a43e..6ff171b17dd0e1fb68cc2326770629fb3bc1d92d 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistOnFrontend.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AbstractWishlistTest.php
@@ -25,7 +25,6 @@
 namespace Magento\Wishlist\Test\TestCase;
 
 use Mtf\ObjectManager;
-use Mtf\Client\Browser;
 use Mtf\TestCase\Injectable;
 use Mtf\Fixture\FixtureFactory;
 use Magento\Cms\Test\Page\CmsIndex;
@@ -34,10 +33,10 @@ use Magento\Customer\Test\Fixture\CustomerInjectable;
 use Magento\Catalog\Test\Page\Product\CatalogProductView;
 
 /**
- * Class AbstractWishlistOnFrontend
- * Abstract class for wish list on frontend tests
+ * Class AbstractWishlistTest
+ * Abstract class for wish list tests
  */
-abstract class AbstractWishlistOnFrontend extends Injectable
+abstract class AbstractWishlistTest extends Injectable
 {
     /**
      * Object Manager
@@ -67,13 +66,6 @@ abstract class AbstractWishlistOnFrontend extends Injectable
      */
     protected $fixtureFactory;
 
-    /**
-     * Browser
-     *
-     * @var Browser
-     */
-    protected $browser;
-
     /**
      * Wishlist index page
      *
@@ -82,12 +74,11 @@ abstract class AbstractWishlistOnFrontend extends Injectable
     protected $wishlistIndex;
 
     /**
-     * Injection data
+     * Injection data.
      *
      * @param CmsIndex $cmsIndex
      * @param CatalogProductView $catalogProductView
      * @param FixtureFactory $fixtureFactory
-     * @param Browser $browser
      * @param WishlistIndex $wishlistIndex
      * @param ObjectManager $objectManager
      * @return void
@@ -96,20 +87,18 @@ abstract class AbstractWishlistOnFrontend extends Injectable
         CmsIndex $cmsIndex,
         CatalogProductView $catalogProductView,
         FixtureFactory $fixtureFactory,
-        Browser $browser,
         WishlistIndex $wishlistIndex,
         ObjectManager $objectManager
     ) {
         $this->cmsIndex = $cmsIndex;
         $this->catalogProductView = $catalogProductView;
         $this->fixtureFactory = $fixtureFactory;
-        $this->browser = $browser;
         $this->wishlistIndex = $wishlistIndex;
         $this->objectManager = $objectManager;
     }
 
     /**
-     * Login customer
+     * Login customer.
      *
      * @param CustomerInjectable $customer
      * @return void
@@ -124,7 +113,7 @@ abstract class AbstractWishlistOnFrontend extends Injectable
     }
 
     /**
-     * Create products
+     * Create products.
      *
      * @param string $products
      * @return array
@@ -140,16 +129,19 @@ abstract class AbstractWishlistOnFrontend extends Injectable
     }
 
     /**
-     * Add products to wish list
+     * Add products to wish list.
      *
      * @param array $products
+     * @param bool $configure [optional]
      * @return void
      */
-    protected function addToWishlist(array $products)
+    protected function addToWishlist(array $products, $configure = false)
     {
-        foreach ($products as $product) {
-            $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
-            $this->catalogProductView->getViewBlock()->addToWishlist();
-        }
+        $addProductsToWishlistStep = $this->objectManager->create(
+            'Magento\Wishlist\Test\TestStep\AddProductsToWishlistStep',
+            ['products' => $products, 'configure' => $configure]
+        );
+
+        $addProductsToWishlistStep->run();
     }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php
index 4317988f091e9bd9c40617c4338dc5607d1f878d..2ac44ee759cec878b1fe50b5821c53c15712c34b 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest.php
@@ -24,12 +24,6 @@
 
 namespace Magento\Wishlist\Test\TestCase;
 
-use Magento\Customer\Test\Page\CustomerAccountLogout;
-use Mtf\TestCase\Injectable;
-use Mtf\Client\Driver\Selenium\Browser;
-use Mtf\Fixture\InjectableFixture;
-use Mtf\ObjectManager;
-use Magento\Catalog\Test\Page\Product\CatalogProductView;
 use Magento\Customer\Test\Fixture\CustomerInjectable;
 
 /**
@@ -50,68 +44,21 @@ use Magento\Customer\Test\Fixture\CustomerInjectable;
  * @group Wishlist_(CS)
  * @ZephyrId MAGETWO-29045
  */
-class AddProductToWishlistEntityTest extends Injectable
+class AddProductToWishlistEntityTest extends AbstractWishlistTest
 {
-    /**
-     * Catalog product view page
-     *
-     * @var CatalogProductView
-     */
-    protected $catalogProductView;
-
-    /**
-     * Customer Account Logout page
-     *
-     * @var CustomerAccountLogout
-     */
-    protected $customerAccountLogout;
-
-    /**
-     * Browser object
-     *
-     * @var Browser
-     */
-    protected $browser;
-
-    /**
-     * ObjectManager object
-     *
-     * @var ObjectManager
-     */
-    protected $objectManager;
-
     /**
      * Prepare data for test
      *
      * @param CustomerInjectable $customer
-     * @param Browser $browser
-     * @param ObjectManager $objectManager
      * @return array
      */
-    public function __prepare(CustomerInjectable $customer, Browser $browser, ObjectManager $objectManager)
+    public function __prepare(CustomerInjectable $customer)
     {
-        $this->browser = $browser;
-        $this->objectManager = $objectManager;
         $customer->persist();
 
         return ['customer' => $customer];
     }
 
-    /**
-     * Injection data
-     *
-     * @param CatalogProductView $catalogProductView
-     * @param CustomerAccountLogout $customerAccountLogout
-     * @return void
-     */
-    public function __inject(
-        CatalogProductView $catalogProductView,
-        CustomerAccountLogout $customerAccountLogout
-    ) {
-        $this->catalogProductView = $catalogProductView;
-        $this->customerAccountLogout = $customerAccountLogout;
-    }
-
     /**
      * Run Add Product To Wishlist test
      *
@@ -122,66 +69,12 @@ class AddProductToWishlistEntityTest extends Injectable
     public function test(CustomerInjectable $customer, $product)
     {
         $this->markTestIncomplete('Bug: MAGETWO-27949');
-        $product = $this->createProduct($product);
+        $product = $this->createProducts($product)[0];
 
         // Steps:
         $this->loginCustomer($customer);
-        $this->addProductToWishlist($product);
+        $this->addToWishlist([$product], true);
 
         return ['product' => $product];
     }
-
-    /**
-     * Create product
-     *
-     * @param string $product
-     * @return InjectableFixture
-     */
-    protected function createProduct($product)
-    {
-        $createProducts = $this->objectManager->create(
-            'Magento\Catalog\Test\TestStep\CreateProductsStep',
-            ['products' => $product]
-        );
-        return $createProducts->run()['products'][0];
-    }
-
-    /**
-     * Login customer
-     *
-     * @param CustomerInjectable $customer
-     * @return void
-     */
-    protected function loginCustomer(CustomerInjectable $customer)
-    {
-        $customerLogin = $this->objectManager->create(
-            'Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep',
-            ['customer' => $customer]
-        );
-        $customerLogin->run();
-    }
-
-    /**
-     * Add product to wishlist
-     *
-     * @param InjectableFixture $product
-     * @return void
-     */
-    protected function addProductToWishlist($product)
-    {
-        $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
-        $viewBlock = $this->catalogProductView->getViewBlock();
-        $viewBlock->fillOptions($product);
-        $viewBlock->addToWishlist();
-    }
-
-    /**
-     * Logout customer from frontend account
-     *
-     * return void
-     */
-    public function tearDown()
-    {
-        $this->customerAccountLogout->open();
-    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest/test.csv
index a8d0b3b26f93b2792601fa8e790ebb11929ecbb2..92def772d1f25a53d8d48e34a69d3da3189edef0 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest/test.csv
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductToWishlistEntityTest/test.csv
@@ -4,5 +4,5 @@
 "downloadableProductInjectable::with_two_separately_links";"assertAddProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertProductIsPresentInCustomerBackendWishlist"
 "groupedProductInjectable::three_simple_products";"assertAddProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertProductIsPresentInCustomerBackendWishlist"
 "configurableProductInjectable::default";"assertAddProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertProductIsPresentInCustomerBackendWishlist"
-"bundleProduct::bundle_dynamic_product";"assertAddProductToWishlistSuccessMessage, assertBundleProductDetailsInWishlist, assertProductIsPresentInCustomerBackendWishlist"
-"bundleProduct::bundle_fixed_product";"assertAddProductToWishlistSuccessMessage, assertBundleProductDetailsInWishlist, assertProductIsPresentInCustomerBackendWishlist"
\ No newline at end of file
+"bundleProduct::bundle_dynamic_product";"assertAddProductToWishlistSuccessMessage, assertProductDetailsInWishlist, assertProductIsPresentInCustomerBackendWishlist"
+"bundleProduct::bundle_fixed_product";"assertAddProductToWishlistSuccessMessage, assertProductDetailsInWishlist, assertProductIsPresentInCustomerBackendWishlist"
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php
index 7398ee2c6d7dfbb5e766c3d180a0e523f2a7d454..e41e009f83395c696450b6aa86d0d50660a58209 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest.php
@@ -25,6 +25,7 @@
 namespace Magento\Wishlist\Test\TestCase;
 
 use Mtf\ObjectManager;
+use Mtf\Client\Browser;
 use Magento\Checkout\Test\Fixture\Cart;
 use Magento\Customer\Test\Fixture\CustomerInjectable;
 
@@ -47,19 +48,28 @@ use Magento\Customer\Test\Fixture\CustomerInjectable;
  * @group Wishlist_(CS)
  * @ZephyrId MAGETWO-25268
  */
-class AddProductsToCartFromCustomerWishlistOnFrontendTest extends AbstractWishlistOnFrontend
+class AddProductsToCartFromCustomerWishlistOnFrontendTest extends AbstractWishlistTest
 {
+    /**
+     * Browser
+     *
+     * @var Browser
+     */
+    protected $browser;
+
     /**
      * Run suggest searching result test
      *
      * @param CustomerInjectable $customer
      * @param string $products
      * @param int $qty
+     * @param Browser $browser
      * @return array
      */
-    public function test(CustomerInjectable $customer, $products, $qty)
+    public function test(CustomerInjectable $customer, $products, $qty, Browser $browser)
     {
         // Preconditions
+        $this->browser = $browser;
         $customer->persist();
         $this->loginCustomer($customer);
         $products = $this->createProducts($products);
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv
index b40743fd36389ded31b8fe19cc263cec7ff3a18d..471cd7123f1cf709fe262e7896c18a2396b91131 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/AddProductsToCartFromCustomerWishlistOnFrontendTest/test.csv
@@ -3,7 +3,7 @@
 "catalogProductVirtual::50_dollar_product";"1";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
 "catalogProductSimple::default,catalogProductVirtual::50_dollar_product,catalogProductSimple::default,catalogProductVirtual::50_dollar_product";"-";"assertProductQtyInShoppingCart, assertWishlistIsEmpty"
 "groupedProductInjectable::three_simple_products";"-";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
-"downloadableProductInjectable::with_two_separately_links";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
+"downloadableProductInjectable::with_two_separately_links";"-";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
 "configurableProductInjectable::default";"3";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
 "bundleProduct::bundle_dynamic_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
 "bundleProduct::bundle_fixed_product";"2";"assertProductQtyInShoppingCart, assertProductsIsAbsentInWishlist"
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..054b5e3b2975024cabe361d2e05aa178dc991461
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.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.
+ *
+ * @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\Test\TestCase;
+
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
+use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
+
+/**
+ * Test Creation for ConfigureProductInCustomerWishlistOnBackend
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Create customer
+ * 2. Create products
+ * 3. Add products to the customer's wishlist (unconfigured)
+ *
+ * Steps:
+ * 1. Go to Backend
+ * 2. Go to Customers > All Customers
+ * 3. Open the customer
+ * 4. Open wishlist tab
+ * 5. Click 'Configure' for the product
+ * 6. Fill in data
+ * 7. Click Ok
+ * 8. Perform assertions
+ *
+ * @group Wishlist_(CS)
+ * @ZephyrId MAGETWO-29257
+ */
+class ConfigureProductInCustomerWishlistOnBackendTest extends AbstractWishlistTest
+{
+    /**
+     * Prepare data
+     *
+     * @param CustomerInjectable $customer
+     * @return array
+     */
+    public function __prepare(CustomerInjectable $customer)
+    {
+        $customer->persist();
+
+        return ['customer' => $customer];
+    }
+
+    /**
+     * Configure customer wish list on backend
+     *
+     * @param CustomerInjectable $customer
+     * @param string $product
+     * @param CustomerIndex $customerIndex
+     * @param CustomerIndexEdit $customerIndexEdit
+     * @return array
+     */
+    public function test(
+        CustomerInjectable $customer,
+        $product,
+        CustomerIndex $customerIndex,
+        CustomerIndexEdit $customerIndexEdit
+    ) {
+        $this->markTestIncomplete('Bug: MAGETWO-27949');
+
+        // Preconditions
+        $product = $this->createProducts($product)[0];
+        $this->loginCustomer($customer);
+        $this->addToWishlist([$product]);
+        // Steps
+        $customerIndex->open();
+        $customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]);
+        $customerForm = $customerIndexEdit->getCustomerForm();
+        $customerForm->openTab('wishlist');
+        $customerForm->getTabElement('wishlist')->getSearchGridBlock()->searchAndAction(
+            ['product_name' => $product->getName()],
+            'Configure'
+        );
+        $customerIndexEdit->getConfigureProductBlock()->configProduct($product);
+
+        return['product' => $product];
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..740881766b87fed446df100e5e824a15032f3520
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest/test.csv
@@ -0,0 +1,6 @@
+"product";"constraint"
+"catalogProductSimple::with_two_custom_option";"assertProductInCustomerWishlistOnBackendGrid"
+"configurableProductInjectable::default";"assertConfigurableProductInCustomerWishlistOnBackendGrid"
+"bundleProduct::bundle_dynamic_product";"assertBundleProductInCustomerWishlistOnBackendGrid"
+"downloadableProductInjectable::with_two_separately_links";"assertDownloadableProductInCustomerWishlistOnBackendGrid"
+"groupedProductInjectable::three_simple_products";"assertGroupedProductInCustomerWishlistOnBackendGrid"
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..e57e3a27546e922908ccefb087d2c7f402af1846
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.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\Wishlist\Test\TestCase;
+
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+
+/**
+ * Test Creation for ConfigureProductInCustomerWishlist on frontend
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Create customer
+ * 2. Create composite products
+ * 3. Log in to frontend
+ * 4. Add products to the customer's wish list (unconfigured)
+ *
+ * Steps:
+ * 1. Open Wish list
+ * 2. Click 'Configure' for the product
+ * 3. Fill data
+ * 4. Click 'Ok'
+ * 5. Perform assertions
+ *
+ * @group Wishlist_(CS)
+ * @ZephyrId MAGETWO-29507
+ */
+class ConfigureProductInCustomerWishlistOnFrontendTest extends AbstractWishlistTest
+{
+    /**
+     * Prepare data
+     *
+     * @param CustomerInjectable $customer
+     * @return array
+     */
+    public function __prepare(CustomerInjectable $customer)
+    {
+        $customer->persist();
+
+        return ['customer' =>$customer];
+    }
+
+    /**
+     * Configure customer wish list on frontend
+     *
+     * @param CustomerInjectable $customer
+     * @param string $product
+     * @return array
+     */
+    public function test(CustomerInjectable $customer, $product)
+    {
+        // Preconditions
+        $product = $this->createProducts($product)[0];
+        $this->loginCustomer($customer);
+        $this->addToWishlist([$product]);
+
+        // Steps
+        $this->cmsIndex->getLinksBlock()->openLink('My Wish List');
+        $this->wishlistIndex->getItemsBlock()->getItemProduct($product)->clickEdit();
+        $this->catalogProductView->getViewBlock()->addToWishlist($product);
+
+        return ['product' => $product];
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..7b192fe4280b0e032de3490bad40f6adaa0c2bec
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest/test.csv
@@ -0,0 +1,6 @@
+"product";"constraint"
+"catalogProductSimple::with_two_custom_option";"assertProductIsPresentInWishlist, assertProductDetailsInWishlist"
+"configurableProductInjectable::default";"assertProductIsPresentInWishlist, assertProductDetailsInWishlist"
+"bundleProduct::bundle_dynamic_product";"assertProductIsPresentInWishlist, assertProductDetailsInWishlist"
+"downloadableProductInjectable::with_two_separately_links";"assertProductIsPresentInWishlist, assertProductDetailsInWishlist"
+"groupedProductInjectable::three_simple_products";"assertProductIsPresentInWishlist, assertProductDetailsInWishlist"
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php
index e856c74d5c9617fd8bb4168a656395c39756f89f..9a86948f2dd180747e0947237cb6f79d7a7d1f7a 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductFromCustomerWishlistOnBackendTest.php
@@ -24,14 +24,7 @@
 
 namespace Magento\Wishlist\Test\TestCase;
 
-use Mtf\Client\Browser;
-use Mtf\TestCase\Injectable;
-use Mtf\Fixture\FixtureFactory;
-use Magento\Cms\Test\Page\CmsIndex;
-use Magento\Customer\Test\Page\CustomerAccountLogin;
-use Magento\Customer\Test\Page\CustomerAccountLogout;
 use Magento\Customer\Test\Fixture\CustomerInjectable;
-use Magento\Catalog\Test\Page\Product\CatalogProductView;
 use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
 use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
 
@@ -57,50 +50,8 @@ use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
  * @group Wishlist_(CS)
  * @ZephyrId MAGETWO-27813
  */
-class DeleteProductFromCustomerWishlistOnBackendTest extends Injectable
+class DeleteProductFromCustomerWishlistOnBackendTest extends AbstractWishlistTest
 {
-    /**
-     * Cms index page
-     *
-     * @var CmsIndex
-     */
-    protected $cmsIndex;
-
-    /**
-     * Customer login page
-     *
-     * @var CustomerAccountLogin
-     */
-    protected $customerAccountLogin;
-
-    /**
-     * Product view page
-     *
-     * @var CatalogProductView
-     */
-    protected $catalogProductView;
-
-    /**
-     * Page CustomerAccountLogout
-     *
-     * @var CustomerAccountLogout
-     */
-    protected $customerAccountLogout;
-
-    /**
-     * Page of all customer grid
-     *
-     * @var CustomerIndex
-     */
-    protected $customerIndex;
-
-    /**
-     * Customer edit page
-     *
-     * @var CustomerIndexEdit
-     */
-    protected $customerIndexEdit;
-
     /**
      * Prepare data
      *
@@ -115,85 +66,34 @@ class DeleteProductFromCustomerWishlistOnBackendTest extends Injectable
     }
 
     /**
-     * Injection data
+     * Delete product from customer wishlist on backend
      *
-     * @param CmsIndex $cmsIndex
-     * @param CustomerAccountLogin $customerAccountLogin
-     * @param CustomerAccountLogout $customerAccountLogout
-     * @param CatalogProductView $catalogProductView
+     * @param CustomerInjectable $customer
+     * @param string $product
      * @param CustomerIndex $customerIndex
      * @param CustomerIndexEdit $customerIndexEdit
-     * @return void
+     * @return array
      */
-    public function __inject(
-        CmsIndex $cmsIndex,
-        CustomerAccountLogin $customerAccountLogin,
-        CustomerAccountLogout $customerAccountLogout,
-        CatalogProductView $catalogProductView,
+    public function test(
+        CustomerInjectable $customer,
+        $product,
         CustomerIndex $customerIndex,
         CustomerIndexEdit $customerIndexEdit
     ) {
-        $this->cmsIndex = $cmsIndex;
-        $this->customerAccountLogin = $customerAccountLogin;
-        $this->customerAccountLogout = $customerAccountLogout;
-        $this->catalogProductView = $catalogProductView;
-        $this->customerIndex = $customerIndex;
-        $this->customerIndexEdit = $customerIndexEdit;
-    }
-
-    /**
-     * Delete product from customer wishlist on backend
-     *
-     * @param Browser $browser
-     * @param CustomerInjectable $customer
-     * @param FixtureFactory $fixtureFactory
-     * @param string $product
-     * @return array
-     */
-    public function test(Browser $browser, CustomerInjectable $customer, FixtureFactory $fixtureFactory, $product)
-    {
         $this->markTestIncomplete('MAGETWO-27949');
         //Preconditions
-        list($fixture, $dataSet) = explode('::', $product);
-        $product = $fixtureFactory->createByCode($fixture, ['dataSet' => $dataSet]);
-        $product->persist();
+        $product = $this->createProducts($product)[0];
         $this->loginCustomer($customer);
-        $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
-        $this->catalogProductView->getViewBlock()->addToWishlist();
+        $this->addToWishlist([$product]);
 
         //Steps
-        $this->customerIndex->open();
-        $this->customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]);
-        $customerForm = $this->customerIndexEdit->getCustomerForm();
+        $customerIndex->open();
+        $customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]);
+        $customerForm = $customerIndexEdit->getCustomerForm();
         $customerForm->openTab('wishlist');
         $filter = ['product_name' => $product->getName()];
-        $customerForm->getTabElement('wishlist')->getSearchGridBlock()->searchAndDelete($filter);
+        $customerForm->getTabElement('wishlist')->getSearchGridBlock()->searchAndAction($filter, 'Delete');
 
         return ['products' => [$product]];
     }
-
-    /**
-     * Login customer
-     *
-     * @param CustomerInjectable $customer
-     * @return void
-     */
-    protected function loginCustomer(CustomerInjectable $customer)
-    {
-        $this->cmsIndex->open();
-        if (!$this->cmsIndex->getLinksBlock()->isLinkVisible('Log Out')) {
-            $this->cmsIndex->getLinksBlock()->openLink('Log In');
-            $this->customerAccountLogin->getLoginBlock()->login($customer);
-        }
-    }
-
-    /**
-     * Log out after test
-     *
-     * @return void
-     */
-    public function tearDown()
-    {
-        $this->customerAccountLogout->open();
-    }
 }
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php
index 82731761118ad0a2a911ccb0d3ef89591311dec1..8ce4d6ae2dafb387cebf4f0ca5627f7184b34668 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/DeleteProductsFromWishlistOnFrontendTest.php
@@ -45,7 +45,7 @@ use Magento\Customer\Test\Fixture\CustomerInjectable;
  * @group Wishlist_(CS)
  * @ZephyrId MAGETWO-28874
  */
-class DeleteProductsFromWishlistOnFrontendTest extends AbstractWishlistOnFrontend
+class DeleteProductsFromWishlistOnFrontendTest extends AbstractWishlistTest
 {
     /**
      * Delete products form default wish list
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..c6270fb66617298e03af3ff333694e62d995c7f1
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Test\TestCase;
+
+use Magento\Checkout\Test\Constraint\AssertAddedProductToCartSuccessMessage;
+use Magento\Checkout\Test\Page\CheckoutCart;
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Mtf\Fixture\FixtureInterface;
+
+/**
+ * Test Creation for Move Product from ShoppingCart to Wishlist
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Test products are created.
+ *
+ * Steps:
+ * 1. Add product to Shopping Cart.
+ * 2. Call AssertAddProductToCartSuccessMessage.
+ * 2. Click 'Move to Wishlist' button from Shopping Cart for added product.
+ * 3. Perform asserts.
+ *
+ * @group Shopping_Cart_(CS)
+ * @ZephyrId MAGETWO-29545
+ */
+class MoveProductFromShoppingCartToWishlistTest extends AbstractWishlistTest
+{
+    /**
+     * Prepare data for test
+     *
+     * @param CustomerInjectable $customer
+     * @return array
+     */
+    public function __prepare(CustomerInjectable $customer)
+    {
+        $customer->persist();
+
+        return ['customer' => $customer];
+    }
+
+    /**
+     * Run Move from ShoppingCard to Wishlist test
+     *
+     * @param CustomerInjectable $customer
+     * @param string $product
+     * @param AssertAddedProductToCartSuccessMessage $assertAddedProductToCartSuccessMessage
+     * @param CheckoutCart $checkoutCart
+     * @return array
+     */
+    public function test(
+        CustomerInjectable $customer,
+        $product,
+        AssertAddedProductToCartSuccessMessage $assertAddedProductToCartSuccessMessage,
+        CheckoutCart $checkoutCart
+    ) {
+        // Preconditions:
+        $product = $this->createProducts($product)[0];
+        $this->loginCustomer($customer);
+
+        // Steps:
+        $this->addToCart($product);
+        $assertAddedProductToCartSuccessMessage->processAssert($checkoutCart, $product);
+        $checkoutCart->getCartBlock()->getCartItem($product)->moveToWishlist();
+
+        return ['product' => $product];
+    }
+
+    /**
+     * Add product to cart
+     *
+     * @param FixtureInterface $product
+     * @return void
+     */
+    protected function addToCart(FixtureInterface $product)
+    {
+        $addProductsToTheCartStep = $this->objectManager->create(
+            'Magento\Checkout\Test\TestStep\AddProductsToTheCartStep',
+            ['products' => [$product]]
+        );
+        $addProductsToTheCartStep->run();
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..d330b2779a670b8309893a895540bb761d5674d2
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest/test.csv
@@ -0,0 +1,7 @@
+"product";"constraint"
+"catalogProductSimple::default";"assertMoveProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertCartIsEmpty"
+"catalogProductVirtual::default";"assertMoveProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertCartIsEmpty"
+"downloadableProductInjectable::with_two_separately_links";"assertMoveProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertCartIsEmpty, assertProductDetailsInWishlist"
+"configurableProductInjectable::default";"assertMoveProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertCartIsEmpty, assertProductDetailsInWishlist"
+"bundleProduct::bundle_dynamic_product";"assertMoveProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertCartIsEmpty, assertProductDetailsInWishlist"
+"bundleProduct::bundle_fixed_product";"assertMoveProductToWishlistSuccessMessage, assertProductIsPresentInWishlist, assertCartIsEmpty, assertProductDetailsInWishlist"
\ No newline at end of file
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php
index a2b41e6afab78a06bd12791484c772f23a21ba61..5fd6ded0abec6f421814236c021337eb9eef19b0 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ShareWishlistEntityTest.php
@@ -55,6 +55,8 @@ use Magento\Wishlist\Test\Page\WishlistShare;
  *
  * @group Wishlist_(CS)
  * @ZephyrId MAGETWO-23394
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class ShareWishlistEntityTest extends Injectable
 {
@@ -175,7 +177,7 @@ class ShareWishlistEntityTest extends Injectable
         //Steps
         $this->loginCustomer($customer);
         $browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
-        $this->catalogProductView->getViewBlock()->addToWishlist();
+        $this->catalogProductView->getViewBlock()->clickAddToWishlist();
         $this->wishlistIndex->getWishlistBlock()->clickShareWishList();
         $this->wishlistShare->getSharingInfoForm()->fillForm($sharingInfo);
         $this->wishlistShare->getSharingInfoForm()->shareWishlist();
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..84e330c3bb4c9538d80ea7fe29fb9cedfb4822e0
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.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.
+ *
+ * @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\Test\TestCase;
+
+use Magento\Customer\Test\Fixture\CustomerInjectable;
+use Magento\Customer\Test\Page\Adminhtml\CustomerIndex;
+use Magento\Customer\Test\Page\Adminhtml\CustomerIndexEdit;
+
+/**
+ * Test Creation for ViewProductInCustomerWishlistOnBackend
+ *
+ * Test Flow:
+ *
+ * Preconditions:
+ * 1. Create customer.
+ * 2. Create products from dataSet.
+ * 3. Add products to the customer's wish list (composite products should be configured).
+ *
+ * Steps:
+ * 1. Log in to backend.
+ * 2. Go to Customers > All Customers.
+ * 3. Search and open customer.
+ * 4. Open wish list tab.
+ * 5. Perform assertions.
+ *
+ * @group Wishlist_(CS)
+ * @ZephyrId MAGETWO-29616
+ */
+class ViewProductInCustomerWishlistOnBackendTest extends AbstractWishlistTest
+{
+    /**
+     * Prepare customer for test.
+     *
+     * @param CustomerInjectable $customer
+     * @return array
+     */
+    public function __prepare(CustomerInjectable $customer)
+    {
+        $customer->persist();
+
+        return ['customer' => $customer];
+    }
+
+    /**
+     * Configure customer wish list on backend.
+     *
+     * @param CustomerInjectable $customer
+     * @param string $product
+     * @param CustomerIndex $customerIndex
+     * @param CustomerIndexEdit $customerIndexEdit
+     * @return array
+     */
+    public function test(
+        CustomerInjectable $customer,
+        $product,
+        CustomerIndex $customerIndex,
+        CustomerIndexEdit $customerIndexEdit
+    ) {
+        $this->markTestIncomplete('Bug: MAGETWO-27949');
+
+        // Preconditions
+        $product = $this->createProducts($product)[0];
+        $this->loginCustomer($customer);
+        $this->addToWishlist([$product], true);
+
+        // Steps
+        $customerIndex->open();
+        $customerIndex->getCustomerGridBlock()->searchAndOpen(['email' => $customer->getEmail()]);
+        $customerIndexEdit->getCustomerForm()->openTab('wishlist');
+
+        return['product' => $product];
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest/test.csv b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest/test.csv
new file mode 100644
index 0000000000000000000000000000000000000000..740881766b87fed446df100e5e824a15032f3520
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest/test.csv
@@ -0,0 +1,6 @@
+"product";"constraint"
+"catalogProductSimple::with_two_custom_option";"assertProductInCustomerWishlistOnBackendGrid"
+"configurableProductInjectable::default";"assertConfigurableProductInCustomerWishlistOnBackendGrid"
+"bundleProduct::bundle_dynamic_product";"assertBundleProductInCustomerWishlistOnBackendGrid"
+"downloadableProductInjectable::with_two_separately_links";"assertDownloadableProductInCustomerWishlistOnBackendGrid"
+"groupedProductInjectable::three_simple_products";"assertGroupedProductInCustomerWishlistOnBackendGrid"
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php
new file mode 100644
index 0000000000000000000000000000000000000000..7f87b02424ae2698e01f487c39356b0889fa8ac4
--- /dev/null
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php
@@ -0,0 +1,100 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Wishlist\Test\TestStep;
+
+use Magento\Catalog\Test\Page\Product\CatalogProductView;
+use Mtf\Client\Browser;
+use Mtf\TestStep\TestStepInterface;
+
+/**
+ * Class AddProductsToWishlistStep
+ * Adding created products to the wish list
+ */
+class AddProductsToWishlistStep implements TestStepInterface
+{
+    /**
+     * Array with products
+     *
+     * @var array
+     */
+    protected $products;
+
+    /**
+     * Frontend product view page
+     *
+     * @var CatalogProductView
+     */
+    protected $catalogProductView;
+
+    /**
+     * Interface Browser
+     *
+     * @var Browser
+     */
+    protected $browser;
+
+    /**
+     * Configure flag
+     *
+     * @var bool
+     */
+    protected $configure;
+
+    /**
+     * @constructor
+     * @param CatalogProductView $catalogProductView
+     * @param Browser $browser
+     * @param array $products
+     * @param bool $configure [optional]
+     */
+    public function __construct(
+        CatalogProductView $catalogProductView,
+        Browser $browser,
+        array $products,
+        $configure = false
+    ) {
+        $this->products = $products;
+        $this->catalogProductView = $catalogProductView;
+        $this->browser = $browser;
+        $this->configure = $configure;
+    }
+
+    /**
+     * Add products to the wish list
+     *
+     * @return void
+     */
+    public function run()
+    {
+        foreach ($this->products as $product) {
+            $this->browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
+            if ($this->configure) {
+                $this->catalogProductView->getViewBlock()->addToWishlist($product);
+            } else {
+                $this->catalogProductView->getViewBlock()->clickAddToWishlist();
+            }
+        }
+    }
+}
diff --git a/dev/tests/functional/tests/app/Magento/Wishlist/Test/etc/constraint.xml b/dev/tests/functional/tests/app/Magento/Wishlist/Test/etc/constraint.xml
index a5bba6d8aea4a8fec1ddde5933a9dae7c87fc805..2769df12994a29055ab05c707bfaa3163ff4d9ec 100644
--- a/dev/tests/functional/tests/app/Magento/Wishlist/Test/etc/constraint.xml
+++ b/dev/tests/functional/tests/app/Magento/Wishlist/Test/etc/constraint.xml
@@ -42,7 +42,13 @@
     <assertProductIsPresentInCustomerBackendWishlist module="Magento_Wishlist">
         <severeness>low</severeness>
     </assertProductIsPresentInCustomerBackendWishlist>
-    <assertBundleProductDetailsInWishlist module="Magento_Wishlist">
+    <assertProductDetailsInWishlist module="Magento_Wishlist">
         <severeness>low</severeness>
-    </assertBundleProductDetailsInWishlist>
+    </assertProductDetailsInWishlist>
+    <assertProductInCustomerWishlistOnBackendGrid module="Magento_Wishlist">
+        <severeness>low</severeness>
+    </assertProductInCustomerWishlistOnBackendGrid>
+    <assertMoveProductToWishlistSuccessMessage module="Magento_Wishlist">
+        <severeness>low</severeness>
+    </assertMoveProductToWishlistSuccessMessage>
 </constraint>
diff --git a/dev/tests/functional/utils/bootstrap.php b/dev/tests/functional/utils/bootstrap.php
index 789fc0399c75d7a73e60c5443ab5ff9ea354ab9e..b7647311f5d7e576f53b3821ed2f95663ae926e3 100644
--- a/dev/tests/functional/utils/bootstrap.php
+++ b/dev/tests/functional/utils/bootstrap.php
@@ -38,8 +38,6 @@ set_include_path($path);
 $appRoot = dirname(dirname(dirname(dirname(__DIR__))));
 require $appRoot . '/app/bootstrap.php';
 
-$objectManagerFactory = new \Magento\Framework\App\ObjectManagerFactory();
-
-$arguments = $_SERVER;
-$objectManager = $objectManagerFactory->create(BP, $arguments);
+$objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER);
+$objectManager = $objectManagerFactory->create($_SERVER);
 \Mtf\ObjectManagerFactory::configure($objectManager);
diff --git a/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem.php b/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem.php
new file mode 100644
index 0000000000000000000000000000000000000000..ced86951709f897aecc35a098d67acb88b929b1f
--- /dev/null
+++ b/dev/tests/integration/framework/Magento/TestFramework/App/Filesystem.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright  Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\TestFramework\App;
+
+class Filesystem extends \Magento\Framework\Filesystem
+{
+    /**
+     * Overridden paths
+     *
+     * @var string[]
+     */
+    private $paths = [];
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function getDirPath($code)
+    {
+        return $this->getOverriddenPath($code, parent::getDirPath($code));
+    }
+
+    /**
+     * Overrides a path to directory for testing purposes
+     *
+     * @param string $code
+     * @param string $value
+     * @return void
+     */
+    public function overridePath($code, $value)
+    {
+        $this->paths[$code] = str_replace('\\', '/', $value);
+        unset($this->readInstances[$code]);
+        unset($this->writeInstances[$code]);
+    }
+
+    /**
+     * Looks up an overridden directory path
+     *
+     * @param string $code
+     * @param string $original
+     * @return string
+     */
+    private function getOverriddenPath($code, $original)
+    {
+        if (array_key_exists($code, $this->paths)) {
+            return $this->paths[$code];
+        }
+        return $original;
+    }
+}
diff --git a/dev/tests/integration/framework/Magento/TestFramework/Application.php b/dev/tests/integration/framework/Magento/TestFramework/Application.php
index fc8a5f50ecb278088a090e0793fe28a213eea1e2..efca4bf48e13d87967d153d87ad6aa510823bdad 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/Application.php
@@ -24,7 +24,7 @@
 namespace Magento\TestFramework;
 
 use Magento\Authorization\Model\UserContextInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
@@ -142,20 +142,26 @@ class Application
         $this->_installEtcDir = "{$installDir}/etc";
 
         $generationDir = "{$installDir}/generation";
+        $customDirs = array(
+            DirectoryList::CONFIG => array(DirectoryList::PATH => $this->_installEtcDir),
+            DirectoryList::VAR_DIR => array(DirectoryList::PATH => $installDir),
+            DirectoryList::MEDIA => array(DirectoryList::PATH => "{$installDir}/media"),
+            DirectoryList::STATIC_VIEW => array(DirectoryList::PATH => "{$installDir}/pub_static"),
+            DirectoryList::GENERATION => array(DirectoryList::PATH => $generationDir),
+            DirectoryList::CACHE => array(DirectoryList::PATH => $installDir . '/cache'),
+            DirectoryList::LOG => array(DirectoryList::PATH => $installDir . '/log'),
+            DirectoryList::THEMES => array(DirectoryList::PATH => BP . '/app/design'),
+            DirectoryList::SESSION => array(DirectoryList::PATH => $installDir . '/session'),
+            DirectoryList::TMP => array(DirectoryList::PATH => $installDir . '/tmp'),
+            DirectoryList::UPLOAD => array(DirectoryList::PATH => $installDir . '/upload'),
+        );
         $this->_initParams = array(
-            Filesystem::PARAM_APP_DIRS => array(
-                Filesystem::CONFIG_DIR => array('path' => $this->_installEtcDir),
-                Filesystem::VAR_DIR => array('path' => $installDir),
-                Filesystem::MEDIA_DIR => array('path' => "{$installDir}/media"),
-                Filesystem::STATIC_VIEW_DIR => array('path' => "{$installDir}/pub_static"),
-                Filesystem::GENERATION_DIR => array('path' => $generationDir),
-                Filesystem::CACHE_DIR => array('path' => $installDir . '/cache'),
-                Filesystem::LOG_DIR => array('path' => $installDir . '/log'),
-                Filesystem::THEMES_DIR => array('path' => BP . '/app/design'),
-            ),
+            \Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => $customDirs,
             \Magento\Framework\App\State::PARAM_MODE => $appMode
         );
-        $this->_factory = new \Magento\TestFramework\ObjectManagerFactory();
+        $dirList = new \Magento\Framework\App\Filesystem\DirectoryList(BP, $customDirs);
+        $driverPool = new \Magento\Framework\Filesystem\DriverPool;
+        $this->_factory = new \Magento\TestFramework\ObjectManagerFactory($dirList, $driverPool);
     }
 
     /**
@@ -203,27 +209,27 @@ class Application
      */
     public function initialize($overriddenParams = array())
     {
-        $overriddenParams['base_dir'] = BP;
         $overriddenParams[\Magento\Framework\App\State::PARAM_MODE] = $this->_appMode;
         $overriddenParams = $this->_customizeParams($overriddenParams);
+        $directories = isset($overriddenParams[\Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS])
+            ? $overriddenParams[\Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS]
+            : array();
+        $directoryList = new DirectoryList(BP, $directories);
 
         /** @var \Magento\TestFramework\ObjectManager $objectManager */
         $objectManager = Helper\Bootstrap::getObjectManager();
         if (!$objectManager) {
-            $objectManager = $this->_factory->create(BP, $overriddenParams);
+            $objectManager = $this->_factory->create($overriddenParams);
+            $objectManager->addSharedInstance($directoryList, 'Magento\Framework\App\Filesystem\DirectoryList');
+            $objectManager->addSharedInstance($directoryList, 'Magento\Framework\Filesystem\DirectoryList');
         } else {
-            $objectManager = $this->_factory->restore($objectManager, BP, $overriddenParams);
+            $objectManager = $this->_factory->restore($objectManager, $directoryList, $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\Framework\App\Filesystem\DirectoryList');
-        $objectManager->addSharedInstance($directoryList, 'Magento\Framework\Filesystem\DirectoryList');
-        $objectManager->removeSharedInstance('Magento\Framework\App\Filesystem');
-        $objectManager->removeSharedInstance('Magento\Framework\App\Filesystem\DirectoryList\Verification');
+        /** @var \Magento\TestFramework\App\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\TestFramework\App\Filesystem');
+        $objectManager->removeSharedInstance('Magento\Framework\Filesystem');
+        $objectManager->addSharedInstance($filesystem, 'Magento\Framework\Filesystem');
 
         Helper\Bootstrap::setObjectManager($objectManager);
 
@@ -255,22 +261,6 @@ class Application
             $objectManager->get('Magento\Framework\ObjectManager\DynamicConfigInterface')->getConfiguration()
         );
         \Magento\Framework\Phrase::setRenderer($objectManager->get('Magento\Framework\Phrase\RendererInterface'));
-
-        /** @var \Magento\Framework\App\Filesystem\DirectoryList\Verification $verification */
-        $verification = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList\Verification');
-        $verification->createAndVerifyDirectories();
-
-        $directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $directoryListConfig = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList\Configuration');
-        $directoryListConfig->configure($directoryList);
-
-        $directories = isset(
-            $overriddenParams[\Magento\Framework\App\Filesystem::PARAM_APP_DIRS]
-        ) ? $overriddenParams[\Magento\Framework\App\Filesystem::PARAM_APP_DIRS] : array();
-        foreach ($directories as $code => $configOverrides) {
-            $config = array_merge($directoryList->getConfig($code), $configOverrides);
-            $directoryList->addDirectory($code, $config);
-        }
     }
 
     /**
diff --git a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
index 21cc737136486ab5882c214a8d170ae63bb80079..e0ab8a1f019515b818d2bcad525d14f757e7e22a 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/ObjectManagerFactory.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\TestFramework;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem\DriverPool;
+
 /**
  * Class ObjectManagerFactory
  *
@@ -82,24 +85,18 @@ class ObjectManagerFactory extends \Magento\Framework\App\ObjectManagerFactory
      * Restore locator instance
      *
      * @param ObjectManager $objectManager
-     * @param string $rootDir
+     * @param DirectoryList $directoryList
      * @param array $arguments
      * @return ObjectManager
      */
-    public function restore(ObjectManager $objectManager, $rootDir, array $arguments)
+    public function restore(ObjectManager $objectManager, $directoryList, array $arguments)
     {
-        $directories = isset($arguments[\Magento\Framework\App\Filesystem::PARAM_APP_DIRS])
-            ? $arguments[\Magento\Framework\App\Filesystem::PARAM_APP_DIRS]
-            : array();
-        $directoryList = new \Magento\TestFramework\App\Filesystem\DirectoryList($rootDir, $directories);
-
         \Magento\TestFramework\ObjectManager::setInstance($objectManager);
-
+        $this->directoryList = $directoryList;
         $objectManager->configure($this->_primaryConfigData);
-        $objectManager->addSharedInstance($directoryList, 'Magento\Framework\App\Filesystem\DirectoryList');
-        $objectManager->addSharedInstance($directoryList, 'Magento\Framework\Filesystem\DirectoryList');
-
-        $appArguments = parent::createAppArguments($directoryList, $arguments);
+        $objectManager->addSharedInstance($this->directoryList, 'Magento\Framework\App\Filesystem\DirectoryList');
+        $objectManager->addSharedInstance($this->directoryList, 'Magento\Framework\Filesystem\DirectoryList');
+        $appArguments = parent::createAppArguments($this->directoryList, $arguments);
         $this->appArgumentsProxy->setSubject($appArguments);
         $this->factory->setArguments($appArguments->get());
         $objectManager->addSharedInstance($appArguments, 'Magento\Framework\App\Arguments');
@@ -116,18 +113,16 @@ class ObjectManagerFactory extends \Magento\Framework\App\ObjectManagerFactory
      * Load primary config
      *
      * @param \Magento\Framework\App\Filesystem\DirectoryList $directoryList
+     * @param DriverPool $driverPool
      * @param mixed $argumentMapper
      * @param string $appMode
      * @return array
      */
-    protected function _loadPrimaryConfig(
-        \Magento\Framework\App\Filesystem\DirectoryList $directoryList,
-        $argumentMapper,
-        $appMode
-    ) {
+    protected function _loadPrimaryConfig(DirectoryList $directoryList, $driverPool, $argumentMapper, $appMode)
+    {
         if (null === $this->_primaryConfigData) {
             $this->_primaryConfigData = array_replace(
-                parent::_loadPrimaryConfig($directoryList, $argumentMapper, $appMode),
+                parent::_loadPrimaryConfig($directoryList, $driverPool, $argumentMapper, $appMode),
                 array(
                     'default_setup' => array('type' => 'Magento\TestFramework\Db\ConnectionAdapter')
                 )
@@ -152,14 +147,4 @@ class ObjectManagerFactory extends \Magento\Framework\App\ObjectManagerFactory
         }
         return $this->_primaryConfigData;
     }
-
-    /**
-     * Override method in while running integration tests to prevent getting Exception
-     *
-     * @param \Magento\Framework\ObjectManager $objectManager
-     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-     */
-    protected function configureDirectories(\Magento\Framework\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 cc407facec018bbc1eafecdffe54a3ad6f691457..711f6ae10b44030fdd6e8843f8bb3272f26c7dd4 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php
@@ -26,6 +26,8 @@
  */
 namespace Magento\TestFramework\TestCase;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -73,9 +75,10 @@ abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
                 )
             );
 
-            $filesystem = $this->_objectManager->get('Magento\Framework\App\Filesystem');
-            $modulesDir = $filesystem->getPath($this->getDirectoryConstant());
-            $this->_schemaFile = $modulesDir . $this->_getXsdPath();
+            /** @var \Magento\Framework\Filesystem $filesystem */
+            $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+            $this->_schemaFile = $filesystem->getDirectoryRead($this->getDirectoryConstant())
+                ->getAbsolutePath($this->_getXsdPath());
         }
     }
 
@@ -147,8 +150,8 @@ abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
     public function getXmlConfigFiles()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $directory = $objectManager->get('Magento\Framework\App\Filesystem')
-            ->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $directory = $objectManager->get('Magento\Framework\Filesystem')
+            ->getDirectoryRead(DirectoryList::MODULES);
 
         return $objectManager->get('\Magento\Framework\Config\FileIteratorFactory')
             ->create($directory, $directory->search($this->_getConfigFilePathGlob()));
@@ -161,7 +164,7 @@ abstract class AbstractConfigFiles extends \PHPUnit_Framework_TestCase
      */
     protected function getDirectoryConstant()
     {
-        return \Magento\Framework\App\Filesystem::MODULES_DIR;
+        return DirectoryList::MODULES;
     }
 
     /**
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 1f4598fdf2688f33cf222449ac0df568cc2023e0..025835bff63a1ec7817f086b97e2b8a3226460f2 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
@@ -23,6 +23,7 @@
  */
 namespace Magento\Test;
 
+use Magento\Framework\App\Bootstrap;
 use Magento\Framework\App\State;
 
 class ApplicationTest extends \PHPUnit_Framework_TestCase
@@ -38,16 +39,13 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $installDir = '/install/dir';
         $appMode = \Magento\Framework\App\State::MODE_DEVELOPER;
         $directoryList = new \Magento\Framework\App\Filesystem\DirectoryList(BP);
-        $filesystem = new \Magento\Framework\App\Filesystem(
+        $driverPool = new \Magento\Framework\Filesystem\DriverPool;
+        $filesystem = new \Magento\Framework\Filesystem(
             $directoryList,
-            new \Magento\Framework\Filesystem\Directory\ReadFactory(),
-            new \Magento\Framework\Filesystem\Directory\WriteFactory(),
-            new \Magento\Framework\Filesystem\File\ReadFactory(
-                new \Magento\Framework\Filesystem\DriverFactory($directoryList)
-            ),
-            new \Magento\Framework\Filesystem\File\WriteFactory(
-                new \Magento\Framework\Filesystem\DriverFactory($directoryList)
-            )
+            new \Magento\Framework\Filesystem\Directory\ReadFactory($driverPool),
+            new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool),
+            new \Magento\Framework\Filesystem\File\ReadFactory($driverPool),
+            new \Magento\Framework\Filesystem\File\WriteFactory($driverPool)
         );
 
         $object = new \Magento\TestFramework\Application(
@@ -66,7 +64,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
         $initParams = $object->getInitParams();
         $this->assertInternalType('array', $initParams, 'Wrong initialization parameters type');
         $this->assertArrayHasKey(
-            \Magento\Framework\App\Filesystem::PARAM_APP_DIRS,
+            Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS,
             $initParams,
             'Directories are 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 932cd99ccd83d6bdb69674c33c9b4d87ef556885..9bbbc91222bf4fb0c4c247ed7befee68e82084db 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
@@ -27,6 +27,9 @@
  */
 namespace Magento\Test\Helper;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class BootstrapTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -50,9 +53,9 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
      * @var array
      */
     protected $_fixtureInitParams = array(
-        \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-            \Magento\Framework\App\Filesystem::CONFIG_DIR => array('path' => __DIR__),
-            \Magento\Framework\App\Filesystem::VAR_DIR => array('path' => __DIR__)
+        Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+            DirectoryList::CONFIG => array('path' => __DIR__),
+            DirectoryList::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 c9a00748ae5b73297ae91dc0bbc83ce5f458fc7e..8b6e197723ff57c2a34d755655e6bff7fd25d68b 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
@@ -40,13 +40,6 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
     {
         $resource = new \stdClass();
         $instanceConfig = new \Magento\TestFramework\ObjectManager\Config();
-        $verification = $this->getMock(
-            'Magento\Framework\App\Filesystem\DirectoryList\Verification',
-            array(),
-            array(),
-            '',
-            false
-        );
         $cache = $this->getMock('Magento\Framework\App\CacheInterface');
         $configLoader = $this->getMock('Magento\Framework\App\ObjectManager\ConfigLoader', array(), array(), '', false);
         $configCache = $this->getMock('Magento\Framework\App\ObjectManager\ConfigCache', array(), array(), '', false);
@@ -72,7 +65,6 @@ class ObjectManagerTest extends \PHPUnit_Framework_TestCase
             $factory,
             $instanceConfig,
             array(
-                'Magento\Framework\App\Filesystem\DirectoryList\Verification' => $verification,
                 'Magento\Framework\App\Cache\Type\Config' => $cache,
                 'Magento\Framework\App\ObjectManager\ConfigLoader' => $configLoader,
                 'Magento\Framework\App\ObjectManager\ConfigCache' => $configCache,
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php
index b4fb5187b5e695d684039db2b56a496dc0ef8945..1fb504a4ca3f8462441a21f256ae5ede849493c0 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/RequestTest.php
@@ -33,7 +33,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_model = new \Magento\TestFramework\Request(
-            $this->getMock('Magento\Framework\App\Route\ConfigInterface', [], [], '', false),
+            $this->getMock('Magento\Framework\App\Route\ConfigInterface\Proxy', [], [], '', false),
             $this->getMock('Magento\Framework\App\Request\PathInfoProcessorInterface', [], [], '', false),
             $this->getMock('Magento\Framework\Stdlib\CookieManager', [], [], '', false)
         );
diff --git a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php
index a554a38b2e8de6e10ef51972bd912a42a959380b..66d3f4b9fc0d13c2476444b66baa2c1fbbb21ed7 100644
--- a/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php
+++ b/dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/TestCase/ControllerAbstractTest.php
@@ -37,7 +37,7 @@ class ControllerAbstractTest extends \Magento\TestFramework\TestCase\AbstractCon
     {
         $this->messageManager = $this->getMock('\Magento\Framework\Message\Manager', array(), array(), '', false);
         $request = new \Magento\TestFramework\Request(
-            $this->getMock('Magento\Framework\App\Route\ConfigInterface', [], [], '', false),
+            $this->getMock('Magento\Framework\App\Route\ConfigInterface\Proxy', [], [], '', false),
             $this->getMock('Magento\Framework\App\Request\PathInfoProcessorInterface', [], [], '', false),
             $this->getMock('Magento\Framework\Stdlib\CookieManager', [], [], '', false)
         );
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 24f9e51e0085ce543a1f0d53316e75b17f5062c1..b8a687e7d444f310b801ba903a94926a17b29a65 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
@@ -23,6 +23,7 @@
  */
 namespace Magento\Backend\Block\System\Config;
 use Magento\Framework\App\Cache\State;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * @magentoAppArea adminhtml
@@ -263,9 +264,9 @@ class FormTest extends \PHPUnit_Framework_TestCase
             'Magento\Framework\App\Config\FileResolver'
         )->disableOriginalConstructor()->getMock();
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Framework\App\Filesystem');
+            ->get('Magento\Framework\Filesystem');
         /** @var $directory  \Magento\Framework\Filesystem\Directory\Read */
-        $directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $fileIteratorFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
             'Magento\Framework\Config\FileIteratorFactory'
         );
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 36815fc06f9e5581024c4f6c1b5dc8e9b017b633..9de65b0df1b41ed9dfa738c46f8c42384973f418 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
@@ -22,6 +22,8 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 namespace Magento\Backend\Block\Widget\Grid;
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Store\Model\StoreManager;
 /**
  * @magentoDataFixture Magento/Backend/Block/_files/backend_theme.php
@@ -67,8 +69,8 @@ class MassactionTest extends \PHPUnit_Framework_TestCase
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
             StoreManager::PARAM_RUN_CODE => 'admin',
             StoreManager::PARAM_RUN_TYPE => 'store',
-            \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/../../_files/design')
+            Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                DirectoryList::THEMES => 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 2e90624cc54de13cfdc6be07da275d9c6f5a899d..a88d575a9cb867a5a880d18a0c0506bfb6df0da1 100644
--- a/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php
+++ b/dev/tests/integration/testsuite/Magento/Backend/Block/Widget/GridTest.php
@@ -126,7 +126,7 @@ class GridTest extends \PHPUnit_Framework_TestCase
                     'Magento\Framework\View\Element\Template\Context',
                     array(
                         'filesystem' => $objectManager->create(
-                            '\Magento\Framework\App\Filesystem',
+                            '\Magento\Framework\Filesystem',
                             array('directoryList' => $directoryList)
                         )
                     )
diff --git a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/UrlRewriteTest.php b/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/UrlRewriteTest.php
deleted file mode 100644
index 40d98f02c2f67f5f71911ea3108a2910ced1b5ed..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/UrlRewriteTest.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Backend\Controller\Adminhtml;
-
-/**
- * @magentoAppArea adminhtml
- */
-class UrlRewriteTest extends \Magento\Backend\Utility\Controller
-{
-    /**
-     * Check save cms page rewrite
-     * @magentoDbIsolation enabled
-     * @magentoDataFixture Magento/Cms/_files/pages.php
-     */
-    public function testSaveActionCmsPage()
-    {
-        $page = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Cms\Model\Page');
-        $page->load('page_design_blank', 'identifier');
-
-        $this->getRequest()->setPost(
-            [
-                'description' => 'Some URL rewrite description',
-                'options' => 'R',
-                'request_path' => 'some_new_path',
-                'store_id' => 1,
-                'cms_page' => $page->getId()
-            ]
-        );
-        $this->dispatch('backend/admin/url_rewrite/save');
-
-        $this->assertSessionMessages(
-            $this->contains('The URL Rewrite has been saved.'),
-            \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS
-        );
-        $this->assertRedirect($this->stringContains('backend/admin/url_rewrite/index'));
-    }
-}
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 52539c4ba5a01435bdc93de913628e9371e36e0f..1b2007d23921ed175328cf91b1ad363e69f16a47 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Backend\Model\Config\Backend\Admin;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @magentoAppArea adminhtml
  */
@@ -50,9 +52,9 @@ class RobotsTest extends \PHPUnit_Framework_TestCase
         $this->model->setPath('design/search_engine_robots/custom_instructions');
         $this->model->afterLoad();
         $this->rootDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryRead(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
+            DirectoryList::ROOT
         );
     }
 
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 cde4b79d46f3d4c32532304ca2f19aa238c50646..a841528a49c4eef017aec1e889126a9eeaa1cbc9 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
@@ -21,12 +21,13 @@
  * @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)
  */
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /** @var \Magento\Framework\Filesystem\Directory\Write $rootDirectory */
 $rootDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-    'Magento\Framework\App\Filesystem'
+    'Magento\Framework\Filesystem'
 )->getDirectoryWrite(
-    \Magento\Framework\App\Filesystem::ROOT_DIR
+    DirectoryList::ROOT
 );
 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 54b934ff142866e7ad0ab411213602d075b48702..ceae419a6652b0a574467e19742b0e9cc23b0f20 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
@@ -21,10 +21,12 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /** @var \Magento\Framework\Filesystem\Directory\Write $rootDirectory */
 $rootDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-    'Magento\Framework\App\Filesystem'
+    'Magento\Framework\Filesystem'
 )->getDirectoryWrite(
-    \Magento\Framework\App\Filesystem::ROOT_DIR
+    DirectoryList::ROOT
 );
 $rootDirectory->copyFile($rootDirectory->getRelativePath(__DIR__ . '/robots.txt'), 'robots.txt');
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php
index fb3748e49514268e20ca3a0a90347991e4d82713..85d8d2d374d964d74d85251ddec8606c7a42dd0a 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Helper/ImageTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Helper;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ImageTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -46,9 +48,9 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
 
         // image fixtures
@@ -96,9 +98,9 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
 
         $mediaDirectory->delete($config->getBaseMediaPath());
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 ed577d8355e008b3bae17f282ed9e48799d46086..d8f4429a83bf77e0c6c0cd9d6b900e45f2b20abd 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Model\Product\Attribute\Backend;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Test class for \Magento\Catalog\Model\Product\Attribute\Backend\Media.
  * @magentoDataFixture Magento/Catalog/_files/product_simple.php
@@ -50,9 +52,9 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
         $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
 
         self::$_mediaTmpDir = $mediaDirectory->getAbsolutePath($config->getBaseTmpMediaPath());
@@ -75,9 +77,9 @@ class MediaTest extends \PHPUnit_Framework_TestCase
 
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
 
         if ($mediaDirectory->isExist($config->getBaseMediaPath())) {
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 3e5f2ac1b227a831ff4e3750be59d554d7be6860..d123affbf99ec1f319d204b542d1b8d2ef470f56 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
@@ -47,7 +47,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         );
         $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\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $registry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false);
         $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false);
         $this->_model = $this->getMockForAbstractClass(
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php
index f70efba036a1299b8882cbd02b9c46300e6af6ba..4f6fdddb931f4f4b80b3a12172daac7c947b615d 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Tests product model:
  * - general behaviour is tested (external interaction and pricing is not tested there)
@@ -266,9 +268,9 @@ class ProductGettersTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
         $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 ce6fc4da174040062f3d0cdbc9a4c068308e15cb..ad414b25ed8f49d99e0dabe194d6f4255c09f674 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Catalog\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Tests product model:
  * - general behaviour is tested (external interaction and pricing is not tested there)
@@ -53,9 +55,9 @@ class ProductTest extends \PHPUnit_Framework_TestCase
 
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
 
         if ($mediaDirectory->isExist($config->getBaseMediaPath())) {
@@ -154,9 +156,9 @@ class ProductTest extends \PHPUnit_Framework_TestCase
 
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
         $mediaDirectory = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
 
         $mediaDirectory->create($config->getBaseTmpMediaPath());
diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/FileResolverStub.php b/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/FileResolverStub.php
index 5f58f07e187051ffa619a151b891f0fb8af4ba9e..4a22ae2980e047b8709cb5431c61b40a69fb736d 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/FileResolverStub.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/Service/V1/FileResolverStub.php
@@ -35,8 +35,8 @@ class FileResolverStub implements \Magento\Framework\Config\FileResolverInterfac
         $readDirectory = $objectManager->create(
             'Magento\Framework\Filesystem\Directory\Read',
             [
-                'config' => ['path' => realpath(__DIR__ . '/../../_files/etc')],
-                'driver' => $objectManager->create('Magento\Framework\Filesystem\Driver\File')
+                'driver' => $objectManager->create('Magento\Framework\Filesystem\Driver\File'),
+                'path' => realpath(__DIR__ . '/../../_files/etc'),
             ]
         );
         $paths = ['data_object.xml'];
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 a433616ce8041fd594fa0eae0678066ee6115cd5..3773ec2c475eb3fb4d02cff97fe4a21579a3ca26 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/product_image.php
@@ -22,13 +22,15 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 /** @var $mediaConfig \Magento\Catalog\Model\Product\Media\Config */
 $mediaConfig = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
 
 /** @var $mediaDirectory \Magento\Framework\Filesystem\Directory\WriteInterface */
-$mediaDirectory = $objectManager->get('Magento\Framework\App\Filesystem')
-    ->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+$mediaDirectory = $objectManager->get('Magento\Framework\Filesystem')
+    ->getDirectoryWrite(DirectoryList::MEDIA);
 $targetDirPath = $mediaConfig->getBaseMediaPath() . str_replace('/', DIRECTORY_SEPARATOR, '/m/a/');
 $targetTmpDirPath = $mediaConfig->getBaseTmpMediaPath() . str_replace('/', DIRECTORY_SEPARATOR, '/m/a/');
 $mediaDirectory->create($targetDirPath);
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 60f087209d30cf3a59cef11c55098a3eb0b3b7e8..09ec81540dba688ffb547ff8ec9b9f36fd49581c 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
@@ -21,6 +21,7 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /** @var $config \Magento\Catalog\Model\Product\Media\Config */
 $config = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
@@ -29,9 +30,9 @@ $config = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
 
 /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
 $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-    'Magento\Framework\App\Filesystem'
+    'Magento\Framework\Filesystem'
 )->getDirectoryWrite(
-    \Magento\Framework\App\Filesystem::MEDIA_DIR
+    DirectoryList::MEDIA
 );
 
 $mediaDirectory->delete($config->getBaseMediaPath());
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 b7b19ccb7bef5efca8341a7db1881246b1aba796..1ba1c880b7a114c3edad40dadad680e9ef0f7ee7 100644
--- a/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php
+++ b/dev/tests/integration/testsuite/Magento/Catalog/controllers/_files/products.php
@@ -24,12 +24,14 @@
 
 // Copy images to tmp media path
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 $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\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
-$mediaDirectory = $obectManager->get('Magento\Framework\App\Filesystem')
-    ->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+$mediaDirectory = $obectManager->get('Magento\Framework\Filesystem')
+    ->getDirectoryWrite(DirectoryList::MEDIA);
 
 $baseTmpMediaPath = $config->getBaseTmpMediaPath();
 $mediaDirectory->create($baseTmpMediaPath);
diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php
index d7536203fd43e7d98af2dab424b77b13e832d970..d36c37daca5e190fddbffb543d5e4b8a04e37f4a 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Export/ProductTest.php
@@ -88,7 +88,7 @@ class ProductTest extends \PHPUnit_Framework_TestCase
      */
     public function testExportStockItemAttributesAreFilled()
     {
-        $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $directoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false);
 
         $filesystemMock->expects($this->once())->method('getDirectoryWrite')->will($this->returnValue($directoryMock));
diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php
index d58d379f96635d9923ef96203722250805fbf843..637dc75c3fbe74c4128fdb3205453ac445a655ca 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/ProductTest.php
@@ -30,6 +30,8 @@
  */
 namespace Magento\CatalogImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class ProductTest
  *
@@ -104,8 +106,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         }
 
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_to_import.csv',
@@ -152,8 +154,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         }
 
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_to_import.csv',
             $directory
@@ -200,8 +202,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $pathToFile = __DIR__ . '/_files/' . $importFile;
 
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory);
         $this->_model->setSource($source)->setParameters(array('behavior' => $behavior))->isDataValid();
@@ -266,8 +268,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         }
 
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_to_import_with_datetime.csv',
@@ -606,9 +608,9 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         /** @var \Magento\Framework\Filesystem\Directory\Write $mediaDirectory */
         $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
         $mediaDirectory->create('import');
         $dirPath = $mediaDirectory->getAbsolutePath('import');
@@ -622,9 +624,9 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         /** @var \Magento\Framework\Filesystem\Directory\Write $mediaDirectory */
         $mediaDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         );
         $mediaDirectory->delete('import');
         $mediaDirectory->delete('catalog');
@@ -670,9 +672,9 @@ 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\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         );
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory);
         $this->_model->setSource(
             $source
@@ -710,9 +712,9 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         // import data from CSV file
         $pathToFile = __DIR__ . '/_files/products_with_invalid_multiselect_values.csv';
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         );
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory);
         $validationResult = $this->_model->setSource(
             $source
@@ -743,8 +745,8 @@ class ProductTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 
-        $filesystem = $objectManager->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $filesystem = $objectManager->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
 
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/_files/products_multiple_stores.csv',
@@ -773,4 +775,29 @@ class ProductTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('Option Label', $simpleProduct->getAttributeText('attribute_with_option'));
         $this->assertEquals(array(2, 4), $simpleProduct->getAvailableInCategories());
     }
+
+    /**
+     * @magentoDbIsolation enabled
+     */
+    public function testProductWithInvalidWeight()
+    {
+        // import data from CSV file
+        $pathToFile = __DIR__ . '/_files/product_to_import_invalid_weight.csv';
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
+            'Magento\Framework\Filesystem'
+        );
+
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
+        $source = new \Magento\ImportExport\Model\Import\Source\Csv($pathToFile, $directory);
+        $validationResult = $this->_model->setSource(
+            $source
+        )->setParameters(
+                array('behavior' => \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND)
+            )->isDataValid();
+
+        $expectedErrors = ["Product weight is invalid" => [2]];
+
+        $this->assertFalse($validationResult);
+        $this->assertEquals($expectedErrors, $this->_model->getErrorMessages());
+    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_to_import_invalid_weight.csv b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_to_import_invalid_weight.csv
new file mode 100644
index 0000000000000000000000000000000000000000..02b5c012bee1e9a4bb05bd9e677cb4b7a6f3b0bd
--- /dev/null
+++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_to_import_invalid_weight.csv
@@ -0,0 +1,5 @@
+sku,_store,name,price,_type,_attribute_set,weight
+simple1,,"simple 1",10,simple,Default,2
+simple2,,"simple 2",20,simple,Default,-5
+simple3,,"simple 3",30,simple,Default,0
+virtual1,,"virtual 1",5,virtual,Default,
diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/FulltextTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/FulltextTest.php
index 0c519efde675f44c43a0b7784223f1a8e056eb7f..5e7f0a3543e4d2791299b7f8bef45d50e9cf9031 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/FulltextTest.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/FulltextTest.php
@@ -56,12 +56,24 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \Magento\Catalog\Model\Product
      */
-    protected $productFirst;
+    protected $productApple;
 
     /**
      * @var \Magento\Catalog\Model\Product
      */
-    protected $productSecond;
+    protected $productBanana;
+    /**
+     * @var \Magento\Catalog\Model\Product
+     */
+    protected $productOrange;
+    /**
+     * @var \Magento\Catalog\Model\Product
+     */
+    protected $productPapaya;
+    /**
+     * @var \Magento\Catalog\Model\Product
+     */
+    protected $productCherry;
 
     protected function setUp()
     {
@@ -87,8 +99,11 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
             'Magento\Search\Model\QueryFactory'
         );
 
-        $this->productFirst = $this->getProductBySku('fulltext-1');
-        $this->productSecond = $this->getProductBySku('fulltext-2');
+        $this->productApple = $this->getProductBySku('fulltext-1');
+        $this->productBanana = $this->getProductBySku('fulltext-2');
+        $this->productOrange = $this->getProductBySku('fulltext-3');
+        $this->productPapaya = $this->getProductBySku('fulltext-4');
+        $this->productCherry = $this->getProductBySku('fulltext-5');
     }
 
     public function testReindexAll()
@@ -97,14 +112,17 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
 
         $this->indexer->reindexAll();
 
-        $products = $this->search('Simple Product First');
+        $products = $this->search('Apple');
         $this->assertCount(1, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
 
         $products = $this->search('Simple Product');
-        $this->assertCount(2, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
-        $this->assertEquals($this->productSecond->getId(), $products[1]->getId());
+        $this->assertCount(5, $products);
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
+        $this->assertEquals($this->productBanana->getId(), $products[1]->getId());
+        $this->assertEquals($this->productOrange->getId(), $products[2]->getId());
+        $this->assertEquals($this->productPapaya->getId(), $products[3]->getId());
+        $this->assertEquals($this->productCherry->getId(), $products[4]->getId());
     }
 
     /**
@@ -112,20 +130,23 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
      */
     public function testReindexRowAfterEdit()
     {
-        $this->productFirst->setData('name', 'Simple Product Third');
-        $this->productFirst->save();
+        $this->productApple->setData('name', 'Simple Product Cucumber');
+        $this->productApple->save();
 
-        $products = $this->search('Simple Product First');
+        $products = $this->search('Apple');
         $this->assertCount(0, $products);
 
-        $products = $this->search('Simple Product Third');
+        $products = $this->search('Cucumber');
         $this->assertCount(1, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
 
         $products = $this->search('Simple Product');
-        $this->assertCount(2, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
-        $this->assertEquals($this->productSecond->getId(), $products[1]->getId());
+        $this->assertCount(5, $products);
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
+        $this->assertEquals($this->productBanana->getId(), $products[1]->getId());
+        $this->assertEquals($this->productOrange->getId(), $products[2]->getId());
+        $this->assertEquals($this->productPapaya->getId(), $products[3]->getId());
+        $this->assertEquals($this->productCherry->getId(), $products[4]->getId());
     }
 
     /**
@@ -134,8 +155,8 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
     public function testReindexRowAfterMassAction()
     {
         $productIds = [
-            $this->productFirst->getId(),
-            $this->productSecond->getId(),
+            $this->productApple->getId(),
+            $this->productBanana->getId(),
         ];
         $attrData = [
             'name' => 'Simple Product Common',
@@ -147,24 +168,27 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
         );
         $action->updateAttributes($productIds, $attrData, 1);
 
-        $products = $this->search('Simple Product First');
+        $products = $this->search('Apple');
         $this->assertCount(0, $products);
 
-        $products = $this->search('Simple Product Second');
+        $products = $this->search('Banana');
         $this->assertCount(0, $products);
 
-        $products = $this->search('Simple Product Third');
+        $products = $this->search('Unknown');
         $this->assertCount(0, $products);
 
-        $products = $this->search('Simple Product Common');
+        $products = $this->search('Common');
         $this->assertCount(2, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
-        $this->assertEquals($this->productSecond->getId(), $products[1]->getId());
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
+        $this->assertEquals($this->productBanana->getId(), $products[1]->getId());
 
         $products = $this->search('Simple Product');
-        $this->assertCount(2, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
-        $this->assertEquals($this->productSecond->getId(), $products[1]->getId());
+        $this->assertCount(5, $products);
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
+        $this->assertEquals($this->productBanana->getId(), $products[1]->getId());
+        $this->assertEquals($this->productOrange->getId(), $products[2]->getId());
+        $this->assertEquals($this->productPapaya->getId(), $products[3]->getId());
+        $this->assertEquals($this->productCherry->getId(), $products[4]->getId());
     }
 
     /**
@@ -173,11 +197,14 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
      */
     public function testReindexRowAfterDelete()
     {
-        $this->productSecond->delete();
+        $this->productBanana->delete();
 
-        $products = $this->search('Simple Product Common');
-        $this->assertCount(1, $products);
-        $this->assertEquals($this->productFirst->getId(), $products[0]->getId());
+        $products = $this->search('Simple Product');
+        $this->assertCount(4, $products);
+        $this->assertEquals($this->productApple->getId(), $products[0]->getId());
+        $this->assertEquals($this->productOrange->getId(), $products[1]->getId());
+        $this->assertEquals($this->productPapaya->getId(), $products[2]->getId());
+        $this->assertEquals($this->productCherry->getId(), $products[3]->getId());
     }
 
     /**
@@ -191,9 +218,10 @@ class FulltextTest extends \PHPUnit_Framework_TestCase
         $this->resourceFulltext->resetSearchResults();
         $query = $this->queryFactory->get();
         $query->unsetData()->setQueryText($text)->prepare();
-        $this->resourceFulltext->prepareResult($this->fulltext, $text, $query);
         $products = [];
-        foreach ($query->getResultCollection() as $product) {
+        $collection = $this->engine->getResultCollection();
+        $collection->addSearchFilter($text);
+        foreach ($collection as $product) {
             $products[] = $product;
         }
         return $products;
diff --git a/app/code/Magento/CatalogSearch/Model/Search/CatalogTest.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Search/CatalogTest.php
similarity index 100%
rename from app/code/Magento/CatalogSearch/Model/Search/CatalogTest.php
rename to dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Search/CatalogTest.php
diff --git a/dev/tests/integration/testsuite/Magento/CatalogSearch/_files/indexer_fulltext.php b/dev/tests/integration/testsuite/Magento/CatalogSearch/_files/indexer_fulltext.php
index be6ff88532fbaf82518fa7c425ffd4ccbfdab6a6..e4c65bc79e07917b500bf5d2c87594dda0510766 100644
--- a/dev/tests/integration/testsuite/Magento/CatalogSearch/_files/indexer_fulltext.php
+++ b/dev/tests/integration/testsuite/Magento/CatalogSearch/_files/indexer_fulltext.php
@@ -30,7 +30,7 @@ $productFirst = $objectManager->create('Magento\Catalog\Model\Product');
 $productFirst->setTypeId('simple')
     ->setAttributeSetId(4)
     ->setWebsiteIds([1])
-    ->setName('Simple Product First')
+    ->setName('Simple Product Apple')
     ->setSku('fulltext-1')
     ->setPrice(10)
     ->setMetaTitle('first meta title')
@@ -46,7 +46,7 @@ $productSecond = $objectManager->create('Magento\Catalog\Model\Product');
 $productSecond->setTypeId('simple')
     ->setAttributeSetId(4)
     ->setWebsiteIds([1])
-    ->setName('Simple Product Second')
+    ->setName('Simple Product Banana')
     ->setSku('fulltext-2')
     ->setPrice(20)
     ->setMetaTitle('second meta title')
@@ -57,3 +57,51 @@ $productSecond->setTypeId('simple')
     ->setStockData(['use_config_manage_stock' => 0])
     ->save();
 
+/** @var $productFirst \Magento\Catalog\Model\Product */
+$productThird = $objectManager->create('Magento\Catalog\Model\Product');
+$productThird->setTypeId('simple')
+    ->setAttributeSetId(4)
+    ->setWebsiteIds([1])
+    ->setName('Simple Product Orange')
+    ->setSku('fulltext-3')
+    ->setPrice(20)
+    ->setMetaTitle('third meta title')
+    ->setMetaKeyword('third meta keyword')
+    ->setMetaDescription('third meta description')
+    ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
+    ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
+    ->setStockData(['use_config_manage_stock' => 0])
+    ->save();
+
+/** @var $productFirst \Magento\Catalog\Model\Product */
+$productFourth = $objectManager->create('Magento\Catalog\Model\Product');
+$productFourth->setTypeId('simple')
+    ->setAttributeSetId(4)
+    ->setWebsiteIds([1])
+    ->setName('Simple Product Papaya')
+    ->setSku('fulltext-4')
+    ->setPrice(20)
+    ->setMetaTitle('fourth meta title')
+    ->setMetaKeyword('fourth meta keyword')
+    ->setMetaDescription('fourth meta description')
+    ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
+    ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
+    ->setStockData(['use_config_manage_stock' => 0])
+    ->save();
+
+/** @var $productFirst \Magento\Catalog\Model\Product */
+$productFifth = $objectManager->create('Magento\Catalog\Model\Product');
+$productFifth->setTypeId('simple')
+    ->setAttributeSetId(4)
+    ->setWebsiteIds([1])
+    ->setName('Simple Product Cherry')
+    ->setSku('fulltext-5')
+    ->setPrice(20)
+    ->setMetaTitle('fifth meta title')
+    ->setMetaKeyword('fifth meta keyword')
+    ->setMetaDescription('fifth meta description')
+    ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
+    ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
+    ->setStockData(['use_config_manage_stock' => 0])
+    ->save();
+
diff --git a/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php b/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php
index 98c6a3e760e05f543a4259d4981bf133901dca3f..852514da1bdeef63322417a6c3a717a96c396fe1 100644
--- a/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Checkout/Controller/OnepageTest.php
@@ -48,37 +48,12 @@ class OnepageTest extends \Magento\TestFramework\TestCase\AbstractController
         $this->dispatch('checkout/onepage/index');
         $html = $this->getResponse()->getBody();
         $this->assertContains('<li id="opc-payment"', $html);
-        $this->assertSelectCount('[id="checkout-payment-method-load"]', 1, $html);
+        $this->assertSelectEquals('[id="checkout-shipping-method-load"]', '', 1, $html);
+        $this->assertSelectEquals('[id="checkout-payment-method-load"]', '', 1, $html);
         $this->assertSelectCount('form[id="co-billing-form"][action=""]', 1, $html);
         $this->assertSelectCount('form[id="co-payment-form"] input[name="form_key"]', 1, $html);
     }
 
-    /**
-     * Covers app/code/Magento/Checkout/Block/Onepage/Payment/Info.php
-     */
-    public function testProgressAction()
-    {
-        $steps = array(
-            'payment' => array('is_show' => true, 'complete' => true),
-            'billing' => array('is_show' => true),
-            'shipping' => array('is_show' => true),
-            'shipping_method' => array('is_show' => true)
-        );
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Checkout\Model\Session'
-        )->setSteps(
-            $steps
-        );
-
-        $this->dispatch('checkout/onepage/progress');
-        $html = $this->getResponse()->getBody();
-        $this->assertContains('Checkout', $html);
-        $methodTitle = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Checkout\Model\Session'
-        )->getQuote()->getPayment()->getMethodInstance()->getTitle();
-        $this->assertContains('<dt class="title">' . $methodTitle . '</dt>', $html);
-    }
-
     public function testShippingMethodAction()
     {
         $this->dispatch('checkout/onepage/shippingMethod');
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 3df51f368b84b6d4ccba4731022028e18e3a14e0..df88334ac03aca6b93dba438a1b3e46dd31c5900 100644
--- a/dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Cms/Helper/Wysiwyg/ImagesTest.php
@@ -23,20 +23,22 @@
  */
 namespace Magento\Cms\Helper\Wysiwyg;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ImagesTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetStorageRoot()
     {
-        $path = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
-        )->getPath(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
         );
+        $mediaPath = $filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath();
+        /** @var \Magento\Cms\Helper\Wysiwyg\Images $helper */
         $helper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Cms\Helper\Wysiwyg\Images'
         );
-        $realPath = str_replace('\\', '/', $path);
-        $this->assertStringStartsWith($realPath, $helper->getStorageRoot());
+        $this->assertStringStartsWith($mediaPath, $helper->getStorageRoot());
     }
 
     public function testGetCurrentUrl()
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 e725dd5f6b1eec76c6a4a888d8ec8b3ac3a7983f..24a1b5303bcee46d71d298e4f2cfb95f5b430162 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
@@ -24,6 +24,8 @@
  */
 namespace Magento\Cms\Model\Wysiwyg\Images;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  *
  * @SuppressWarnings(PHPMD.LongVariable)
@@ -86,7 +88,8 @@ class StorageTest extends \PHPUnit_Framework_TestCase
     public function testGetThumbsPath()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
         $session = $objectManager->get('Magento\Backend\Model\Session');
         $backendUrl = $objectManager->get('Magento\Backend\Model\UrlInterface');
         $imageFactory = $objectManager->get('Magento\Framework\Image\AdapterFactory');
@@ -114,7 +117,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
             $uploaderFactory
         );
         $this->assertStringStartsWith(
-            str_replace('\\', '/', $filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR)),
+            $filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath(),
             $model->getThumbsPath()
         );
     }
diff --git a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php b/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php
index 16e7bfd7675cdc8b3ad1b7385ab98df11c930a78..c4f10222e07b1fec6749203e5ae8557ceb96ce6c 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/App/EmulationTest.php
@@ -43,12 +43,8 @@ class EmulationTest extends \PHPUnit_Framework_TestCase
         $design = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->get('Magento\Framework\View\DesignInterface');
 
-        $initialEnvInfo = $this->_model->startEnvironmentEmulation(1);
-        $initialDesign = $initialEnvInfo->getInitialDesign();
-        $this->assertEquals(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, $initialDesign['area']);
-        $this->assertEquals(\Magento\Framework\App\Area::AREA_FRONTEND, $design->getDesignTheme()->getData('area'));
-
-        $this->_model->stopEnvironmentEmulation($initialEnvInfo);
+        $this->_model->startEnvironmentEmulation(1);
+        $this->_model->stopEnvironmentEmulation();
         $this->assertEquals(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, $design->getArea());
     }
 }
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 7c5696182a5b2a03bd3396a6878cd60439c04c98..9af2cfe96343522bd50e80e07b23351cd4d05133 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/File/StorageTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/File/StorageTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Model\File;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class StorageTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -39,12 +41,12 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         $this->assertArrayHasKey('media_directory', $config);
         $this->assertArrayHasKey('allowed_resources', $config);
         $this->assertArrayHasKey('update_time', $config);
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
         $this->assertEquals(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-                'Magento\Framework\App\Filesystem'
-            )->getPath(
-                \Magento\Framework\App\Filesystem::MEDIA_DIR
-            ),
+            $filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath(),
             $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 74f9dd71b7fb990a072a95002fc6b90612cd69c5..a927d5d9905006bd36501569b48b2c9dcdd6722e 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/ObserverTest.php
@@ -63,7 +63,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
             array(
                 $this->_objectManager->create('Magento\Core\Model\Resource\Theme\Data\CollectionFactory'),
                 $this->_objectManager->create('Magento\Core\Model\Theme\Data\Collection'),
-                $this->_objectManager->create('Magento\Framework\App\Filesystem')
+                $this->_objectManager->create('Magento\Framework\Filesystem')
             )
         );
         $themeRegistration->expects($this->once())->method('register')->with($this->equalTo($pattern));
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 03fc64e974492f5727982219526b946505685317..943cc8210354605c34d501f8a1dc4b07b32b9d45 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/CollectionTest.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Core\Model\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class CollectionTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -39,16 +41,16 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Framework\App\Filesystem\DirectoryList',
             array(
-                'root' => \Magento\Framework\App\Filesystem::ROOT_DIR,
-                'directories' => array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => array(
-                        'path' => dirname(__DIR__) . '/_files/design'
+                'root' => DirectoryList::ROOT,
+                'config' => array(
+                    DirectoryList::THEMES => array(
+                        DirectoryList::PATH => dirname(__DIR__) . '/_files/design'
                     )
                 )
             )
         );
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('directoryList' => $directoryList)
         );
         $this->_model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
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 59c3fc76ba4e798ee07abd87c969fbbb5309e2cd..cc6a700df237f74f66553145fc936269144b8ac4 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/Theme/RegistrationTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Core\Model\Theme;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class RegistrationTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -42,8 +45,8 @@ class RegistrationTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => array(
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::THEMES => array(
                         'path' => dirname(__DIR__) . '/_files/design'
                     )
                 )
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 77409fe8521aff511fd45fec20058d4a3d83e671..20ab2c48ae08321e39882b84173201a8b68fab36 100644
--- a/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
+++ b/dev/tests/integration/testsuite/Magento/Core/Model/View/DesignTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Core\Model\View;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @magentoDataFixture Magento/Core/Model/_files/design/themes.php
  */
@@ -46,23 +49,23 @@ class DesignTest extends \PHPUnit_Framework_TestCase
     public static function setUpBeforeClass()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $themeDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $themeDir = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
         $themeDir->delete('theme/frontend');
         $themeDir->delete('theme/_merged');
 
-        $libPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::LIB_WEB);
-        copy($libPath . '/prototype/prototype.js', $libPath . '/prototype/prototype.min.js');
+        $libDir = $filesystem->getDirectoryWrite(DirectoryList::LIB_WEB);
+        $libDir->copyFile('prototype/prototype.js', 'prototype/prototype.min.js');
     }
 
     public static function tearDownAfterClass()
     {
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
+        /** @var \Magento\Framework\Filesystem $filesystem */
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Framework\App\Filesystem');
-        $libPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::LIB_WEB);
-        unlink($libPath . '/prototype/prototype.min.js');
+            ->get('Magento\Framework\Filesystem');
+        $libDir = $filesystem->getDirectoryWrite(DirectoryList::LIB_WEB);
+        $libDir->delete('prototype/prototype.min.js');
     }
 
     protected function setUp()
@@ -83,8 +86,8 @@ class DesignTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => array(
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::THEMES => array(
                         'path' => realpath(__DIR__ . '/../_files/design')
                     )
                 )
@@ -205,10 +208,10 @@ class DesignTest extends \PHPUnit_Framework_TestCase
             'Magento\Framework\View\DesignInterface'
         )->getDesignTheme();
         $customConfigFile = $theme->getCustomization()->getCustomViewConfigPath();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
+        /** @var $filesystem \Magento\Framework\Filesystem */
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $relativePath = $directory->getRelativePath($customConfigFile);
         try {
             $directory->writeFile(
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 dcc166c8b53a4509ca94a2538ee4687694f66eaa..f86fff3eab15cdb1bd3b6bb1f1e986ff47b63d32 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
@@ -21,12 +21,15 @@
  * @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)
  */
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\AreaList')
     ->getArea(\Magento\Backend\App\Area\FrontNameResolver::AREA_CODE)
     ->load(\Magento\Framework\App\Area::PART_CONFIG);
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-        \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => realpath(__DIR__)),
+    Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+        DirectoryList::THEMES => array('path' => realpath(__DIR__)),
     ),
 ));
 \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->configure(
diff --git a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/FileResolverStub.php b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/FileResolverStub.php
index f93865f29ccb2c70121f49eea393c78576ebd4a5..35599dfadd704e5f209193b90bc9dafdbb8e1922 100644
--- a/dev/tests/integration/testsuite/Magento/Customer/Service/V1/FileResolverStub.php
+++ b/dev/tests/integration/testsuite/Magento/Customer/Service/V1/FileResolverStub.php
@@ -35,8 +35,8 @@ class FileResolverStub implements \Magento\Framework\Config\FileResolverInterfac
         $readDirectory = $objectManager->create(
             'Magento\Framework\Filesystem\Directory\Read',
             [
-                'config' => ['path' => realpath(__DIR__ . '/../../_files/etc')],
-                'driver' => $objectManager->create('Magento\Framework\Filesystem\Driver\File')
+                'driver' => $objectManager->create('Magento\Framework\Filesystem\Driver\File'),
+                'path' => realpath(__DIR__ . '/../../_files/etc'),
             ]
         );
         $paths = ['data_object.xml'];
diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php
index ccd5242e48b8e4cdb5da3649a93a6e9ead65e771..8b4a21df371000d47b3c00d8ba8667160a40339b 100644
--- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php
+++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\CustomerImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class AddressTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -408,9 +410,9 @@ class AddressTest extends \PHPUnit_Framework_TestCase
 
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $filesystem = $objectManager->create('Magento\Framework\App\Filesystem');
+        $filesystem = $objectManager->create('Magento\Framework\Filesystem');
 
-        $directoryWrite = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $directoryWrite = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
 
         $result = $this->_entityAdapter->setSource(
             \Magento\ImportExport\Model\Import\Adapter::findAdapterFor($sourceFile, $directoryWrite)
@@ -504,8 +506,8 @@ class AddressTest extends \PHPUnit_Framework_TestCase
 
         /** @var $objectManager \Magento\TestFramework\ObjectManager */
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        $filesystem = $objectManager->create('Magento\Framework\App\Filesystem');
-        $directoryWrite = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $filesystem = $objectManager->create('Magento\Framework\Filesystem');
+        $directoryWrite = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $result = $this->_entityAdapter->setSource(
             \Magento\ImportExport\Model\Import\Adapter::findAdapterFor($sourceFile, $directoryWrite)
         )->isDataValid();
diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php
index accd9b15f33459bba2ae091373d53eb2c846a676..34dc709e608099ef738fd69fcc68d11bd71d15c8 100644
--- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php
+++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerCompositeTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\CustomerImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
 {
     /**#@+
@@ -157,9 +159,9 @@ class CustomerCompositeTest extends \PHPUnit_Framework_TestCase
             ->loadArea(\Magento\Framework\App\Area::AREA_FRONTEND);
         // set entity adapter parameters
         $this->_entityAdapter->setParameters(array('behavior' => $behavior));
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $filesystem = $this->_objectManager->create('Magento\Framework\App\Filesystem');
-        $rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = $this->_objectManager->create('Magento\Framework\Filesystem');
+        $rootDirectory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
 
         // set fixture CSV file
         $result = $this->_entityAdapter->setSource(
diff --git a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php
index de5c454cb7a19529bfaa15d28b0aca1cf48ccc30..1b31bbb5a3c8b05d255986330301ffacaf3b3ddd 100644
--- a/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php
+++ b/dev/tests/integration/testsuite/Magento/CustomerImportExport/Model/Import/CustomerTest.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\CustomerImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\ImportExport\Model\Import;
 
 /**
@@ -77,9 +78,9 @@ class CustomerTest extends \PHPUnit_Framework_TestCase
         ];
 
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
+            ->create('Magento\Framework\Filesystem');
         $this->directoryWrite = $filesystem
-            ->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->getDirectoryWrite(DirectoryList::ROOT);
     }
 
     /**
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 e9d0b37bc126967e0b16e7408931bdd8918f6242..04ec999b9ff5f47796caf085290ed0d96b57c735 100644
--- a/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
+++ b/dev/tests/integration/testsuite/Magento/DesignEditor/Model/Config/QuickStylesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\DesignEditor\Model\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class QuickStylesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -41,10 +43,6 @@ class QuickStylesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem\DirectoryList $directoryList */
-        $directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $path = str_replace($directoryList->getRoot(), '', str_replace('\\', '/', __DIR__) . '/../_files/design');
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::THEMES_DIR, array('path' => ltrim($path, '/')));
         $this->_design = $objectManager->get('Magento\Framework\View\DesignInterface');
         $objectManager->get('Magento\Framework\App\State')
             ->setAreaCode(\Magento\Framework\View\DesignInterface::DEFAULT_AREA);
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 e4adc60b44f5776485ddae06aaf022e600fd3337..061795101f17125de112f3e1ed4056797db31742 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\DesignEditor\Model\Editor\Tools\Controls;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ConfigurationTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -57,19 +59,6 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
      */
     public function testLoadConfigurations($type, $controlName, $controlData)
     {
-        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $relativePath = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
-        )->getDirectoryRead(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
-        )->getRelativePath(
-            __DIR__ . '/../../../_files/design'
-        );
-        /** @var \Magento\Framework\App\Filesystem\DirectoryList $directoryList */
-        $directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::ROOT_DIR, array('path' => $relativePath));
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::THEMES_DIR, array('path' => $relativePath));
         $designTheme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
             'Magento\Framework\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 708eb9d70a3f3a24e2b68dd7f62042450d0794b8..48bd1788564f012ff9ee047d6ecd6ceb9fd32ce9 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
@@ -22,10 +22,13 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
     array(
-        \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-            \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/design')
+        Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+            DirectoryList::THEMES => array('path' => dirname(__DIR__) . '/design')
         )
     )
 );
diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php
index 22584342409cba722577fb72556555b5795392f6..39fb83deec22e2f9dfb0162315a0a75f33a4e856 100644
--- a/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Directory/Model/ObserverTest.php
@@ -92,20 +92,4 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
         $rates = $currencyResource->getCurrencyRates($this->baseCurrency, explode(',', $allowedCurrencies));
         $this->assertEquals(3, count($rates));
     }
-
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Required parameter 'area' was not passed
-     */
-    public function testScheduledUpdateCurrencyRates_invalidCurrency()
-    {
-        $allowedCurrencies = 'USD,GBP,XXX';
-        $this->configResource->saveConfig(
-            $this->allowedCurrenciesPath,
-            $allowedCurrencies,
-            ScopeInterface::SCOPE_STORE,
-            0
-        );
-        $this->observer->scheduledUpdateCurrencyRates(null);
-    }
 }
\ No newline at end of file
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 97ef0078169dee5d38e9545d035fa47a2a5060c6..b75b9344efbe5343f7da40daa617481ebb2f0bc9 100644
--- a/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Email/Model/Template/FilterTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Email\Model\Template;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FilterTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -128,8 +131,8 @@ class FilterTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => array(
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::THEMES => array(
                         'path' => dirname(__DIR__) . '/_files/design'
                     )
                 )
diff --git a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php
index 57e9706eeac50bfea5337a49c36c14eeac02756a..8e32e53fc31f5dcfb00717d0d6aecccd5f51cc72 100644
--- a/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php
+++ b/dev/tests/integration/testsuite/Magento/Email/Model/TemplateTest.php
@@ -54,7 +54,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
                 $objectManager->get('Magento\Framework\Registry'),
                 $objectManager->get('Magento\Core\Model\App\Emulation'),
                 $objectManager->get('Magento\Store\Model\StoreManager'),
-                $objectManager->create('Magento\Framework\App\Filesystem'),
+                $objectManager->create('Magento\Framework\Filesystem'),
                 $objectManager->create('Magento\Framework\View\Asset\Repository'),
                 $objectManager->create('Magento\Framework\View\FileSystem'),
                 $objectManager->create('Magento\Framework\App\Config\ScopeConfigInterface'),
@@ -153,24 +153,6 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
         );
     }
 
-    /**
-     * @magentoAppIsolation enabled
-     * @magentoDataFixture Magento/Core/_files/design_change.php
-     */
-    public function testGetProcessedTemplateDesignChange()
-    {
-        \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\AreaList'
-        )->getArea(
-            \Magento\Framework\App\Area::AREA_FRONTEND
-        )->load();
-        $this->_model->setTemplateText('{{view url="Magento_Theme::favicon.ico"}}');
-        $this->assertStringEndsWith(
-            'static/frontend/Magento/plushe/en_US/Magento_Theme/favicon.ico',
-            $this->_model->getProcessedTemplate()
-        );
-    }
-
     /**
      * @magentoAppIsolation enabled
      * @magentoDataFixture Magento/Core/_files/store.php
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 8134a59d48e5e65004ff3b7012c8135061aae084..3607fe305077270db05dc049ad8a5c14e6c8c77c 100644
--- a/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Email/Model/_files/themes.php
@@ -21,10 +21,13 @@
  * @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)
  */
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
     array(
-        \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-            \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => dirname(__DIR__) . '/_files/design')
+        Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+            DirectoryList::THEMES => array('path' => dirname(__DIR__) . '/_files/design')
         )
     )
 );
diff --git a/dev/tests/integration/testsuite/Magento/Framework/App/FilesystemTest.php b/dev/tests/integration/testsuite/Magento/Framework/App/FilesystemTest.php
deleted file mode 100644
index f3a996c6b9614012661b6f1ed0ce802e086d4d65..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Framework/App/FilesystemTest.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * Test for \Magento\Framework\App\Filesystem
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in 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\Framework\App;
-
-/**
- * Class FilesystemTest
- * Test for Magento\Framework\App\Filesystem class
- *
- */
-class FilesystemTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Framework\App\Filesystem
-     */
-    protected $filesystem;
-
-    protected function setUp()
-    {
-        $this->filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-    }
-
-    /**
-     * Test getPath returns right path
-     */
-    public function testGetPath()
-    {
-        $this->assertContains('design', $this->filesystem->getPath(\Magento\Framework\App\Filesystem::THEMES_DIR));
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php
index 4d01f176f0c9cd362609856bec6d3872a1986939..60ca4058facd557e69df85c2874c2ed931c6da93 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Code/GeneratorTest.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Framework\Code;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\ObjectManager\Code\Generator as DIGenerator;
 use Magento\Framework\Interception\Code\Generator as InterceptionGenerator;
 
@@ -64,9 +65,9 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase
         $this->_includePath = get_include_path();
 
         $this->varDirectory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
         $generationDirectory = $this->varDirectory->getAbsolutePath('generation');
 
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php
index 181b02609d7e5848678f2853169643a26e0081ae..5002b827bde2fdc4709c30b65539cb88390393f6 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php
@@ -286,7 +286,7 @@ class ReadTest extends \PHPUnit_Framework_TestCase
     {
         return array(
             array('popup.csv', 'var myData = 5;'),
-            array('data.csv', '"field1", "field2"' . PHP_EOL . '"field3", "field4"' . PHP_EOL)
+            array('data.csv', '"field1", "field2"' . "\n" . '"field3", "field4"' . "\n")
         );
     }
 
@@ -300,15 +300,10 @@ class ReadTest extends \PHPUnit_Framework_TestCase
     private function getDirectoryInstance($path)
     {
         $fullPath = __DIR__ . '/../_files/' . $path;
-        $config = array('path' => $fullPath);
         $objectManager = Bootstrap::getObjectManager();
+        /** @var \Magento\Framework\Filesystem\Directory\ReadFactory $directoryFactory */
         $directoryFactory = $objectManager->create('Magento\Framework\Filesystem\Directory\ReadFactory');
-        return $directoryFactory->create(
-            $config,
-            new \Magento\Framework\Filesystem\DriverFactory(
-                $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList')
-            )
-        );
+        return $directoryFactory->create($fullPath);
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php
index 48486e0944d3e5b55869eb8878bf3dfbbf307d34..d192c7dfaad88989a6c22404251bbc440fcd7438 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php
@@ -26,6 +26,7 @@
 namespace Magento\Framework\Filesystem\Directory;
 
 use Magento\TestFramework\Helper\Bootstrap;
+use Magento\Framework\Filesystem\DriverPool;
 
 /**
  * Class ReadTest
@@ -387,15 +388,10 @@ class WriteTest extends \PHPUnit_Framework_TestCase
     private function getDirectoryInstance($path, $permissions)
     {
         $fullPath = __DIR__ . '/../_files/' . $path;
-        $config = array('path' => $fullPath, 'permissions' => $permissions, 'allow_create_dirs' => true);
         $objectManager = Bootstrap::getObjectManager();
+        /** @var \Magento\Framework\Filesystem\Directory\WriteFactory $directoryFactory */
         $directoryFactory = $objectManager->create('Magento\Framework\Filesystem\Directory\WriteFactory');
-        $directory = $directoryFactory->create(
-            $config,
-            new \Magento\Framework\Filesystem\DriverFactory(
-                $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList')
-            )
-        );
+        $directory = $directoryFactory->create($fullPath, DriverPool::FILE, $permissions);
         $this->testDirectories[] = $directory;
         return $directory;
     }
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php
index ac23dc92334832e8decf3d3a18c291198a5ff9a2..a66673e60caa7c037df0001041e434cbee719cd2 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/File/ReadTest.php
@@ -108,7 +108,7 @@ class ReadTest extends \PHPUnit_Framework_TestCase
     {
         return array(
             array('popup.csv', 'var myData = 5;'),
-            array('data.csv', '"field1", "field2"' . PHP_EOL . '"field3", "field4"' . PHP_EOL)
+            array('data.csv', '"field1", "field2"' . "\n" . '"field3", "field4"' . "\n")
         );
     }
 
@@ -124,7 +124,7 @@ class ReadTest extends \PHPUnit_Framework_TestCase
     {
         $file = $this->getFileInstance($path);
         foreach ($lines as $line) {
-            $this->assertEquals($line, $file->readLine($length, PHP_EOL));
+            $this->assertEquals($line, $file->readLine($length, "\n"));
         }
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php
index 2d8a0d7680cf272c85791e71b661f93144056756..46e9cf013137116f8813f8208aaa0e5595383e0b 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Filesystem/FilesystemTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\Filesystem;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList as AppDirectoryList;
 use Magento\TestFramework\Helper\Bootstrap;
 
 /**
@@ -35,13 +37,13 @@ use Magento\TestFramework\Helper\Bootstrap;
 class FilesystemTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     protected $filesystem;
 
     protected function setUp()
     {
-        $this->filesystem = Bootstrap::getObjectManager()->create('Magento\Framework\App\Filesystem');
+        $this->filesystem = Bootstrap::getObjectManager()->create('Magento\Framework\Filesystem');
     }
 
     /**
@@ -49,7 +51,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetDirectoryReadInstance()
     {
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $dir = $this->filesystem->getDirectoryRead(AppDirectoryList::VAR_DIR);
         $this->assertInstanceOf('\Magento\Framework\Filesystem\Directory\Read', $dir);
     }
 
@@ -58,25 +60,15 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetDirectoryWriteInstance()
     {
-        $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $dir = $this->filesystem->getDirectoryWrite(AppDirectoryList::VAR_DIR);
         $this->assertInstanceOf('\Magento\Framework\Filesystem\Directory\Write', $dir);
     }
 
-    /**
-     * Test getDirectoryWrite throws exception on trying to get directory with write access
-     *
-     * @expectedException \Magento\Framework\Filesystem\FilesystemException
-     */
-    public function testGetDirectoryWriteException()
-    {
-        $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::THEMES_DIR);
-    }
-
     /**
      * Test getUri returns right uri
      */
     public function testGetUri()
     {
-        $this->assertContains('media', $this->filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR));
+        $this->assertContains('media', $this->filesystem->getDirectoryRead(AppDirectoryList::MEDIA)->getAbsolutePath());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php
index 26c1d13ef20cd7eb9f50dc118371f0c3a0e5d201..a6daa08cbfefcd4f85b2f4dbf7e08267ab5b5d18 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Image\Adapter;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class InterfaceTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -560,11 +562,12 @@ class InterfaceTest extends \PHPUnit_Framework_TestCase
     public function testCreatePngFromString($pixel1, $expectedColor1, $pixel2, $expectedColor2, $adapterType)
     {
         $adapter = $this->_getAdapter($adapterType);
-        $path = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
-        )->getPath(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
-        ) . '/lib/internal/LinLibertineFont/LinLibertine_Re-4.4.1.ttf';
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
+        $path = $filesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL)
+            ->getAbsolutePath('LinLibertineFont/LinLibertine_Re-4.4.1.ttf');
         $adapter->createPngFromString('T', $path);
         $adapter->refreshImageDimensions();
 
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php
index b1521038be9e706e2a2116135240981420a08523..adbd2df7ec6c7790a63025524b77ce886b4e1196 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Less/File/Collector/AggregatedTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Framework\Less\File\Collector;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class AggregatedTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -39,12 +42,12 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::LIB_WEB => array(
-                        'path' => dirname(dirname(__DIR__)) . '/_files/lib/web'
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::LIB_WEB => array(
+                        DirectoryList::PATH => dirname(dirname(__DIR__)) . '/_files/lib/web'
                     ),
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => array(
-                        'path' => dirname(dirname(__DIR__)) . '/_files/design'
+                    DirectoryList::THEMES => array(
+                        DirectoryList::PATH => dirname(dirname(__DIR__)) . '/_files/design'
                     )
                 )
             )
@@ -54,18 +57,18 @@ class AggregatedTest extends \PHPUnit_Framework_TestCase
 
         /** @var \Magento\Framework\Filesystem $filesystem */
         $filesystem = $this->objectManager->create(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array(
                 'directoryList' => $this->objectManager->create(
-                    'Magento\Framework\Filesystem\DirectoryList',
+                    'Magento\Framework\App\Filesystem\DirectoryList',
                     array(
                         'root' => BP,
-                        'directories' => array(
-                            \Magento\Framework\App\Filesystem::MODULES_DIR => array(
-                                'path' => dirname(dirname(__DIR__)) . '/_files/code'
+                        'config' => array(
+                            DirectoryList::MODULES => array(
+                                DirectoryList::PATH => dirname(dirname(__DIR__)) . '/_files/code'
                             ),
-                            \Magento\Framework\App\Filesystem::THEMES_DIR => array(
-                                'path' => dirname(dirname(__DIR__)) . '/_files/design'
+                            DirectoryList::THEMES => array(
+                                DirectoryList::PATH => dirname(dirname(__DIR__)) . '/_files/design'
                             ),
                         )
                     )
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php
index c46b987ee8a20b46be02db7e829b26ef7d5b4ae7..042ff90f2c0bc4addb244d5fc18d08465617c9a1 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Less/_files/themes.php
@@ -21,10 +21,13 @@
  * @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)
  */
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
     array(
-        \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-            \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/design')
+        Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+            DirectoryList::THEMES => array('path' => __DIR__ . '/design')
         )
     )
 );
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php
index 3882e6e8553e38ea330df15c887ada69c051a905..736c49f510e0534166573401b30b54be439de9ba 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Object/Copy/Config/ReaderTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\Object\Copy\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @magentoDataFixture Magento/Backend/controllers/_files/cache/all_types_disabled.php
  */
@@ -38,17 +40,17 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
+        /** @var \Magento\Framework\Filesystem $filesystem */
         $filesystem = $objectManager->create(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array(
                 'directoryList' => $objectManager->create(
                     'Magento\Framework\App\Filesystem\DirectoryList',
                     array(
                         'root' => BP,
-                        'directories' => array(
-                            \Magento\Framework\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files'),
-                            \Magento\Framework\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files')
+                        'config' => array(
+                            DirectoryList::MODULES => array(DirectoryList::PATH => __DIR__ . '/_files'),
+                            DirectoryList::CONFIG => array(DirectoryList::PATH => __DIR__ . '/_files')
                         )
                     )
                 )
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/AdapterTest.php b/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/AdapterTest.php
index 29b4c0399b4432bfd353eaf3110516ee60bf73e8..cadca8190c33d4d64f3cc671cdb4c9396549cfac 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/AdapterTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/AdapterTest.php
@@ -147,9 +147,9 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
     public function testMatchQueryFilters()
     {
         $this->requestBuilder->bind('fulltext_search_query', 'socks');
-        $this->requestBuilder->bind('pidm_from', 1);
-        $this->requestBuilder->bind('pidm_to', 3);
-        $this->requestBuilder->bind('pidsh', 4);
+        $this->requestBuilder->bind('pidm_from', 11);
+        $this->requestBuilder->bind('pidm_to', 17);
+        $this->requestBuilder->bind('pidsh', 18);
         $this->requestBuilder->setRequestName('one_match_filters');
 
         $queryResponse = $this->executeQuery();
@@ -167,8 +167,8 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
      */
     public function testRangeFilterWithAllFields()
     {
-        $this->requestBuilder->bind('range_filter_from', 1);
-        $this->requestBuilder->bind('range_filter_to', 3);
+        $this->requestBuilder->bind('range_filter_from', 11);
+        $this->requestBuilder->bind('range_filter_to', 16);
         $this->requestBuilder->setRequestName('range_filter');
 
         $queryResponse = $this->executeQuery();
@@ -186,7 +186,7 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
      */
     public function testRangeFilterWithoutFromField()
     {
-        $this->requestBuilder->bind('range_filter_to', 4);
+        $this->requestBuilder->bind('range_filter_to', 18);
         $this->requestBuilder->setRequestName('range_filter_without_from_field');
 
         $queryResponse = $this->executeQuery();
@@ -204,7 +204,7 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
      */
     public function testRangeFilterWithoutToField()
     {
-        $this->requestBuilder->bind('range_filter_from', 2);
+        $this->requestBuilder->bind('range_filter_from', 14);
         $this->requestBuilder->setRequestName('range_filter_without_to_field');
 
         $queryResponse = $this->executeQuery();
@@ -222,14 +222,12 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
      */
     public function testTermFilter()
     {
-        $id = 4;
-
-        $this->requestBuilder->bind('request.product_id', $id);
+        $this->requestBuilder->bind('request.price', 18);
         $this->requestBuilder->setRequestName('term_filter');
 
         $queryResponse = $this->executeQuery();
         $this->assertEquals(1, $queryResponse->count());
-        $this->assertEquals($id, $queryResponse->getIterator()->offsetGet(0)->getId());
+        $this->assertEquals(4, $queryResponse->getIterator()->offsetGet(0)->getId());
     }
 
     /**
@@ -243,7 +241,7 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
      */
     public function testTermFilterArray()
     {
-        $this->requestBuilder->bind('request.product_id', [3, 4]);
+        $this->requestBuilder->bind('request.price', [16, 18]);
         $this->requestBuilder->setRequestName('term_filter');
 
         $queryResponse = $this->executeQuery();
@@ -265,7 +263,7 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
         $this->requestBuilder->setRequestName('one_wildcard');
 
         $queryResponse = $this->executeQuery();
-        $this->assertEquals(4, $queryResponse->count());
+        $this->assertEquals(3, $queryResponse->count());
     }
 
     /**
@@ -280,14 +278,14 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
     public function testBoolFilter()
     {
         $expectedIds = [2, 3];
-        $this->requestBuilder->bind('must_range_filter1_from', 1);
-        $this->requestBuilder->bind('must_range_filter1_to', 6);
-        $this->requestBuilder->bind('should_term_filter1', 1);
-        $this->requestBuilder->bind('should_term_filter2', 2);
-        $this->requestBuilder->bind('should_term_filter3', 3);
-        $this->requestBuilder->bind('should_term_filter4', 4);
-        $this->requestBuilder->bind('not_term_filter1', 1);
-        $this->requestBuilder->bind('not_term_filter2', 4);
+        $this->requestBuilder->bind('must_range_filter1_from', 12);
+        $this->requestBuilder->bind('must_range_filter1_to', 22);
+        $this->requestBuilder->bind('should_term_filter1', 12);
+        $this->requestBuilder->bind('should_term_filter2', 14);
+        $this->requestBuilder->bind('should_term_filter3', 16);
+        $this->requestBuilder->bind('should_term_filter4', 18);
+        $this->requestBuilder->bind('not_term_filter1', 12);
+        $this->requestBuilder->bind('not_term_filter2', 18);
         $this->requestBuilder->setRequestName('bool_filter');
 
         $queryResponse = $this->executeQuery();
@@ -312,9 +310,9 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
     public function testBoolFilterWithNestedNegativeBoolFilter()
     {
         $expectedIds = [1];
-        $this->requestBuilder->bind('not_range_filter_from', 2);
-        $this->requestBuilder->bind('not_range_filter_to', 5);
-        $this->requestBuilder->bind('nested_not_term_filter', 1);
+        $this->requestBuilder->bind('not_range_filter_from', 14);
+        $this->requestBuilder->bind('not_range_filter_to', 20);
+        $this->requestBuilder->bind('nested_not_term_filter', 12);
         $this->requestBuilder->setRequestName('bool_filter_with_nested_bool_filter');
 
         $queryResponse = $this->executeQuery();
@@ -339,8 +337,8 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
     public function testBoolFilterWithNestedRangeInNegativeBoolFilter()
     {
         $expectedIds = [1, 4, 5];
-        $this->requestBuilder->bind('nested_must_range_filter_from', 2);
-        $this->requestBuilder->bind('nested_must_range_filter_to', 4);
+        $this->requestBuilder->bind('nested_must_range_filter_from', 14);
+        $this->requestBuilder->bind('nested_must_range_filter_to', 18);
         $this->requestBuilder->setRequestName('bool_filter_with_range_in_nested_negative_filter');
 
         $queryResponse = $this->executeQuery();
@@ -367,15 +365,13 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
     public function testSimpleAdvancedSearch(
         $nameQuery,
         $descriptionQuery,
-        $storeFilter,
         $rangeFilter,
         $expectedRecordsCount
     ) {
         $this->requestBuilder->bind('name_query', $nameQuery);
         $this->requestBuilder->bind('description_query', $descriptionQuery);
-        $this->requestBuilder->bind('store_filter', $storeFilter);
-        $this->requestBuilder->bind('request.from_product_id', $rangeFilter['from']);
-        $this->requestBuilder->bind('request.to_product_id', $rangeFilter['to']);
+        $this->requestBuilder->bind('request.from_price', $rangeFilter['from']);
+        $this->requestBuilder->bind('request.to_price', $rangeFilter['to']);
         $this->requestBuilder->setRequestName('advanced_search_test');
 
         $queryResponse = $this->executeQuery();
@@ -388,11 +384,10 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
     public function advancedSearchDataProvider()
     {
         return array(
-            ['white', 'shorts', '1', ['from' => '3', 'to' => '4'], 0],
-            ['white', 'shorts', '1', ['from' => '1', 'to' => '4'], 1],
-            ['white', 'shorts', '5', ['from' => '1', 'to' => '4'], 0],
-            ['black', 'tshirts', '1', ['from' => '1', 'to' => '5'], 0],
-            ['peoples', 'green', '1', ['from' => '1', 'to' => '6'], 2],
+            ['white', 'shorts', ['from' => '16', 'to' => '18'], 0],
+            ['white', 'shorts',['from' => '12', 'to' => '18'], 1],
+            ['black', 'tshirts', ['from' => '12', 'to' => '20'], 0],
+            ['peoples', 'green', ['from' => '12', 'to' => '22'], 2],
         );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php b/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php
index 1b2fd46eb11ab15f347eb4307eaeda2804e5e89f..3c6c9e96e50d12e07a912db6281c0cef785e179c 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php
@@ -46,9 +46,9 @@ class MatchTest extends \PHPUnit_Framework_TestCase
      */
     public function testBuildQuery($conditionType, $expectedSuffix)
     {
-        $expectedScoreCondition = "(MATCH (with_boost, without_boost) AGAINST ('{$expectedSuffix}someValue' " .
+        $expectedScoreCondition = "(MATCH (data_index) AGAINST ('{$expectedSuffix}someValue' " .
             "IN BOOLEAN MODE) * 3.14) AS global_score";
-        $expectedSql = "SELECT `someTable`.* FROM `someTable` WHERE (MATCH (with_boost, without_boost) " .
+        $expectedSql = "SELECT `someTable`.* FROM `someTable` WHERE (MATCH (data_index) " .
             "AGAINST ('{$expectedSuffix}someValue' IN BOOLEAN MODE))";
 
         /** @var \Magento\Framework\Search\Adapter\Mysql\ScoreBuilder $scoreBuilder */
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Search/_files/requests.xml b/dev/tests/integration/testsuite/Magento/Framework/Search/_files/requests.xml
index 5b5a4830449ec1ec949e4703e09becac0cf04556..81100b7bb0fa9e94dc942b1907a3afb348123803 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Search/_files/requests.xml
+++ b/dev/tests/integration/testsuite/Magento/Framework/Search/_files/requests.xml
@@ -84,7 +84,7 @@
             </query>
         </queries>
         <filters>
-            <filter xsi:type="wildcardFilter" name="wildcard_filter" value="$wildcard_filter$" field="data_index"/>
+            <filter xsi:type="wildcardFilter" name="wildcard_filter" value="$wildcard_filter$" field="name"/>
         </filters>
         <from>10</from>
         <size>10</size>
@@ -121,14 +121,14 @@
                 <filterReference clause="must" ref="term_rm"/>
                 <filterReference clause="must" ref="range_rm"/>
             </filter>
-            <filter name="range_rm" xsi:type="rangeFilter" field="product_id" from="$not_bind$" to="$not_bind$"/>
-            <filter name="term_rm" xsi:type="termFilter" field="product_id" value="$not_bind$"/>
+            <filter name="range_rm" xsi:type="rangeFilter" field="price" from="$not_bind$" to="$not_bind$"/>
+            <filter name="term_rm" xsi:type="termFilter" field="price" value="$not_bind$"/>
             <filter xsi:type="boolFilter" name="pid">
                 <filterReference clause="should" ref="pidm"/>
                 <filterReference clause="should" ref="pidsh"/>
             </filter>
-            <filter name="pidm" xsi:type="rangeFilter" field="product_id" from="$pidm_from$" to="$pidm_to$"/>
-            <filter name="pidsh" xsi:type="termFilter" field="product_id" value="$pidsh$"/>
+            <filter name="pidm" xsi:type="rangeFilter" field="price" from="$pidm_from$" to="$pidm_to$"/>
+            <filter name="pidsh" xsi:type="termFilter" field="price" value="$pidsh$"/>
         </filters>
         <from>10</from>
         <size>10</size>
@@ -145,7 +145,7 @@
         <filters>
             <filter name="range_filter"
                     xsi:type="rangeFilter"
-                    field="product_id"
+                    field="price"
                     from="$range_filter_from$"
                     to="$range_filter_to$"/>
         </filters>
@@ -164,7 +164,7 @@
         <filters>
             <filter name="range_filter_without_from_field"
                     xsi:type="rangeFilter"
-                    field="product_id"
+                    field="price"
                     to="$range_filter_to$"/>
         </filters>
         <from>10</from>
@@ -182,7 +182,7 @@
         <filters>
             <filter name="range_filter_without_to_field"
                     xsi:type="rangeFilter"
-                    field="product_id"
+                    field="price"
                     from="$range_filter_from$"/>
         </filters>
         <from>10</from>
@@ -198,7 +198,7 @@
             </query>
         </queries>
         <filters>
-            <filter name="term_filter" xsi:type="termFilter" field="product_id" value="$request.product_id$"/>
+            <filter name="term_filter" xsi:type="termFilter" field="price" value="$request.price$"/>
         </filters>
         <from>10</from>
         <size>10</size>
@@ -224,32 +224,32 @@
             </filter>
             <filter name="must_range_filter1"
                     xsi:type="rangeFilter"
-                    field="product_id"
+                    field="price"
                     from="$must_range_filter1_from$"
                     to="$must_range_filter1_to$"/>
             <filter name="should_term_filter1"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$should_term_filter1$"/>
             <filter name="should_term_filter2"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$should_term_filter2$"/>
             <filter name="should_term_filter3"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$should_term_filter3$"/>
             <filter name="should_term_filter4"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$should_term_filter4$"/>
             <filter name="not_term_filter1"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$not_term_filter1$"/>
             <filter name="not_term_filter2"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$not_term_filter2$"/>
         </filters>
         <from>10</from>
@@ -274,12 +274,12 @@
             </filter>
             <filter name="not_range_filter"
                     xsi:type="rangeFilter"
-                    field="product_id"
+                    field="price"
                     from="$not_range_filter_from$"
                     to="$not_range_filter_to$"/>
             <filter name="nested_not_term_filter"
                     xsi:type="termFilter"
-                    field="product_id"
+                    field="price"
                     value="$nested_not_term_filter$"/>
         </filters>
         <from>10</from>
@@ -303,7 +303,7 @@
             </filter>
             <filter name="nested_must_range_filter"
                     xsi:type="rangeFilter"
-                    field="product_id"
+                    field="price"
                     from="$nested_must_range_filter_from$"
                     to="$nested_must_range_filter_to$"/>
         </filters>
@@ -332,12 +332,9 @@
         </queries>
         <filters>
             <filter xsi:type="boolFilter" name="filter">
-                <filterReference clause="must" ref="store_filter"/>
-                <filterReference clause="must" ref="product_id_filter"/>
+                <filterReference clause="must" ref="price_filter"/>
             </filter>
-            <filter name="store_filter" xsi:type="termFilter" field="store_id" value="$store_filter$"/>
-            <filter name="product_id_filter" xsi:type="rangeFilter" field="product_id" from="$request.from_product_id$"
-                    to="$request.to_product_id$"/>
+            <filter name="price_filter" xsi:type="rangeFilter" field="price" from="$request.from_price$" to="$request.to_price$"/>
         </filters>
         <from>10</from>
         <size>10</size>
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Session/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Framework/Session/ConfigTest.php
index ed805f46072c80e5043fefac624f011412b759ba..0be59a27b0d36bc41f97c3d31bc861de7009ede7 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Session/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Session/ConfigTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Session;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @magentoAppIsolation enabled
  */
@@ -67,12 +69,12 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
      */
     public function testDefaultConfiguration()
     {
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
         $this->assertEquals(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-                'Magento\Framework\App\Filesystem'
-            )->getPath(
-                'session'
-            ),
+            $filesystem->getDirectoryRead(DirectoryList::SESSION)->getAbsolutePath(),
             $this->_model->getSavePath()
         );
         $this->assertEquals(
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php
index 0d333666c75b3930d8d9f38a2883c7be5c49e65c..c5ed93e81d53d5e688e7662c9fc57a59d4c361f1 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Design/FileResolution/FallbackTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\View\Design\FileResolution;
 
+use Magento\Framework\App\Bootstrap as AppBootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\TestFramework\Helper\Bootstrap;
 
 /**
@@ -42,11 +44,11 @@ class FallbackTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         Bootstrap::getInstance()->reinitialize(array(
-            \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                \Magento\Framework\App\Filesystem::THEMES_DIR => array(
+            AppBootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                DirectoryList::THEMES => array(
                     'path' => __DIR__ . '/../../_files/fallback/design'
                 ),
-                \Magento\Framework\App\Filesystem::LIB_WEB => array(
+                DirectoryList::LIB_WEB => array(
                     'path' => __DIR__ . '/../../_files/fallback/lib/web'
                 ),
             )
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php
index af52dd526e2802b4be38527649bc18fb6dbd1fda..6f3297b43e251661454a5401184ae17f8d51e4f8 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php
@@ -23,8 +23,6 @@
  */
 namespace Magento\Framework\View\Element;
 
-use Magento\Framework\App\Filesystem\DirectoryList;
-
 /**
  * @magentoAppIsolation enabled
  */
@@ -67,19 +65,6 @@ class AbstractBlockTest extends \PHPUnit_Framework_TestCase
      */
     public function testCssWithWrongImage()
     {
-        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $relativePath = $objectManager->get(
-            'Magento\Framework\App\Filesystem'
-        )->getDirectoryRead(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
-        )->getRelativePath(
-            __DIR__ . '/_files'
-        );
-        /** @var $directoryList \Magento\Framework\App\Filesystem\DirectoryList */
-        $directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::THEMES_DIR, array('path' => $relativePath));
-
         $cssUrl = $this->_block->getViewFileUrl(
             'css/wrong.css',
             array('area' => 'frontend', 'theme' => 'Magento/plushe', 'locale' => 'en_US')
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php
index 396e7cd58307fae77efc2b0fa79a452e0135eb10..1bc199f3a75c0a9886ee6969e3c07bf8a09dda8b 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/FileSystemTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Framework\View;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Tests for the view layer fallback mechanism
  * @magentoDataFixture Magento/Core/Model/_files/design/themes.php
@@ -38,8 +41,8 @@ class FileSystemTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => array(
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::THEMES => array(
                         'path' => dirname(dirname(__DIR__)) . '/Core/Model/_files/design'
                     )
                 )
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php
index d4cbe125573d0bc03d428a5d679802ec98edfbfa..ff02b1ab00d6ac5f125dccef0d498b071068ceee 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/LayoutTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Framework\View\Utility;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class LayoutTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -34,8 +37,8 @@ class LayoutTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::APP_DIR => array('path' => BP . '/dev/tests/integration')
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::APP => array('path' => BP . '/dev/tests/integration')
                 )
             )
         );
diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php
index f430c0d241fdce6fc53c3da5e418f039f6b17825..0c5ee6f23a47af09c3dca4d477048e15d7c132b3 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/fallback/themes_registration.php
@@ -21,9 +21,12 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(array(
-    \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-        \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/design')
+    Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+        DirectoryList::THEMES => array('path' => __DIR__ . '/design')
     )
 ));
 $objectManger = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
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 00654ac07f69db1a711125580a2f16cdb544e956..814a1fa75deb6e5ad38d96fd0e231db9c47e33f5 100644
--- a/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
+++ b/dev/tests/integration/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\ImportExport\Model\Import;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class EntityAbstractTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -35,8 +37,8 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase
     public function testSaveValidatedBunches()
     {
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->create('Magento\Framework\App\Filesystem');
-        $directory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+            ->create('Magento\Framework\Filesystem');
+        $directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $source = new \Magento\ImportExport\Model\Import\Source\Csv(
             __DIR__ . '/Entity/_files/customers_for_validation_test.csv',
             $directory
diff --git a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
index 381cac90271e05e65a0db0684d184cb3436d2a83..8627021412d919018925bda8bd52f8fd3a4bf964 100644
--- a/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Install/Model/ConfigTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Install\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -55,17 +57,17 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         }
         $cacheState->persist();
 
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
+        /** @var \Magento\Framework\Filesystem $filesystem */
         $filesystem = $this->_objectManager->create(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array(
                 'directoryList' => $this->_objectManager->create(
                     'Magento\Framework\App\Filesystem\DirectoryList',
                     array(
                         'root' => BP,
-                        'directories' => array(
-                            \Magento\Framework\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files'),
-                            \Magento\Framework\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files')
+                        'config' => array(
+                            DirectoryList::MODULES => array(DirectoryList::PATH => __DIR__ . '/_files'),
+                            DirectoryList::CONFIG => array(DirectoryList::PATH => __DIR__ . '/_files')
                         )
                     )
                 )
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 4f1421d9dca98ea0771bf804c3122a889878ffd7..a564c86109d8a0d21b7a30bb9c386aa692545061 100644
--- a/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/Persistent/Model/Persistent/ConfigTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Persistent\Model\Persistent;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -40,14 +42,14 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
             'Magento\Framework\App\Filesystem\DirectoryList',
             array(
-                'root' => \Magento\Framework\App\Filesystem::ROOT_DIR,
-                'directories' => array(
-                    \Magento\Framework\App\Filesystem::MODULES_DIR => array('path' => dirname(__DIR__))
+                'root' => DirectoryList::ROOT,
+                'config' => array(
+                    DirectoryList::MODULES => array(DirectoryList::PATH => dirname(__DIR__))
                 )
             )
         );
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('directoryList' => $directoryList)
         );
 
diff --git a/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php
index 11139983e9fd49a6eb9937b1e1773ddbfede7752..3dbaf45d1c4a5280ddf96433daa4395ee8a077b9 100644
--- a/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/Reports/Model/Resource/Report/Product/Viewed/CollectionTest.php
@@ -54,4 +54,89 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         }
         $this->assertEquals($expectedResult, $actualResult);
     }
+
+    /**
+     * @dataProvider tableForPeriodDataProvider
+     *
+     * @param $period
+     * @param $expectedTable
+     * @param $dateFrom
+     * @param $dateTo
+     */
+    public function testTableSelection($period, $expectedTable, $dateFrom, $dateTo)
+    {
+        $dbTableName = $this->_collection->getTable($expectedTable);
+        $this->_collection->setPeriod($period);
+        $this->_collection->setDateRange($dateFrom, $dateTo);
+        $this->_collection->load();
+        $from = $this->_collection->getSelect()->getPart('from');
+
+        $this->assertArrayHasKey($dbTableName, $from);
+
+        $this->assertArrayHasKey('tableName', $from[$dbTableName]);
+        $actualTable = $from[$dbTableName]['tableName'];
+
+        $this->assertEquals($dbTableName, $actualTable);
+    }
+
+    /**
+     * Data provider for testTableSelection
+     *
+     * @return array
+     */
+    public function tableForPeriodDataProvider()
+    {
+        $dateNow = date('Y-m-d', time());
+        $dateYearAgo = date('Y-m-d', strtotime($dateNow . ' -1 year'));
+        return array(
+            [
+                'period'    => 'year',
+                'table'     => 'report_viewed_product_aggregated_yearly',
+                'date_from' => null,
+                'date_to'   => null
+            ],
+            [
+                'period'    => 'month',
+                'table'     => 'report_viewed_product_aggregated_monthly',
+                'date_from' => null,
+                'date_to'   => null
+            ],
+            [
+                'period'    => 'day',
+                'table'     => 'report_viewed_product_aggregated_daily',
+                'date_from' => null,
+                'date_to'   => null
+            ],
+            [
+                'period'    => 'undefinedPeriod',
+                'table'     => 'report_viewed_product_aggregated_daily',
+                'date_from' => null,
+                'date_to'   => null
+            ],
+            [
+                'period'    => null,
+                'table'     => 'report_viewed_product_aggregated_daily',
+                'date_from' => $dateYearAgo,
+                'date_to'   => $dateNow
+            ],
+            [
+                'period'    => null,
+                'table'     => 'report_viewed_product_aggregated_daily',
+                'date_from' => $dateNow,
+                'date_to'   => $dateNow
+            ],
+            [
+                'period'    => null,
+                'table'     => 'report_viewed_product_aggregated_daily',
+                'date_from' => $dateYearAgo,
+                'date_to'   => $dateYearAgo
+            ],
+            [
+                'period'    => null,
+                'table'     => 'report_viewed_product_aggregated_yearly',
+                'date_from' => null,
+                'date_to'   => null
+            ],
+        );
+    }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php
index 36179a42b36f8fed5256c83dd0c7b757fe20d98a..888d002eb96491ba689a963bf05699a3f2f54b12 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php
@@ -44,15 +44,6 @@ class CreditmemoSenderTest extends \PHPUnit_Framework_TestCase
         );
         $creditmemo->setOrder($order);
 
-        $payment = $order->getPayment();
-        $paymentInfoBlock = Bootstrap::getObjectManager()->get(
-            'Magento\Payment\Helper\Data'
-        )->getInfoBlock(
-                $payment
-            );
-        $paymentInfoBlock->setArea('invalid-area');
-        $payment->setBlockMock($paymentInfoBlock);
-
         $this->assertEmpty($creditmemo->getEmailSent());
 
         $creditmemoSender = Bootstrap::getObjectManager()
@@ -61,6 +52,5 @@ class CreditmemoSenderTest extends \PHPUnit_Framework_TestCase
 
         $this->assertTrue($result);
         $this->assertNotEmpty($creditmemo->getEmailSent());
-        $this->assertEquals('frontend', $paymentInfoBlock->getArea());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php
index 098dc8cea27f87eb6f742451ca959d155816b526..af088999f5ac6f15277c38a6a0f55a06ffbe0fbf 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php
@@ -42,15 +42,6 @@ class InvoiceSenderTest extends \PHPUnit_Framework_TestCase
         );
         $invoice->setOrder($order);
 
-        $payment = $order->getPayment();
-        $paymentInfoBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Payment\Helper\Data'
-        )->getInfoBlock(
-            $payment
-        );
-        $paymentInfoBlock->setArea('invalid-area');
-        $payment->setBlockMock($paymentInfoBlock);
-
         /** @var InvoiceSender $invoiceSender */
         $invoiceSender = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
             ->create('Magento\Sales\Model\Order\Email\Sender\InvoiceSender');
@@ -61,6 +52,5 @@ class InvoiceSenderTest extends \PHPUnit_Framework_TestCase
 
         $this->assertTrue($result);
         $this->assertNotEmpty($invoice->getEmailSent());
-        $this->assertEquals('frontend', $paymentInfoBlock->getArea());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/OrderSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/OrderSenderTest.php
index 9d42a96fcd1d95474aa8c7d441f5a93964aed72d..594cccbc2d0d558582fe0276b8f8bb7cea237ca7 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/OrderSenderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/OrderSenderTest.php
@@ -39,15 +39,6 @@ class OrderSenderTest extends \PHPUnit_Framework_TestCase
         $order->loadByIncrementId('100000001');
         $order->setCustomerEmail('customer@example.com');
 
-        $payment = $order->getPayment();
-        $paymentInfoBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Payment\Helper\Data'
-        )->getInfoBlock(
-                $payment
-            );
-        $paymentInfoBlock->setArea('invalid-area');
-        $payment->setBlockMock($paymentInfoBlock);
-
         $this->assertEmpty($order->getEmailSent());
 
         $orderSender = Bootstrap::getObjectManager()
@@ -57,6 +48,5 @@ class OrderSenderTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($result);
 
         $this->assertNotEmpty($order->getEmailSent());
-        $this->assertEquals('frontend', $paymentInfoBlock->getArea());
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php
index a2866de33df5f9b734771fabaf52aaf58f48e006..6aa0efffe6629fce4524f3a820214dbf934677d1 100644
--- a/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php
@@ -41,14 +41,6 @@ class ShipmentSenderTest extends \PHPUnit_Framework_TestCase
         );
         $shipment->setOrder($order);
 
-        $payment = $order->getPayment();
-        $paymentInfoBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Payment\Helper\Data'
-        )->getInfoBlock(
-            $payment
-        );
-        $payment->setBlockMock($paymentInfoBlock);
-
         $this->assertEmpty($shipment->getEmailSent());
 
         $orderSender = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
@@ -58,7 +50,6 @@ class ShipmentSenderTest extends \PHPUnit_Framework_TestCase
         $this->assertTrue($result);
 
         $this->assertNotEmpty($shipment->getEmailSent());
-        $this->assertEquals('frontend', $paymentInfoBlock->getArea());
     }
 
     /**
@@ -74,14 +65,6 @@ class ShipmentSenderTest extends \PHPUnit_Framework_TestCase
         $order->loadByIncrementId('100000001');
         $order->setCustomerEmail('customer@example.com');
 
-        $payment = $order->getPayment();
-        $paymentInfoBlock = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Payment\Helper\Data'
-        )->getInfoBlock(
-            $payment
-        );
-        $payment->setBlockMock($paymentInfoBlock);
-
         /** @var \Magento\Sales\Model\Order\Shipment $shipment */
         $shipment = $objectManager->create('Magento\Sales\Model\Order\Shipment');
         $shipment->setOrder($order);
diff --git a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php
index c657f71b12d87ceaf80ea2d333bc8c7652b4ac6c..8f855558094ccd6a09498957388bbb5377edf85b 100644
--- a/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php
+++ b/dev/tests/integration/testsuite/Magento/SalesRule/Model/Resource/Report/CollectionTest.php
@@ -52,4 +52,64 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
         }
         $this->assertEquals($expectedResult, $actualResult);
     }
+
+    /**
+     * @dataProvider periodDataProvider
+     * @magentoDataFixture Magento/SalesRule/_files/order_with_coupon.php
+     * @magentoDataFixture Magento/SalesRule/_files/report_coupons.php
+     *
+     * @param $period
+     * @param $expectedPeriod
+     * @param $dateFrom
+     * @param $dateTo
+     */
+    public function testPeriod($period, $dateFrom, $dateTo, $expectedPeriod)
+    {
+        $this->_collection->setPeriod($period);
+        $this->_collection->setDateRange($dateFrom, $dateTo);
+        $items = $this->_collection->getItems();
+        $this->assertCount(1, $items);
+        $this->assertEquals($expectedPeriod, $items[0]->getPeriod());
+    }
+
+    /**
+     * Data provider for testTableSelection
+     *
+     * @return array
+     */
+    public function periodDataProvider()
+    {
+        return array(
+            [
+                'period'    => 'year',
+                'date_from' => null,
+                'date_to'   => null,
+                'expected_period' => date('Y', time())
+            ],
+            [
+                'period'    => 'month',
+                'date_from' => null,
+                'date_to'   => null,
+                'expected_period' => date('Y-m', time())
+            ],
+            [
+                'period'    => 'day',
+                'date_from' => null,
+                'date_to'   => null,
+                'expected_period' => date('Y-m-d', time())
+            ],
+            [
+                'period'    => 'undefinedPeriod',
+                'date_from' => null,
+                'date_to'   => null,
+                'expected_period' => date('Y-m-d', time())
+            ],
+            [
+                'period'    => null,
+                'date_from' => date('Y-m-d', strtotime('-1 year', time())),
+                'date_to'   => date('Y-m-d', time()),
+                'expected_period' => date('Y-m-d', time())
+            ]
+        );
+    }
 }
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 270e6437921ac4cd8adf4fcc9be7c9641eb8188e..324447bc82190f0e2ebf560e58442aeba5fb1234 100644
--- a/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php
+++ b/dev/tests/integration/testsuite/Magento/Sitemap/_files/sitemap_products.php
@@ -23,17 +23,20 @@
  */
 
 // Copy images to tmp media path
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
 /** @var \Magento\Catalog\Model\Product\Media\Config $config */
 $config = $objectManager->get('Magento\Catalog\Model\Product\Media\Config');
 
+/** @var \Magento\Framework\Filesystem $filesystem */
+$filesystem = $objectManager->get('Magento\Framework\Filesystem');
 /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $mediaDirectory */
-$filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-$mediaPath = $filesystem->getPath(\Magento\Framework\App\Filesystem::MEDIA_DIR);
-$mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
-
+$mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+$mediaPath = $mediaDirectory->getAbsolutePath();
 $baseTmpMediaPath = $config->getBaseTmpMediaPath();
 $mediaDirectory->create($baseTmpMediaPath);
+
 copy(__DIR__ . '/magento_image_sitemap.png', $mediaPath . '/' . $baseTmpMediaPath . '/magento_image_sitemap.png');
 copy(__DIR__ . '/second_image.png', $mediaPath . '/' . $baseTmpMediaPath . '/second_image.png');
 
diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php
index 9bff9bed2a4253cb7e34be20945e4ca8f619e022..409164110e1aece7e0b02dee2ef7383a0fa3ca1a 100644
--- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php
+++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Store\Model;
 
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class StoreTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -61,7 +64,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase
             'url' => $objectManager->get('Magento\Framework\Url'),
             'request' => $objectManager->get('Magento\Framework\App\RequestInterface'),
             'configDataResource' => $objectManager->get('Magento\Core\Model\Resource\Config\Data'),
-            'filesystem' => $objectManager->get('Magento\Framework\App\Filesystem'),
+            'filesystem' => $objectManager->get('Magento\Framework\Filesystem'),
             'config' => $objectManager->get('Magento\Framework\App\Config\ReinitableConfigInterface'),
             'storeManager' => $objectManager->get('Magento\Store\Model\StoreManager'),
             'sidResolver' => $objectManager->get('Magento\Framework\Session\SidResolverInterface'),
@@ -215,8 +218,8 @@ class StoreTest extends \PHPUnit_Framework_TestCase
     {
         \Magento\TestFramework\Helper\Bootstrap::getInstance()->reinitialize(
             array(
-                \Magento\Framework\App\Filesystem::PARAM_APP_DIRS => array(
-                    \Magento\Framework\App\Filesystem::PUB_DIR => array('uri' => '')
+                Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => array(
+                    DirectoryList::PUB => array(DirectoryList::URL_PATH => '')
                 )
             )
         );
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 45866a5ab8a754af01b4426a8caef163874594f9..95f91094d473ccb8a075a724db3d0b6ba7011eca 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/AclConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class AclConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -41,11 +43,12 @@ class AclConfigFilesTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
-        )->getPath(
-            \Magento\Framework\App\Filesystem::LIB_INTERNAL
-        ) . '/Magento/Framework/Acl/etc/acl.xsd';
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
+        $this->_schemeFile = $filesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL)
+            ->getAbsolutePath('Magento/Framework/Acl/etc/acl.xsd');
     }
 
     /**
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php
index 67001f2fa0122e2e955687cc5ec67e290924b3fb..e16b02017dedf4c683a0d363b39d39971dd5e0df 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/BlockInstantiationTest.php
@@ -54,8 +54,11 @@ class BlockInstantiationTest extends \Magento\TestFramework\TestCase\AbstractInt
                 );
                 \Magento\TestFramework\Helper\Bootstrap::getInstance()->loadArea($area);
 
-                $block = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($class);
-                $this->assertNotNull($block);
+                try {
+                    \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create($class);
+                } catch (\Exception $e) {
+                    throw new \Exception("Unable to instantiate '{$class}'", 0, $e);
+                }
             },
             $this->allBlocksDataProvider()
         );
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 92633bf7b34c171bd84898f677ae16fdfb7151a5..af0397c25f7ddfd4c4cf3e0bc6a98b9a6fc8cd65 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/DiConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class DiConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -47,9 +49,9 @@ class DiConfigFilesTest extends \PHPUnit_Framework_TestCase
     {
         //init primary configs
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $configDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::CONFIG_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $configDirectory = $filesystem->getDirectoryRead(DirectoryList::CONFIG);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\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 392200648ff9f26c916f4dc8a2f227841cabe209..edbf6e89c1f8808567216593f5944a793413dbf0 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/EavAttributesConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class EavAttributesConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -33,9 +35,9 @@ class EavAttributesConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\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 6359d6de2a69dd891a77f959466adf3b7f224f83..199d093c792d9ead84dd866b108510ceb951b937 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ExportConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ExportConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -33,9 +35,9 @@ class ExportConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\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 9ad888949d811f34abd0b5e2094e67d8470f5c8d..14e595c901d3be63e24bc389ba3e622211338b2b 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ImportConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ImportConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -33,9 +35,9 @@ class ImportConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\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 b790bacf4082c05e1c0cb7b90b18c76230159c37..bd0b0a580384296f6edbd1fb1bdaf631ffe254fd 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/IndexerConfigFilesTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class IndexerConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -41,11 +44,12 @@ class IndexerConfigFilesTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
-        )->getPath(
-            \Magento\Framework\App\Filesystem::APP_DIR
-        ) . '/code/Magento/Indexer/etc/indexer.xsd';
+        /** @var Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
+        $this->schemeFile = $filesystem->getDirectoryRead(DirectoryList::APP)
+            ->getAbsolutePath('code/Magento/Indexer/etc/indexer.xsd');
     }
 
     /**
@@ -69,12 +73,12 @@ class IndexerConfigFilesTest extends \PHPUnit_Framework_TestCase
      */
     public function indexerConfigFileDataProvider()
     {
+        /** @var Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
         $fileList = glob(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-                'Magento\Framework\App\Filesystem'
-            )->getPath(
-                \Magento\Framework\App\Filesystem::APP_DIR
-            ) . '/*/*/*/etc/indexer.xml'
+            $filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath() . '/*/*/*/etc/indexer.xml'
         );
         $dataProviderResult = array();
         foreach ($fileList as $file) {
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php
index 6ccf80aac87fa3ed8480a5d839ebc4f2950a0eae..020f3a97f36cc39cab9050e109132404b29385fe 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/MviewConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class MviewConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -41,11 +43,12 @@ class MviewConfigFilesTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->schemeFile = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
-        )->getPath(
-            \Magento\Framework\App\Filesystem::LIB_INTERNAL
-        ) . '/Magento/Framework/Mview/etc/mview.xsd';
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
+        $this->schemeFile = $filesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL)
+            ->getAbsolutePath('Magento/Framework/Mview/etc/mview.xsd');
     }
 
     /**
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 0ce4d0d27f79b8ca40f0e59f947c76f7e0194088..aaae6304c65ddcda3a61dafddd81e4a39635b248 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductOptionsConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ProductOptionsConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -34,9 +36,9 @@ class ProductOptionsConfigFilesTest extends \PHPUnit_Framework_TestCase
     {
         //init primary configs
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\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 e74971fa165d5c25dafb50ccaced00b2b6f0b909..f12845ce40df8bb3831aa39b8584ebee3ee43b2e 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ProductTypesConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ProductTypesConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -33,9 +35,9 @@ class ProductTypesConfigFilesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\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 37477773fe83324e5ce6138c9950d8167375a941..9364d5a85771e79b69ce97a769bdb2edb3874c10 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ResourcesConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ResourcesConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -33,9 +35,9 @@ class ResourcesConfigFilesTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var $filesystem \Magento\Framework\App\Filesystem */
-        $filesystem = $objectManager->get('Magento\Framework\App\Filesystem');
-        $modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var $filesystem \Magento\Framework\Filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $fileIteratorFactory = $objectManager->get('Magento\Framework\Config\FileIteratorFactory');
         $xmlFiles = $fileIteratorFactory->create(
             $modulesDirectory,
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 c0539f789b7f971433891a32c845e140a245bf55..3ef219c5cdcb30a0ce906f0dfea5a4147a3a1106 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/SystemConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class SystemConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     public function testConfiguration()
@@ -34,8 +36,9 @@ class SystemConfigFilesTest extends \PHPUnit_Framework_TestCase
         $cacheState = $objectManager->get('Magento\Framework\App\Cache\StateInterface');
         $cacheState->setEnabled(\Magento\Framework\App\Cache\Type\Config::TYPE_IDENTIFIER, false);
 
-        $modulesDir = $objectManager->get('Magento\Framework\App\Filesystem')
-            ->getPath(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $modulesDir = $filesystem->getDirectoryRead(DirectoryList::MODULES)->getAbsolutePath();
 
         $fileList = glob($modulesDir . '/*/*/etc/adminhtml/system.xml');
 
diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ThemeConfigFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ThemeConfigFilesTest.php
index b791b54d2f003ecccfd7c61a32b35ddb0d2c47fc..8b6abf95da639c0d69ee2715c438b441f9dc93e3 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ThemeConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ThemeConfigFilesTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ThemeConfigFilesTest extends \Magento\TestFramework\TestCase\AbstractConfigFiles
 {
     /**
@@ -34,7 +36,7 @@ class ThemeConfigFilesTest extends \Magento\TestFramework\TestCase\AbstractConfi
      */
     protected function getDirectoryConstant()
     {
-        return \Magento\Framework\App\Filesystem::LIB_INTERNAL;
+        return DirectoryList::LIB_INTERNAL;
     }
 
     /**
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 54a8d2ccd12576c5cdb10e7b114ec59d402a6495..4d53ee64bdc07fcfe428db703281e59c7e4e008a 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/ViewConfigFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Modular;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ViewConfigFilesTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -32,12 +34,13 @@ class ViewConfigFilesTest extends \PHPUnit_Framework_TestCase
     public function testViewConfigFile($file)
     {
         $domConfig = new \Magento\Framework\Config\Dom($file);
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
+        );
         $result = $domConfig->validate(
-            \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-                'Magento\Framework\App\Filesystem'
-            )->getPath(
-                \Magento\Framework\App\Filesystem::LIB_INTERNAL
-            ) . '/Magento/Framework/Config/etc/view.xsd',
+            $filesystem->getDirectoryRead(DirectoryList::LIB_INTERNAL)
+                ->getAbsolutePath('Magento/Framework/Config/etc/view.xsd'),
             $errors
         );
         $message = "Invalid XML-file: {$file}\n";
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 1674bc05cc47485cf89838190d92125453ce56ea..5836b28a0c26af839a41485373fe213c39fe4dfc 100644
--- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php
+++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Theme/XmlFilesTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Integrity\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class XmlFilesTest extends \PHPUnit_Framework_TestCase
 {
     const NO_VIEW_XML_FILES_MARKER = 'no-view-xml';
@@ -38,7 +40,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
         }
         $this->_validateConfigFile(
             $file,
-            $this->getPath(\Magento\Framework\App\Filesystem::LIB_INTERNAL) . '/Magento/Framework/Config/etc/view.xsd'
+            $this->getPath(DirectoryList::LIB_INTERNAL) . '/Magento/Framework/Config/etc/view.xsd'
         );
     }
 
@@ -48,7 +50,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     public function viewConfigFileDataProvider()
     {
         $result = [];
-        $files = glob($this->getPath(\Magento\Framework\App\Filesystem::THEMES_DIR) . '/*/*/view.xml');
+        $files = glob($this->getPath(DirectoryList::THEMES) . '/*/*/view.xml');
         foreach ($files as $file) {
             $result[substr($file, strlen(BP))] = [$file];
         }
@@ -70,7 +72,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     public function themeConfigFileExistsDataProvider()
     {
         $result = [];
-        $files = glob($this->getPath(\Magento\Framework\App\Filesystem::THEMES_DIR) . '/*/*/*', GLOB_ONLYDIR);
+        $files = glob($this->getPath(DirectoryList::THEMES) . '/*/*/*', GLOB_ONLYDIR);
         foreach ($files as $themeDir) {
             $result[substr($themeDir, strlen(BP))] = [$themeDir];
         }
@@ -85,7 +87,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     {
         $this->_validateConfigFile(
             $file,
-            $this->getPath(\Magento\Framework\App\Filesystem::LIB_INTERNAL) . '/Magento/Framework/Config/etc/theme.xsd'
+            $this->getPath(DirectoryList::LIB_INTERNAL) . '/Magento/Framework/Config/etc/theme.xsd'
         );
     }
 
@@ -109,7 +111,7 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
     public function themeConfigFileDataProvider()
     {
         $result = [];
-        $files = glob($this->getPath(\Magento\Framework\App\Filesystem::THEMES_DIR) . '/*/*/*/theme.xml');
+        $files = glob($this->getPath(DirectoryList::THEMES) . '/*/*/*/theme.xml');
         foreach ($files as $file) {
             $result[substr($file, strlen(BP))] = [$file];
         }
@@ -143,10 +145,10 @@ class XmlFilesTest extends \PHPUnit_Framework_TestCase
      */
     protected function getPath($code)
     {
-        return \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
-        )->getPath(
-            $code
+        /** @var \Magento\Framework\Filesystem $filesystem */
+        $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
+            'Magento\Framework\Filesystem'
         );
+        return $filesystem->getDirectoryRead($code)->getAbsolutePath();
     }
 }
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 535e083a156dd2628e7978b193099c84119a168d..8963cc68b922950eb2992e0a29a8f1137ff4e3b8 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Test\Tools\Layout\Reference;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Tools\Layout\Formatter;
 use Magento\Tools\Layout\Reference\Processor;
 
@@ -60,9 +62,10 @@ class ProcessorTest extends \PHPUnit_Framework_TestCase
         }
         $this->_testDir = realpath(__DIR__ . '/_files') . '/';
 
+        /** @var Filesystem $filesystem */
         $filesystem = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
-            ->get('Magento\Framework\App\Filesystem');
-        $this->_varDir = $filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR) . '/references/';
+            ->get('Magento\Framework\Filesystem');
+        $this->_varDir = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR)->getAbsolutePath('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 1f5ce7dd72f797767977e3583b8926529d4b0112..2a43d912dfd72c95977761eb3b4762efdb8ea28a 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
@@ -23,42 +23,18 @@
  */
 namespace Magento\Theme\Controller\Adminhtml\System\Design;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\DirectoryList;
+
 /**
  * @magentoAppArea adminhtml
  */
 class ThemeControllerTest extends \Magento\Backend\Utility\Controller
 {
-    /** @var \Magento\Framework\App\Filesystem */
-    protected $_filesystem;
-
-    protected function setUp()
-    {
-        parent::setUp();
-
-        $this->_filesystem = $this->_objectManager->get('Magento\Framework\App\Filesystem');
-    }
-
-    /**
-     * Test upload JS file
-     */
     public function testUploadJsAction()
     {
-        $_FILES = array(
-            'js_files_uploader' => array(
-                'name' => 'simple-js-file.js',
-                'type' => 'application/x-javascript',
-                'tmp_name' => $this->_prepareFileForUploading(),
-                'error' => '0',
-                'size' => '28'
-            )
-        );
-
-        $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\App\Filesystem\DirectoryList'
-        );
-        /** @var $directoryList \Magento\Framework\App\Filesystem\DirectoryList */
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::SYS_TMP_DIR, array('path' => ''));
-
+        $name = 'simple-js-file.js';
+        $this->createUploadFixture($name);
         $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface')
             ->getCollection()
             ->getFirstItem();
@@ -67,27 +43,32 @@ class ThemeControllerTest extends \Magento\Backend\Utility\Controller
         $this->dispatch('backend/admin/system_design_theme/uploadjs');
         $output = $this->getResponse()->getBody();
         $this->assertContains('"error":false', $output);
-        $this->assertContains('simple-js-file.js', $output);
+        $this->assertContains($name, $output);
     }
 
     /**
-     * Prepare file for uploading
+     * Creates a fixture for testing uploaded file
      *
-     * @return string
+     * @param string $name
+     * @return void
      */
-    protected function _prepareFileForUploading()
+    private function createUploadFixture($name)
     {
-        /**
-         * Copy file to writable directory.
-         * Uploader can copy(upload) and then remove this temporary file.
-         */
-        $fileName = __DIR__ . '/_files/simple-js-file.js';
-        $varDir = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
-        $rootDir = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
-        $destinationFilePath = 'simple-js-file.js';
-
-        $rootDir->copyFile($rootDir->getRelativePath($fileName), $destinationFilePath, $varDir);
-
-        return $varDir->getAbsolutePath($destinationFilePath);
+        /** @var \Magento\TestFramework\App\Filesystem $filesystem */
+        $filesystem = $this->_objectManager->get('Magento\Framework\Filesystem');
+        $tmpDir = $filesystem->getDirectoryWrite(DirectoryList::SYS_TMP);
+        $subDir = str_replace('\\', '_', __CLASS__);
+        $tmpDir->create($subDir);
+        $target = $tmpDir->getAbsolutePath("{$subDir}/{$name}");
+        copy(__DIR__ . "/_files/{$name}", $target);
+        $_FILES = array(
+            'js_files_uploader' => array(
+                'name' => 'simple-js-file.js',
+                'type' => 'application/x-javascript',
+                'tmp_name' => $target,
+                'error' => '0',
+                'size' => '28'
+            )
+        );
     }
 }
diff --git a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php b/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
deleted file mode 100644
index a862372b3e4c419aab9fd1d228cce22bb42d1cfe..0000000000000000000000000000000000000000
--- a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-
-/**
- * Storage model test
- */
-namespace Magento\Theme\Model\Wysiwyg;
-
-class StorageTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var \Magento\Framework\App\RequestInterface|PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_request;
-
-    /**
-     * @var \Magento\Framework\ObjectManager
-     */
-    protected $_objectManager;
-
-    /**
-     * @var \Magento\Theme\Helper\Storage
-     */
-    protected $_helperStorage;
-
-    /**
-     * @var \Magento\Framework\App\Filesystem
-     */
-    protected $_filesystem;
-
-    /**
-     * @var \Magento\Theme\Model\Wysiwyg\Storage
-     */
-    protected $_storageModel;
-
-    /**
-     * @var \Magento\Framework\Filesystem\Directory\Write
-     */
-    protected $directoryTmp;
-
-    /**
-     * @var \Magento\Framework\Filesystem\Directory\Write
-     */
-    protected $directoryVar;
-
-    protected function setUp()
-    {
-        $this->_objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-
-        $directoryList = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
-            'Magento\Framework\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\Framework\App\Filesystem::VAR_DIR, array('path' => $dirPath));
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::TMP_DIR, array('path' => $tmpDirPath));
-        $directoryList->addDirectory(\Magento\Framework\App\Filesystem::MEDIA_DIR, array('path' => $tmpDirPath));
-
-        $this->_filesystem = $this->_objectManager->create(
-            'Magento\Framework\App\Filesystem',
-            array('directoryList' => $directoryList)
-        );
-        $this->directoryVar = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
-        $this->directoryTmp = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::TMP_DIR);
-
-        /** @var $theme \Magento\Framework\View\Design\ThemeInterface */
-        $theme = $this->_objectManager->create('Magento\Framework\View\Design\ThemeInterface')
-            ->getCollection()
-            ->getFirstItem();
-
-        /** @var $request \Magento\Framework\App\Request\Http */
-        $request = $this->_objectManager->get('Magento\Framework\App\Request\Http');
-        $request->setParam(\Magento\Theme\Helper\Storage::PARAM_THEME_ID, $theme->getId());
-        $request->setParam(
-            \Magento\Theme\Helper\Storage::PARAM_CONTENT_TYPE,
-            \Magento\Theme\Model\Wysiwyg\Storage::TYPE_IMAGE
-        );
-
-        $this->_helperStorage = $this->_objectManager->get('Magento\Theme\Helper\Storage');
-
-        $this->_storageModel = $this->_objectManager->create(
-            'Magento\Theme\Model\Wysiwyg\Storage',
-            array('helper' => $this->_helperStorage, 'filesystem' => $this->_filesystem)
-        );
-    }
-
-    protected function tearDown()
-    {
-        $this->directoryTmp->delete($this->directoryTmp->getRelativePath($this->_helperStorage->getStorageRoot()));
-    }
-
-    /**
-     * @covers \Magento\Theme\Model\Wysiwyg\Storage::_createThumbnail
-     */
-    public function testCreateThumbnail()
-    {
-        $image = 'some_image.jpg';
-        $imagePath = realpath(__DIR__) . "/_files/theme/image/{$image}";
-        $tmpImagePath = $this->_copyFileToTmpCustomizationPath($imagePath);
-
-        $relativePath = $this->directoryTmp->getRelativePath($tmpImagePath);
-        $method = $this->_getMethod('_createThumbnail');
-        $result = $method->invokeArgs($this->_storageModel, array($relativePath));
-
-        $expectedResult = $this->directoryTmp->getRelativePath(
-            $this->_helperStorage->getThumbnailDirectory($tmpImagePath) . '/' . $image
-        );
-
-        $this->assertEquals($expectedResult, $result);
-        $this->assertFileExists($this->directoryTmp->getAbsolutePath($result));
-    }
-
-    /**
-     * @param string $name
-     * @return \ReflectionMethod
-     */
-    protected function _getMethod($name)
-    {
-        $class = new \ReflectionClass('Magento\Theme\Model\Wysiwyg\Storage');
-        $method = $class->getMethod($name);
-        $method->setAccessible(true);
-        return $method;
-    }
-
-    /**
-     * Copy file to tmp theme customization path
-     *
-     * @param string $sourceFile
-     * @return string
-     */
-    protected function _copyFileToTmpCustomizationPath($sourceFile)
-    {
-        $targetFile = $this->_helperStorage->getStorageRoot() . '/' . basename($sourceFile);
-        $this->directoryTmp->create(pathinfo($targetFile, PATHINFO_DIRNAME));
-        $this->directoryVar->copyFile(
-            $this->directoryVar->getRelativePath($sourceFile),
-            $this->directoryTmp->getRelativePath($targetFile),
-            $this->directoryTmp
-        );
-        return $targetFile;
-    }
-}
diff --git a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/_files/theme/image/some_image.jpg b/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/_files/theme/image/some_image.jpg
deleted file mode 100644
index 8cf9655aa2dbe11ea02fed51e6e802910657d746..0000000000000000000000000000000000000000
Binary files a/dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/_files/theme/image/some_image.jpg and /dev/null differ
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 d2a842a3912aef8f5d8f1fa8b466ddf378901884..9078c06e319d244de7bf5290eebcf3d301e63afc 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/DataTest.php
@@ -26,6 +26,8 @@
  */
 namespace Magento\Widget\Model\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @magentoDataFixture Magento/Backend/controllers/_files/cache/all_types_disabled.php
  * @magentoAppArea adminhtml
@@ -37,38 +39,14 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     protected $_configData;
 
-    /**
-     * @var \Magento\Framework\App\Filesystem\DirectoryList
-     */
-    protected $directoryList;
-
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $filesystem = $objectManager->create(
-            'Magento\Framework\App\Filesystem',
-            array(
-                'directoryList' => $objectManager->create(
-                    'Magento\Framework\App\Filesystem\DirectoryList',
-                    array(
-                        'root' => BP,
-                        'directories' => array(
-                            \Magento\Framework\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files/code'),
-                            \Magento\Framework\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files/code'),
-                            \Magento\Framework\App\Filesystem::THEMES_DIR => array('path' => __DIR__ . '/_files/design')
-                        )
-                    )
-                )
-            )
-        );
-
-        $this->directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $dirPath = ltrim(
-            str_replace($this->directoryList->getRoot(), '', str_replace('\\', '/', __DIR__)) . '/_files',
-            '/'
-        );
-        $this->directoryList->addDirectory(\Magento\Framework\App\Filesystem::MODULES_DIR, array('path' => $dirPath));
+        /** @var \Magento\TestFramework\App\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $filesystem->overridePath(DirectoryList::MODULES, __DIR__ . '/_files/code');
+        $filesystem->overridePath(DirectoryList::CONFIG, __DIR__ . '/_files/code');
+        $filesystem->overridePath(DirectoryList::THEMES, __DIR__ . '/_files/design');
 
         /** @var \Magento\Framework\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 206bbda0696bff58ea6c4bf6bfa23bc87b157cdb..26435f1a5228880947bf228b678bc5c41b7040a4 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/FileResolverTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Widget\Model\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileResolverTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -32,33 +34,14 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
      */
     private $_object;
 
-    /**
-     * @var \Magento\Framework\App\Filesystem\DirectoryList
-     */
-    protected $directoryList;
-
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-        /** @var \Magento\Framework\App\Filesystem $filesystem */
-        $filesystem = $objectManager->create(
-            'Magento\Framework\App\Filesystem',
-            array(
-                'directoryList' => $objectManager->create(
-                    'Magento\Framework\App\Filesystem\DirectoryList',
-                    array(
-                        'root' => BP,
-                        'directories' => array(
-                            \Magento\Framework\App\Filesystem::MODULES_DIR => array('path' => __DIR__ . '/_files/code'),
-                            \Magento\Framework\App\Filesystem::THEMES_DIR => array(
-                                'path' => __DIR__ . '/_files/design'
-                            ),
-                            \Magento\Framework\App\Filesystem::CONFIG_DIR => array('path' => __DIR__ . '/_files/')
-                        )
-                    )
-                )
-            )
-        );
+        /** @var \Magento\TestFramework\App\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $filesystem->overridePath(DirectoryList::MODULES, __DIR__ . '/_files/code');
+        $filesystem->overridePath(DirectoryList::THEMES, __DIR__ . '/_files/design');
+        $filesystem->overridePath(DirectoryList::CONFIG, __DIR__ . '/_files');
 
         $moduleListMock = $this->getMockBuilder(
             'Magento\Framework\Module\ModuleListInterface'
@@ -83,13 +66,6 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             'Magento\Widget\Model\Config\FileResolver',
             array('moduleReader' => $moduleReader, 'filesystem' => $filesystem)
         );
-
-        $this->directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $dirPath = ltrim(
-            str_replace($this->directoryList->getRoot(), '', str_replace('\\', '/', __DIR__)) . '/_files',
-            '/'
-        );
-        $this->directoryList->addDirectory(\Magento\Framework\App\Filesystem::MODULES_DIR, array('path' => $dirPath));
     }
 
     public function testGetDesign()
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 4d210aeb1c8b7bba8f7f8bf8980350db68360565..69f09478b7c089f9c43d9c6ebeb1bb5e0f011c84 100644
--- a/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
+++ b/dev/tests/integration/testsuite/Magento/Widget/Model/Config/ReaderTest.php
@@ -1,9 +1,5 @@
 <?php
-namespace Magento\Widget\Model\Config;
-
 /**
- * \Magento\Widget\Model\Config\Reader
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -24,15 +20,17 @@ namespace Magento\Widget\Model\Config;
  *
  * @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\Widget\Model\Config;
+
+use Magento\Framework\App\Filesystem\DirectoryList;
+
+/**
+ * \Magento\Widget\Model\Config\Reader
  * @magentoDataFixture Magento/Backend/controllers/_files/cache/all_types_disabled.php
  */
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
-    /**
-     * @var \Magento\Framework\App\Filesystem\DirectoryList
-     */
-    protected $directoryList;
-
     /**
      * @var \Magento\Widget\Model\Config\Reader
      */
@@ -41,23 +39,11 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
-
-        $this->directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $dirPath = ltrim(
-            str_replace($this->directoryList->getRoot(), '', str_replace('\\', '/', __DIR__)) . '/_files',
-            '/'
-        );
-        $this->directoryList->addDirectory(
-            \Magento\Framework\App\Filesystem::MODULES_DIR,
-            array('path' => $dirPath . '/code')
-        );
-        $this->directoryList->addDirectory(\Magento\Framework\App\Filesystem::CONFIG_DIR, array('path' => $dirPath));
-        $this->directoryList->addDirectory(\Magento\Framework\App\Filesystem::ROOT_DIR, array('path' => $dirPath));
-
-        $filesystem = $objectManager->create(
-            'Magento\Framework\App\Filesystem',
-            array('directoryList' => $this->directoryList)
-        );
+        /** @var \Magento\TestFramework\App\Filesystem $filesystem */
+        $filesystem = $objectManager->get('Magento\Framework\Filesystem');
+        $filesystem->overridePath(DirectoryList::MODULES, __DIR__ . '/_files/code');
+        $filesystem->overridePath(DirectoryList::ROOT, __DIR__ . '/_files');
+        $filesystem->overridePath(DirectoryList::CONFIG, __DIR__ . '/_files');
 
         /** @var \Magento\Framework\Module\Declaration\FileResolver $modulesDeclarations */
         $modulesDeclarations = $objectManager->create(
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Application.php b/dev/tests/performance/framework/Magento/TestFramework/Application.php
index 9f59a6b7bc24c4fa5ef7b638b3b2b23fb46a914c..715af60f7452688bb1fcc030b9619dc80603c629 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Application.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Application.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\TestFramework;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Application
 {
     /**
@@ -203,9 +205,9 @@ class Application
     {
         /** @var \Magento\Framework\Filesystem\Directory\Write $varDirectory */
         $varDirectory = $this->getObjectManager()->get(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->getDirectoryWrite(
-            \Magento\Framework\App\Filesystem::VAR_DIR
+            DirectoryList::VAR_DIR
         );
         $varDirectory->changePermissions('', 0777);
     }
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php b/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php
index b648f5a0af6a0d38c252a328942dfe84d46dd18f..2894c20df090cae73f82b68abb7aeb876b883b4c 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Helper/Categories.php
@@ -103,8 +103,8 @@ class Categories
     protected function getObjectManager()
     {
         if (!$this->_objectManager) {
-            $locatorFactory = new \Magento\Framework\App\ObjectManagerFactory();
-            $this->_objectManager = $locatorFactory->create(BP, $_SERVER);
+            $objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER);
+            $this->_objectManager = $objectManagerFactory->create($_SERVER);
         }
         return $this->_objectManager;
     }
diff --git a/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php b/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php
index bceec3ed950495c8c43b043e75b208c066b8c4e9..af4bef6112f7591ddb52b5c9fad4e9a471cec3cc 100644
--- a/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php
+++ b/dev/tests/performance/framework/Magento/TestFramework/Performance/Bootstrap.php
@@ -123,7 +123,9 @@ class Bootstrap
             $configFile = "{$this->testsBaseDir}/config.php";
             $configFile = file_exists($configFile) ? $configFile : "{$configFile}.dist";
             $configData = require $configFile;
-            $this->config = new Config($configData, $this->testsBaseDir, $this->appBootstrap->getDirList()->getRoot());
+            /** @var \Magento\Framework\App\Filesystem\DirectoryList $dirList */
+            $dirList = $this->appBootstrap->getObjectManager()->get('Magento\Framework\App\Filesystem\DirectoryList');
+            $this->config = new Config($configData, $this->testsBaseDir, $dirList->getRoot());
         }
         return $this->config;
     }
diff --git a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php
index 3e784f15ba6d739f802d73bf893892ae813ac229..7ae65442839a24ddf4451c02b44416c4d7083b71 100644
--- a/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php
+++ b/dev/tests/performance/framework/tests/unit/testsuite/Magento/Test/Performance/BootstrapTest.php
@@ -35,11 +35,14 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
         $this->appBootstrap = $this->getMock('Magento\Framework\App\Bootstrap', [], [], '', false);
         $dirList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false);
         $dirList->expects($this->any())->method('getRoot')->will($this->returnValue(BP));
-        $this->appBootstrap->expects($this->any())->method('getDirList')->will($this->returnValue($dirList));
         $objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager');
         $this->appBootstrap->expects($this->any())
             ->method('getObjectManager')
             ->will($this->returnValue($objectManager));
+        $objectManager->expects($this->any())
+            ->method('get')
+            ->with('Magento\Framework\App\Filesystem\DirectoryList')
+            ->will($this->returnValue($dirList));
     }
 
     protected function tearDown()
diff --git a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
index 16754a80c17868fa11401f69afbb964a35e8cc6a..c8a7566b5495ed1aae220a21ee7ec28fd1737f03 100644
--- a/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
+++ b/dev/tests/static/framework/Magento/TestFramework/Utility/Files.php
@@ -203,6 +203,7 @@ class Files
             $this->getMainConfigFiles(),
             $this->getLayoutFiles(),
             $this->getConfigFiles(),
+            $this->getDiConfigs(true),
             $this->getLayoutConfigFiles(),
             $this->getPageTypeFiles()
         );
@@ -854,7 +855,7 @@ class Files
         if ($asDataSet) {
             $output = [];
             foreach ($configs as $file) {
-                $output[] = [$file];
+                $output[$file] = [$file];
             }
 
             return $output;
diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt
index 6f8558945e1681eca44776f7d442c22e676b7d1c..ffd698a1a0106f2cc608cc02c5eb6f3a464ed20d 100644
--- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/namespace.txt
@@ -13,6 +13,7 @@ dev/tests/unit/testsuite/Magento/Framework/Code/_files/app/code/Magento/SomeModu
 dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/_files/ConfigDomMock.php
 dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Code/Generator/_files/Sample.php
 dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/Sample.php
+dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php
 dev/tools/Magento/Tools/I18n/Zend/Exception.php
 dev/tools/Magento/Tools/I18n/Zend/Console/Getopt/Exception.php
 dev/tools/Magento/Tools/I18n/Zend/Console/Getopt.php
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
index 3f2e8d2e56270539cce3e87ab8a6f8fa06af7ded..c52ea4e4276e52a2008f95215850c776fcb401e5 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteCodeTest.php
@@ -363,7 +363,7 @@ class ObsoleteCodeTest extends \PHPUnit_Framework_TestCase
             '|Var|Tmp|Cache|Log|Session|Upload|Export)?Dir\(/S',
             $content,
             'The class \Magento\Core\Model\Config\Options is obsolete. '
-            . 'Replacement suggestion: \Magento\Framework\App\Filesystem'
+            . 'Replacement suggestion: \Magento\Framework\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 3e502d682446752c9c0a48168bfe4dc9e9eb8b74..b048cfee769442b1021b6accdd044dd54a9f3aa1 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
@@ -786,7 +786,7 @@ return array(
     array('Mage_Core_Controller_Magento_Router_Admin', 'Magento\Backend\App\Router'),
     array('Mage_Core_Model_Convert'),
     array('Mage_Core_Model_Config_Fieldset', 'Magento\Core\Model\Fieldset\Config'),
-    array('Mage_Core_Model_Config_Options', 'Magento\Framework\App\Filesystem'),
+    array('Mage_Core_Model_Config_Options', 'Magento\Framework\Filesystem'),
     array('Magento\Framework\App\Dir', 'Magento\Framework\Filesystem'),
     array('Magento\Framework\Filesystem\Adapter\Local', 'Magento\Framework\Filesystem\Driver\File'),
     array('Magento\Framework\Filesystem\Adapter\Zlib', 'Magento\Framework\Filesystem\Driver\Zlib'),
@@ -1770,7 +1770,6 @@ return array(
     array('Magento\Adminhtml\Block\Report\Shopcart\Product', 'Magento\Reports\Block\Adminhtml\Shopcart\Product'),
     array('Magento\Adminhtml\Block\Report\Wishlist\Grid', 'Magento\Reports\Block\Adminhtml\Wishlist\Grid'),
     array('Magento\Adminhtml\Block\Report\Wishlist', 'Magento\Reports\Block\Adminhtml\Wishlist'),
-    array('Magento\Framework\App\Dir\Verification', 'Magento\Framework\App\Filesystem\DirectoryList\Verification'),
     array('Magento\Backend\Helper\Addresses'),
     array('Magento\Core\Model\Cookie', 'Magento\Framework\Stdlib\Cookie'),
     array('Magento\Core\Model\Logger', 'Magento\Framework\Logger'),
@@ -2834,4 +2833,12 @@ return array(
     ['Magento\Rss\Controller\Catalog'],
     ['Magento\Wishlist\Block\Rss'],
     ['Magento\Wishlist\Controller\Index\Rss'],
+    ['Magento\Checkout\Controller\Onepage\Progress'],
+    ['Magento\Framework\App\Filesystem', 'Magento\Framework\Filesystem'],
+    ['Magento\TestFramework\App\Filesystem\DirectoryList'],
+    ['Magento\Framework\App\Filesystem\DirectoryList\Configuration'],
+    ['Magento\Framework\App\Filesystem\DirectoryList\Verification'],
+    ['Magento\Framework\Filesystem\DriverFactory', 'Magento\Framework\Filesystem\DriverPool'],
+    ['Magento\Framework\Filesystem\WrapperFactory'],
+    ['Magento\Framework\Filesystem\WrapperInterface'],
 );
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 cd32bee8bb14507243ab1cfb94b14d6874496a20..fa293631ed8cbd52b987602c7f543bae34893f0c 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
@@ -546,36 +546,59 @@ return array(
         '\Magento\GroupedProduct\Model\Resource\Product\Link::LINK_TYPE_GROUPED'
     ),
     array('PARAM_APP_URIS', 'Magento\Framework\Filesystem'),
-    array('ROOT', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::ROOT_DIR'),
-    array('APP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::APP_DIR'),
-    array('MODULES', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::MODULES_DIR'),
-    array('THEMES', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::THEMES_DIR'),
-    array('CONFIG', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::CONFIG_DIR'),
-    array('LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LIB_INTERNAL'),
-    array('LOCALE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LOCALE_DIR'),
-    array('PUB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::PUB_DIR'),
-    array('PUB_LIB', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LIB_WEB'),
-    array('PUB_LIB_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem::LIB_WEB'),
-    array('MEDIA', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::MEDIA_DIR'),
-    array('STATIC_VIEW', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'),
-    array('PUB_VIEW_CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'),
-    array('PUB_VIEW_CACHE_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR'),
-    array('VAR_DIR', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem'),
-    array('TMP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::TMP_DIR'),
-    array('CACHE', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::CACHE_DIR'),
-    array('LOG', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::LOG_DIR'),
-    array('SESSION', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::SESSION_DIR'),
-    array('DI', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::DI_DIR'),
-    array('GENERATION', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::GENERATION_DIR'),
-    array('UPLOAD', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::UPLOAD_DIR'),
-    array('SYS_TMP', '\Magento\Framework\Filesystem', '\Magento\Framework\App\Filesystem::SYS_TMP_DIR'),
+    array('ROOT_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::ROOT'),
+    array('APP_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::APP'),
+    array('MODULES_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::MODULES'
+    ),
+    array('THEMES_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::THEMES'
+    ),
+    array('CONFIG_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::CONFIG'
+    ),
+    array('LIB_INTERNAL',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::LIB_INTERNAL'
+    ),
+    array('LOCALE_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::LOCALE'),
+    array('PUB_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::PUB'),
+    array('LIB_WEB', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::LIB_WEB'),
+    array('MEDIA_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::MEDIA'),
+    array('STATIC_VIEW_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::STATIC_VIEW'
+    ),
+    array('VAR_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR'),
+    array('TMP_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::TMP'),
+    array('CACHE_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::CACHE'),
+    array('LOG_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::LOG'),
+    array('SESSION_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::SESSION'
+    ),
+    array('DI_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem\DirectoryList::DI'),
+    array('GENERATION_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::GENERATION'
+    ),
+    array('UPLOAD_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Filesystem\DirectoryList::UPLOAD'
+    ),
+    array('SYS_TMP_DIR',
+        '\Magento\Framework\App\Filesystem',
+        '\Magento\Framework\Filesystem\DirectoryList::SYS_TMP'
+    ),
     array('LAYOUT_NAVIGATION_CLASS_NAME', 'Magento\DesignEditor\Model\State'),
     array(
         'TYPE_CONFIGURABLE',
         '\Magento\Catalog\Model\Product\Type',
         '\Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE'
     ),
-    array('LIB_DIR', '\Magento\Framework\App\Filesystem', '\Magento\Framework\App\Filesystem::LIB_INTERNAL'),
     array(
         'PERIOD_UNIT_DAY',
         '\Magento\Payment\Model\Recurring\Profile',
@@ -641,4 +664,23 @@ return array(
     ['MAX_QUERY_LEN', 'Magento\CatalogSearch\Helper\Data'],
     ['QUERY_VAR_NAME', 'Magento\CatalogSearch\Helper\Data'],
     ['XML_PATH_CUSTOMER_VIV_GROUP_AUTO_ASSIGN', 'Magento\Customer\Helper\Data'],
+    array(
+        'PARAM_APP_DIRS',
+        'Magento\Framework\App\Filesystem',
+        '\Magento\Framework\App\Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS'
+    ),
+    array(
+        'CACHE_VIEW_REL_DIR',
+        'Magento\Framework\App\Filesystem',
+        '\Magento\Framework\View\Asset\Minified::CACHE_VIEW_REL'
+    ),
+    ['WRAPPER_CONTENT_ZLIB', 'Magento\Framework\Filesystem', '\Magento\Framework\Filesystem\DriverPool::ZLIB'],
+    ['WRAPPER_CONTENT_PHAR', 'Magento\Framework\Filesystem'],
+    ['WRAPPER_CONTENT_RAR', 'Magento\Framework\Filesystem'],
+    ['WRAPPER_CONTENT_OGG', 'Magento\Framework\Filesystem'],
+    ['FTP', 'Magento\Framework\Filesystem'],
+    ['FTPS', 'Magento\Framework\Filesystem'],
+    ['SSH2', 'Magento\Framework\Filesystem'],
+    ['HTTP', 'Magento\Framework\Filesystem', '\Magento\Framework\Filesystem\DriverPool::HTTP'],
+    ['HTTPS', 'Magento\Framework\Filesystem', '\Magento\Framework\Filesystem\DriverPool::HTTPS'],
 );
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 9e6c4b2ccbdd5a060be2ac36b0870d6260772a13..8a856de5d7b76a932469258aa67da71ebb032c1e 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
@@ -333,7 +333,7 @@ return array(
     array(
         'cleanVarSubFolders',
         '',
-        '\Magento\Framework\App\Filesystem::getDirectoryRead(\Magento\Framework\App\Filesystem::VAR_DIR)::search())'
+        '\Magento\Framework\Filesystem::getDirectoryRead(\Magento\Framework\Filesystem::VAR_DIR)::search())'
     ),
     array('collectRoutes', 'Magento\Backend\App\Router'),
     array('collectRoutes', 'Magento\Core\App\Router\Base'),
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 82d74438a61cbf11a85b29d060e3774cad9885e6..57eaad47bc3640b7a7227268373f7c062b405597 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
@@ -76,7 +76,7 @@ return array(
     array('_moduleReader', 'Magento\Backend\Model\Menu\Config'),
     array('_option', 'Magento\Captcha\Helper\Data', '_dirs'),
     array('_options', 'Magento\Core\Model\Config', 'Magento\Framework\Filesystem'),
-    array('_optionsMapping', null, '\Magento\Framework\App\Filesystem::getPath($nodeKey)'),
+    array('_optionsMapping', null, '\Magento\Framework\Filesystem::getDirectoryRead($nodeKey)->getAbsolutePath()'),
     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/phpcpd/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcpd/blacklist/common.txt
index 97cdd137383c958502a80d765e7dfcbb2fa979f4..50021cff7bce0ec8ed42a6a2cd40e169cdb45efa 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
@@ -129,3 +129,4 @@ Magento/Sales/Service/V1
 Magento/Shipping/Controller/Adminhtml/Order/Shipment
 vendor
 setup/vendor
+Magento/CatalogSearch/Model/Resource/Fulltext
\ No newline at end of file
diff --git a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt
index 161f90ea1332a3766e5e770b643c7952ade15f9d..641a2ad0bf80247e83195a0ff1b852face4f6194 100644
--- a/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt
+++ b/dev/tests/static/testsuite/Magento/Test/Php/_files/phpcs/blacklist/common.txt
@@ -36,8 +36,6 @@ dev/tests/static/testsuite/Magento/Test/Php/Exemplar/CodeMessTest/phpmd/input
 lib/internal/Magento/Framework/Translate/Adapter.php
 # __ method for Translate cannot be in camelCase
 lib/internal/Magento/Framework/Translate/AdapterInterface.php
-# WrapperInterface methods cannot be camelCase as they follow method naming convention from framework classes
-lib/internal/Magento/Framework/Filesystem/WrapperInterface.php
 # PSR-1 not applied to
 dev/tests/integration/testsuite/Magento
 # PSR-1 not applied to
diff --git a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
index 219eeed89590281d84810932b986fb40044e5d17..87e6684388e99af31c816185b65bb6158d656759 100644
--- a/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
+++ b/dev/tests/unit/framework/Magento/Test/Block/Adminhtml.php
@@ -102,7 +102,7 @@ class Adminhtml extends \PHPUnit_Framework_TestCase
         $this->_eventManagerMock    = $this->_makeMock('Magento\Framework\Event\ManagerInterface');
         $this->_controllerMock      = $this->_makeMock('Magento\Framework\App\FrontController');
         $this->_loggerMock          = $this->_makeMock('Magento\Framework\Logger');
-        $this->_filesystemMock      = $this->_makeMock('Magento\Framework\App\Filesystem');
+        $this->_filesystemMock      = $this->_makeMock('Magento\Framework\Filesystem');
         $this->_cacheMock           = $this->_makeMock('Magento\Framework\App\CacheInterface');
         $this->_scopeConfigMock     = $this->_makeMock('Magento\Framework\App\Config\ScopeConfigInterface');
         $this->_storeManagerMock    = $this->_makeMock('Magento\Store\Model\StoreManager');
diff --git a/dev/tests/unit/framework/Magento/TestFramework/Matcher/MethodInvokedAtIndex.php b/dev/tests/unit/framework/Magento/TestFramework/Matcher/MethodInvokedAtIndex.php
index 9db81b741183bbb0e1c2b306c32624e437c3479f..aa90b7bc62da0faa2ef8c8eb920fbe64e410647f 100644
--- a/dev/tests/unit/framework/Magento/TestFramework/Matcher/MethodInvokedAtIndex.php
+++ b/dev/tests/unit/framework/Magento/TestFramework/Matcher/MethodInvokedAtIndex.php
@@ -21,8 +21,21 @@
  * @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\Matcher;
 
+/**
+ * Class MethodInvokedAtIndex
+ * Matches invocations per 'method' at 'position'
+ * Example:
+ * $mock->expects(new MethodInvokedAtIndex(0))->method('getMethod')->willReturn(1);
+ * $mock->expects(new MethodInvokedAtIndex(1))->method('getMethod')->willReturn(2);
+ *
+ * $mock->getMethod(); // returns 1
+ * $mock->getMethod(); // returns 2
+ *
+ * @package Magento\TestFramework\Matcher
+ */
 class MethodInvokedAtIndex extends \PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
 {
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Session/AdminConfigTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Session/AdminConfigTest.php
index 8981053b69ac450cd0d3d326f3399b6a15f7636a..b25f8f8f46a328221a22a71b33f9becf5537e939 100644
--- a/dev/tests/unit/testsuite/Magento/Backend/Model/Session/AdminConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Session/AdminConfigTest.php
@@ -51,6 +51,12 @@ class AdminConfigTest extends \PHPUnit_Framework_TestCase
      */
     private $storeManagerMock;
 
+    /**
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $filesystemMock;
+
+
     protected function setUp()
     {
         $this->requestMock = $this->getMock(
@@ -77,6 +83,11 @@ class AdminConfigTest extends \PHPUnit_Framework_TestCase
         $this->storeManagerMock = $this->getMockForAbstractClass('\Magento\Framework\StoreManagerInterface');
         $this->storeManagerMock->expects($this->once())->method('getStore')->will($this->returnValue($storeMock));
 
+        $this->filesystemMock = $this->getMock('\Magento\Framework\Filesystem', [], [], '', false);
+        $dirMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface');
+        $this->filesystemMock->expects($this->any())
+            ->method('getDirectoryWrite')
+            ->will($this->returnValue($dirMock));
     }
 
     public function testSetCookiePathNonDefault()
@@ -107,7 +118,8 @@ class AdminConfigTest extends \PHPUnit_Framework_TestCase
                 'validatorFactory' => $this->validatorFactory,
                 'request' => $this->requestMock,
                 'frontNameResolver' => $mockFrontNameResolver,
-                'storeManager' => $this->storeManagerMock
+                'storeManager' => $this->storeManagerMock,
+                'filesystem' => $this->filesystemMock,
             ]
         );
 
@@ -141,9 +153,10 @@ class AdminConfigTest extends \PHPUnit_Framework_TestCase
                 'validatorFactory' => $this->validatorFactory,
                 'request' => $this->requestMock,
                 'sessionName' => $sessionName,
-                'storeManager' => $this->storeManagerMock
+                'storeManager' => $this->storeManagerMock,
+                'filesystem' => $this->filesystemMock,
             ]
         );
         $this->assertSame($sessionName, $adminConfig->getName());
     }
-}
\ No newline at end of file
+}
diff --git a/dev/tests/unit/testsuite/Magento/Backup/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Backup/Helper/DataTest.php
index 6bd995785c47966f7d0efc6c2f31e6dfd96ddc2f..d57096506c5cb2a0741ffe6975cbbd2c904b2082 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/Helper/DataTest.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Backup\Helper;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\MaintenanceMode;
 
 class DataTest extends \PHPUnit_Framework_TestCase
@@ -34,15 +35,28 @@ class DataTest extends \PHPUnit_Framework_TestCase
     protected $helper;
 
     /**
-     * @var \Magento\Framework\App\Filesystem | \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
     public function setUp()
     {
-        $this->filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem')->disableOriginalConstructor()
+        $this->filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')->disableOriginalConstructor()
             ->getMock();
 
+        $this->filesystem->expects($this->any())
+            ->method('getDirectoryRead')
+            ->will($this->returnCallback(function ($code) {
+                $dir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
+                $dir->expects($this->any())
+                    ->method('getAbsolutePath')
+                    ->will($this->returnCallback(function ($path) use ($code) {
+                        $path = empty($path) ? $path : '/' . $path;
+                        return rtrim($code, '/') . $path;
+                    }));
+                return $dir;
+            }));
+
         $this->helper = (new \Magento\TestFramework\Helper\ObjectManager($this))
             ->getObject('Magento\Backup\Helper\Data', [
                 'filesystem' => $this->filesystem,
@@ -51,26 +65,17 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
     public function testGetBackupIgnorePaths()
     {
-        $this->filesystem->expects($this->any())->method('getPath')
-            ->will($this->returnValueMap([
-                [MaintenanceMode::FLAG_DIR, MaintenanceMode::FLAG_DIR],
-                [Filesystem::SESSION_DIR, Filesystem::SESSION_DIR],
-                [Filesystem::CACHE_DIR, Filesystem::CACHE_DIR],
-                [Filesystem::LOG_DIR, Filesystem::LOG_DIR],
-                [Filesystem::VAR_DIR, Filesystem::VAR_DIR],
-            ]));
-
         $this->assertEquals(
             [
                 '.git',
                 '.svn',
-                'var/' . MaintenanceMode::FLAG_FILENAME,
-                Filesystem::SESSION_DIR,
-                Filesystem::CACHE_DIR,
-                Filesystem::LOG_DIR,
-                Filesystem::VAR_DIR . '/full_page_cache',
-                Filesystem::VAR_DIR . '/locks',
-                Filesystem::VAR_DIR . '/report',
+                MaintenanceMode::FLAG_DIR . '/' . MaintenanceMode::FLAG_FILENAME,
+                DirectoryList::SESSION,
+                DirectoryList::CACHE,
+                DirectoryList::LOG,
+                DirectoryList::VAR_DIR . '/full_page_cache',
+                DirectoryList::VAR_DIR . '/locks',
+                DirectoryList::VAR_DIR . '/report',
             ],
             $this->helper->getBackupIgnorePaths()
         );
@@ -78,26 +83,17 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
     public function testGetRollbackIgnorePaths()
     {
-        $this->filesystem->expects($this->any())->method('getPath')
-            ->will($this->returnValueMap([
-                [MaintenanceMode::FLAG_DIR, MaintenanceMode::FLAG_DIR],
-                [Filesystem::SESSION_DIR, Filesystem::SESSION_DIR],
-                [Filesystem::ROOT_DIR, Filesystem::ROOT_DIR],
-                [Filesystem::LOG_DIR, Filesystem::LOG_DIR],
-                [Filesystem::VAR_DIR, Filesystem::VAR_DIR],
-            ]));
-
         $this->assertEquals(
             [
                 '.svn',
                 '.git',
                 'var/' . MaintenanceMode::FLAG_FILENAME,
-                Filesystem::SESSION_DIR,
-                Filesystem::LOG_DIR,
-                Filesystem::VAR_DIR . '/locks',
-                Filesystem::VAR_DIR . '/report',
-                Filesystem::ROOT_DIR . '/errors',
-                Filesystem::ROOT_DIR . '/index.php',
+                DirectoryList::SESSION,
+                DirectoryList::LOG,
+                DirectoryList::VAR_DIR . '/locks',
+                DirectoryList::VAR_DIR . '/report',
+                DirectoryList::ROOT . '/errors',
+                DirectoryList::ROOT . '/index.php',
             ],
             $this->helper->getRollbackIgnorePaths()
         );
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 c20d46c881d777ddbb636e09d6226c8472342a9c..53a564c3c0f541552dd1cd3b5d79dee5175e44c4 100644
--- a/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php
+++ b/dev/tests/unit/testsuite/Magento/Backup/Model/Fs/CollectionTest.php
@@ -28,7 +28,7 @@ class CollectionTest extends \PHPUnit_Framework_TestCase
     public function testConstructor()
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $filesystem = $this->getMockBuilder('\Magento\Framework\App\Filesystem')
+        $filesystem = $this->getMockBuilder('\Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $directoryWrite = $this->getMockBuilder(
diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/TypeTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/TypeTest.php
index 7638498dcc2e7a4a2e215d49e947e14eb96dc5ce..8cfcdebf17991793e1866045acad5d2eddbd9be9 100644
--- a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/TypeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/TypeTest.php
@@ -28,26 +28,63 @@ class TypeTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \Magento\Bundle\Model\Product\Type
      */
-    protected $_model;
+    protected $model;
+
+    /**
+     * @var \Magento\Bundle\Model\Resource\Selection\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $bundleCollection;
+
+    /**
+     * @var \Magento\Catalog\Helper\Data|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $catalogData;
+
+    /**
+     * @var \Magento\Framework\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $storeManager;
+
+    /**
+     * @var \Magento\Bundle\Model\OptionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $bundleOption;
 
     protected function setUp()
     {
+        $this->bundleCollection = $this->getMockBuilder('Magento\Bundle\Model\Resource\Selection\CollectionFactory')
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->catalogData = $this->getMockBuilder('Magento\Catalog\Helper\Data')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->storeManager = $this->getMockBuilder('Magento\Framework\StoreManagerInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $this->bundleOption = $this->getMockBuilder('Magento\Bundle\Model\OptionFactory')
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
         $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_model = $objectHelper->getObject(
+        $this->model = $objectHelper->getObject(
             'Magento\Bundle\Model\Product\Type',
             array(
                 'productFactory' => $this->getMock('Magento\Catalog\Model\ProductFactory'),
                 'bundleModelSelection' => $this->getMock('Magento\Bundle\Model\SelectionFactory'),
                 'bundleFactory' => $this->getMock('Magento\Bundle\Model\Resource\BundleFactory'),
-                'bundleCollection' => $this->getMock('Magento\Bundle\Model\Resource\Selection\CollectionFactory'),
-                'bundleOption' => $this->getMock('Magento\Bundle\Model\OptionFactory')
+                'bundleCollection' => $this->bundleCollection,
+                'bundleOption' => $this->bundleOption,
+                'catalogData' => $this->catalogData,
+                'storeManager' => $this->storeManager
             )
         );
     }
 
     public function testHasWeightTrue()
     {
-        $this->assertTrue($this->_model->hasWeight(), 'This product has not weight, but it should');
+        $this->assertTrue($this->model->hasWeight(), 'This product has not weight, but it should');
     }
 
     public function testGetIdentities()
@@ -88,6 +125,532 @@ class TypeTest extends \PHPUnit_Framework_TestCase
             ->expects($this->exactly(2))
             ->method('getSelections')
             ->will($this->returnValue(array($productMock)));
-        $this->assertEquals($identities, $this->_model->getIdentities($productMock));
+        $this->assertEquals($identities, $this->model->getIdentities($productMock));
+    }
+
+    public function testGetSkuWithType()
+    {
+        $sku = 'sku';
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('sku')
+            ->will($this->returnValue($sku));
+        $productMock->expects($this->at(2))
+            ->method('getData')
+            ->with('sku_type')
+            ->will($this->returnValue('some_data'));
+
+        $this->assertEquals($sku, $this->model->getSku($productMock));
+    }
+
+    public function testGetSkuWithoutType()
+    {
+        $sku = 'sku';
+        $itemSku = 'item';
+        $selectionIds = [1, 2, 3];
+        $serializeIds = serialize($selectionIds);
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->setMethods(['__wakeup', 'getData', 'hasCustomOptions', 'getCustomOption'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $customOptionMock = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->setMethods(['getValue', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $selectionItemMock = $this->getMockBuilder('Magento\Framework\Object')
+            ->setMethods(['getSku', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('sku')
+            ->will($this->returnValue($sku));
+        $productMock->expects($this->at(1))
+            ->method('getCustomOption')
+            ->with('option_ids')
+            ->will($this->returnValue(false));
+        $productMock->expects($this->at(2))
+            ->method('getData')
+            ->with('sku_type')
+            ->will($this->returnValue(null));
+        $productMock->expects($this->once())
+            ->method('hasCustomOptions')
+            ->will($this->returnValue(true));
+        $productMock->expects($this->at(4))
+            ->method('getCustomOption')
+            ->with('bundle_selection_ids')
+            ->will($this->returnValue($customOptionMock));
+        $customOptionMock->expects($this->any())
+            ->method('getValue')
+            ->will($this->returnValue($serializeIds));
+        $selectionMock = $this->getSelectionsByIdsMock($selectionIds, $productMock, 5, 6);
+        $selectionMock->expects(($this->any()))
+            ->method('getItems')
+            ->will($this->returnValue(array($selectionItemMock)));
+        $selectionItemMock->expects($this->any())
+            ->method('getSku')
+            ->will($this->returnValue($itemSku));
+
+        $this->assertEquals($sku . '-' . $itemSku, $this->model->getSku($productMock));
+    }
+
+    public function testGetWeightWithoutCustomOption()
+    {
+        $weight = 5;
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->setMethods(['__wakeup', 'getData'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('weight_type')
+            ->will($this->returnValue(true));
+        $productMock->expects($this->at(1))
+            ->method('getData')
+            ->with('weight')
+            ->will($this->returnValue($weight));
+
+        $this->assertEquals($weight, $this->model->getWeight($productMock));
+    }
+
+    public function testGetWeightWithCustomOption()
+    {
+        $weight = 5;
+        $selectionIds = [1, 2, 3];
+        $serializeIds = serialize($selectionIds);
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->setMethods(['__wakeup', 'getData', 'hasCustomOptions', 'getCustomOption'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $customOptionMock = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->setMethods(['getValue', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $selectionItemMock = $this->getMockBuilder('Magento\Framework\Object')
+            ->setMethods(['getSelectionId', 'getWeight', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('weight_type')
+            ->will($this->returnValue(false));
+        $productMock->expects($this->once())
+            ->method('hasCustomOptions')
+            ->will($this->returnValue(true));
+        $productMock->expects($this->at(2))
+            ->method('getCustomOption')
+            ->with('bundle_selection_ids')
+            ->will($this->returnValue($customOptionMock));
+        $customOptionMock->expects($this->once())
+            ->method('getValue')
+            ->will($this->returnValue($serializeIds));
+        $selectionMock = $this->getSelectionsByIdsMock($selectionIds, $productMock, 3, 4);
+        $selectionMock->expects($this->once())
+            ->method('getItems')
+            ->will($this->returnValue(array($selectionItemMock)));
+        $selectionItemMock->expects($this->any())
+            ->method('getSelectionId')
+            ->will($this->returnValue('id'));
+        $productMock->expects($this->at(5))
+            ->method('getCustomOption')
+            ->with('selection_qty_' . 'id')
+            ->will($this->returnValue(null));
+        $selectionItemMock->expects($this->once())
+            ->method('getWeight')
+            ->will($this->returnValue($weight));
+
+
+        $this->assertEquals($weight, $this->model->getWeight($productMock));
+    }
+
+    public function testGetWeightWithSeveralCustomOption()
+    {
+        $weight = 5;
+        $qtyOption = 5;
+        $selectionIds = [1, 2, 3];
+        $serializeIds = serialize($selectionIds);
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->setMethods(['__wakeup', 'getData', 'hasCustomOptions', 'getCustomOption'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $customOptionMock = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->setMethods(['getValue', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $qtyOptionMock = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->setMethods(['getValue', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $selectionItemMock = $this->getMockBuilder('Magento\Framework\Object')
+            ->setMethods(['getSelectionId', 'getWeight', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('weight_type')
+            ->will($this->returnValue(false));
+        $productMock->expects($this->once())
+            ->method('hasCustomOptions')
+            ->will($this->returnValue(true));
+        $productMock->expects($this->at(2))
+            ->method('getCustomOption')
+            ->with('bundle_selection_ids')
+            ->will($this->returnValue($customOptionMock));
+        $customOptionMock->expects($this->once())
+            ->method('getValue')
+            ->will($this->returnValue($serializeIds));
+        $selectionMock = $this->getSelectionsByIdsMock($selectionIds, $productMock, 3, 4);
+        $selectionMock->expects($this->once())
+            ->method('getItems')
+            ->will($this->returnValue(array($selectionItemMock)));
+        $selectionItemMock->expects($this->any())
+            ->method('getSelectionId')
+            ->will($this->returnValue('id'));
+        $productMock->expects($this->at(5))
+            ->method('getCustomOption')
+            ->with('selection_qty_' . 'id')
+            ->will($this->returnValue($qtyOptionMock));
+        $qtyOptionMock->expects($this->once())
+            ->method('getValue')
+            ->will($this->returnValue($qtyOption));
+        $selectionItemMock->expects($this->once())
+            ->method('getWeight')
+            ->will($this->returnValue($weight));
+
+        $this->assertEquals($weight * $qtyOption, $this->model->getWeight($productMock));
+    }
+
+    public function testIsVirtualWithoutCustomOption()
+    {
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->once())
+            ->method('hasCustomOptions')
+            ->will($this->returnValue(false));
+
+        $this->assertFalse($this->model->isVirtual($productMock));
+    }
+
+    public function testIsVirtual()
+    {
+        $selectionIds = [1, 2, 3];
+        $serializeIds = serialize($selectionIds);
+
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $customOptionMock = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->setMethods(['getValue', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $selectionItemMock = $this->getMockBuilder('Magento\Framework\Object')
+            ->setMethods(['isVirtual', 'getItems', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->once())
+            ->method('hasCustomOptions')
+            ->will($this->returnValue(true));
+        $productMock->expects($this->once())
+            ->method('getCustomOption')
+            ->with('bundle_selection_ids')
+            ->will($this->returnValue($customOptionMock));
+        $customOptionMock->expects($this->once())
+            ->method('getValue')
+            ->will($this->returnValue($serializeIds));
+        $selectionMock = $this->getSelectionsByIdsMock($selectionIds, $productMock, 2, 3);
+        $selectionMock->expects($this->once())
+            ->method('getItems')
+            ->will($this->returnValue(array($selectionItemMock)));
+        $selectionItemMock->expects($this->once())
+            ->method('isVirtual')
+            ->will($this->returnValue(true));
+        $selectionItemMock->expects($this->once())
+            ->method('isVirtual')
+            ->will($this->returnValue(true));
+        $selectionMock->expects($this->once())
+            ->method('count')
+            ->will($this->returnValue(1));
+
+        $this->assertTrue($this->model->isVirtual($productMock));
+    }
+
+    /**
+     * @param $selectionIds
+     * @param $productMock
+     * @param $getSelectionsIndex
+     * @param $getSelectionsIdsIndex
+     * @return \PHPUnit_Framework_MockObject_MockObject
+     */
+
+    protected function getSelectionsByIdsMock ($selectionIds, $productMock, $getSelectionsIndex, $getSelectionsIdsIndex)
+    {
+        $usedSelectionsMock = $this->getMockBuilder('Magento\Bundle\Model\Resource\Selection\Collection')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at($getSelectionsIndex))
+            ->method('getData')
+            ->with('_cache_instance_used_selections')
+            ->will($this->returnValue($usedSelectionsMock));
+        $productMock->expects($this->at($getSelectionsIdsIndex))
+            ->method('getData')
+            ->with('_cache_instance_used_selections_ids')
+            ->will($this->returnValue($selectionIds));
+
+        return $usedSelectionsMock;
+    }
+
+    /**
+     * @param $expected
+     * @param $firstId
+     * @param $secondId
+     * @dataProvider shakeSelectionsDataProvider
+     */
+    public function testShakeSelections($expected, $firstId, $secondId)
+    {
+        $firstItemMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->setMethods(['__wakeup', 'getOption', 'getOptionId', 'getPosition', 'getSelectionId'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $secondItemMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->setMethods(['__wakeup', 'getOption', 'getOptionId', 'getPosition', 'getSelectionId'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $optionFirstMock = $this->getMockBuilder('Magento\Bundle\Model\Option')
+            ->setMethods(['getPosition', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $optionSecondMock = $this->getMockBuilder('Magento\Bundle\Model\Option')
+            ->setMethods(['getPosition', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $firstItemMock->expects($this->once())
+            ->method('getOption')
+            ->will($this->returnValue($optionFirstMock));
+        $optionFirstMock->expects($this->once())
+            ->method('getPosition')
+            ->will($this->returnValue('option_position'));
+        $firstItemMock->expects($this->once())
+            ->method('getOptionId')
+            ->will($this->returnValue('option_id'));
+        $firstItemMock->expects($this->once())
+            ->method('getPosition')
+            ->will($this->returnValue('position'));
+        $firstItemMock->expects($this->once())
+            ->method('getSelectionId')
+            ->will($this->returnValue($firstId));
+        $secondItemMock->expects($this->once())
+            ->method('getOption')
+            ->will($this->returnValue($optionSecondMock));
+        $optionSecondMock->expects($this->any())
+            ->method('getPosition')
+            ->will($this->returnValue('option_position'));
+        $secondItemMock->expects($this->once())
+            ->method('getOptionId')
+            ->will($this->returnValue('option_id'));
+        $secondItemMock->expects($this->once())
+            ->method('getPosition')
+            ->will($this->returnValue('position'));
+        $secondItemMock->expects($this->once())
+            ->method('getSelectionId')
+            ->will($this->returnValue($secondId));
+
+        $this->assertEquals($expected, $this->model->shakeSelections($firstItemMock, $secondItemMock));
+    }
+
+    /**
+     * @return array
+     */
+    public function shakeSelectionsDataProvider()
+    {
+        return [
+            [0, 0, 0],
+            [1, 1, 0],
+            [-1, 0, 1]
+        ];
+    }
+
+    public function testGetSelectionsByIds()
+    {
+        $selectionIds = [1, 2, 3];
+        $usedSelectionsIds =[4, 5, 6];
+        $storeId = 2;
+        $websiteId = 1;
+        $storeFilter = 'store_filter';
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $usedSelectionsMock = $this->getMockBuilder('Magento\Bundle\Model\Resource\Selection\Collection')
+            ->setMethods([
+                    'addAttributeToSelect',
+                    'setFlag',
+                    'addStoreFilter',
+                    'setStoreId',
+                    'setPositionOrder',
+                    'addFilterByRequiredOptions',
+                    'setSelectionIdsFilter',
+                    'joinPrices'
+                ])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $storeMock = $this->getMockBuilder('Magento\Store\Model\Store')
+            ->setMethods(['getWebsiteId', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('_cache_instance_used_selections')
+            ->will($this->returnValue(null));
+        $productMock->expects($this->at(1))
+            ->method('getData')
+            ->with('_cache_instance_used_selections_ids')
+            ->will($this->returnValue($usedSelectionsIds));
+        $productMock->expects($this->once())
+            ->method('getStoreId')
+            ->will($this->returnValue($storeId));
+        $this->bundleCollection->expects($this->once())
+            ->method('create')
+            ->will($this->returnValue($usedSelectionsMock));
+        $usedSelectionsMock->expects($this->once())
+            ->method('addAttributeToSelect')
+            ->with('*')
+            ->will($this->returnSelf());
+        $usedSelectionsMock->expects($this->at(1))
+            ->method('setFlag')
+            ->with('require_stock_items', true)
+            ->will($this->returnSelf());
+        $usedSelectionsMock->expects($this->at(2))
+            ->method('setFlag')
+            ->with('product_children', true)
+            ->will($this->returnSelf());
+        $productMock->expects($this->at(3))
+            ->method('getData')
+            ->with('_cache_instance_store_filter')
+            ->will($this->returnValue($storeFilter));
+        $usedSelectionsMock->expects($this->once())
+            ->method('addStoreFilter')
+            ->with($storeFilter)
+            ->will($this->returnSelf());
+        $usedSelectionsMock->expects($this->once())
+            ->method('setStoreId')
+            ->with($storeId)
+            ->will($this->returnSelf());
+        $usedSelectionsMock->expects($this->once())
+            ->method('setPositionOrder')
+            ->will($this->returnSelf());
+        $usedSelectionsMock->expects($this->once())
+            ->method('addFilterByRequiredOptions')
+            ->will($this->returnSelf());
+        $usedSelectionsMock->expects($this->once())
+            ->method('setSelectionIdsFilter')
+            ->with($selectionIds)
+            ->will($this->returnSelf());
+        $this->catalogData->expects($this->once())
+            ->method('isPriceGlobal')
+            ->will($this->returnValue(false));
+        $this->storeManager->expects($this->once())
+            ->method('getStore')
+            ->with($storeId)
+            ->will($this->returnValue($storeMock));
+        $storeMock->expects($this->once())
+            ->method('getWebsiteId')
+            ->will($this->returnValue($websiteId));
+        $usedSelectionsMock->expects($this->once())
+            ->method('joinPrices')
+            ->with($websiteId)
+            ->will($this->returnSelf());
+        $productMock->expects($this->at(4))
+            ->method('setData')
+            ->with('_cache_instance_used_selections', $usedSelectionsMock)
+            ->will($this->returnSelf());
+        $productMock->expects($this->at(5))
+            ->method('setData')
+            ->with('_cache_instance_used_selections_ids', $selectionIds)
+            ->will($this->returnSelf());
+
+        $this->model->getSelectionsByIds($selectionIds, $productMock);
+    }
+
+    public function testGetOptionsByIds()
+    {
+        $optionsIds = [1, 2, 3];
+        $usedOptionsIds =[4, 5, 6];
+        $productId = 3;
+        $storeId = 2;
+        $productMock = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $usedOptionsMock = $this->getMockBuilder('Magento\Bundle\Model\Resource\Option\Collection')
+            ->setMethods(['getResourceCollection'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $dbResourceMock= $this->getMockBuilder('Magento\Framework\Model\Resource\Db\Collection\AbstractCollection')
+            ->setMethods(['setProductIdFilter', 'setPositionOrder', 'joinValues', 'setIdFilter'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $storeMock = $this->getMockBuilder('Magento\Store\Model\Store')
+            ->setMethods(['getId', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $productMock->expects($this->at(0))
+            ->method('getData')
+            ->with('_cache_instance_used_options')
+            ->will($this->returnValue(null));
+        $productMock->expects($this->at(1))
+            ->method('getData')
+            ->with('_cache_instance_used_options_ids')
+            ->will($this->returnValue($usedOptionsIds));
+        $productMock->expects($this->once())
+            ->method('getId')
+            ->will($this->returnValue($productId));
+        $this->bundleOption->expects($this->once())
+            ->method('create')
+            ->will($this->returnValue($usedOptionsMock));
+        $usedOptionsMock->expects($this->once())
+            ->method('getResourceCollection')
+            ->will($this->returnValue($dbResourceMock));
+        $dbResourceMock->expects($this->once())
+            ->method('setProductIdFilter')
+            ->with($productId)
+            ->will($this->returnSelf());
+        $dbResourceMock->expects($this->once())
+            ->method('setPositionOrder')
+            ->will($this->returnSelf());
+        $this->storeManager->expects($this->once())
+            ->method('getStore')
+            ->will($this->returnValue($storeMock));
+        $storeMock->expects($this->once())
+            ->method('getId')
+            ->will($this->returnValue($storeId));
+        $dbResourceMock->expects($this->once())
+            ->method('joinValues')
+            ->will($this->returnSelf());
+        $dbResourceMock->expects($this->once())
+            ->method('setIdFilter')
+            ->with($optionsIds)
+            ->will($this->returnSelf());
+        $productMock->expects($this->at(3))
+            ->method('setData')
+            ->with('_cache_instance_used_options', $dbResourceMock)
+            ->will($this->returnSelf());
+        $productMock->expects($this->at(4))
+            ->method('setData')
+            ->with('_cache_instance_used_options_ids', $optionsIds)
+            ->will($this->returnSelf());
+
+        $this->model->getOptionsByIds($optionsIds, $productMock);
     }
 }
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 eb2e2704d0aff012b17ecd86837454287b212922..cd19f44dc68dc761bb94c9497253b02b9c9fc83c 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php
@@ -50,7 +50,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
             $this->returnValue('1')
         );
 
-        $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $directoryMock = $this->getMock('Magento\Framework\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 1387a7b54fb540a486b8aadc3c4c3f7ebe693cee..009152742e7340cc35e08d694bc9967cfa8ec66e 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Captcha\Helper;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class DataTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -32,7 +34,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
     }
 
     protected function _getHelper($store, $config, $factory)
@@ -112,20 +114,24 @@ class DataTest extends \PHPUnit_Framework_TestCase
 
     public function testGetFonts()
     {
-        $this->_filesystem->expects(
-            $this->once()
-        )->method(
-            'getPath'
-        )->with(
-            \Magento\Framework\App\Filesystem::LIB_INTERNAL
-        )->will(
-            $this->returnValue(TESTS_TEMP_DIR . '/lib')
-        );
+        $fontPath = 'path/to/fixture.ttf';
+        $expectedFontPath = 'lib/' . $fontPath;
+
+        $libDirMock = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', [], [], '', false);
+        $libDirMock->expects($this->once())
+            ->method('getAbsolutePath')
+            ->with($fontPath)
+            ->will($this->returnValue($expectedFontPath));
+        $this->_filesystem->expects($this->once())
+            ->method('getDirectoryRead')
+            ->with(DirectoryList::LIB_INTERNAL)
+            ->will($this->returnValue($libDirMock))
+        ;
 
         $factoryMock = $this->getMock('Magento\Captcha\Model\CaptchaFactory', array(), array(), '', false);
 
         $config = $this->_getConfigStub();
-        $configData = array('font_code' => array('label' => 'Label', 'path' => 'path/to/fixture.ttf'));
+        $configData = array('font_code' => array('label' => 'Label', 'path' => $fontPath));
 
         $config->expects(
             $this->any()
@@ -145,8 +151,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $this->assertArrayHasKey('label', $fonts['font_code']);
         $this->assertArrayHasKey('path', $fonts['font_code']);
         $this->assertEquals('Label', $fonts['font_code']['label']);
-        $this->assertStringStartsWith(TESTS_TEMP_DIR, $fonts['font_code']['path']);
-        $this->assertStringEndsWith('path/to/fixture.ttf', $fonts['font_code']['path']);
+        $this->assertEquals($expectedFontPath, $fonts['font_code']['path']);
     }
 
     /**
@@ -170,7 +175,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->will(
             $this->returnValue($dirWriteMock)
         );
diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php
index c7345f5eeb9112486a56935285b4bda70b7cb8a5..d5ed490467d3089967e5a027b6b957eda9e35ed0 100644
--- a/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php
+++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/CronTest.php
@@ -74,7 +74,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\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('Magento\Framework\Filesystem\Directory\Write', array(), array(), '', false);
         $this->_storeManager = $this->getMock('Magento\Store\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 bbd92f9de0bcb97c38d4f0f4344aaee9c90a3dcb..c92654598fff5e85d9e1fdc6d695c52ba60c1912 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
@@ -30,7 +30,7 @@ class GridTest extends \PHPUnit_Framework_TestCase
         $attribute = $this->getMock('Magento\Catalog\Model\Resource\Eav\Attribute', array(), array(), '', false);
         $attribute->expects($this->once())->method('getAttributeId')->will($this->returnValue(2));
 
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
 
         $urlBuilder = $this->getMock('Magento\Framework\UrlInterface', array(), array(), '', false);
         $urlBuilder->expects(
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php
index 243ccaa75819b1c89e12dae987c638a2ec5edd3b..2122277476768bc3774c6557b57db07b86ae7d9f 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php
@@ -24,7 +24,7 @@
 
 namespace Magento\Catalog\Model\Layer\Search;
 
-use Magento\CatalogSearch\Model\Layer\Search\CollectionFilter;
+use Magento\TestFramework\Helper\ObjectManager;
 
 class CollectionFilterTest extends \PHPUnit_Framework_TestCase
 {
@@ -38,10 +38,6 @@ class CollectionFilterTest extends \PHPUnit_Framework_TestCase
      */
     protected $catalogConfigMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $queryFactoryMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
@@ -49,38 +45,38 @@ class CollectionFilterTest extends \PHPUnit_Framework_TestCase
     protected $storeManagerMock;
 
     /**
-     * @var \Magento\CatalogSearch\Model\Layer\Search\CollectionFilter
+     * @var \Magento\Catalog\Model\Layer\Search\CollectionFilter
      */
     protected $model;
 
     protected function setUp()
     {
+        $objectManager = new ObjectManager($this);
         $this->visibilityMock = $this->getMock('Magento\Catalog\Model\Product\Visibility', array(), array(), '', false);
         $this->catalogConfigMock = $this->getMock('\Magento\Catalog\Model\Config', array(), array(), '', false);
-        $this->queryFactoryMock = $this->getMock(
-            '\Magento\Search\Model\QueryFactory',
-            array(),
-            array(),
-            '',
-            false
-        );
+
         $this->storeManagerMock = $this->getMock('\Magento\Framework\StoreManagerInterface');
 
-        $this->model = new CollectionFilter(
-            $this->catalogConfigMock, $this->queryFactoryMock, $this->storeManagerMock, $this->visibilityMock
+        $this->model = $objectManager->getObject(
+            'Magento\Catalog\Model\Layer\Search\CollectionFilter',
+            [
+                'catalogConfig' => $this->catalogConfigMock,
+                'storeManager' => $this->storeManagerMock,
+                'productVisibility' => $this->visibilityMock
+            ]
         );
     }
 
     /**
-     * @covers \Magento\CatalogSearch\Model\Layer\Search\CollectionFilter::filter
-     * @covers \Magento\CatalogSearch\Model\Layer\Search\CollectionFilter::__construct
+     * @covers \Magento\Catalog\Model\Layer\Search\CollectionFilter::filter
+     * @covers \Magento\Catalog\Model\Layer\Search\CollectionFilter::__construct
      */
     public function testFilter()
     {
         $collectionMock = $this->getMock(
             '\Magento\Catalog\Model\Resource\Product\Collection',
             array(
-                'addAttributeToSelect', 'addSearchFilter', 'setStore', 'addMinimalPrice', 'addFinalPrice',
+                'addAttributeToSelect', 'setStore', 'addMinimalPrice', 'addFinalPrice',
                 'addTaxPercents', 'addStoreFilter', 'addUrlRewrite', 'setVisibility'
             ),
             array(),
@@ -88,18 +84,13 @@ class CollectionFilterTest extends \PHPUnit_Framework_TestCase
             false
         );
         $categoryMock = $this->getMock('\Magento\Catalog\Model\Category', array(), array(), '', false);
-        $queryMock = $this->getMock('Magento\CatalogSearch\Helper\Query', array('getQueryText'), array(), '', false);
-
-        $queryMock->expects($this->once())->method('getQueryText');
 
         $this->catalogConfigMock->expects($this->once())->method('getProductAttributes');
         $this->visibilityMock->expects($this->once())->method('getVisibleInSearchIds');
-        $this->queryFactoryMock->expects($this->once())->method('get')->will($this->returnValue($queryMock));
         $this->storeManagerMock->expects($this->once())->method('getStore');
 
         $collectionMock->expects($this->once())->method('addAttributeToSelect')
             ->will($this->returnValue($collectionMock));
-        $collectionMock->expects($this->once())->method('addSearchFilter')->will($this->returnValue($collectionMock));
         $collectionMock->expects($this->once())->method('setStore')->will($this->returnValue($collectionMock));
         $collectionMock->expects($this->once())->method('addMinimalPrice')->will($this->returnValue($collectionMock));
         $collectionMock->expects($this->once())->method('addFinalPrice')->will($this->returnValue($collectionMock));
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ObserverTest.php
index 4856d5b8fa9adcac0ddbe220a79d13222ab5fa8f..df0933c4236b85337553c5d1f928f907babb1246 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ObserverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ObserverTest.php
@@ -54,7 +54,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
     protected $_categoryFlatState;
 
     /**
-     * @var \Magento\Store\Model\StoreManagerInterface
+     * @var \Magento\Framework\StoreManagerInterface
      */
     protected $_storeManager;
 
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 1250a1a6254f800f7c513ada2a77518eb28cfcff..990e88abbe31c0e45cbf8600def1c23a5e68ea3c 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
@@ -88,7 +88,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->mediaDirectory = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\Write')
             ->disableOriginalConstructor()
             ->getMock();
-        $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $filesystem->expects($this->once())->method('getDirectoryWrite')->will(
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ImageTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ImageTest.php
index 09819abf92b4640691db781b9c686cb1f6e582a5..554a07a3c42b713b6d4ea426e309ad38f572e551 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ImageTest.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Catalog\Model\Product;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper;
 
 /**
@@ -63,7 +64,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
     protected $coreFileHelper;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -118,9 +119,9 @@ class ImageTest extends \PHPUnit_Framework_TestCase
             ->getMock();
         $this->mediaDirectory->expects($this->once())->method('create')->will($this->returnValue(true));
 
-        $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', [], [], '', false);
+        $this->filesystem = $this->getMock('Magento\Framework\Filesystem', [], [], '', false);
         $this->filesystem->expects($this->once())->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)
+            ->with(DirectoryList::MEDIA)
             ->will($this->returnValue($this->mediaDirectory));
         $this->factory = $this->getMock('Magento\Framework\Image\Factory', [], [], '', false);
         $this->repository = $this->getMock('Magento\Framework\View\Asset\Repository', [], [], '', false);
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 ddd8449744a6d7a34c657a48e214334deb874e8a..68eaf284a81e55aa26c063b3cd13303a484d610a 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
@@ -36,7 +36,7 @@ class SimpleTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Framework\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\Framework\App\Filesystem')
+        $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $coreRegistry = $this->getMock('Magento\Framework\Registry', 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 26072ee0a5039e15982b59d4330ecc0fe3dee6bf..f26a96b7008cfc55fa12c9ce893398ab9c6b5d3f 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
@@ -37,7 +37,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase
         $coreDataMock = $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false);
         $coreRegistryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false);
         $fileStorageDbMock = $this->getMock('Magento\Core\Helper\File\Storage\Database', array(), array(), '', false);
-        $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php
index b6c1f554cebe63418e33e3e4a46ec26d6a5dd152..792d954bfa6755fa5115de17ea7504f090752126 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Resource/Category/TreeTest.php
@@ -142,4 +142,78 @@ class TreeTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($model, $model->setCollection($this->getCollectionMock()));
         $this->assertEquals($model, $model->setCollection($this->getCollectionMock()));
     }
+
+    public function testAddCollectionData()
+    {
+        $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $select = $this->getMock('Zend_Db_Select', array(), array(), '', false);
+        $select->expects($this->any())->method('from')->will($this->returnSelf());
+        $select->expects($this->any())->method('join')->will($this->returnSelf());
+        $select->expects($this->any())->method('joinLeft')->will($this->returnSelf());
+        $select->expects($this->any())->method('where')->will($this->returnSelf());
+
+        $connection = $this->getMock('Magento\Framework\DB\Adapter\AdapterInterface');
+        $connection->expects($this->any())->method('select')->will($this->returnValue($select));
+        $connection->expects($this->any())->method('fetchCol')->will($this->returnValue(array()));
+
+        $resource = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false);
+        $resource->expects($this->any())->method('getConnection')->will($this->returnValue($connection));
+        $resource->expects($this->any())->method('getTableName')->will($this->returnArgument(0));
+
+        $eventManager = $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false);
+        $attributeConfig = $this->getMock(
+            'Magento\Catalog\Model\Attribute\Config',
+            array(),
+            array(),
+            '',
+            false
+        );
+
+        $attributes = array('attribute_one', 'attribute_two');
+        $attributeConfig->expects(
+            $this->once()
+        )->method(
+                'getAttributeNames'
+            )->with(
+                'catalog_category'
+            )->will(
+                $this->returnValue($attributes)
+            );
+
+        $collection = $this->getMock('Magento\Catalog\Model\Resource\Category\Collection', array(), array(), '', false);
+        $collection->expects($this->never())->method('getAllIds')->will($this->returnValue(array()));
+        $collectionFactory = $this->getMock(
+            'Magento\Catalog\Model\Resource\Category\Collection\Factory',
+            array(),
+            array(),
+            '',
+            false
+        );
+        $collectionFactory->expects($this->once())->method('create')->will($this->returnValue($collection));
+
+        $store = $this->getMock('Magento\Store\Model\Store', array(), array(), '', false);
+        $store->expects($this->any())->method('getId')->will($this->returnValue(1));
+
+        $storeManager = $this->getMockForAbstractClass('Magento\Framework\StoreManagerInterface');
+        $storeManager->expects($this->any())->method('getStore')->will($this->returnValue($store));
+
+        $model = $objectHelper->getObject(
+            'Magento\Catalog\Model\Resource\Category\Tree',
+            array(
+                'storeManager' => $storeManager,
+                'resource' => $resource,
+                'eventManager' => $eventManager,
+                'attributeConfig' => $attributeConfig,
+                'collectionFactory' => $collectionFactory
+            )
+        );
+
+        $nodeMock = $this->getMock('\Magento\Framework\Data\Tree\Node', array('getId', 'getPath'), array(), '', false);
+        $nodeMock->expects($this->any())->method('getId')->will($this->returnValue(1));
+        $nodeMock->expects($this->once())->method('getPath')->will($this->returnValue(array()));
+
+        $model->addNode($nodeMock);
+
+        $this->assertSame($model, $model->addCollectionData(null, false, array(), false, true));
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteServiceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteServiceTest.php
index 9db763c478002fd557b661158523436e74862c71..f820e3cdf33f3c592db262c0f654b55c22559a66 100644
--- a/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Catalog/Service/V1/Product/Attribute/Media/WriteServiceTest.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Catalog\Service\V1\Product\Attribute\Media;
 
-use \Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class WriteServiceTest extends \PHPUnit_Framework_TestCase
 {
@@ -72,7 +73,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->filesystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array(),
             array(),
             '',
@@ -160,7 +161,7 @@ class WriteServiceTest extends \PHPUnit_Framework_TestCase
         $this->mediaConfigMock->expects($this->any())->method('getBaseTmpMediaPath')
             ->will($this->returnValue($mediaTmpPath));
         $mediaDirectoryMock = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface');
-        $this->filesystemMock->expects($this->any())->method('getDirectoryWrite')->with(Filesystem::MEDIA_DIR)
+        $this->filesystemMock->expects($this->any())->method('getDirectoryWrite')->with(DirectoryList::MEDIA)
             ->will($this->returnValue($mediaDirectoryMock));
 
         $mediaDirectoryMock->expects($this->once())->method('create')->with($mediaTmpPath);
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php
index 64c482a5b10328f7d7362229509400d8f7c798c5..3c281d7131db5e5012cb4f7f43054cd7525298b7 100644
--- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Block/Stockqty/DefaultStockqtyTest.php
@@ -110,6 +110,50 @@ class DefaultStockqtyTest extends \PHPUnit_Framework_TestCase
         $this->assertSame($expectedQty, $this->block->getData('product_stock_qty'));
     }
 
+    public function testGetStockQtyLeft()
+    {
+        $productMinQty = 2;
+        $treshold = 2;
+        $productStockQty = 3;
+        $productId = 4;
+        $expectedQty = 1;
+
+        $product = $this->getMock('Magento\Catalog\Model\Product', ['getId', '__wakeup'], [], '', false);
+        $product->expects($this->any())->method('getId')->will($this->returnValue($productId));
+
+        $this->setDataArrayValue('threshold_qty', $treshold);
+
+        $this->registryMock->expects($this->any())
+            ->method('registry')
+            ->with('current_product')
+            ->will($this->returnValue($product));
+
+
+        $this->stockItemService->expects($this->once())
+            ->method('getStockQty')
+            ->with($this->equalTo($productId))
+            ->will($this->returnValue($productStockQty));
+
+        $stockItem = $this->getMock(
+            'Magento\CatalogInventory\Service\V1\Data\StockItem',
+            [],
+            [],
+            '',
+            false
+        );
+
+        $stockItem->expects($this->once())
+            ->method('getMinQty')
+            ->will($this->returnValue($productMinQty));
+
+        $this->stockItemService->expects($this->once())
+            ->method('getStockItem')
+            ->with($this->equalTo($productId))
+            ->will($this->returnValue($stockItem));
+
+        $this->assertSame($expectedQty, $this->block->getStockQtyLeft());
+    }
+
     /**
      * @return array
      */
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItemTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItemTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..27221df4a2037a60749e35365574da85a4ea7ac4
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItemTest.php
@@ -0,0 +1,248 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Quote\Item\QuantityValidator\Initializer;
+
+use Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList;
+
+class StockItemTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\StockItem
+     */
+    protected $model;
+
+    /**
+     * @var QuoteItemQtyList| \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $quoteItemQtyList;
+
+    /**
+     * @var \Magento\Catalog\Model\ProductTypes\ConfigInterface| \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $typeConfig;
+
+    protected function setUp()
+    {
+        $this->quoteItemQtyList = $this
+            ->getMockBuilder('Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\QuoteItemQtyList')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->typeConfig = $this
+            ->getMockBuilder('Magento\Catalog\Model\ProductTypes\ConfigInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->model = $objectManagerHelper->getObject(
+            'Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\StockItem',
+            [
+                'quoteItemQtyList' => $this->quoteItemQtyList,
+                'typeConfig' => $this->typeConfig
+            ]
+        );
+    }
+
+    public function testInitializeWithSubitem()
+    {
+        $qty = 2;
+        $parentItemQty = 3;
+
+        $stockItem = $this->getMockBuilder('Magento\CatalogInventory\Model\Stock\Item')
+            ->setMethods(
+                [
+                    'checkQuoteItemQty',
+                    'setProductName',
+                    'setIsChildItem',
+                    'hasIsChildItem',
+                    'unsIsChildItem',
+                    '__wakeup'
+                ]
+            )
+            ->disableOriginalConstructor()
+            ->getMock();
+        $quoteItem = $this->getMockBuilder('Magento\Sales\Model\Quote\Item')
+            ->setMethods(
+                [
+                    'getParentItem',
+                    'getProduct',
+                    'getId',
+                    'getQuoteId',
+                    'setIsQtyDecimal',
+                    'setData',
+                    'setUseOldQty',
+                    'setMessage',
+                    'setBackorders',
+                    '__wakeup'
+                ]
+            )
+            ->disableOriginalConstructor()
+            ->getMock();
+        $parentItem = $this->getMockBuilder('Magento\Sales\Model\Quote\Item')
+            ->setMethods(['getQty', 'setIsQtyDecimal', 'getProduct', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $product = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $parentProduct = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productTypeInstance = $this->getMockBuilder('Magento\Catalog\Model\Product\Type\AbstractType')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productTypeCustomOption = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $result = $this->getMockBuilder('Magento\Framework\Object')
+            ->setMethods(
+                [
+                    'getItemIsQtyDecimal',
+                    'getHasQtyOptionUpdate',
+                    'getOrigQty',
+                    'getItemUseOldQty',
+                    'getMessage',
+                    'getItemBackorders',
+                ]
+            )
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $quoteItem->expects($this->any())->method('getParentItem')->will($this->returnValue($parentItem));
+        $parentItem->expects($this->once())->method('getQty')->will($this->returnValue($parentItemQty));
+        $quoteItem->expects($this->any())->method('getProduct')->will($this->returnValue($product));
+        $product->expects($this->any())->method('getId')->will($this->returnValue('product_id'));
+        $quoteItem->expects($this->once())->method('getId')->will($this->returnValue('quote_item_id'));
+        $quoteItem->expects($this->once())->method('getQuoteId')->will($this->returnValue('quote_id'));
+        $this->quoteItemQtyList->expects($this->any())
+            ->method('getQty')
+            ->with('product_id', 'quote_item_id', 'quote_id', 0)
+            ->will($this->returnValue('summary_qty'));
+        $stockItem->expects($this->once())
+            ->method('checkQuoteItemQty')
+            ->with($parentItemQty * $qty, 'summary_qty', $qty)
+            ->will($this->returnValue($result));
+        $product->expects($this->once())
+            ->method('getCustomOption')
+            ->with('product_type')
+            ->will($this->returnValue($productTypeCustomOption));
+        $productTypeCustomOption->expects($this->once())
+            ->method('getValue')
+            ->will(($this->returnValue('option_value')));
+        $this->typeConfig->expects($this->once())
+            ->method('isProductSet')
+            ->with('option_value')
+            ->will($this->returnValue(true));
+        $product->expects($this->once())->method('getName')->will($this->returnValue('product_name'));
+        $stockItem->expects($this->once())->method('setProductName')->with('product_name')->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('setIsChildItem')->with(true)->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('hasIsChildItem')->will($this->returnValue(true));
+        $stockItem->expects($this->once())->method('unsIsChildItem');
+        $result->expects($this->exactly(3))->method('getItemIsQtyDecimal')->will($this->returnValue(true));
+        $quoteItem->expects($this->once())->method('setIsQtyDecimal')->with(true)->will($this->returnSelf());
+        $parentItem->expects($this->once())->method('setIsQtyDecimal')->with(true)->will($this->returnSelf());
+        $parentItem->expects($this->any())->method('getProduct')->will($this->returnValue($parentProduct));
+        $result->expects($this->once())->method('getHasQtyOptionUpdate')->will($this->returnValue(true));
+        $parentProduct->expects($this->once())
+            ->method('getTypeInstance')
+            ->will($this->returnValue($productTypeInstance));
+        $productTypeInstance->expects($this->once())
+            ->method('getForceChildItemQtyChanges')
+            ->with($product)->will($this->returnValue(true));
+        $result->expects($this->once())->method('getOrigQty')->will($this->returnValue('orig_qty'));
+        $quoteItem->expects($this->once())->method('setData')->with('qty', 'orig_qty')->will($this->returnSelf());
+        $result->expects($this->exactly(2))->method('getItemUseOldQty')->will($this->returnValue('item'));
+        $quoteItem->expects($this->once())->method('setUseOldQty')->with('item')->will($this->returnSelf());
+        $result->expects($this->exactly(2))->method('getMessage')->will($this->returnValue('message'));
+        $quoteItem->expects($this->once())->method('setMessage')->with('message')->will($this->returnSelf());
+        $result->expects($this->exactly(2))->method('getItemBackorders')->will($this->returnValue('backorders'));
+        $quoteItem->expects($this->once())->method('setBackorders')->with('backorders')->will($this->returnSelf());
+
+        $this->model->initialize($stockItem, $quoteItem, $qty);
+    }
+
+    public function testInitializeWithoutSubitem()
+    {
+        $qty = 3;
+
+        $stockItem = $this->getMockBuilder('Magento\CatalogInventory\Model\Stock\Item')
+            ->setMethods(['checkQuoteItemQty', 'setProductName', 'setIsChildItem', 'hasIsChildItem', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $quoteItem = $this->getMockBuilder('Magento\Sales\Model\Quote\Item')
+            ->setMethods(['getProduct', 'getParentItem', 'getQtyToAdd', 'getId', 'getQuoteId', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $product = $this->getMockBuilder('Magento\Catalog\Model\Product')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $productTypeCustomOption = $this->getMockBuilder('Magento\Catalog\Model\Product\Configuration\Item\Option')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $result = $this->getMockBuilder('Magento\Framework\Object')
+            ->setMethods(
+                ['getItemIsQtyDecimal', 'getHasQtyOptionUpdate', 'getItemUseOldQty', 'getMessage', 'getItemBackorders']
+            )
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $quoteItem->expects($this->once())->method('getParentItem')->will($this->returnValue(false));
+        $quoteItem->expects($this->once())->method('getQtyToAdd')->will($this->returnValue(false));
+        $product->expects($this->once())->method('getId')->will($this->returnValue('product_id'));
+        $quoteItem->expects($this->any())->method('getProduct')->will($this->returnValue($product));
+        $quoteItem->expects($this->once())->method('getId')->will($this->returnValue('quote_item_id'));
+        $quoteItem->expects($this->once())->method('getQuoteId')->will($this->returnValue('quote_id'));
+        $this->quoteItemQtyList->expects($this->any())
+            ->method('getQty')
+            ->with('product_id', 'quote_item_id', 'quote_id', $qty)
+            ->will($this->returnValue('summary_qty'));
+        $stockItem->expects($this->once())
+            ->method('checkQuoteItemQty')
+            ->with($qty, 'summary_qty', $qty)
+            ->will($this->returnValue($result));
+        $product->expects($this->once())
+            ->method('getCustomOption')
+            ->with('product_type')
+            ->will($this->returnValue($productTypeCustomOption));
+        $productTypeCustomOption->expects($this->once())
+            ->method('getValue')
+            ->will($this->returnValue('option_value'));
+        $this->typeConfig->expects($this->once())
+            ->method('isProductSet')
+            ->with('option_value')
+            ->will($this->returnValue(true));
+        $product->expects($this->once())->method('getName')->will($this->returnValue('product_name'));
+        $stockItem->expects($this->once())->method('setProductName')->with('product_name')->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('setIsChildItem')->with(true)->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('hasIsChildItem')->will($this->returnValue(false));
+        $result->expects($this->once())->method('getItemIsQtyDecimal')->will($this->returnValue(null));
+        $result->expects($this->once())->method('getHasQtyOptionUpdate')->will($this->returnValue(false));
+        $result->expects($this->once())->method('getItemUseOldQty')->will($this->returnValue(null));
+        $result->expects($this->once())->method('getMessage')->will($this->returnValue(null));
+        $result->expects($this->once())->method('getItemBackorders')->will($this->returnValue(null));
+
+        $this->model->initialize($stockItem, $quoteItem, $qty);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemRegistryTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemRegistryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..08bb5d51ff5ba889702d6f20cc6ecb70e6ff1fd7
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemRegistryTest.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)
+ */
+namespace Magento\CatalogInventory\Model\Stock;
+
+use Magento\CatalogInventory\Model\Stock\Item;
+
+/**
+ * Class ItemRegistryTest
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
+class ItemRegistryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var ItemRegistry
+     */
+    protected $model;
+
+    /** @var Item|\PHPUnit_Framework_MockObject_MockObject */
+
+    protected $stockItemRegistry;
+
+    /** @var \Magento\CatalogInventory\Model\Stock\ItemFactory|\PHPUnit_Framework_MockObject_MockObject */
+    protected $stockItemFactory;
+
+    /** @var \Magento\CatalogInventory\Model\Resource\Stock\Item| \PHPUnit_Framework_MockObject_MockObject */
+    protected $stockItemResource;
+
+    protected function setUp()
+    {
+        $this->stockItemFactory = $this
+            ->getMockBuilder('Magento\CatalogInventory\Model\Stock\ItemFactory')
+            ->setMethods(['create'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->stockItemResource = $this
+            ->getMockBuilder('Magento\CatalogInventory\Model\Resource\Stock\Item')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
+
+        $this->model = $objectManagerHelper->getObject(
+            'Magento\CatalogInventory\Model\Stock\ItemRegistry',
+            [
+                'stockItemFactory' => $this->stockItemFactory,
+                'stockItemResource' => $this->stockItemResource
+            ]
+        );
+    }
+
+    public function testRetrieve()
+    {
+        $productId = 3;
+        $times = 1;
+
+        $stockItem = $this->buildStockItem($productId, $times);
+
+        $this->assertEquals($stockItem, $this->model->retrieve($productId));
+        $this->assertEquals($stockItem, $this->model->retrieve($productId));
+    }
+
+    public function testErase()
+    {
+        $productId = 3;
+        $times = 2;
+
+        $stockItem = $this->buildStockItem($productId, $times);
+
+        $this->model->retrieve($productId);
+        $this->assertEquals($this->model, $this->model->erase($productId));
+        $this->assertEquals($stockItem, $this->model->retrieve($productId));
+    }
+
+    /**
+     * @param $productId
+     * @param $times
+     * @return \PHPUnit_Framework_MockObject_MockObject|Item
+     */
+    private function buildStockItem($productId, $times)
+    {
+        $stockItem = $this->stockItemRegistry = $this
+            ->getMockBuilder('Magento\CatalogInventory\Model\Stock\Item')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->stockItemFactory
+            ->expects($this->exactly($times))
+            ->method('create')
+            ->will($this->returnValue($stockItem));
+        $this->stockItemResource
+            ->expects($this->exactly($times))
+            ->method('loadByProductId')
+            ->with($stockItem, $productId)
+            ->will($this->returnSelf());
+
+        return $stockItem;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php
index 884e9acce54a8b0ab56b561339484de8e6897896..81bec55dad8076635b4eb9e5fb8edf0d9286bd92 100644
--- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemTest.php
@@ -112,7 +112,10 @@ class ItemTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->scopeConfig = $this->getMock('Magento\Framework\App\Config', [], [], '', false);
+        $this->scopeConfig = $this->getMockBuilder('Magento\Framework\App\Config')
+            ->setMethods(['isSetFlag', 'getValue'])
+            ->disableOriginalConstructor()
+            ->getMock();
         $this->storeManager = $this->getMock('Magento\Framework\StoreManagerInterface', [], [], '', false);
 
         $this->stockItemRegistry = $this->getMock(
@@ -708,4 +711,72 @@ class ItemTest extends \PHPUnit_Framework_TestCase
             $this->item->getIsInStock()
         );
     }
+
+    public function testAddQty()
+    {
+        $defaultQty = 5.5;
+        $qty = 3.3;
+
+        $this->setDataArrayValue('qty', $defaultQty);
+        $this->setDataArrayValue('manage_stock', true);
+
+        $this->scopeConfig->expects($this->once())
+            ->method('isSetFlag')
+            ->with(
+                $this->equalTo(Item::XML_PATH_CAN_SUBTRACT),
+                $this->equalTo(\Magento\Store\Model\ScopeInterface::SCOPE_STORE)
+            )
+            ->will($this->returnValue(true));
+
+        $this->item->addQty($qty);
+        $this->assertEquals($defaultQty + $qty, $this->item->getQty());
+    }
+
+    public function testAddQtyWithManageStockFalse()
+    {
+        $qty = 1;
+        $defaultQty = 3;
+
+        $this->setDataArrayValue('qty', $defaultQty);
+        $this->setDataArrayValue('manage_stock', false);
+
+        $this->assertEquals($this->item, $this->item->addQty($qty));
+        $this->assertEquals($defaultQty, $this->item->getQty());
+    }
+
+    public function testAddQtyWithCannotSubtractConfig()
+    {
+        $qty = 1;
+        $defaultQty = 3;
+
+        $this->setDataArrayValue('qty', $defaultQty);
+        $this->setDataArrayValue('manage_stock', true);
+        $this->scopeConfig->expects($this->once())
+            ->method('isSetFlag')
+            ->with(
+                $this->equalTo(Item::XML_PATH_CAN_SUBTRACT),
+                $this->equalTo(\Magento\Store\Model\ScopeInterface::SCOPE_STORE)
+            )
+            ->will($this->returnValue(false));
+
+        $this->assertEquals($this->item, $this->item->addQty($qty));
+        $this->assertEquals($defaultQty, $this->item->getQty());
+    }
+
+    public function testSubtractQty()
+    {
+        $subtractQty = 3;
+
+        $qty = 5;
+
+        $this->setDataArrayValue('qty', $qty);
+
+        $this->scopeConfig->expects($this->once())
+            ->method('isSetFlag')
+            ->with('cataloginventory/options/can_subtract', 'store')
+            ->will($this->returnValue(true));
+        $this->initManageStock(false, true);
+        $this->item->subtractQty($subtractQty);
+        $this->assertEquals($qty - $subtractQty, $this->item->getQty());
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/StockTest.php b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/StockTest.php
index 20b00923a81644a10c70fb61a765ea9a7a12829f..72b245309b320c8efe4f125ec02ceaaaffa371a0 100644
--- a/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/StockTest.php
+++ b/dev/tests/unit/testsuite/Magento/CatalogInventory/Model/StockTest.php
@@ -90,11 +90,11 @@ class StockTest extends \PHPUnit_Framework_TestCase
         $this->model = $objectManagerHelper->getObject(
             'Magento\CatalogInventory\Model\Stock',
             [
-                'stockStatus'       => $this->stockStatus,
+                'stockStatus' => $this->stockStatus,
                 'collectionFactory' => $this->collectionFactory,
-                'stockItemService'  => $this->stockItemService,
-                'stockItemFactory'  => $this->stockItemFactory,
-                'productFactory'    => $this->productFactory
+                'stockItemService' => $this->stockItemService,
+                'stockItemFactory' => $this->stockItemFactory,
+                'productFactory' => $this->productFactory
             ]
         );
     }
@@ -148,7 +148,6 @@ class StockTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->will($this->returnValue($itemCollection));
 
-
         $productOne = $this->getMockBuilder('Magento\Catalog\Model\Product')
             ->disableOriginalConstructor()
             ->setMethods(['getId', 'getStockStatus', '__wakeup'])
@@ -169,7 +168,6 @@ class StockTest extends \PHPUnit_Framework_TestCase
             ->method('getIterator')
             ->will($this->returnValue(new \ArrayIterator([$productOne, $productTwo, $productThree])));
 
-
         $this->stockStatus->expects($this->once())
             ->method('assignProduct')
             ->with($productOne, $stockItemStockId, $productOneStatus);
@@ -177,29 +175,103 @@ class StockTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($this->model, $this->model->addItemsToProducts($productCollection));
     }
 
-    /**
-     * @covers \Magento\CatalogInventory\Model\Stock::getProductType
-     */
-    public function testGettingProductType()
+    public function testBackItemQty()
     {
         $productId = 1;
         $qty = 1;
         $productType = 'simple';
 
         $stockItem = $this->getMockBuilder('Magento\CatalogInventory\Model\Stock\Item')
+            ->setMethods(
+                [
+                    'loadByProduct',
+                    'getId',
+                    'getCanBackInStock',
+                    'getQty',
+                    'getMinQty',
+                    'setIsInStock',
+                    'setStockStatusChangedAutomaticallyFlag',
+                    'save',
+                    '__wakeup',
+                ]
+            )
             ->disableOriginalConstructor()
             ->getMock();
+
         $stockItem->expects($this->atLeastOnce())->method('loadByProduct')->with($productId)->will($this->returnSelf());
         $stockItem->expects($this->any())->method('getId')->will($this->returnValue(1));
-
         $this->stockItemFactory->expects($this->atLeastOnce())->method('create')->will($this->returnValue($stockItem));
+        $this->getProductType($productId, $productType);
+        $this->stockItemService->expects($this->once())
+            ->method('isQty')
+            ->with($productType)
+            ->will($this->returnValue(true));
+        $stockItem->expects($this->once())->method('getCanBackInStock')->will($this->returnValue(true));
+        $stockItem->expects($this->once())->method('getQty')->will($this->returnValue('10'));
+        $stockItem->expects($this->any())->method('getMinQty')->will($this->returnValue('3'));
+        $stockItem->expects($this->once())->method('setIsInStock')->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('setStockStatusChangedAutomaticallyFlag')->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('save');
 
-        $product = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false);
-        $product->expects($this->atLeastOnce())->method('load')->with($productId);
-        $product->expects($this->atLeastOnce())->method('getTypeId')->will($this->returnValue($productType));
-        $this->productFactory->expects($this->atLeastOnce())->method('create')->will($this->returnValue($product));
+        $this->assertEquals($this->model, $this->model->backItemQty($productId, $qty));
+    }
 
-        $this->stockItemService->expects($this->once())->method('isQty')->with($productType);
-        $this->model->backItemQty($productId, $qty);
+    /**
+     * @expectedException \Magento\Framework\Model\Exception
+     * @expectedExceptionMessage We cannot specify a product identifier for the order item.
+     */
+    public function testRegisterItemSaleException()
+    {
+        $item = $this->getMockBuilder('\Magento\Framework\Object')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $this->model->registerItemSale($item);
+    }
+
+    public function testRegisterItemSale()
+    {
+        $productId = 1;
+        $qty = 3;
+        $productType = 'simple';
+        $storeId = 1;
+
+        $item = $this->getMockBuilder('\Magento\Framework\Object')
+            ->setMethods(['getProductId', 'getStoreId', 'getQtyOrdered'])
+            ->disableOriginalConstructor()
+            ->getMock();
+        $stockItem = $this->getMockBuilder('Magento\CatalogInventory\Model\Stock\Item')
+            ->setMethods(['loadByProduct', 'setStoreId', 'checkQty', 'subtractQty', 'save', '__wakeup'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $item->expects($this->once())->method('getProductId')->will($this->returnValue($productId));
+        $stockItem->expects($this->any())->method('loadByProduct')->with($productId)->will($this->returnSelf());
+        $this->stockItemFactory->expects($this->any())->method('create')->will($this->returnValue($stockItem));
+        $this->getProductType($productId, $productType);
+        $this->stockItemService->expects($this->once())
+            ->method('isQty')
+            ->with($productType)
+            ->will($this->returnValue(true));
+        $item->expects($this->exactly(2))->method('getStoreId')->will($this->returnValue($storeId));
+        $stockItem->expects($this->once())->method('setStoreId')->with($storeId)->will($this->returnSelf());
+        $item->expects($this->exactly(2))->method('getQtyOrdered')->will($this->returnValue($qty));
+        $stockItem->expects($this->once())->method('checkQty')->with($qty)->will($this->returnValue(true));
+        $stockItem->expects($this->once())->method('subtractQty')->with($qty)->will($this->returnSelf());
+        $stockItem->expects($this->once())->method('save')->will($this->returnSelf());;
+
+        $this->assertEquals($this->model, $this->model->registerItemSale($item));
+    }
+
+    /**
+     * @param $productId
+     * @param $productType
+     */
+    private function getProductType($productId, $productType)
+    {
+        $product = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false);
+        $product->expects($this->any())->method('load')->with($productId);
+        $product->expects($this->any())->method('getTypeId')->will($this->returnValue($productType));
+        $this->productFactory->expects($this->any())->method('create')->will($this->returnValue($product));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/FullTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/FullTest.php
index 7b40da2041f21682ab3db38f338d866e124ed81b..d3be6038f56e33dbaaea35ff5bda6811fc157149 100644
--- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/FullTest.php
+++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Indexer/Fulltext/Action/FullTest.php
@@ -44,7 +44,7 @@ class FullTest extends \PHPUnit_Framework_TestCase
     protected $catalogSearchData;
     /** @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject */
     protected $scopeConfig;
-    /** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var \Magento\Framework\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */
     protected $storeManager;
     /** @var \Magento\Framework\Stdlib\DateTime|\PHPUnit_Framework_MockObject_MockObject */
     protected $dateTime;
diff --git a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Search/RequestGeneratorTest.php b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Search/RequestGeneratorTest.php
index 62e269492adba4d49431915019c0fa644410948c..6d1a69a41c202853a103362a5f11e600f9f96c9d 100644
--- a/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Search/RequestGeneratorTest.php
+++ b/dev/tests/unit/testsuite/Magento/CatalogSearch/Model/Search/RequestGeneratorTest.php
@@ -109,7 +109,15 @@ class RequestGeneratorTest extends \PHPUnit_Framework_TestCase
     {
         $attribute = $this->getMockBuilder('Magento\Catalog\Model\Resource\Product\Attribute')
             ->disableOriginalConstructor()
-            ->setMethods(['getAttributeCode', 'getBackendType', 'getIsVisibleInAdvancedSearch', 'getSearchWeight'])
+            ->setMethods(
+                [
+                    'getAttributeCode',
+                    'getBackendType',
+                    'getIsVisibleInAdvancedSearch',
+                    'getSearchWeight',
+                    'getFrontendInput'
+                ]
+            )
             ->getMock();
         $attribute->expects($this->any())
             ->method('getAttributeCode')
@@ -117,6 +125,9 @@ class RequestGeneratorTest extends \PHPUnit_Framework_TestCase
         $attribute->expects($this->any())
             ->method('getBackendType')
             ->willReturn($type);
+        $attribute->expects($this->any())
+            ->method('getFrontendInput')
+            ->willReturn($type);
 
         $attribute->expects($this->any())
             ->method('getSearchWeight')
diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveBillingTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveBillingTest.php
index f43b11caec127942053b095f6a10b21042716d8b..2b382943d89676c82253337b317b641e45d2a89f 100644
--- a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveBillingTest.php
+++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveBillingTest.php
@@ -180,7 +180,10 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase
                 'html' => null
             ],
             'allow_sections' => ['shipping'],
-            'duplicateBillingInfo' => 'true'
+            'duplicateBillingInfo' => 'true',
+            'update_progress' => [
+                'html' => 'some_html'
+            ]
         ];
         $this->quote->expects($this->once())
             ->method('hasItems')
@@ -202,7 +205,7 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase
 
         $layout = $this->getMock(
             'Magento\Framework\View\Layout',
-            ['getUpdate', 'generateXml', 'generateElements', 'getOutput'],
+            ['getUpdate', 'generateXml', 'generateElements', 'getOutput', 'getBlock'],
             [],
             '',
             false
@@ -211,6 +214,17 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->willReturn($layout);
 
+        $block = $this->getMockBuilder('Magento\Framework\View\Element\AbstractBlock')
+            ->disableOriginalConstructor()
+            ->setMethods(['setAttribute', 'toHtml'])
+            ->getMockForAbstractClass();
+        $block->expects($this->any())
+            ->method('setAttribute')
+            ->willReturnSelf();
+        $block->expects($this->any())
+            ->method('toHtml')
+            ->willReturn('some_html');
+
         $update = $this->getMock('Magento\Core\Model\Layout\Merge', ['load'], [], '', false);
         $layout->expects($this->any())
             ->method('getUpdate')
@@ -220,6 +234,12 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase
         $this->coreHelper->expects($this->once())
             ->method('jsonEncode')
             ->with($expectedResult);
+        $this->view->expects($this->any())
+            ->method('getLayout')
+            ->willReturn($layout);
+        $layout->expects($this->any())
+            ->method('getBlock')
+            ->willReturn($block);
 
         $this->controller->execute();
     }
diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveShippingTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveShippingTest.php
index 57e1c81197d15faa60479161d462078de9dd68bc..29a728c2384375e2b76286907def4e96b962c472 100644
--- a/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveShippingTest.php
+++ b/dev/tests/unit/testsuite/Magento/Checkout/Controller/Onepage/SaveShippingTest.php
@@ -178,6 +178,9 @@ class SaveShippingTest extends \PHPUnit_Framework_TestCase
             'update_section' => [
                 'name' => 'shipping-method',
                 'html' => null
+            ],
+            'update_progress' => [
+                'html' => 'some_html'
             ]
         ];
         $this->quote->expects($this->once())
@@ -203,7 +206,7 @@ class SaveShippingTest extends \PHPUnit_Framework_TestCase
             ->with($expectedResult);
         $layout = $this->getMock(
             'Magento\Framework\View\Layout',
-            ['getUpdate', 'generateXml', 'generateElements', 'getOutput'],
+            ['getUpdate', 'generateXml', 'generateElements', 'getOutput', 'getBlock'],
             [],
             '',
             false
@@ -212,12 +215,29 @@ class SaveShippingTest extends \PHPUnit_Framework_TestCase
             ->method('create')
             ->willReturn($layout);
 
+        $block = $this->getMockBuilder('Magento\Framework\View\Element\AbstractBlock')
+            ->disableOriginalConstructor()
+            ->setMethods(['setAttribute', 'toHtml'])
+            ->getMockForAbstractClass();
+        $block->expects($this->any())
+            ->method('setAttribute')
+            ->willReturnSelf();
+        $block->expects($this->any())
+            ->method('toHtml')
+            ->willReturn('some_html');
+
         $update = $this->getMock('Magento\Core\Model\Layout\Merge', [], [], '', false);
         $layout->expects($this->any())
             ->method('getUpdate')
             ->willReturn($update);
         $update->expects($this->once())
             ->method('load');
+        $this->view->expects($this->any())
+            ->method('getLayout')
+            ->willReturn($layout);
+        $layout->expects($this->any())
+            ->method('getBlock')
+            ->willReturn($block);
 
         $this->controller->execute();
     }
diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php
index 17d9a4bdd583ae67530febf5901a2627e9f86530..83be2df63c1f722ee382a50f023d0f19769d1887 100644
--- a/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Checkout/Model/Type/OnepageTest.php
@@ -376,12 +376,13 @@ class OnepageTest extends \PHPUnit_Framework_TestCase
         );
         $shippingAddressMock = $this->getMock(
             'Magento\Sales\Model\Quote\Address',
-            ['setSameAsBilling', '__wakeup', 'unserialize'],
+            ['setSameAsBilling', 'save', '__wakeup', 'unserialize'],
             [],
             '',
             false
         );
         $shippingAddressMock->expects($this->any())->method('setSameAsBilling')->with((int)$data['use_for_shipping']);
+        $shippingAddressMock->expects($this->once())->method('save');
         $quoteMock->expects($this->any())->method('setPasswordHash')->with($passwordHash);
         $quoteMock->expects($this->any())->method('getCheckoutMethod')->will($this->returnValue($checkoutMethod));
         $quoteMock->expects($this->any())->method('isVirtual')->will($this->returnValue($isVirtual));
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 0f4a85d6b0ee8d240ee7291eff910daf47addd38..163b432c20031bd6460e4fc0ce8bce9b84ae5d57 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
@@ -1,6 +1,8 @@
 <?php
 namespace Magento\Cms\Model\Wysiwyg\Images;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Magento
  *
@@ -111,7 +113,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_driverMock = $this->getMockForAbstractClass(
             'Magento\Framework\Filesystem\DriverInterface',
             array(),
@@ -139,7 +141,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->_filesystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryWrite'),
             array(),
             '',
@@ -150,7 +152,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->will(
             $this->returnValue($this->_directoryMock)
         );
diff --git a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php
index 189639f8ab2ca5f361bd97710c03e36fa7725a5d..3cd8b291b6bf15d8c43d702ceafcf353136c1fc2 100644
--- a/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php
+++ b/dev/tests/unit/testsuite/Magento/ConfigurableProduct/Model/Product/Type/ConfigurableTest.php
@@ -66,7 +66,7 @@ class ConfigurableTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Framework\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\Framework\App\Filesystem')
+        $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
index b9cee5eb4bc7fb636a3832ab13a3feea9fc20112..c0f71fb49c49379d324a98abdec5becd7a813f47 100644
--- a/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/App/MediaTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\App;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class MediaTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -40,11 +42,6 @@ class MediaTest extends \PHPUnit_Framework_TestCase
      */
     protected $_requestMock;
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $_dirVerificationMock;
-
     /**
      * @var callable
      */
@@ -71,7 +68,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
     protected $_responseMock;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystemMock;
 
@@ -89,15 +86,8 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManager');
         $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\Framework\App\Filesystem\DirectoryList\Verification',
-            array(),
-            array(),
-            '',
-            false
-        );
 
-        $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->directoryReadMock = $this->getMock(
             'Magento\Framework\Filesystem\Directory\Read',
             array(),
@@ -111,7 +101,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryRead'
         )->with(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->will(
             $this->returnValue($this->directoryReadMock)
         );
@@ -119,7 +109,6 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->_responseMock = $this->getMock('Magento\Core\Model\File\Storage\Response', array(), array(), '', false);
 
         $map = array(
-            array('Magento\Framework\App\Filesystem\DirectoryList\Verification', $this->_dirVerificationMock),
             array('Magento\Core\Model\File\Storage\Request', $this->_requestMock),
             array('Magento\Core\Model\File\Storage\Synchronization', $this->_sync)
         );
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/File/MediaTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/File/MediaTest.php
index b974bc5695060edf711cdc8f08a862fe0359893c..79db7f85166301494fddb5d96ecb989c6153beaf 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/File/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Helper/File/MediaTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Helper\File;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class MediaTest extends \PHPUnit_Framework_TestCase
 {
     const UPDATE_TIME = 'update_time';
@@ -44,12 +46,12 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         $this->dirMock = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\ReadInterface')
             ->disableOriginalConstructor()
             ->getMock();
-        $filesystemMock = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $filesystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $filesystemMock->expects($this->any())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)
+            ->with(DirectoryList::MEDIA)
             ->will($this->returnValue($this->dirMock));
         $dateMock = $this->getMockBuilder('Magento\Framework\Stdlib\DateTime\DateTime')
             ->disableOriginalConstructor()
diff --git a/dev/tests/unit/testsuite/Magento/Core/Helper/File/Storage/DatabaseTest.php b/dev/tests/unit/testsuite/Magento/Core/Helper/File/Storage/DatabaseTest.php
index 89daad349df9e17118a0ddd68ae28b05ece25198..1f1d627147ba09854f0f3afc20c1ac4296fd7302 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Helper/File/Storage/DatabaseTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Helper/File/Storage/DatabaseTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Helper\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class DatabaseTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -33,7 +35,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Core\Model\File\Storage\DatabaseFactory | \PHPUnit_Framework_MockObject_MockObject  */
     protected $dbStorageFactoryMock;
 
-    /** @var \Magento\Framework\App\Filesystem | \PHPUnit_Framework_MockObject_MockObject  */
+    /** @var \Magento\Framework\Filesystem | \PHPUnit_Framework_MockObject_MockObject  */
     protected $filesystemMock;
 
     /** @var \Magento\Core\Model\File\Storage\File | \PHPUnit_Framework_MockObject_MockObject  */
@@ -52,9 +54,17 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->setMethods(['create'])
             ->getMock();
-        $this->filesystemMock = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $mediaDirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
+        $mediaDirMock->expects($this->any())
+            ->method('getAbsolutePath')
+            ->will($this->returnValue('media-dir'));
+        $this->filesystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
+        $this->filesystemMock->expects($this->any())
+            ->method('getDirectoryRead')
+            ->with(DirectoryList::MEDIA)
+            ->will($this->returnValue($mediaDirMock));
         $this->fileStorageMock = $this->getMockBuilder('Magento\Core\Model\File\Storage\File')
             ->disableOriginalConstructor()
             ->getMock();
@@ -150,13 +160,11 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dbModelMock->expects($this->exactly($callNum))
-            ->method('saveFile');
+            ->method('saveFile')
+            ->with('filename');
 
-        $this->helper->saveFile('filename');
+        $this->helper->saveFile('media-dir/filename');
     }
 
     public function updateFileDataProvider()
@@ -184,13 +192,11 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dbModelMock->expects($this->exactly($callNum))
-            ->method('renameFile');
+            ->method('renameFile')
+            ->with('oldName', 'newName');
 
-        $this->helper->renameFile('oldName', 'newName');
+        $this->helper->renameFile('media-dir/oldName', 'media-dir/newName');
     }
 
     /**
@@ -210,13 +216,11 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dbModelMock->expects($this->exactly($callNum))
-            ->method('copyFile');
+            ->method('copyFile')
+            ->with('oldName', 'newName');
 
-        $this->helper->copyFile('oldName', 'newName');
+        $this->helper->copyFile('media-dir/oldName', 'media-dir/newName');
     }
 
     /**
@@ -237,14 +241,12 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dbModelMock->expects($this->exactly($callNum))
             ->method('fileExists')
+            ->with('file')
             ->will($this->returnValue(true));
 
-        $this->assertEquals($expected, $this->helper->fileExists('file'));
+        $this->assertEquals($expected, $this->helper->fileExists('media-dir/file'));
     }
 
     public function fileExistsDataProvider()
@@ -258,9 +260,10 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
     /**
      * @param int $storage
      * @param int $callNum
+     * @param string $expected
      * @dataProvider getUniqueFilenameDataProvider
      */
-    public function testGetUniqueFilename($storage, $callNum)
+    public function testGetUniqueFilename($storage, $callNum, $expected)
     {
         $this->configMock->expects($this->once())
             ->method('getValue')
@@ -272,9 +275,6 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $map = [
             ['directory/filename.ext', true],
             ['directory/filename_1.ext', true],
@@ -284,7 +284,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
             ->method('fileExists')
             ->will($this->returnValueMap($map));
 
-        $this->helper->getUniqueFilename('directory/', 'filename.ext');
+        $this->assertSame($expected, $this->helper->getUniqueFilename('media-dir/directory/', 'filename.ext'));
     }
 
     public function getUniqueFilenameDataProvider()
@@ -315,11 +315,9 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dbModelMock->expects($this->exactly($callNum))
             ->method('loadByFilename')
+            ->with('filename')
             ->will($this->returnSelf());
         $dbModelMock->expects($this->exactly($callNum))
             ->method('getId')
@@ -330,7 +328,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->fileStorageMock->expects($this->exactly($callSaveFile))
             ->method('saveFile')
             ->will($this->returnValue(true));
-        $this->assertEquals($expected, $this->helper->saveFileToFilesystem('filename'));
+        $this->assertEquals($expected, $this->helper->saveFileToFilesystem('media-dir/filename'));
     }
 
     public function saveFileToFileSystemDataProvider()
@@ -354,11 +352,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
 
     public function testGetMediaRelativePath()
     {
-        $this->filesystemMock->expects($this->once())
-            ->method('getPath')
-            ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)
-            ->will($this->returnValue('/media/dir/'));
-        $this->assertEquals('fullPath', $this->helper->getMediaRelativePath('/media/dir/fullPath'));
+        $this->assertEquals('fullPath', $this->helper->getMediaRelativePath('media-dir/fullPath'));
     }
 
     /**
@@ -385,13 +379,11 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $dbModelMock->expects($this->exactly($callNum))
             ->method('getResource')
             ->will($this->returnValue($resourceModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $resourceModelMock->expects($this->exactly($callNum))
-            ->method('deleteFolder');
+            ->method('deleteFolder')
+            ->with('folder');
 
-        $this->helper->deleteFolder('folder');
+        $this->helper->deleteFolder('media-dir/folder');
     }
 
     /**
@@ -411,13 +403,11 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dbModelMock->expects($this->exactly($callNum))
-            ->method('deleteFile');
+            ->method('deleteFile')
+            ->with('file');
 
-        $this->helper->deleteFile('file');
+        $this->helper->deleteFile('media-dir/file');
     }
 
     /**
@@ -428,7 +418,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
      * @param int $callDirWrite
      * @dataProvider saveUploadedFileDataProvider
      */
-    public function testSaveUploadedFile($result, $expected, $storage, $callNum, $callDirWrite = 0)
+    public function testSaveUploadedFile($result, $expected, $expectedFullPath, $storage, $callNum, $callDirWrite = 0)
     {
         $this->configMock->expects($this->once())
             ->method('getValue')
@@ -440,15 +430,12 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
         $this->dbStorageFactoryMock->expects($this->exactly($callNum))
             ->method('create')
             ->will($this->returnValue($dbModelMock));
-        $this->filesystemMock->expects($this->exactly($callNum))
-            ->method('getPath')
-            ->will($this->returnValue('media-dir'));
         $dirWriteMock = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\WriteInterface')
             ->disableOriginalConstructor()
             ->getMock();
         $this->filesystemMock->expects($this->exactly($callDirWrite))
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($dirWriteMock));
         $dirWriteMock->expects($this->exactly($callDirWrite))
             ->method('renameFile');
@@ -461,7 +448,8 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
             ->method('fileExists')
             ->will($this->returnValueMap($map));
         $dbModelMock->expects($this->exactly($callNum))
-            ->method('saveFile');
+            ->method('saveFile')
+            ->with($expectedFullPath);
         $this->assertEquals($expected, $this->helper->saveUploadedFile($result));
     }
 
@@ -469,21 +457,24 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
     {
         return [
             'media database, file not unique' => [
-                ['file' => 'filename.ext', 'path' => 'directory/'],
+                ['file' => 'filename.ext', 'path' => 'media-dir/directory/'],
                 '/filename_2.ext',
+                'directory/filename_2.ext',
                 \Magento\Core\Model\File\Storage::STORAGE_MEDIA_DATABASE,
                 1,
                 1,
             ],
             'media database, file unique' => [
-                ['file' => 'file.ext', 'path' => 'directory/'],
+                ['file' => 'file.ext', 'path' => 'media-dir/directory/'],
                 '/file.ext',
+                'directory/file.ext',
                 \Magento\Core\Model\File\Storage::STORAGE_MEDIA_DATABASE,
                 1,
             ],
             'non-media database' => [
-                ['file' => 'filename.ext', 'path' => 'directory/'],
+                ['file' => 'filename.ext', 'path' => 'media-dir/directory/'],
                 'filename.ext',
+                '',
                 10,
                 0,
             ],
@@ -492,12 +483,29 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
 
     public function testGetMediaBaseDir()
     {
-        $this->filesystemMock->expects($this->once())
-            ->method('getPath')
-            ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)
-            ->will($this->returnValue('/media/dir/'));
+        $mediaDirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
+        $mediaDirMock->expects($this->any())
+            ->method('getAbsolutePath')
+            ->will($this->returnValue('media-dir'));
+        $filesystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
+            ->disableOriginalConstructor()
+            ->getMock();
+        $filesystemMock->expects($this->once())
+            ->method('getDirectoryRead')
+            ->with(DirectoryList::MEDIA)
+            ->will($this->returnValue($mediaDirMock));
+
+        $this->helper = $this->objectManager->getObject(
+            'Magento\Core\Helper\File\Storage\Database',
+            [
+                'filesystem' => $filesystemMock,
+                'fileStorage' => $this->fileStorageMock,
+                'dbStorageFactory' => $this->dbStorageFactoryMock,
+                'config' => $this->configMock,
+            ]
+        );
 
-        $this->assertEquals('/media/dir', $this->helper->getMediaBaseDir());
-        $this->assertEquals('/media/dir', $this->helper->getMediaBaseDir());
+        $this->assertEquals('media-dir', $this->helper->getMediaBaseDir());
+        $this->assertEquals('media-dir', $this->helper->getMediaBaseDir());
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php
index 3511ddf0ad5bbfbe51583b8f7561e15b0a758f5a..c383b45528fc68b6c59d0de328eb532605666425 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/App/EmulationTest.php
@@ -25,7 +25,7 @@
  */
 namespace Magento\Core\Model\App;
 
-class EmulationTest extends \Magento\Test\BaseTestCase
+class EmulationTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\StoreManagerInterface
@@ -67,6 +67,21 @@ class EmulationTest extends \Magento\Test\BaseTestCase
      */
     private $viewDesignMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Store\Model\Store
+     */
+    private $storeMock;
+
+    /**
+     * @var \Magento\TestFramework\Helper\ObjectManager
+     */
+    private $objectManager;
+
+    /**
+     * New store id
+     */
+    const NEW_STORE_ID = 9;
+
     /**
      * @var \Magento\Core\Model\App\Emulation
      */
@@ -74,21 +89,38 @@ class EmulationTest extends \Magento\Test\BaseTestCase
 
     public function setUp()
     {
-        parent::setUp();
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
         // Mocks
-        $this->designMock = $this->basicMock('Magento\Core\Model\Design');
-        $this->storeManagerMock = $this->basicMock('Magento\Framework\StoreManagerInterface');
-        $this->translateMock = $this->basicMock('Magento\Framework\TranslateInterface');
-        $this->scopeConfigMock = $this->basicMock('Magento\Framework\App\Config\ScopeConfigInterface');
-        $this->localeResolverMock = $this->basicMock('Magento\Framework\Locale\ResolverInterface');
-        $this->inlineConfigMock = $this->basicMock('Magento\Framework\Translate\Inline\ConfigInterface');
-        $this->inlineTranslationMock = $this->basicMock('Magento\Framework\Translate\Inline\StateInterface');
+        $this->designMock = $this->getMockBuilder('Magento\Core\Model\Design')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
+        $this->storeManagerMock = $this->getMockBuilder('Magento\Framework\StoreManagerInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
+        $this->translateMock = $this->getMockBuilder('Magento\Framework\TranslateInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
+        $this->scopeConfigMock = $this->getMockBuilder('Magento\Framework\App\Config\ScopeConfigInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
+        $this->localeResolverMock = $this->getMockBuilder('Magento\Framework\Locale\ResolverInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
+        $this->inlineConfigMock = $this->getMockBuilder('Magento\Framework\Translate\Inline\ConfigInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
+        $this->inlineTranslationMock = $this->getMockBuilder('Magento\Framework\Translate\Inline\StateInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])->getMock();
         $this->viewDesignMock = $this->getMockForAbstractClass('Magento\Framework\View\DesignInterface');
+        $this->storeMock = $this->getMockBuilder('Magento\Store\Model\Store')
+            ->disableOriginalConstructor()
+            ->setMethods(['__wakeup', 'getStoreId'])
+            ->getMock();
 
         // Stubs
         $this->designMock->expects($this->any())->method('loadChange')->willReturnSelf();
         $this->designMock->expects($this->any())->method('getData')->willReturn(false);
-        $this->translateMock->expects($this->any())->method('setLocale')->willReturnSelf();
 
         // Prepare SUT
         $this->model = $this->objectManager->getObject('Magento\Core\Model\App\Emulation',
@@ -108,7 +140,6 @@ class EmulationTest extends \Magento\Test\BaseTestCase
     public function testStartDefaults()
     {
         // Test data
-        $newDesignData = ['array', 'with', 'data'];
         $inlineTranslate = false;
         $initArea = 'initial area';
         $initTheme = 'initial design theme';
@@ -116,75 +147,61 @@ class EmulationTest extends \Magento\Test\BaseTestCase
         $initLocale = 'initial locale code';
         $newInlineTranslate = false;
         $newLocale = 'new locale code';
-        $newStoreId = 9;
-        $initDesignData = ['area' => $initArea, 'theme' => $initTheme, 'store' => $initStore];
+        $newArea = \Magento\Framework\App\Area::AREA_FRONTEND;
 
         // Stubs
-
         $this->inlineTranslationMock->expects($this->any())->method('isEnabled')->willReturn($inlineTranslate);
         $this->viewDesignMock->expects($this->any())->method('getArea')->willReturn($initArea);
         $this->viewDesignMock->expects($this->any())->method('getDesignTheme')->willReturn($initTheme);
-        $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($initStore);
+        $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($this->storeMock);
+        $this->storeMock->expects($this->any())
+            ->method('getStoreId')->willReturn($initStore);
         $this->localeResolverMock->expects($this->any())->method('getLocaleCode')->willReturn($initLocale);
         $this->inlineConfigMock->expects($this->any())->method('isActive')->willReturn($newInlineTranslate);
-        $this->viewDesignMock->expects($this->any())->method('getConfigurationDesignTheme')->willReturn($newDesignData);
+        $this->viewDesignMock->expects($this->any())->method('getConfigurationDesignTheme')->willReturn($initTheme);
         $this->scopeConfigMock->expects($this->any())->method('getValue')->willReturn($newLocale);
 
         // Expectations
-        $this->inlineTranslationMock->expects($this->once())->method('suspend')->with($newInlineTranslate);
-        $this->viewDesignMock->expects($this->once())->method('setDesignTheme')->with($newDesignData);
-        $this->localeResolverMock->expects($this->once())->method('setLocaleCode')->with($newLocale);
-        $this->translateMock->expects($this->once())->method('setLocale')->with($newLocale);
-        $this->storeManagerMock->expects($this->once())->method('setCurrentStore')->with($newStoreId);
+        $this->storeMock->expects($this->any())->method('getStoreId')->willReturn($initStore);
+        $this->inlineTranslationMock->expects($this->any())->method('suspend')->with($newInlineTranslate);
+        $this->viewDesignMock->expects($this->any())->method('setDesignTheme')->with($initTheme);
+        $this->localeResolverMock->expects($this->any())->method('setLocaleCode')->with($newLocale);
+        $this->translateMock->expects($this->any())->method('setLocale')->with($newLocale);
+        $this->translateMock->expects($this->any())->method('loadData')->with($newArea);
+        $this->storeManagerMock->expects($this->any())
+            ->method('setCurrentStore')->with(self::NEW_STORE_ID);
 
         // Test
-        $initialEnvironment = $this->model->startEnvironmentEmulation($newStoreId);
-        $this->assertSame($inlineTranslate, $initialEnvironment->getInitialTranslateInline());
-        $this->assertSame($initDesignData, $initialEnvironment->getInitialDesign());
-        $this->assertSame($initLocale, $initialEnvironment->getInitialLocaleCode());
-    }
-
-    public function testStartWithInlineTranslation()
-    {
-        $inlineTranslation = true;
-
-        $this->inlineConfigMock->expects($this->any())->method('isActive')->willReturn($inlineTranslation);
-
-        $this->inlineTranslationMock->expects($this->once())
-            ->method('suspend')
-            ->with($inlineTranslation);
-
-        $this->model->startEnvironmentEmulation(1, null, true);
+        $this->model->startEnvironmentEmulation(self::NEW_STORE_ID, \Magento\Framework\App\Area::AREA_FRONTEND);
 
     }
 
-    public function testStartAreaNotDefault()
-    {
-        $area = 'backend';
-        $newDesignData = ['array', 'with', 'data'];
-
-        $this->viewDesignMock->expects($this->any())->method('getConfiguratioNDesignTheme')->willReturn($newDesignData);
-
-        $this->viewDesignMock->expects($this->once())
-            ->method('setDesignTheme')
-            ->with($newDesignData, $area);
-
-        $this->model->startEnvironmentEmulation(1, $area);
-    }
-
     public function testStop()
     {
         // Test data
-        $initialEnvInfo = $this->objectManager->getObject('\Magento\Framework\Object');
         $initArea = 'initial area';
         $initTheme = 'initial design theme';
-        $initStore = 1;
         $initLocale = 'initial locale code';
+        $initialStore = 1;
         $initTranslateInline = false;
-        $initDesignData = ['area' => $initArea, 'theme' => $initTheme, 'store' => $initStore];
-        $initialEnvInfo->setInitialTranslateInline($initTranslateInline)
-            ->setInitialDesign($initDesignData)
-            ->setInitialLocaleCode($initLocale);
+
+        $this->inlineTranslationMock->expects($this->once())
+            ->method('isEnabled')
+            ->willReturn($initTranslateInline);
+        $this->viewDesignMock->expects($this->once())
+            ->method('getArea')
+            ->willReturn($initArea);
+        $this->viewDesignMock->expects($this->once())
+            ->method('getDesignTheme')
+            ->willReturn($initTheme);
+        $this->storeManagerMock->expects($this->any())->method('getStore')->willReturn($this->storeMock);
+        $this->storeMock->expects($this->once())->method('getStoreId')->willReturn($initialStore);
+        $this->localeResolverMock->expects($this->once())
+            ->method('getLocaleCode')
+            ->willReturn($initLocale);
+
+
+        $this->model->storeCurrentEnvironmentInfo();
 
         // Expectations
         $this->inlineTranslationMock->expects($this->once())
@@ -194,16 +211,16 @@ class EmulationTest extends \Magento\Test\BaseTestCase
             ->method('setDesignTheme')
             ->with($initTheme, $initArea);
         $this->storeManagerMock->expects($this->once())
-            ->method('setCurrentStore')
-            ->with($initStore);
+            ->method('setCurrentStore')->with($initialStore);
         $this->localeResolverMock->expects($this->once())
             ->method('setLocaleCode')
             ->with($initLocale);
         $this->translateMock->expects($this->once())
             ->method('setLocale')
             ->with($initLocale);
+        $this->translateMock->expects($this->once())->method('loadData')->with($initArea);
 
         // Test
-        $this->assertSame($this->model, $this->model->stopEnvironmentEmulation($initialEnvInfo));
+        $this->model->stopEnvironmentEmulation();
     }
 } 
\ No newline at end of file
diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php
index e06b5b5adac068dc86ac8037971651b32b56742d..4d4cc4ccc018220a3d81ab61d05b7c1c57610435 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Asset/Plugin/CleanMergedJsCssTest.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Core\Model\Asset\Plugin;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class CleanMergedJsCssTest extends \Magento\Test\BaseTestCase
 {
     /**
@@ -33,7 +35,7 @@ class CleanMergedJsCssTest extends \Magento\Test\BaseTestCase
     private $databaseMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\App\Filesystem
+     * @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Filesystem
      */
     private $filesystemMock;
 
@@ -50,7 +52,7 @@ class CleanMergedJsCssTest extends \Magento\Test\BaseTestCase
     public function setUp()
     {
         parent::setUp();
-        $this->filesystemMock = $this->basicMock('\Magento\Framework\App\Filesystem');
+        $this->filesystemMock = $this->basicMock('\Magento\Framework\Filesystem');
         $this->databaseMock = $this->basicMock('\Magento\Core\Helper\File\Storage\Database');
         $this->model = $this->objectManager->getObject('Magento\Core\Model\Asset\Plugin\CleanMergedJsCss',
             [
@@ -76,7 +78,7 @@ class CleanMergedJsCssTest extends \Magento\Test\BaseTestCase
             ->with($mergedDir);
         $this->filesystemMock->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->willReturn($readDirectoryMock);
 
         $this->model->aroundCleanMergedJsCss(
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 05e198b2d05009a7a186c06783811c283ed25042..98dbb5dc928e8d7e68e9db8a8e38b4e449d2892e 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Model\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -55,7 +57,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $directory->expects($this->once())->method('getRelativePath')->will($this->returnArgument(0));
         $directory->expects($this->once())->method('openFile')->with('cacheFile')->will($this->returnValue($file));
         $filesystem = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryWrite'),
             array(),
             '',
@@ -66,7 +68,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::PUB_DIR
+            DirectoryList::PUB
         )->will(
             $this->returnValue($directory)
         );
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 877baf80c99324d509acba7c71acdce93ae47bc2..697e69fdfb154ca103df2ebee4f8e84a15d9d34a 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Model\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class SynchronizationTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -75,7 +77,7 @@ class SynchronizationTest extends \PHPUnit_Framework_TestCase
         $directory->expects($this->once())->method('getRelativePath')->will($this->returnArgument(0));
         $directory->expects($this->once())->method('openFile')->with($filePath)->will($this->returnValue($file));
         $filesystem = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryWrite'),
             array(),
             '',
@@ -86,7 +88,7 @@ class SynchronizationTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::PUB_DIR
+            DirectoryList::PUB
         )->will(
             $this->returnValue($directory)
         );
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 71e4e879d07a03b5005da4f9efdafd805442a030..6ddd1b58cb9663e27e1c6a50cb2b195e4f8f4d24 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/MergeTest.php
@@ -117,7 +117,7 @@ class MergeTest extends \PHPUnit_Framework_TestCase
 
         $objectHelper = new \Magento\TestFramework\Helper\ObjectManager($this);
 
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false, false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false, false);
         $directory = $this->getMock('Magento\Framework\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/Layout/Update/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php
index fae5f317b3c5bd15ef9b9959f73cc60d72d7ef49..2443511890c8b30d280a5b0e469ae878e4a67c2e 100644
--- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/Update/ValidatorTest.php
@@ -42,10 +42,10 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase
      */
     protected function _createValidator($layoutUpdate, $isSchemaValid = true)
     {
-        $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $dirList = $this->getMockBuilder('Magento\Framework\App\Filesystem\DirectoryList')
             ->disableOriginalConstructor()
             ->getMock();
-        $filesystem->expects(
+        $dirList->expects(
             $this->exactly(2)
         )->method(
             'getPath'
@@ -79,7 +79,7 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase
 
         $model = $this->_objectHelper->getObject(
             'Magento\Core\Model\Layout\Update\Validator',
-            array('filesystem' => $filesystem, 'domConfigFactory' => $domConfigFactory)
+            array('dirList' => $dirList, 'domConfigFactory' => $domConfigFactory)
         );
 
         return $model;
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 03ff17ab58e2a469697bcf34659ee1c524ec89ad..e2bb9dcf3e8f61be68363aecbf11cd5daad9e87a 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
@@ -64,7 +64,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetConnectionInMemoryCaching()
     {
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $string = $this->getMock('Magento\Framework\Stdlib\String', array(), array(), '', false);
         $dateTime = $this->getMock('Magento\Framework\Stdlib\DateTime', null, array(), '', true);
         $connection = new \Magento\Framework\DB\Adapter\Pdo\Mysql(
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 cc1773480cc373b22b720c3ce219c6acd994dde8..3378d6dc404034bd925cf4ced081b370df300a9c 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Core\Model\Resource\File\Storage;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class FileTest
  */
@@ -39,7 +41,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
     protected $loggerMock;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystemMock;
 
@@ -55,7 +57,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
     {
         $this->loggerMock = $this->getMock('Magento\Framework\Logger', array(), array(), '', false);
         $this->filesystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryRead'),
             array(),
             '',
@@ -90,7 +92,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryRead'
         )->with(
-            $this->equalTo(\Magento\Framework\App\Filesystem::MEDIA_DIR)
+            $this->equalTo(DirectoryList::MEDIA)
         )->will(
             $this->returnValue($this->directoryReadMock)
         );
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 ed51bee30b81ea339cc54a62227473ea15f30297..a09654ac12b2739eafd4b08df0d85e7d4a7a7f40 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
@@ -27,6 +27,8 @@
  */
 namespace Magento\Core\Model\Theme\Image;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class PathTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -56,7 +58,7 @@ class PathTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->mediaDirectory = $this->getMock(
             'Magento\Framework\Filesystem\Directory\ReadInterface', array(), array(), '', false
         );
@@ -75,7 +77,7 @@ class PathTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue('/theme/origin'));
 
         $this->filesystem->expects($this->any())->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)
+            ->with(DirectoryList::MEDIA)
             ->will($this->returnValue($this->mediaDirectory));
 
         $this->model = new Path(
diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/FileTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/FileTest.php
index 7386b33efe2f9692fa541ae113700dcfc41e7b67..616bed3b7319d20510d22e1bf5316f8ef0ff996b 100644
--- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/FileTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/FileTest.php
@@ -29,35 +29,48 @@ use Magento\Customer\Model\Metadata\ElementFactory;
 
 class FileTest extends AbstractFormTestCase
 {
+    const ENTITY_TYPE = 0;
     /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Core\Helper\Data */
     protected $coreDataMock;
 
     /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Core\Model\File\Validator\NotProtectedExtension */
     protected $fileValidatorMock;
 
-    /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\App\Filesystem */
+    /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\Filesystem */
     protected $fileSystemMock;
 
     /** @var \PHPUnit_Framework_MockObject_MockObject | \Magento\Framework\App\RequestInterface */
     protected $requestMock;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\File\UploaderFactory
+     */
+    protected $uploaderFactoryMock;
+
     protected function setUp()
     {
         parent::setUp();
-        $this->coreDataMock = $this->getMockBuilder(
-            'Magento\Core\Helper\Data'
-        )->disableOriginalConstructor()->getMock();
-        $this->fileValidatorMock = $this->getMockBuilder(
-            'Magento\Core\Model\File\Validator\NotProtectedExtension'
-        )->disableOriginalConstructor()->getMock();
-        $this->fileSystemMock = $this->getMockBuilder(
-            'Magento\Framework\App\Filesystem'
-        )->disableOriginalConstructor()->getMock();
-        $this->requestMock = $this->getMockBuilder(
-            'Magento\Framework\App\RequestInterface'
-        )->disableOriginalConstructor()->setMethods(
-            ['getParam', 'getParams', 'getModuleName', 'setModuleName', 'getActionName', 'setActionName', 'getCookie']
-        )->getMock();
+        $this->coreDataMock = $this->getMockBuilder('Magento\Core\Helper\Data')
+            ->disableOriginalConstructor()->getMock();
+        $this->fileValidatorMock = $this->getMockBuilder('Magento\Core\Model\File\Validator\NotProtectedExtension')
+            ->disableOriginalConstructor()->getMock();
+        $this->fileSystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
+            ->disableOriginalConstructor()->getMock();
+        $this->requestMock = $this->getMockBuilder('Magento\Framework\App\RequestInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(
+                [
+                    'getParam',
+                    'getParams',
+                    'getModuleName',
+                    'setModuleName',
+                    'getActionName',
+                    'setActionName',
+                    'getCookie'
+                ]
+            )
+            ->getMock();
+        $this->uploaderFactoryMock = $this->getMock('Magento\Framework\File\UploaderFactory', [], [], '', false);
     }
 
     /**
@@ -267,21 +280,64 @@ class FileTest extends AbstractFormTestCase
         $this->assertSame($fileForm, $fileForm->compactValue('aValue'));
     }
 
-    /**
-     * @param string $expected
-     * @param array $value
-     * @dataProvider compactValueDataProvider
-     */
-    public function testCompactValue($expected, $value)
+    public function testCompactValueNoDelete()
     {
         $fileForm = $this->getClass('value', false);
         $this->attributeMetadataMock->expects($this->any())->method('isRequired')->will($this->returnValue(false));
-        $this->assertSame($expected, $fileForm->compactValue($value));
+        $this->assertSame('value', $fileForm->compactValue([]));
     }
 
-    public function compactValueDataProvider()
+    public function testCompactValueDelete()
     {
-        return array('notDelete' => array('value', []), 'delete' => array('', array('delete' => true)));
+        $fileForm = $this->getClass('value', false);
+        $this->attributeMetadataMock->expects($this->any())->method('isRequired')->will($this->returnValue(false));
+        $mediaDirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
+        $mediaDirMock->expects($this->once())
+            ->method('delete')
+            ->with(self::ENTITY_TYPE . 'value');
+        $this->fileSystemMock->expects($this->once())
+            ->method('getDirectoryWrite')
+            ->with(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)
+            ->will($this->returnValue($mediaDirMock));
+        $this->assertSame('', $fileForm->compactValue(['delete' => true]));
+    }
+
+    public function testCompactValueTmpFile()
+    {
+        $value = ['tmp_name' => 'tmp.file', 'name' => 'new.file'];
+        $expected = 'saved.file';
+
+        $fileForm = $this->getClass(null, false);
+        $mediaDirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
+        $this->fileSystemMock->expects($this->once())
+            ->method('getDirectoryWrite')
+            ->with(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)
+            ->will($this->returnValue($mediaDirMock));
+        $mediaDirMock->expects($this->any())
+            ->method('getAbsolutePath')
+            ->will($this->returnArgument(0));
+        $uploaderMock = $this->getMock('\Magento\Framework\File\Uploader', [], [], '', false);
+        $this->uploaderFactoryMock->expects($this->once())
+            ->method('create')
+            ->with(['fileId' => $value])
+            ->will($this->returnValue($uploaderMock));
+        $uploaderMock->expects($this->once())
+            ->method('setFilesDispersion')
+            ->with(true);
+        $uploaderMock->expects($this->once())
+            ->method('setFilenamesCaseSensitivity')
+            ->with(false);
+        $uploaderMock->expects($this->once())
+            ->method('setAllowRenameFiles')
+            ->with(true);
+        $uploaderMock->expects($this->once())
+            ->method('save')
+            ->with(self::ENTITY_TYPE, 'new.file');
+        $uploaderMock->expects($this->once())
+            ->method('getUploadedFileName')
+            ->will($this->returnValue($expected));
+
+        $this->assertSame($expected, $fileForm->compactValue($value));
     }
 
     public function testRestoreValue()
@@ -348,11 +404,12 @@ class FileTest extends AbstractFormTestCase
                 $this->attributeMetadataMock,
                 $this->localeResolverMock,
                 $value,
-                0,
+                self::ENTITY_TYPE,
                 $isAjax,
                 $this->coreDataMock,
                 $this->fileValidatorMock,
-                $this->fileSystemMock
+                $this->fileSystemMock,
+                $this->uploaderFactoryMock
             )
         );
         return $fileForm;
diff --git a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
index 0c49de7cde1f4f43ca5985284f95e5e587007aa1..06745b508253f488f3e372ba67b642eb3e758033 100644
--- a/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Model/Metadata/Form/ImageTest.php
@@ -47,7 +47,8 @@ class ImageTest extends FileTest
                 $isAjax,
                 $this->coreDataMock,
                 $this->fileValidatorMock,
-                $this->fileSystemMock
+                $this->fileSystemMock,
+                $this->uploaderFactoryMock
             )
         );
         return $imageForm;
diff --git a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php
index 71be3818d05e075c0eabb54dd0cd152160c1d149..67091b05057ac4ccdfa95a39f23a74d054d8fde1 100755
--- a/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Customer/Service/V1/CustomerAccountServiceTest.php
@@ -221,7 +221,8 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase
                     'sendPasswordResetConfirmationEmail',
                     'sendPasswordResetNotificationEmail',
                     'sendPasswordReminderEmail',
-                    'delete'
+                    'delete',
+                    'validatePassword',
                 )
             )->getMock();
 
@@ -2181,4 +2182,43 @@ class CustomerAccountServiceTest extends \PHPUnit_Framework_TestCase
         );
         return $customerService;
     }
+
+    public function testChangePasswordSendMailException()
+    {
+        $exception = new MailException(__('The mail server is down'));
+        $newPassword = 'newPassword';
+        $encryptedHash = 'password_encrypted_hash';
+
+        $this->_mockReturnValue($this->_customerModelMock, array('getId' => self::ID, 'password' => self::PASSWORD));
+
+        $this->_customerModelMock->expects($this->once())
+            ->method('validatePassword')
+            ->with(self::PASSWORD)
+            ->will($this->returnValue(true));
+        $this->_customerModelMock->expects($this->once())
+            ->method('setRpToken')
+            ->with(null)
+            ->will($this->returnSelf());
+        $this->_customerModelMock->expects($this->once())
+            ->method('setRpTokenCreatedAt')
+            ->with(null)
+            ->will($this->returnSelf());
+        $this->_encryptorMock->expects($this->once())
+            ->method('getHash')
+            ->with($newPassword, true)
+            ->will($this->returnValue($encryptedHash));
+        $this->_customerModelMock->expects($this->once())
+            ->method('setPasswordHash')
+            ->with($encryptedHash)
+            ->will($this->returnSelf());
+        $this->_customerModelMock->expects($this->once())
+            ->method('sendPasswordResetNotificationEmail')
+            ->will($this->throwException($exception));
+        $this->_loggerMock->expects($this->once())
+            ->method('logException')
+            ->with($exception);
+
+        $customerService = $this->_createService();
+        $customerService->changePassword(self::ID, self::PASSWORD, $newPassword);
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php
index 21ab170383f61df1e48cda019403d1180a94fdab..23167c55174dcd8e029d7e0383e53b71d75a2af3 100644
--- a/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php
+++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Controller/Varien/Router/StandardTest.php
@@ -99,7 +99,13 @@ class StandardTest extends \PHPUnit_Framework_TestCase
 
         $excludedRouters = array('admin' => 'admin router', 'vde' => 'vde router');
 
-        $routerListMock = $this->getMock('\Magento\Framework\App\Route\ConfigInterface');
+        $routerListMock = $this->getMock(
+            '\Magento\Framework\App\Route\ConfigInterface\Proxy',
+            array(),
+            array(),
+            '',
+            false
+        );
 
         $infoProcessorMock = $this->getMock('Magento\Framework\App\Request\PathInfoProcessorInterface');
         $infoProcessorMock->expects($this->any())->method('process')->will($this->returnArgument(1));
diff --git a/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php b/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php
index cc12e3777d0fae626103a0a16699b20deed0a38a..f1cb48345db7f257aef454b6f2b95fc7c693f26a 100644
--- a/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php
+++ b/dev/tests/unit/testsuite/Magento/Dhl/Model/CarrierTest.php
@@ -141,7 +141,7 @@ class CarrierTest extends \PHPUnit_Framework_TestCase
             $this->returnValue(file_get_contents(__DIR__ . '/_files/countries.xml'))
         );
         $filesystem = $this->getMockBuilder(
-            '\Magento\Framework\App\Filesystem'
+            '\Magento\Framework\Filesystem'
         )->disableOriginalConstructor()->setMethods(
             array('getDirectoryRead')
         )->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Directory/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Directory/Model/ObserverTest.php
index c7d0bc37a9c69ab01a2103a78b2d68e220dabaea..6551864a841a26c3e56ac7b80d58cc92507f3c70 100644
--- a/dev/tests/unit/testsuite/Magento/Directory/Model/ObserverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Directory/Model/ObserverTest.php
@@ -44,7 +44,7 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Framework\Mail\Template\TransportBuilder|\PHPUnit_Framework_MockObject_MockObject */
     protected $transportBuilder;
 
-    /** @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var \Magento\Framework\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */
     protected $storeManager;
 
     /** @var \Magento\Directory\Model\CurrencyFactory|\PHPUnit_Framework_MockObject_MockObject */
diff --git a/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php b/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php
index f7e4cd0e1b022c86190f8fca631fb65f0f17066a..2761896f8f5a9a6b0a9e37f0ea0c1d98897918b9 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Helper/DownloadTest.php
@@ -24,7 +24,8 @@
 namespace Magento\Downloadable\Helper;
 
 use Magento\Downloadable\Helper\Download as DownloadHelper;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\File\ReadInterface as FileReadInterface;
 use Magento\Framework\Filesystem\Directory\ReadInterface as DirReadInterface;
 use Magento\Downloadable\Helper\File as DownloadableFile;
@@ -79,7 +80,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
         self::$functionExists = true;
         self::$mimeContentType = self::MIME_TYPE;
 
-        $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_handleMock = $this->getMock(
             'Magento\Framework\Filesystem\File\ReadInterface',
             array(),
@@ -242,7 +243,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryRead'
         )->with(
-            Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->will(
             $this->returnValue($this->_workingDirectoryMock)
         );
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 e41128aaaa9044a92c64d0227a6e11c656f505be..fb9ca8a259c3b10d343ebb616ee11964984e7058 100644
--- a/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Downloadable/Model/Product/TypeTest.php
@@ -41,7 +41,7 @@ class TypeTest extends \PHPUnit_Framework_TestCase
         $fileStorageDb = $this->getMockBuilder(
             'Magento\Core\Helper\File\Storage\Database'
         )->disableOriginalConstructor()->getMock();
-        $filesystem = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $coreRegistry = $this->getMock('Magento\Framework\Registry', [], [], '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php
index eea20cd373b850a46ecf5125b7b5b4186252342b..d5a32a6dc5d52a0be11a1d3a0305ca7d91b4a692 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php
@@ -49,7 +49,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
         $this->fileValidatorMock = $this->getMock(
             '\Magento\Core\Model\File\Validator\NotProtectedExtension', ['isValid', 'getMessages'], [], '', false
         );
-        $filesystemMock = $this->getMock('\Magento\Framework\App\Filesystem', [], [], '', false);
+        $filesystemMock = $this->getMock('\Magento\Framework\Filesystem', [], [], '', false);
 
         $this->model = new File(
             $timezoneMock, $loggerMock, $localeResolverMock,
diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php
index f605dc45ecaa6fb1f7db61af55b4ab5c222d3d1f..0e7cafb292f1e5ae7c51b0d01c252969d62efbb3 100644
--- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php
@@ -39,7 +39,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         $fileValidatorMock = $this->getMock(
             '\Magento\Core\Model\File\Validator\NotProtectedExtension', [], [], '', false
         );
-        $filesystemMock = $this->getMock('\Magento\Framework\App\Filesystem', [], [], '', false);
+        $filesystemMock = $this->getMock('\Magento\Framework\Filesystem', [], [], '', false);
 
         $this->model = new Image(
             $timezoneMock, $loggerMock, $localeResolverMock, $coreDataMock, $fileValidatorMock, $filesystemMock
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 4e42620bbe51a11bde13dfcdef12527c1a91fcab..6f5cca5f43a654bc036b09873332ec707368c393 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
@@ -23,6 +23,8 @@
  */
 namespace Magento\Email\Block\Adminhtml\Template;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class EditTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -54,11 +56,6 @@ class EditTest extends \PHPUnit_Framework_TestCase
         array('scope' => 'scope_11', 'scope_id' => 'scope_id_1', 'path' => 'section1/group1/group2/group3/field1')
     );
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $directoryMock;
-
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
@@ -89,7 +86,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         $this->_emailConfigMock = $this->getMock('Magento\Email\Model\Template\Config', array(), array(), '', false);
 
         $this->filesystemMock = $this->getMock(
-            '\Magento\Framework\App\Filesystem',
+            '\Magento\Framework\Filesystem',
             array('getFilesystem', '__wakeup', 'getPath', 'getDirectoryRead'),
             array(),
             '',
@@ -108,7 +105,7 @@ class EditTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getTemplateFileName'
         )->will(
-            $this->returnValue('var/www/magento\rootdir/app\custom/filename.phtml')
+            $this->returnValue(DirectoryList::ROOT . '/custom/filename.phtml')
         );
 
         $params = array(
@@ -262,30 +259,18 @@ class EditTest extends \PHPUnit_Framework_TestCase
 
     public function testGetDefaultTemplatesAsOptionsArray()
     {
-        $dirValueMap = array(
-            array(\Magento\Framework\App\Filesystem::ROOT_DIR, 'var/www/magento\rootdir/'),
-            array(\Magento\Framework\App\Filesystem::APP_DIR, 'var/www/magento\rootdir\app/'),
-            array(\Magento\Framework\App\Filesystem::THEMES_DIR, 'var\www/magento\rootdir\app/themes/')
-        );
-
-        $this->directoryMock = $this->getMock(
+        $directoryMock = $this->getMock(
             '\Magento\Framework\Filesystem\Directory\Read',
             array(),
             array(),
             '',
             false
         );
-        $this->directoryMock->expects($this->any())->method('isFile')->will($this->returnValue(false));
-        $this->directoryMock->expects($this->any())->method('getRelativePath')->will($this->returnValue(''));
 
-        $this->filesystemMock->expects(
-            $this->any()
-        )->method(
-            'getDirectoryRead'
-        )->will(
-            $this->returnValue($this->directoryMock)
-        );
-        $this->filesystemMock->expects($this->any())->method('getPath')->will($this->returnValueMap($dirValueMap));
+        $this->filesystemMock->expects($this->any())
+            ->method('getDirectoryRead')
+            ->will($this->returnValue($directoryMock))
+        ;
 
         $this->_emailConfigMock
             ->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php
index 24194c974bbbde6689a4afe68bb20a7b93e2295e..af2f59c37e6acd9e3ceb0491741bbdf787ed8e65 100644
--- a/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Email/Model/TemplateTest.php
@@ -50,7 +50,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
                 $this->getMock('Magento\Framework\Registry', array(), array(), '', false),
                 $this->getMock('Magento\Core\Model\App\Emulation', array(), array(), '', false),
                 $this->getMock('Magento\Store\Model\StoreManager', array(), array(), '', false),
-                $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false),
+                $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false),
                 $this->getMock('Magento\Framework\View\Asset\Repository', array(), array(), '', false),
                 $this->getMock('Magento\Framework\View\FileSystem', array(), array(), '', false),
                 $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface'),
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php
index fac3dd4178dcdc5b2561322cf54e69fd32ecf820..bdc8d40d05d2e67153e9dd015d4b6a86848b016b 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/FileResolver/PrimaryTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\App\Arguments\FileResolver;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class PrimaryTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -34,7 +36,7 @@ class PrimaryTest extends \PHPUnit_Framework_TestCase
     public function testGet(array $fileList, $scope, $filename)
     {
         $directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array('search'), array(), '', false);
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array('getDirectoryRead'), array(), '', false);
         $iteratorFactory = $this->getMock(
             'Magento\Framework\Config\FileIteratorFactory',
             array('create'),
@@ -48,7 +50,7 @@ class PrimaryTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryRead'
         )->with(
-            \Magento\Framework\App\Filesystem::CONFIG_DIR
+            DirectoryList::CONFIG
         )->will(
             $this->returnValue($directory)
         );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/LoaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/LoaderTest.php
index 20b3192aa1f1414720f82bf1173595f01c0e3f77..735bf4c2bfb5b1b3f0181b4032eb29cdd81b79d7 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/LoaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Arguments/LoaderTest.php
@@ -40,7 +40,7 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
     {
         $this->_dirs = $this->getMock(
             '\Magento\Framework\App\Filesystem\DirectoryList',
-            array('getDir'),
+            array('getPath'),
             array(),
             '',
             false
@@ -49,7 +49,7 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
 
     public function testWithOneXmlFile()
     {
-        $this->_dirs->expects($this->once())->method('getDir')->will($this->returnValue(__DIR__ . '/_files'));
+        $this->_dirs->expects($this->once())->method('getPath')->will($this->returnValue(__DIR__ . '/_files'));
         $this->_model = new Loader($this->_dirs);
         $expected = require __DIR__ . '/_files/local.php';
         $this->assertEquals($expected, $this->_model->load());
@@ -57,7 +57,7 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
 
     public function testWithTwoXmlFileMerging()
     {
-        $this->_dirs->expects($this->once())->method('getDir')->will($this->returnValue(__DIR__ . '/_files'));
+        $this->_dirs->expects($this->once())->method('getPath')->will($this->returnValue(__DIR__ . '/_files'));
         $this->_model = new Loader($this->_dirs, 'other/local_developer.xml');
         $expected = require __DIR__ . '/_files/other/local_developer_merged.php';
         $this->assertEquals($expected, $this->_model->load());
@@ -65,7 +65,7 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
 
     public function testWithoutXmlFiles()
     {
-        $this->_dirs->expects($this->once())->method('getDir')->will($this->returnValue(__DIR__ . '/notExistFolder'));
+        $this->_dirs->expects($this->once())->method('getPath')->will($this->returnValue(__DIR__ . '/notExistFolder'));
         $this->_model = new Loader($this->_dirs);
         $this->assertEquals(array(), $this->_model->load());
     }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php
index 2b3c43973772a673c2bc7ac342aacc275f67d017..7718bf0924f5504884d25379b61f577fb90838d0 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/BootstrapTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\App;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class BootstrapTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -70,16 +72,16 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
     {
         $this->objectManagerFactory = $this->getMock('\Magento\Framework\App\ObjectManagerFactory', [], [], '', false);
         $this->objectManager = $this->getMockForAbstractClass('\Magento\Framework\ObjectManager');
-        $this->dirs = $this->getMock('\Magento\Framework\App\Filesystem\DirectoryList', ['getDir'], [], '', false);
+        $this->dirs = $this->getMock('\Magento\Framework\App\Filesystem\DirectoryList', ['getPath'], [], '', false);
         $this->maintenanceMode = $this->getMock('\Magento\Framework\App\MaintenanceMode', ['isOn'], [], '', false);
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', [], [], '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', [], [], '', false);
 
         $this->logger = $this->getMock('Magento\Framework\Logger', [], [], '', false);
 
         $mapObjectManager = [
             ['Magento\Framework\App\Filesystem\DirectoryList', $this->dirs],
             ['Magento\Framework\App\MaintenanceMode', $this->maintenanceMode],
-            ['Magento\Framework\App\Filesystem', $filesystem],
+            ['Magento\Framework\Filesystem', $filesystem],
             ['Magento\Framework\Logger', $this->logger]
         ];
 
@@ -105,6 +107,34 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
         );
     }
 
+    public function testCreateObjectManagerFactory()
+    {
+        $result = Bootstrap::createObjectManagerFactory('test', []);
+        $this->assertInstanceOf('Magento\Framework\App\ObjectManagerFactory', $result);
+    }
+
+    public function testCreateFilesystemDirectoryList()
+    {
+        $result = Bootstrap::createFilesystemDirectoryList(
+            'test',
+            [Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS => [DirectoryList::APP => ['path' => '/custom/path']]]
+        );
+        /** @var \Magento\Framework\App\Filesystem\DirectoryList $result */
+        $this->assertInstanceOf('Magento\Framework\App\Filesystem\DirectoryList', $result);
+        $this->assertEquals('/custom/path', $result->getPath(DirectoryList::APP));
+    }
+
+    public function testCreateFilesystemDriverPool()
+    {
+        $driverClass = get_class($this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface'));
+        $result = Bootstrap::createFilesystemDriverPool(
+            [Bootstrap::INIT_PARAM_FILESYSTEM_DRIVERS => ['custom' => $driverClass]]
+        );
+        /** @var \Magento\Framework\Filesystem\DriverPool $result */
+        $this->assertInstanceOf('Magento\Framework\Filesystem\DriverPool', $result);
+        $this->assertInstanceof($driverClass, $result->getDriver('custom'));
+    }
+
     public function testGetParams()
     {
         $testParams = ['testValue1', 'testValue2'];
@@ -136,12 +166,6 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
         $this->assertSame($this->objectManager, $bootstrap->getObjectManager());
     }
 
-    public function testGetDirList()
-    {
-        $bootstrap = self::createBootstrap();
-        $this->assertSame($this->dirs, $bootstrap->getDirList());
-    }
-
     public function testIsDeveloperMode()
     {
         $bootstrap = self::createBootstrap();
@@ -245,4 +269,4 @@ class BootstrapTest extends \PHPUnit_Framework_TestCase
             [true, false],
         ];
     }
-}
\ No newline at end of file
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php
index 2a6886527ae2cbb63b01ba963707798f3fba5d7a..2bddd1c7e7354d732687dd8d2a900bf1ec2fe8d0 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Cache/Frontend/FactoryTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\App\Cache\Frontend;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FactoryTest extends \PHPUnit_Framework_TestCase
 {
     public static function setUpBeforeClass()
@@ -98,8 +100,8 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
     public static function idPrefixDataProvider()
     {
         return array(
-            // start of md5('CONFIG_DIR')
-            'default id prefix' => array(array('backend' => 'Zend_Cache_Backend_BlackHole'), 'a3c_'),
+            // start of md5('DIR')
+            'default id prefix' => array(array('backend' => 'Zend_Cache_Backend_BlackHole'), 'c15_'),
             'id prefix in "id_prefix" option' => array(
                 array('backend' => 'Zend_Cache_Backend_BlackHole', 'id_prefix' => 'id_prefix_value'),
                 'id_prefix_value'
@@ -157,14 +159,13 @@ class FactoryTest extends \PHPUnit_Framework_TestCase
         $objectManager = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false);
         $objectManager->expects($this->any())->method('create')->will($this->returnCallback($processFrontendFunc));
 
-        $map = array(
-            array(\Magento\Framework\App\Filesystem::CACHE_DIR, 'CACHE_DIR'),
-            array(\Magento\Framework\App\Filesystem::CONFIG_DIR, 'CONFIG_DIR')
-        );
-
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getPath'), array(), '', false);
-
-        $filesystem->expects($this->any())->method('getPath')->will($this->returnValueMap($map));
+        $dirMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface');
+        $dirMock->expects($this->any())
+            ->method('getAbsolutePath')
+            ->will($this->returnValue('DIR'));
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', [], array(), '', false);
+        $filesystem->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($dirMock));
+        $filesystem->expects($this->any())->method('getDirectoryWrite')->will($this->returnValue($dirMock));
 
         $resource = $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php
index 6c647a1f0d14c62f31360d7a87efced4eadede4c..4ca0160841a1648e6c40d508872f44d90fee46bb 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/FileResolverTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\App\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileResolverTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -35,7 +37,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
     /**
      * Filesystem
      *
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -61,7 +63,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->filesystem = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryRead'),
             array(),
             '',
@@ -113,7 +115,7 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryRead'
         )->with(
-            \Magento\Framework\App\Filesystem::CONFIG_DIR
+            DirectoryList::CONFIG
         )->will(
             $this->returnValue($directory)
         );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php
index 50752518f771565ab363e49ceb5016cc182f94a2..decf0bacfb01610645874dcff4929da067082b14 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Framework\App\Config\Initial;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php
deleted file mode 100644
index 4473f51b93f82d714ca91b40098409d3f76f8fb8..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Framework\App\Filesystem\DirectoryList;
-
-class ConfigurationTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var Configuration
-     */
-    protected $dirListConfiguration;
-
-    /**
-     * @dataProvider configureDataProvider
-     */
-    public function testConfigure($pubDirIsConfigured)
-    {
-        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
-
-        /* Mock Config model */
-        $config = $this->getMockBuilder(
-            'Magento\Framework\App\Config\ScopeConfigInterface'
-        )->disableOriginalConstructor()->setMethods(
-            array('getValue', 'setValue', 'isSetFlag')
-        )->getMock();
-
-        $config->expects(
-            $this->at(0)
-        )->method(
-            'getValue'
-        )->with(
-            Configuration::XML_FILESYSTEM_DIRECTORY_PATH
-        )->will(
-            $this->returnValue(array(\Magento\Framework\App\Filesystem::PUB_DIR => array('uri' => '')))
-        );
-
-        $config->expects(
-            $this->at(1)
-        )->method(
-            'getValue'
-        )->with(
-            Configuration::XML_FILESYSTEM_WRAPPER_PATH
-        )->will(
-            $this->returnValue(array(\Magento\Framework\Filesystem::HTTP => array('protocol' => 'http')))
-        );
-
-        /* Mock DirectoryList model */
-        $directoryList = $this->getMockBuilder(
-            'Magento\Framework\Filesystem\DirectoryList'
-        )->disableOriginalConstructor()->setMethods(
-            array('setDirectory', 'isConfigured', 'addProtocol', 'getConfig')
-        )->getMock();
-
-        $directoryList->expects(
-            $this->once()
-        )->method(
-            'addProtocol'
-        )->with(
-            \Magento\Framework\Filesystem::HTTP,
-            array('protocol' => 'http')
-        );
-
-        $directoryList->expects(
-            $this->atLeastOnce()
-        )->method(
-            'isConfigured'
-        )->with(
-            \Magento\Framework\App\Filesystem::PUB_DIR
-        )->will(
-            $this->returnValue($pubDirIsConfigured)
-        );
-
-        if ($pubDirIsConfigured) {
-            $directoryList->expects($this->once())
-                ->method('getConfig')
-                ->with(\Magento\Framework\App\Filesystem::PUB_DIR)
-                ->will($this->returnValue(['test_key' => 'test_value']));
-            $directoryList->expects($this->once())
-                ->method('setDirectory')
-                ->with(\Magento\Framework\App\Filesystem::PUB_DIR, ['uri' => '', 'test_key' => 'test_value']);
-        } else {
-            $directoryList->expects($this->once())
-                ->method('setDirectory')
-                ->with(\Magento\Framework\App\Filesystem::PUB_DIR, array('uri' => ''));
-        }
-
-        $this->dirListConfiguration = $objectManager->getObject(
-            'Magento\Framework\App\Filesystem\DirectoryList\Configuration',
-            array('config' => $config)
-        );
-        $this->assertNull($this->dirListConfiguration->configure($directoryList));
-    }
-
-    public function configureDataProvider()
-    {
-        return array(array('pubDirIsConfigured' => true), array('pubDirIsConfigured' => false));
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php
deleted file mode 100644
index ef893a633d00c52d934d86f13811dd301b920d72..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php
+++ /dev/null
@@ -1,234 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Framework\App\Filesystem\DirectoryList;
-
-use Magento\Framework\App\State;
-
-class VerificationTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * Test for createAndVerifyDirectories method
-     *
-     * @param string $mode
-     * @param array $expectedDirs
-     * @dataProvider createAndVerifyDirectoriesDataProvider
-     */
-    public function testCreateAndVerifyDirectories($mode, $expectedDirs)
-    {
-        $verification = $this->getVerificationInstance($expectedDirs, $mode);
-        $verification->createAndVerifyDirectories();
-    }
-
-    /**
-     * Data provider for testCreateAndVerifyDirectories
-     *
-     * @return array
-     */
-    public static function createAndVerifyDirectoriesDataProvider()
-    {
-        return array(
-            'developer mode' => array(
-                State::MODE_DEVELOPER,
-                array(
-                    \Magento\Framework\App\Filesystem::CACHE_DIR => array(true, true, 'base_dir/var/cache'),
-                    \Magento\Framework\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
-                    \Magento\Framework\App\Filesystem::SESSION_DIR => array(true, true, 'base_dir/var/session')
-                )
-            ),
-            'with_not_existing_dirs' => array(
-                State::MODE_DEFAULT,
-                array(
-                    \Magento\Framework\App\Filesystem::CACHE_DIR => array(false, true, 'base_dir/var/cache'),
-                    \Magento\Framework\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
-                    \Magento\Framework\App\Filesystem::SESSION_DIR => array(false, true, 'base_dir/var/session')
-                )
-            ),
-            'production mode' => array(
-                State::MODE_PRODUCTION,
-                array(
-                    \Magento\Framework\App\Filesystem::CACHE_DIR => array(true, true, 'base_dir/var/cache'),
-                    \Magento\Framework\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
-                    \Magento\Framework\App\Filesystem::SESSION_DIR => array(true, true, 'base_dir/var/session')
-                )
-            )
-        );
-    }
-
-    /**
-     * Test for createAndVerifyDirectories method if some directories are not writable
-     *
-     * @param string $mode
-     * @param array $expectedDirs
-     * @dataProvider notWritableDataProvider
-     * @expectedException \Magento\Framework\App\InitException
-     */
-    public function testNotWritable($mode, $expectedDirs)
-    {
-        $verification = $this->getVerificationInstance($expectedDirs, $mode);
-        $verification->createAndVerifyDirectories();
-    }
-
-    /**
-     * Data provider for testNotWritable
-     *
-     * @return array
-     */
-    public static function notWritableDataProvider()
-    {
-        return array(
-            'developer mode' => array(
-                State::MODE_DEVELOPER,
-                array(
-                    \Magento\Framework\App\Filesystem::CACHE_DIR => array(true, false, 'base_dir/var/cache'),
-                    \Magento\Framework\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
-                    \Magento\Framework\App\Filesystem::SESSION_DIR => array(true, false, 'base_dir/var/session')
-                )
-            )
-        );
-    }
-
-    /**
-     * Test for createAndVerifyDirectories method if some directories cannot be created
-     *
-     * @param string $mode
-     * @param array $expectedDirs
-     * @dataProvider createExceptionDataProvider
-     * @expectedException \Magento\Framework\App\InitException
-     */
-    public function testCreateException($mode, $expectedDirs)
-    {
-        $verification = $this->getVerificationInstance($expectedDirs, $mode);
-        $verification->createAndVerifyDirectories();
-    }
-
-    /**
-     * Data provider for testCreateException
-     *
-     * @return array
-     */
-    public static function createExceptionDataProvider()
-    {
-        return array(
-            'developer mode' => array(
-                State::MODE_DEVELOPER,
-                array(
-                    \Magento\Framework\App\Filesystem::CACHE_DIR => array(true, false, 'base_dir/var/cache'),
-                    \Magento\Framework\App\Filesystem::LOG_DIR => array(true, true, 'base_dir/var/log'),
-                    \Magento\Framework\App\Filesystem::SESSION_DIR => array(true, false, 'base_dir/var/session', true)
-                )
-            )
-        );
-    }
-
-    /**
-     * Get verification instance
-     *
-     * @param array $expectedDirs
-     * @param string $mode
-     * @return Verification
-     */
-    protected function getVerificationInstance(array $expectedDirs, $mode)
-    {
-        $filesystem = $this->getFilesystemMock($expectedDirs);
-        $appState = $this->getMock('Magento\Framework\App\State', array('getMode'), array(), '', false);
-        $appState->expects($this->once())->method('getMode')->will($this->returnValue($mode));
-        return new Verification($filesystem, $appState);
-    }
-
-    /**
-     * Get filesystem mock
-     *
-     * @param array $dirsToVerify
-     * @return \Magento\Framework\Filesystem | \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected function getFilesystemMock(array $dirsToVerify)
-    {
-        $filesystem = $this->getMock(
-            'Magento\Framework\App\Filesystem',
-            array('getDirectoryWrite', '__wakeup'),
-            array(),
-            '',
-            false
-        );
-        $valueMap = array();
-        foreach ($dirsToVerify as $code => $config) {
-            $createException = isset($config[3]) ? $config[3] : false;
-            $directory = $this->getDirectoryMock($config[0], $config[1], $config[2], $createException);
-            $valueMap[] = array($code, $directory);
-        }
-        $filesystem->expects(
-            $this->exactly(count($dirsToVerify))
-        )->method(
-            'getDirectoryWrite'
-        )->will(
-            $this->returnValueMap($valueMap)
-        );
-
-        return $filesystem;
-    }
-
-    /**
-     * Get directory mock
-     *
-     * @param bool $existing
-     * @param bool $writable
-     * @param string $absolutePath
-     * @param bool $createException
-     * @return \Magento\Framework\Filesystem\Directory\Write | \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected function getDirectoryMock($existing, $writable, $absolutePath, $createException)
-    {
-        $directory = $this->getMock(
-            'Magento\Framework\Filesystem\Directory\Write',
-            array('isExist', 'isWritable', 'getAbsolutePath', 'create'),
-            array(),
-            '',
-            false
-        );
-        $directory->expects($this->once())->method('isExist')->will($this->returnValue($existing));
-
-        if (!$existing) {
-            if (!$createException) {
-                $directory->expects($this->once())->method('create');
-            } else {
-                $directory->expects(
-                    $this->once()
-                )->method(
-                    'create'
-                )->will(
-                    $this->throwException(new \Magento\Framework\Filesystem\FilesystemException(''))
-                );
-            }
-            return $directory;
-        }
-
-        $directory->expects($this->once())->method('isWritable')->will($this->returnValue($writable));
-
-        if (!$writable) {
-            $directory->expects($this->once())->method('getAbsolutePath')->will($this->returnValue($absolutePath));
-        }
-
-        return $directory;
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..72c443b10dcc531b56155da81350a868bca225b0
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Framework\App\Filesystem;
+
+class DirectoryListTest extends \PHPUnit_Framework_TestCase
+{
+    public function testRoot()
+    {
+        $object = new DirectoryList('/root/dir');
+        $this->assertEquals($object->getRoot(), $object->getPath(DirectoryList::ROOT));
+    }
+
+    public function testDirectoriesCustomization()
+    {
+        $config = [
+            DirectoryList::APP => [DirectoryList::PATH => 'foo', DirectoryList::URL_PATH => 'bar'],
+            'unknown' => [DirectoryList::PATH => '/baz'],
+        ];
+        $object = new DirectoryList('/root/dir', $config);
+        $this->assertFileExists($object->getPath(DirectoryList::SYS_TMP));
+        $this->assertEquals('/root/dir/foo', $object->getPath(DirectoryList::APP));
+        $this->assertEquals('bar', $object->getUrlPath(DirectoryList::APP));
+        $this->setExpectedException(
+            '\Magento\Framework\Filesystem\FilesystemException',
+            "Unknown directory type: 'unknown'"
+        );
+        $object->getPath('unknown');
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php
deleted file mode 100644
index a0a868f23f5cae52f9bdc5a2a082443b9895515c..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @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\Framework\App;
-
-class FilesystemTest extends \PHPUnit_Framework_TestCase
-{
-    /** @var Filesystem */
-    protected $_filesystem;
-
-    /** @var \Magento\Framework\Filesystem\Directory\ReadFactory|\PHPUnit_Framework_MockObject_MockObject */
-    protected $_dirReadFactoryMock;
-
-    /** @var \Magento\Framework\Filesystem\Directory\WriteFactory|\PHPUnit_Framework_MockObject_MockObject */
-    protected $_dirWriteFactoryMock;
-
-    /** @var \Magento\Framework\App\Filesystem\DirectoryList|\PHPUnit_Framework_MockObject_MockObject  */
-    protected $_directoryListMock;
-
-    /** @var \Magento\Framework\Filesystem\File\ReadFactory|\PHPUnit_Framework_MockObject_MockObject  */
-    protected $_fileReadFactoryMock;
-
-    public function setUp()
-    {
-        $this->_dirReadFactoryMock = $this->getMock(
-            'Magento\Framework\Filesystem\Directory\ReadFactory',
-            array(),
-            array(),
-            '',
-            false
-        );
-        $this->_directoryListMock = $this->getMock(
-            'Magento\Framework\App\Filesystem\DirectoryList',
-            array(),
-            array(),
-            '',
-            false
-        );
-        $this->_dirWriteFactoryMock = $this->getMock(
-            'Magento\Framework\Filesystem\Directory\WriteFactory',
-            array(),
-            array(),
-            '',
-            false
-        );
-        $this->_fileReadFactoryMock = $this->getMock(
-            'Magento\Framework\Filesystem\File\ReadFactory',
-            array(),
-            array(),
-            '',
-            false
-        );
-
-        $this->_filesystem = new Filesystem(
-            $this->_directoryListMock,
-            $this->_dirReadFactoryMock,
-            $this->_dirWriteFactoryMock,
-            $this->_fileReadFactoryMock
-        );
-    }
-
-    public function testGetPath()
-    {
-        $this->_setupDirectoryListMock(array('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/Framework/App/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php
index 8deeb7f74a7e4cecc1c2a8107bc75a1673821afa..790e3fa7a77df3e92afd95350114cdc022fc50b3 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/HttpTest.php
@@ -29,112 +29,128 @@ class HttpTest extends \PHPUnit_Framework_TestCase
     /**
      * @var \Magento\TestFramework\Helper\ObjectManager
      */
-    protected $_objectManager;
+    protected $objectManager;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_responseMock;
+    protected $responseMock;
+
+    /**
+     * @var \Magento\Framework\App\Http
+     */
+    protected $http;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_filesystemMock;
+    protected $frontControllerMock;
 
     /**
-     * @var \Magento\Framework\App\Http
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $eventManagerMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_http;
+    protected $requestMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_frontControllerMock;
+    protected $objectManagerMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_eventManagerMock;
+    protected $areaListMock;
 
     /**
      * @var \PHPUnit_Framework_MockObject_MockObject
      */
-    protected $_requestMock;
+    protected $configLoaderMock;
 
     public function setUp()
     {
-        $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
-        $this->_requestMock = $this->getMockBuilder(
-            'Magento\Framework\App\Request\Http'
-        )->disableOriginalConstructor()->setMethods(['getFrontName'])->getMock();
-        $frontName = 'frontName';
-        $this->_requestMock->expects($this->once())->method('getFrontName')->will($this->returnValue($frontName));
-        $areaCode = 'areaCode';
-        $areaListMock = $this->getMockBuilder('Magento\Framework\App\AreaList')
+        $this->objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->requestMock = $this->getMockBuilder('Magento\Framework\App\Request\Http')
+            ->disableOriginalConstructor()
+            ->setMethods(['getFrontName'])
+            ->getMock();
+        $this->areaListMock = $this->getMockBuilder('Magento\Framework\App\AreaList')
             ->disableOriginalConstructor()
             ->setMethods(['getCodeByFrontName'])
             ->getMock();
-        $areaListMock->expects($this->once())->method('getCodeByFrontName')->with($frontName)->will(
-            $this->returnValue($areaCode)
-        );
-        $areaConfig = [];
-        $configLoaderMock = $this->getMockBuilder(
-            'Magento\Framework\App\ObjectManager\ConfigLoader'
-        )->disableOriginalConstructor()->setMethods(['load'])->getMock();
-        $configLoaderMock->expects($this->once())->method('load')->with($areaCode)->will(
-            $this->returnValue($areaConfig)
-        );
-        $objectManagerMock = $this->getMockBuilder('Magento\Framework\ObjectManager')
+        $this->configLoaderMock = $this->getMockBuilder('Magento\Framework\App\ObjectManager\ConfigLoader')
+            ->disableOriginalConstructor()
+            ->setMethods(['load'])
+            ->getMock();
+        $this->objectManagerMock = $this->getMockBuilder('Magento\Framework\ObjectManager')
             ->disableOriginalConstructor()
             ->setMethods(['configure', 'get', 'create'])
             ->getMock();
-        $objectManagerMock->expects($this->once())->method('configure')->with($areaConfig);
-        $this->_responseMock = $this->getMockBuilder('Magento\Framework\App\Response\Http')
+        $this->responseMock = $this->getMockBuilder('Magento\Framework\App\Response\Http')
             ->disableOriginalConstructor()
-            ->setMethods(['setHttpResponseCode', 'setBody', '__wakeup'])
+            ->setMethods(['setBody', '__wakeup', 'sendHeaders', 'sendResponse', 'setRedirect'])
             ->getMock();
-        $this->_frontControllerMock = $this->getMockBuilder(
-            'Magento\Framework\App\FrontControllerInterface'
-        )->disableOriginalConstructor()->setMethods(['dispatch'])->getMock();
-        $objectManagerMock->expects($this->once())
-            ->method('get')
-            ->with('Magento\Framework\App\FrontControllerInterface')
-            ->will($this->returnValue($this->_frontControllerMock));
-        $this->_frontControllerMock->expects($this->once())->method('dispatch')->with($this->_requestMock)->will(
-            $this->returnValue($this->_responseMock)
-        );
-        $this->_eventManagerMock = $this->getMockBuilder(
-            'Magento\Framework\Event\Manager'
-        )->disableOriginalConstructor()->setMethods(
-            ['dispatch']
-        )->getMock();
-        $this->_filesystemMock = $this->getMockBuilder(
-            'Magento\Framework\App\Filesystem'
-        )->disableOriginalConstructor()->setMethods(
-            ['getPath']
-        )->getMock();
-
-        $this->_http = $this->_objectManager->getObject(
+        $this->frontControllerMock = $this->getMockBuilder('Magento\Framework\App\FrontControllerInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['dispatch'])
+            ->getMock();
+        $this->eventManagerMock = $this->getMockBuilder('Magento\Framework\Event\Manager')
+            ->disableOriginalConstructor()
+            ->setMethods(['dispatch'])
+            ->getMock();
+
+        $this->http = $this->objectManager->getObject(
             'Magento\Framework\App\Http',
             [
-                'objectManager' => $objectManagerMock,
-                'eventManager' => $this->_eventManagerMock,
-                'areaList' => $areaListMock,
-                'request' => $this->_requestMock,
-                'response' => $this->_responseMock,
-                'configLoader' => $configLoaderMock,
-                'filesystem' => $this->_filesystemMock
+                'objectManager' => $this->objectManagerMock,
+                'eventManager' => $this->eventManagerMock,
+                'areaList' => $this->areaListMock,
+                'request' => $this->requestMock,
+                'response' => $this->responseMock,
+                'configLoader' => $this->configLoaderMock,
+                'filesystem' => $this->getMock('Magento\Framework\Filesystem', [], [], '', false),
             ]
         );
     }
 
+    /**
+     * Asserts mock objects with methods that are expected to be called when http->launch() is invoked.
+     */
+    private function setUpLaunch()
+    {
+        $frontName = 'frontName';
+        $areaCode = 'areaCode';
+        $this->requestMock->expects($this->once())->method('getFrontName')->will($this->returnValue($frontName));
+        $this->areaListMock->expects($this->once())
+            ->method('getCodeByFrontName')
+            ->with($frontName)->will($this->returnValue($areaCode));
+        $this->configLoaderMock->expects($this->once())
+            ->method('load')->with($areaCode)->will($this->returnValue([]));
+        $this->objectManagerMock->expects($this->once())->method('configure')->with([]);
+        $this->objectManagerMock->expects($this->once())
+            ->method('get')
+            ->with('Magento\Framework\App\FrontControllerInterface')
+            ->will($this->returnValue($this->frontControllerMock));
+        $this->frontControllerMock->expects($this->once())
+            ->method('dispatch')
+            ->with($this->requestMock)
+            ->will($this->returnValue($this->responseMock));
+    }
+
     public function testLaunchSuccess()
     {
-        $this->_eventManagerMock->expects($this->once())->method('dispatch')->with(
-            'controller_front_send_response_before',
-            array('request' => $this->_requestMock, 'response' => $this->_responseMock)
-        );
-        $this->assertSame($this->_responseMock, $this->_http->launch());
+        $this->setUpLaunch();
+        $this->eventManagerMock->expects($this->once())
+            ->method('dispatch')
+            ->with(
+                'controller_front_send_response_before',
+                array('request' => $this->requestMock, 'response' => $this->responseMock)
+            );
+        $this->assertSame($this->responseMock, $this->http->launch());
     }
 
     /**
@@ -143,13 +159,27 @@ class HttpTest extends \PHPUnit_Framework_TestCase
      */
     public function testLaunchException()
     {
-        $this->_frontControllerMock->expects($this->once())->method('dispatch')->with($this->_requestMock)->will(
+        $this->setUpLaunch();
+        $this->frontControllerMock->expects($this->once())->method('dispatch')->with($this->requestMock)->will(
             $this->returnCallback(
                 function () {
                     throw new \Exception('Message');
                 }
             )
         );
-        $this->_http->launch();
+        $this->http->launch();
+    }
+
+    public function testNotInstalledException()
+    {
+        $expectedException = new \Exception('Test Message');
+        $bootstrapMock = $this->getMock('Magento\Framework\App\Bootstrap', [], [], '', false);
+        $bootstrapMock->expects($this->once())->method('isDeveloperMode')->willReturn(true);
+        $bootstrapMock->expects($this->once())->method('getErrorCode')->willReturn(Bootstrap::ERR_IS_INSTALLED);
+
+        $path = $this->http->getInstallerRedirectPath([]);
+        $this->responseMock->expects($this->once())->method('setRedirect')->with($path)->will($this->returnSelf());
+        $this->responseMock->expects($this->once())->method('sendHeaders')->will($this->returnSelf());
+        $this->assertTrue($this->http->catchException($bootstrapMock, $expectedException));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Language/DictionaryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Language/DictionaryTest.php
index 0ba2fab53d11f985158cc74721c0464611767107..37c46ed165a31c98a687912b8bcc6388a0f74ea1 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Language/DictionaryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Language/DictionaryTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\App\Language;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class DictionaryTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -44,10 +46,10 @@ class DictionaryTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->dir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', [], [], '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', [], [], '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::LOCALE_DIR)
+            ->with(DirectoryList::LOCALE)
             ->will($this->returnValue($this->dir));
         $this->configFactory = $this->getMockBuilder('\Magento\Framework\App\Language\ConfigFactory')
             ->setMethods(['create'])
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/MaintenanceModeTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/MaintenanceModeTest.php
index 31f77f1d04a08786b64a311a9af52a1dcae2b11d..eb987458329c732a7d600386b6b3c9306718eb23 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/MaintenanceModeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/MaintenanceModeTest.php
@@ -39,7 +39,7 @@ class MaintenanceModeTest extends \PHPUnit_Framework_TestCase
     protected function setup()
     {
         $this->flagDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', [], [], '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', [], [], '', false);
         $filesystem->expects($this->any())
             ->method('getDirectoryWrite')
             ->will($this->returnValue($this->flagDir));
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php
index d5307398d513c03cbb0f0e0aa8d8f811907656bf..7584186813d02cf5caabcc1d25fe4719771468e4 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManager/ConfigLoaderTest.php
@@ -30,6 +30,11 @@ class ConfigLoaderTest extends \PHPUnit_Framework_TestCase
      */
     protected $_model;
 
+    /**
+     * @var \Magento\Framework\ObjectManager\Config\Reader\DomFactory
+     */
+    protected $_readerFactoryMock;
+
     /**
      * @var \Magento\Framework\ObjectManager\Config\Reader\Dom
      */
@@ -50,8 +55,26 @@ class ConfigLoaderTest extends \PHPUnit_Framework_TestCase
             false
         );
 
+        $this->_readerFactoryMock = $this->getMock(
+            'Magento\Framework\ObjectManager\Config\Reader\DomFactory',
+            array('create'),
+            array(),
+            '',
+            false
+        );
+
+        $this->_readerFactoryMock->expects(
+            $this->any()
+        )->method(
+            'create'
+        )->will(
+            $this->returnValue($this->_readerMock)
+        );
+
         $this->_cacheMock = $this->getMock('Magento\Framework\App\Cache\Type\Config', array(), array(), '', false);
-        $this->_model = new \Magento\Framework\App\ObjectManager\ConfigLoader($this->_cacheMock, $this->_readerMock);
+        $this->_model = new \Magento\Framework\App\ObjectManager\ConfigLoader(
+            $this->_cacheMock, $this->_readerFactoryMock
+        );
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php
index 561461936f62fa07bed04409491591ebabd874e1..ada0f7c18cf2581fd4a24a7f5f59cd70e3b752ad 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php
@@ -62,7 +62,7 @@ class ObjectManagerFactoryTest extends \PHPUnit_Framework_TestCase
     public function testCreateObjectManagerFactoryCouldBeOverridden()
     {
         $rootPath = __DIR__ . '/_files/';
-        $factory = new ObjectManagerFactory();
-        $factory->create($rootPath, array(), false);
+        $factory = Bootstrap::createObjectManagerFactory($rootPath, []);
+        $factory->create([], false);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php
index f2382261466146346cf13951bd1ecb79111c800e..d6709c7f3d26f828fbdfdef7a9a2575854f433d6 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Request/HttpTest.php
@@ -34,17 +34,17 @@ class HttpTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\Route\ConfigInterface\Proxy | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $_routerListMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\App\Request\PathInfoProcessorInterface | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $_infoProcessorMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Stdlib\CookieManager | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $_cookieManagerMock;
 
@@ -57,7 +57,13 @@ class HttpTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
 
-        $this->_routerListMock = $this->getMock('Magento\Framework\App\Route\ConfigInterface');
+        $this->_routerListMock = $this->getMock(
+            'Magento\Framework\App\Route\ConfigInterface\Proxy',
+            array('getRouteFrontName', 'getRouteByFrontName', '__wakeup'),
+            array(),
+            '',
+            false
+        );
         $this->_infoProcessorMock = $this->getMock('Magento\Framework\App\Request\PathInfoProcessorInterface');
         $this->_infoProcessorMock->expects($this->any())->method('process')->will($this->returnArgument(1));
         $this->_cookieManagerMock = $this->getMock('Magento\Framework\Stdlib\CookieManager');
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php
index 04640c4775f97cd067f83d29a6b06df176663e9d..3b0f9f2a945a9b7378bb3d85dc222236c3168b5a 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Response/Http/FileFactoryTest.php
@@ -48,7 +48,7 @@ class FileFactoryTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->_fileSystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryWrite'),
             array(),
             '',
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigInterface/ProxyTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigInterface/ProxyTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..933e0d80fbaecd460a7a87cb7aee10a9be742b4d
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigInterface/ProxyTest.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Framework\App\Route\ConfigInterface;
+
+class ProxyTest extends \PHPUnit_Framework_TestCase
+{
+
+    /**
+     * @var \Magento\Framework\App\Route\ConfigInterface\Proxy
+     */
+    protected $_proxy;
+
+    /**
+     * @var \Magento\Framework\App\Route\ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_object;
+
+    public function setUp()
+    {
+        $this->_object = $this->getMock(
+            '\Magento\Framework\App\Route\ConfigInterface',
+            ['getRouteFrontName', 'getRouteByFrontName', 'getModulesByFrontName'],
+            [],
+            '',
+            false
+        );
+
+        $objectManager = $this->getMock('\Magento\Framework\ObjectManager\ObjectManager', ['get'], [], '', false);
+        $objectManager->expects($this->once())
+            ->method('get')
+            ->with('Magento\Framework\App\Route\ConfigInterface')
+            ->will($this->returnValue($this->_object));
+
+        $this->_proxy = new \Magento\Framework\App\Route\ConfigInterface\Proxy(
+            $objectManager,
+            'Magento\Framework\App\Route\ConfigInterface'
+        );
+    }
+
+    public function testGetRouteFrontName()
+    {
+        $routeId = 1;
+        $scope = null;
+        $this->_object->expects($this->once())->method('getRouteFrontName')->with($routeId, $scope);
+        $this->_proxy->getRouteFrontName($routeId, $scope);
+    }
+
+    public function testGetRouteByFrontName()
+    {
+        $frontName = 'route';
+        $scope = null;
+        $this->_object->expects($this->once())->method('getRouteByFrontName')->with($frontName, $scope);
+        $this->_proxy->getRouteByFrontName($frontName, $scope);
+    }
+
+    public function testGetModulesByFrontName()
+    {
+        $frontName = 'route';
+        $scope = null;
+        $this->_object->expects($this->once())->method('getModulesByFrontName')->with($frontName, $scope);
+        $this->_proxy->getModulesByFrontName($frontName, $scope);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php
index 2e4d1b7375891833adcfbb2cb48d429edd2ed8c5..3529f1ce6e3af2014cd46503620793263a6d65c7 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Asset/PublisherTest.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\App\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\View\Asset\Publisher;
 
 class PublisherTest extends \PHPUnit_Framework_TestCase
@@ -34,7 +35,7 @@ class PublisherTest extends \PHPUnit_Framework_TestCase
     private $appState;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     private $filesystem;
 
@@ -61,7 +62,7 @@ class PublisherTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->appState = $this->getMock('Magento\Framework\App\State', array(), array(), '', false);
-        $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->object = new Publisher($this->appState, $this->filesystem);
 
         $this->rootDirWrite = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface');
@@ -69,13 +70,13 @@ class PublisherTest extends \PHPUnit_Framework_TestCase
         $this->staticDirWrite = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface');
         $this->filesystem->expects($this->any())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->will($this->returnValue($this->staticDirRead));
         $this->filesystem->expects($this->any())
             ->method('getDirectoryWrite')
             ->will($this->returnValueMap([
-                [\Magento\Framework\App\Filesystem::ROOT_DIR, $this->rootDirWrite],
-                [\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->staticDirWrite],
+                [DirectoryList::ROOT, $this->rootDirWrite],
+                [DirectoryList::STATIC_VIEW, $this->staticDirWrite],
             ]));
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php
index a43ffa83b78a6e14b6289ac9ac55bd972f5bd6c5..8db243909a86eb9810f425299d1e00f6350fb5bd 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/App/View/Deployment/Version/Storage/FileTest.php
@@ -39,7 +39,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->directory = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface');
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem
             ->expects($this->once())
             ->method('getDirectoryWrite')
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php
index 7ea99ba9d5af4039b8e9143369893d6bae1a8847..5722775e584ddf854691600f4b65b3d7f1f36a8f 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/MediaTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Backup;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 require_once __DIR__ . '/_files/Fs.php';
 require_once __DIR__ . '/_files/Helper.php';
 require_once __DIR__ . '/_files/io.php';
@@ -30,12 +32,12 @@ require_once __DIR__ . '/_files/io.php';
 class MediaTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystemMock;
 
     /**
-     * @var \Magento\Framework\Backup\Factory
+     * @var \Magento\Framework\Backup\Factory|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_backupFactoryMock;
 
@@ -49,6 +51,11 @@ class MediaTest extends \PHPUnit_Framework_TestCase
         require __DIR__ . '/_files/app_dirs.php';
     }
 
+    public static function tearDownAfterClass()
+    {
+        require __DIR__ . '/_files/app_dirs_rollback.php';
+    }
+
     protected function setUp()
     {
         $this->_backupDbMock = $this->getMock('Magento\Framework\Backup\Db', array(), array(), '', false);
@@ -70,7 +77,12 @@ class MediaTest extends \PHPUnit_Framework_TestCase
 
         $this->_backupDbMock->expects($this->any())->method('create')->will($this->returnValue(true));
 
-        $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
+        $dirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
+        $this->_filesystemMock->expects($this->any())
+            ->method('getDirectoryWrite')
+            ->will($this->returnValue($dirMock));
+
         $this->_backupFactoryMock = $this->getMock('Magento\Framework\Backup\Factory', array(), array(), '', false);
         $this->_backupFactoryMock->expects(
             $this->once()
@@ -89,7 +101,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase
     {
         $this->_backupFactoryMock->expects($this->once())->method('create');
 
-        $rootDir = TESTS_TEMP_DIR . '/Magento/Backup/data';
+        $rootDir = str_replace('\\', '/', TESTS_TEMP_DIR) . '/Magento/Backup/data';
 
         $model = new \Magento\Framework\Backup\Media($this->_filesystemMock, $this->_backupFactoryMock);
         $model->setRootDir($rootDir);
@@ -101,18 +113,14 @@ class MediaTest extends \PHPUnit_Framework_TestCase
 
         $ignorePaths = $model->getIgnorePaths();
 
-        $rootDir = str_replace('\\', '/', $rootDir);
-
-        foreach ($ignorePaths as &$path) {
-            if (strpos($path, '~tmp-') || strpos($path, '_media')) {
-                unlink($path);
-            }
-            $path = str_replace('\\', '/', $path);
-        }
-
-        $this->assertTrue(in_array($rootDir, $ignorePaths));
-        $this->assertTrue(in_array($rootDir . '/code', $ignorePaths));
-        $this->assertTrue(in_array($rootDir . '/var/log', $ignorePaths));
+        $expected = [
+            $rootDir,
+            $rootDir . '/app',
+            $rootDir . '/var/log',
+        ];
+        $ignored = array_intersect($expected, $ignorePaths);
+        sort($ignored);
+        $this->assertEquals($expected, $ignored);
     }
 
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php
index b7381a0a0df8f7434d7177f347a8832142ece321..853769f53fe065a036693241ee7a0f392046faa1 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/NomediaTest.php
@@ -30,7 +30,7 @@ require_once __DIR__ . '/_files/io.php';
 class NomediaTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystemMock;
 
@@ -49,6 +49,11 @@ class NomediaTest extends \PHPUnit_Framework_TestCase
         require __DIR__ . '/_files/app_dirs.php';
     }
 
+    public static function tearDownAfterClass()
+    {
+        require __DIR__ . '/_files/app_dirs_rollback.php';
+    }
+
     protected function setUp()
     {
         $this->_backupDbMock = $this->getMock('Magento\Framework\Backup\Db', array(), array(), '', false);
@@ -70,7 +75,12 @@ class NomediaTest extends \PHPUnit_Framework_TestCase
 
         $this->_backupDbMock->expects($this->any())->method('create')->will($this->returnValue(true));
 
-        $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
+        $dirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
+        $this->_filesystemMock->expects($this->any())
+            ->method('getDirectoryWrite')
+            ->will($this->returnValue($dirMock));
+
         $this->_backupFactoryMock = $this->getMock('Magento\Framework\Backup\Factory', array(), array(), '', false);
         $this->_backupFactoryMock->expects(
             $this->once()
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php
index 80e756d1df0ace106ad72de4c88ca5c994f784d4..e43808d5b2f56068f2a2301935add1a9670ee79e 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/SnapshotTest.php
@@ -27,7 +27,7 @@ class SnapshotTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetDbBackupFilename()
     {
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $backupFactory = $this->getMock('Magento\Framework\Backup\Factory', array(), array(), '', false);
         $manager = $this->getMock(
             'Magento\Framework\Backup\Snapshot',
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs.php
index cf06fa3abe8fd69c7662a5462d7e536a91f5634d..023f62db84e1e98175bfddce4ff91c932cb86308 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs.php
@@ -25,7 +25,7 @@
 /**
  * Create directories structure as in application
  */
-$appDirs = ['code', 'media', 'pub/media', 'var/log'];
+$appDirs = ['app', 'pub/media', 'var/log'];
 foreach ($appDirs as $dir) {
     $appDir = TESTS_TEMP_DIR . '/Magento/Backup/data/' . $dir;
     if (!is_dir($appDir)) {
diff --git a/app/code/Magento/Checkout/Controller/Onepage/Progress.php b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs_rollback.php
similarity index 68%
rename from app/code/Magento/Checkout/Controller/Onepage/Progress.php
rename to dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs_rollback.php
index 77cc210ae39d0f17cb91498dd4562d240189e3d1..bb3ec04b8aa7d3825fc622c54c660420004fdcd3 100644
--- a/app/code/Magento/Checkout/Controller/Onepage/Progress.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs_rollback.php
@@ -1,7 +1,5 @@
 <?php
 /**
- * Checkout status block
- *
  * Magento
  *
  * NOTICE OF LICENSE
@@ -23,20 +21,21 @@
  * @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\Checkout\Controller\Onepage;
 
-class Progress extends \Magento\Checkout\Controller\Onepage
-{
-    /**
-     * {@inheritdoc}
-     */
-    public function execute()
-    {
-        if ($this->_expireAjax()) {
-            return;
-        }
-        $this->_view->addPageLayoutHandles();
-        $this->_view->loadLayout(false);
-        $this->_view->renderLayout();
+/**
+ * Cleanup
+ */
+$appDirs = ['app', 'pub/media', 'pub', 'var/log', 'var'];
+foreach ($appDirs as $dir) {
+    $appDir = TESTS_TEMP_DIR . '/Magento/Backup/data/' . $dir;
+    if (is_dir($appDir)) {
+        rmdir($appDir);
     }
 }
+
+$files = glob(TESTS_TEMP_DIR . '/Magento/Backup/data/*');
+foreach ($files as $file) {
+    unlink($file);
+}
+rmdir(TESTS_TEMP_DIR . '/Magento/Backup/data');
+rmdir(TESTS_TEMP_DIR . '/Magento/Backup');
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php
index 0e8990bd2b345eed31e089a7db41d3304d88dcce..e5ddefbf8e9ae2ca8d0ec5b391250c86427f69e0 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Code/GeneratorTest.php
@@ -59,7 +59,7 @@ class GeneratorTest extends \PHPUnit_Framework_TestCase
     protected $ioObjectMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\Filesystem
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem
      */
     protected $filesystemMock;
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php
index 3b6cd9e33bcde1ecd0d4179b0750cc9ba195ab5b..2149e59d0ef0da336de56bb751a3d025a3c4d7bb 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/ReadTest.php
@@ -67,9 +67,9 @@ class ReadTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->read = new \Magento\Framework\Filesystem\Directory\Read(
-            array('path' => $this->path),
             $this->fileFactory,
-            $this->driver
+            $this->driver,
+            $this->path
         );
     }
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php
index b1c4bb7ff7b014a903f12a60877240669b21f8df..fd058af0cdf24dcaf7e0091961746ead1b98b769 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Directory/WriteTest.php
@@ -60,9 +60,9 @@ class WriteTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->write = new \Magento\Framework\Filesystem\Directory\Write(
-            array(),
             $this->fileFactory,
             $this->driver,
+            null,
             'cool-permissions'
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php
index a7c9b1efc03400d423250572224ac58ebb298812..97d992cbd50c32d389100430f811dca93dc36d08 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DirectoryListTest.php
@@ -23,145 +23,105 @@
  */
 namespace Magento\Framework\Filesystem;
 
-use Magento\Framework\Filesystem;
-use Magento\Framework\App\Filesystem as AppFilesystem;
-
 class DirectoryListTest extends \PHPUnit_Framework_TestCase
 {
-    /**
-     * Test for add directory and getConfig methods
-     *
-     * @dataProvider addDirectoryGetConfigDataProvider
-     * @param string $root
-     * @param array $directories
-     * @param array $configs
-     * @param array $expectedConfig
-     */
-    public function testAddDirectoryGetConfig($root, array $directories, array $configs, array $expectedConfig)
+    public function testGetDefaultConfig()
     {
-        $directoryList = new DirectoryList($root, $directories);
-        foreach ($configs as $code => $config) {
-            $directoryList->addDirectory($code, $config);
-            $this->assertEquals($expectedConfig[$code], $directoryList->getConfig($code));
-        }
+        $this->assertArrayHasKey(DirectoryList::SYS_TMP, DirectoryList::getDefaultConfig());
     }
 
-    public function addDirectoryGetConfigDataProvider()
+    public function testGetters()
     {
-        return array(
-            'static_view' => array(
-                __DIR__,
-                array(),
-                array(
-                    'custom2_' . AppFilesystem::STATIC_VIEW_DIR => array(
-                        'path' => 'some/static',
-                        'uri' => 'some/static',
-                        'permissions' => 0777,
-                        'read_only' => true,
-                        'allow_create_dirs' => true
-                    )
-                ),
-                array(
-                    'custom2_' . AppFilesystem::STATIC_VIEW_DIR => array(
-                        'path' => str_replace('\\', '/', __DIR__ . '/some/static'),
-                        'uri' => 'some/static',
-                        'permissions' => 0777,
-                        'read_only' => true,
-                        'allow_create_dirs' => true
-                    )
-                ),
-            )
-        );
+        $customDirs = [
+            'foo' => [DirectoryList::PATH => '/foo/dir'],
+            DirectoryList::SYS_TMP => [DirectoryList::PATH => '/bar/dir', DirectoryList::URL_PATH => 'bar']
+        ];
+        $object = new DirectoryList('/root/dir', $customDirs);
+        $this->assertEquals('/bar/dir', $object->getPath(DirectoryList::SYS_TMP));
+        $this->assertEquals('bar', $object->getUrlPath(DirectoryList::SYS_TMP));
+        $this->assertEquals('/root/dir', $object->getRoot());
     }
 
     /**
+     * @param string $method
      * @expectedException \Magento\Framework\Filesystem\FilesystemException
+     * @expectedExceptionMessage Unknown directory type: 'foo'
+     * @dataProvider assertCodeDataProvider
      */
-    public function testAddDefinedDirectory()
+    public function testAssertCode($method)
     {
-        $directories = array(AppFilesystem::STATIC_VIEW_DIR => array('path' => ''));
-        $directoryList = new DirectoryList(__DIR__, $directories);
-        $directoryList->addDirectory(AppFilesystem::STATIC_VIEW_DIR, array('path' => ''));
+        $object = new DirectoryList('/root/dir');
+        $object->$method('foo');
     }
 
     /**
-     * Test for creating DirectoryList with invalid URI
-     *
-     * @param string $code
-     * @param string $value
-     * @expectedException \InvalidArgumentException
-     * @dataProvider invalidUriDataProvider
+     * @return array
      */
-    public function testInvalidUri($code, $value)
+    public function assertCodeDataProvider()
     {
-        new DirectoryList(__DIR__, array($code => array('uri' => $value)));
+        return [['getPath', 'getUrlPath']];
     }
 
     /**
-     * Data provider for testInvalidUri
-     *
-     * @return array
+     * @param array $config
+     * @param string|bool $expected
+     * @dataProvider getUrlPathDataProvider
      */
-    public function invalidUriDataProvider()
+    public function testGetUrlPath($config, $expected)
     {
-        return array(
-            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')
-        );
+        $object = new DirectoryList('/root/dir', $config);
+        $this->assertEquals($expected, $object->getUrlPath(DirectoryList::SYS_TMP));
     }
 
     /**
-     * Test for getting uri from DirectoryList
+     * @return array
      */
-    public function testGetUri()
+    public function getUrlPathDataProvider()
+    {
+        return [
+            [[], false],
+            [[DirectoryList::SYS_TMP => [DirectoryList::URL_PATH => 'url/path']], 'url/path'],
+        ];
+    }
+
+    public function testFilterPath()
     {
-        $dir = new DirectoryList(
-            __DIR__,
-            array(
-                AppFilesystem::PUB_DIR => array('uri' => ''),
-                AppFilesystem::MEDIA_DIR => array('uri' => 'test'),
-                'custom' => array('uri' => 'test2')
-            )
-        );
+        $object = new DirectoryList('/root/dir', [DirectoryList::SYS_TMP => [DirectoryList::PATH => 'C:\Windows\Tmp']]);
+        $this->assertEquals('C:/Windows/Tmp', $object->getPath(DirectoryList::SYS_TMP));
+    }
 
-        $this->assertEquals('test2', $dir->getConfig('custom')['uri']);
-        $this->assertEquals('', $dir->getConfig(AppFilesystem::PUB_DIR)['uri']);
-        $this->assertEquals('test', $dir->getConfig(AppFilesystem::MEDIA_DIR)['uri']);
+    public function testPrependRoot()
+    {
+        $object = new DirectoryList('/root/dir', [DirectoryList::SYS_TMP => [DirectoryList::PATH => 'tmp']]);
+        $this->assertEquals('/root/dir/tmp', $object->getPath(DirectoryList::SYS_TMP));
     }
 
     /**
-     * Test for getting directory path from DirectoryList
+     * @param string $value
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage URL path must be relative directory path in lowercase with '/' directory separator:
+     * @dataProvider assertUrlPathDataProvider
      */
-    public function testGetDir()
+    public function testAssertUrlPath($value)
     {
-        $newRoot = __DIR__ . '/root';
-        $newMedia = __DIR__ . '/media';
-        $dir = new DirectoryList(
-            __DIR__,
-            array(
-                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(AppFilesystem::ROOT_DIR)['path']);
-        $this->assertEquals(str_replace('\\', '/', $newMedia), $dir->getConfig(AppFilesystem::MEDIA_DIR)['path']);
+        new DirectoryList('/root/dir', [DirectoryList::SYS_TMP => [DirectoryList::URL_PATH => $value]]);
     }
 
-    public function testIsConfigured()
+    /**
+     * @return array
+     */
+    public function assertUrlPathDataProvider()
     {
-        $dir = new DirectoryList(__DIR__, array(AppFilesystem::PUB_DIR => array('uri' => '')));
-
-        $this->assertTrue($dir->isConfigured(AppFilesystem::PUB_DIR));
-        $this->assertFalse($dir->isConfigured(AppFilesystem::MEDIA_DIR));
+        return [
+            ['/'],
+            ['//'],
+            ['/value'],
+            ['value/'],
+            ['/value/'],
+            ['one\\two'],
+            ['../dir'],
+            ['./dir'],
+            ['one/../two']
+        ];
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php
deleted file mode 100644
index 6c053cb02a245a767fae5bb9e1c7afd7f8144156..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Framework\Filesystem;
-
-use Magento\Framework\App\Filesystem\DirectoryList;
-
-/**
- * Class DriverFactoryTest
- */
-class DriverFactoryTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var DirectoryList | \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $directoryList;
-
-    /**
-     * @var DriverFactory
-     */
-    protected $driverFactory;
-
-    protected function setUp()
-    {
-        $this->directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false);
-        $this->driverFactory = new DriverFactory($this->directoryList);
-    }
-
-    public function testGetByProtocolConfig()
-    {
-        $protocolCode = 'protocol';
-        $expectedDriverClass = '\Magento\Framework\Filesystem\Driver\Zlib';
-        $protocolConfig = ['driver' => $expectedDriverClass];
-
-        $this->directoryList->expects($this->once())
-            ->method('getProtocolConfig')
-            ->with($protocolCode)
-            ->will($this->returnValue($protocolConfig));
-
-        $this->assertInstanceOf($expectedDriverClass, $this->driverFactory->get($protocolCode));
-    }
-
-    public function testGetSpecifiedDriver()
-    {
-        $driverClass = '\Magento\Framework\Filesystem\Driver\Http';
-        $this->assertInstanceOf($driverClass, $this->driverFactory->get(null, $driverClass));
-    }
-
-    public function testGetDefault()
-    {
-        $this->assertInstanceOf('\Magento\Framework\Filesystem\Driver\File', $this->driverFactory->get());
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverPoolTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..9880f30d58ab0a9ddd12edd56056b0712e280a8b
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverPoolTest.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright  Copyright (c) 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\Framework\Filesystem;
+
+class DriverPoolTest extends \PHPUnit_Framework_TestCase
+{
+    public function testGetDriver()
+    {
+        $object = new DriverPool;
+        foreach ([DriverPool::FILE, DriverPool::HTTP, DriverPool::HTTPS, DriverPool::ZLIB] as $code) {
+            $this->assertInstanceOf('\Magento\Framework\Filesystem\DriverInterface', $object->getDriver($code));
+        }
+        $default = $object->getDriver('');
+        $this->assertInstanceOf('\Magento\Framework\Filesystem\Driver\File', $default);
+        $this->assertSame($default, $object->getDriver(''));
+    }
+
+    public function testCustomDriver()
+    {
+        $customOne = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\DriverInterface');
+        $customTwo = get_class($this->getMockForAbstractClass('\Magento\Framework\Filesystem\DriverInterface'));
+        $object = new DriverPool(['customOne' => $customOne, 'customTwo' => $customTwo]);
+        $this->assertSame($customOne, $object->getDriver('customOne'));
+        $this->assertInstanceOf('\Magento\Framework\Filesystem\DriverInterface', $object->getDriver('customOne'));
+        $this->assertEquals($customTwo, get_class($object->getDriver('customTwo')));
+        $this->assertInstanceOf('\Magento\Framework\Filesystem\DriverInterface', $object->getDriver('customTwo'));
+    }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     * @expectedExceptionMessage The specified type 'stdClass' does not implement DriverInterface.
+     */
+    public function testCustomDriverException()
+    {
+        new DriverPool(['custom' => new \StdClass]);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php
index 9675955d79c474d102447478f644fc6049f09bdf..8100f3e5015de141591cca4fc29f102252148d2f 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/ReadFactoryTest.php
@@ -23,60 +23,52 @@
  */
 namespace Magento\Framework\Filesystem\File;
 
+use Magento\Framework\Filesystem\DriverPool;
+
 /**
  * Class ReadFactoryTest
  */
 class ReadFactoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\Filesystem\DriverFactory | \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $driverFactory;
-
-    /**
-     * @var WriteFactory
-     */
-    protected $factory;
-
-    public function setUp()
-    {
-        $this->driverFactory = $this->getMock('Magento\Framework\Filesystem\DriverFactory', [], [], '', false);
-        $this->factory = new ReadFactory($this->driverFactory);
-    }
-
-    /**
-     * @dataProvider createProvider
      * @param string|null $protocol
+     * @param \PHPUnit_Framework_MockObject_MockObject|null $driver
+     * @dataProvider createProvider
      */
-    public function testCreate($protocol)
+    public function testCreate($protocol, $driver)
     {
-        $path = 'path';
-        $directoryDriver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
-        $directoryDriver->expects($this->once())
-            ->method('isExists')
-            ->will($this->returnValue(true));
-
+        $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']);
         if ($protocol) {
-            $this->driverFactory->expects($this->once())
-                ->method('get')
-                ->with($protocol, get_class($directoryDriver))
-                ->will($this->returnValue($directoryDriver));
+            $driverMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
+            $driverMock->expects($this->any())->method('isExists')->willReturn(true);
+            $driverPool->expects($this->once())->method('getDriver')->willReturn($driverMock);
         } else {
-            $this->driverFactory->expects($this->never())
-                ->method('get');
+            $driverPool->expects($this->never())->method('getDriver');
         }
-
-        $this->assertInstanceOf(
-            'Magento\Framework\Filesystem\File\Read',
-            $this->factory->create($path, $protocol, $directoryDriver)
-        );
+        $factory = new ReadFactory($driverPool);
+        $result = $factory->create('path', $protocol, $driver);
+        $this->assertInstanceOf('Magento\Framework\Filesystem\File\Read', $result);
     }
 
+    /**
+     * @return array
+     */
     public function createProvider()
     {
+        $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
+        $driver->expects($this->any())->method('isExists')->willReturn(true);
         return [
-            [null],
-            ['custom_protocol']
+            [null, $driver],
+            ['custom_protocol', null]
         ];
     }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testCreateException()
+    {
+        $factory = new ReadFactory(new DriverPool);
+        $factory->create('path');
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php
index ad0db2b3f1c4c2581aebd591ba3ee4652bece22c..574f868dfb4feea05136cedbd468dee7672f3ea1 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/File/WriteFactoryTest.php
@@ -23,58 +23,63 @@
  */
 namespace Magento\Framework\Filesystem\File;
 
+use Magento\Framework\Filesystem\DriverPool;
+
 /**
  * Class WriteFactoryTest
  */
 class WriteFactoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\Filesystem\DriverFactory | \PHPUnit_Framework_MockObject_MockObject
+     * @param string|null $protocol
+     * @param \PHPUnit_Framework_MockObject_MockObject|null $driver
+     * @dataProvider createProvider
      */
-    protected $driverFactory;
+    public function testCreate($protocol, $driver)
+    {
+        $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']);
+        if ($protocol) {
+            $driverMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
+            $driverMock->expects($this->any())->method('isExists')->willReturn(true);
+            $driverPool->expects($this->once())->method('getDriver')->willReturn($driverMock);
+        } else {
+            $driverPool->expects($this->never())->method('getDriver');
+        }
+        $factory = new WriteFactory($driverPool);
+        $result = $factory->create('path', $protocol, $driver);
+        $this->assertInstanceOf('Magento\Framework\Filesystem\File\Write', $result);
+    }
 
     /**
-     * @var WriteFactory
+     * @return array
      */
-    protected $factory;
-
-    public function setUp()
+    public function createProvider()
     {
-        $this->driverFactory = $this->getMock('Magento\Framework\Filesystem\DriverFactory', [], [], '', false);
-        $this->factory = new WriteFactory($this->driverFactory);
+        $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
+        $driver->expects($this->any())->method('isExists')->willReturn(true);
+        return [
+            [null, $driver],
+            ['custom_protocol', null]
+        ];
     }
 
     /**
-     * @dataProvider createProvider
-     * @param string|null $protocol
+     * @expectedException \InvalidArgumentException
      */
-    public function testCreate($protocol)
+    public function testCreateException()
     {
-        $path = 'path';
-        $directoryDriver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
-        $mode = 'a+';
-
-        if ($protocol) {
-            $this->driverFactory->expects($this->once())
-                ->method('get')
-                ->with($protocol, get_class($directoryDriver))
-                ->will($this->returnValue($directoryDriver));
-        } else {
-            $this->driverFactory->expects($this->never())
-                ->method('get');
-        }
-
-        $this->assertInstanceOf(
-            'Magento\Framework\Filesystem\File\Write',
-            $this->factory->create($path, $protocol, $directoryDriver, $mode)
-        );
+        $factory = new WriteFactory(new DriverPool);
+        $factory->create('path');
     }
 
-    public function createProvider()
+    public function testCreateWithMode()
     {
-        return [
-            [null],
-            ['custom_protocol']
-        ];
+        $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
+        $driver->expects($this->any())->method('isExists')->willReturn(false);
+        $driverPool = $this->getMock('Magento\Framework\Filesystem\DriverPool', ['getDriver']);
+        $driverPool->expects($this->once())->method('getDriver')->with('protocol')->willReturn($driver);
+        $factory = new WriteFactory($driverPool);
+        $result = $factory->create('path', 'protocol', null, 'a+');
+        $this->assertInstanceOf('Magento\Framework\Filesystem\File\Write', $result);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php
deleted file mode 100644
index a54272b76d41d89105c9e1af2347d5954fe5c34c..0000000000000000000000000000000000000000
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @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\Framework\Filesystem;
-
-use Magento\Framework\App\Filesystem\DirectoryList;
-
-/**
- * Class WrapperFactoryTest
- */
-class WrapperFactoryTest extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * @var DirectoryList | \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $directoryList;
-
-    /**
-     * @var WrapperFactory
-     */
-    protected $wrapperFactory;
-
-    protected function setUp()
-    {
-        $this->directoryList = $this->getMock('Magento\Framework\App\Filesystem\DirectoryList', [], [], '', false);
-        $this->wrapperFactory = new WrapperFactory($this->directoryList);
-    }
-
-    public function testGetByProtocolConfig()
-    {
-        $protocolCode = 'protocol';
-        $expectedWrapperClass = '\Magento\Framework\Filesystem\Stub\Wrapper';
-        $protocolConfig = ['driver' => $expectedWrapperClass];
-        $driver = $this->getMockForAbstractClass('Magento\Framework\Filesystem\DriverInterface');
-
-        $this->directoryList->expects($this->once())
-            ->method('getProtocolConfig')
-            ->with($protocolCode)
-            ->will($this->returnValue($protocolConfig));
-
-        $this->assertInstanceOf($expectedWrapperClass, $this->wrapperFactory->get($protocolCode, $driver));
-    }
-}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php
index b5e5ca617a8567b309c4ffddbe01f34313f70a25..1a81eb3faff9befbcdd6b037a7b66ef7a1afe07c 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/FilesystemTest.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Framework;
 
-use Magento\Framework\App\Filesystem as AppFilesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class FilesystemTest extends \PHPUnit_Framework_TestCase
 {
@@ -83,29 +83,18 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
 
     public function testGetDirectoryRead()
     {
-        $this->_setupDirectoryListMock(array());
         /** @var \Magento\Framework\Filesystem\Directory\ReadInterface $dirReadMock */
         $dirReadMock = $this->getMock('Magento\Framework\Filesystem\Directory\ReadInterface');
         $this->_dirReadFactoryMock->expects($this->once())->method('create')->will($this->returnValue($dirReadMock));
-        $this->assertEquals($dirReadMock, $this->_filesystem->getDirectoryRead(AppFilesystem::ROOT_DIR));
-    }
-
-    /**
-     * @expectedException \Magento\Framework\Filesystem\FilesystemException
-     */
-    public function testGetDirectoryWriteReadOnly()
-    {
-        $this->_setupDirectoryListMock(array('read_only' => true));
-        $this->_filesystem->getDirectoryWrite(AppFilesystem::ROOT_DIR);
+        $this->assertEquals($dirReadMock, $this->_filesystem->getDirectoryRead(DirectoryList::ROOT));
     }
 
     public function testGetDirectoryWrite()
     {
-        $this->_setupDirectoryListMock(array());
         /** @var \Magento\Framework\Filesystem\Directory\WriteInterface $dirWriteMock */
         $dirWriteMock = $this->getMock('Magento\Framework\Filesystem\Directory\WriteInterface');
         $this->_dirWriteFactoryMock->expects($this->once())->method('create')->will($this->returnValue($dirWriteMock));
-        $this->assertEquals($dirWriteMock, $this->_filesystem->getDirectoryWrite(AppFilesystem::ROOT_DIR));
+        $this->assertEquals($dirWriteMock, $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT));
     }
 
     public function testGetRemoteResource()
@@ -128,13 +117,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
 
     public function testGetUri()
     {
-        $uri = 'http://example.com';
-        $this->_setupDirectoryListMock(array('uri' => $uri));
-        $this->assertEquals($uri, $this->_filesystem->getUri(AppFilesystem::ROOT_DIR));
-    }
-
-    protected function _setupDirectoryListMock(array $config)
-    {
-        $this->_directoryListMock->expects($this->any())->method('getConfig')->will($this->returnValue($config));
+        $this->_directoryListMock->expects($this->once())->method('getUrlPath')->with('code')->willReturn('result');
+        $this->assertEquals('result', $this->_filesystem->getUri('code'));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php
index 1d03fe3ac1f6ffa29d4578ad17009461f110cc89..7ed0910959673609dad2aae22c0a35f767749c1f 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php
@@ -54,7 +54,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->filesystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryWrite', 'createDirectory'),
             array(),
             '',
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php
index d0bac85dfc3d220bd0181dede356864446cbb3d2..e72262d1adf36d43b75cf215b1edb626fd7cfa76 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/ImageMagickTest.php
@@ -31,7 +31,7 @@ class ImageMagickTest extends \PHPUnit_Framework_TestCase
     public function testWatermark($imagePath, $expectedMessage)
     {
         $filesystem =
-            $this->getMockBuilder('Magento\Framework\App\Filesystem')->disableOriginalConstructor()->getMock();
+            $this->getMockBuilder('Magento\Framework\Filesystem')->disableOriginalConstructor()->getMock();
         $this->setExpectedException('LogicException', $expectedMessage);
         $object = new \Magento\Framework\Image\Adapter\ImageMagick($filesystem);
         $object->watermark($imagePath);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php
index 0caee1dab7e0aa402315d5069daf1e70bb66d81f..015f0382297a4c5dad9ab1461ba5813429f233dc 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Less/File/Collector/LibraryTest.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Framework\Less\File\Collector;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Tests Library
@@ -37,7 +38,7 @@ class LibraryTest extends \PHPUnit_Framework_TestCase
     protected $fileListFactoryMock;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|PHPUnit_Framework_MockObject_MockObject
      */
     protected $fileSystemMock;
 
@@ -79,7 +80,7 @@ class LibraryTest extends \PHPUnit_Framework_TestCase
         $this->fileListFactoryMock->expects($this->any())->method('create')
             ->will($this->returnValue($this->fileListMock));
 
-        $this->fileSystemMock = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $this->fileSystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $this->libraryDirectoryMock = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\ReadInterface')
@@ -90,8 +91,8 @@ class LibraryTest extends \PHPUnit_Framework_TestCase
             ->will(
                 $this->returnValueMap(
                     [
-                        [Filesystem::LIB_WEB, $this->libraryDirectoryMock],
-                        [Filesystem::THEMES_DIR, $this->themesDirectoryMock],
+                        [DirectoryList::LIB_WEB, $this->libraryDirectoryMock],
+                        [DirectoryList::THEMES, $this->themesDirectoryMock],
                     ]
                 )
             );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php
index 4bfb1ce61acc1ea55f866a4b856c1d32b6319ae1..93b55c6410e3f3fcde9b597dc78d654570a57c58 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Less/FileGeneratorTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\Less;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileGeneratorTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -68,10 +70,10 @@ class FileGeneratorTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnCallback(function ($file) {
                 return "content of '$file'";
             }));
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::VAR_DIR)
+            ->with(DirectoryList::VAR_DIR)
             ->will($this->returnValue($this->tmpDirectory));
         $this->assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false);
         $this->magentoImport = $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php b/dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php
index 4bb5fed75380081d5f2ed48cd050de60b1fe9d5e..64f4d1c64794bc590132a070cda0e1a166a319bc 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/LoggerTest.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Framework;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\Write;
 
 class LoggerTest extends \PHPUnit_Framework_TestCase
@@ -69,11 +70,11 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $logDir = self::$logDir;
-        $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', [], [], '', false);
+        $this->filesystemMock = $this->getMock('Magento\Framework\Filesystem', [], [], '', false);
         $this->directory = $this->getMock('Magento\Framework\Filesystem\Directory\Write', [], [], '', false);
         $this->filesystemMock->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::LOG_DIR)
+            ->with(DirectoryList::LOG)
             ->will($this->returnValue($this->directory));
         $this->directory->expects($this->any())->method('create')->will($this->returnValue(true));
         $this->directory->expects($this->any())->method('getAbsolutePath')->will(
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..88def1f34abd06e32f1fd262c5a9c4c71a97f635
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php
@@ -0,0 +1,197 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Framework\Model;
+
+use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper;
+
+class AbstractExtensibleModelTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Framework\Model\AbstractExtensibleModel
+     */
+    protected $model;
+
+    /**
+     * @var \Magento\Framework\Model\Context|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $contextMock;
+
+    /**
+     * @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $registryMock;
+
+    /**
+     * @var \Magento\Framework\Model\Resource\Db\AbstractDb|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $resourceMock;
+
+    /**
+     * @var \Magento\Framework\Data\Collection\Db|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $resourceCollectionMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $actionValidatorMock;
+
+    protected function setUp()
+    {
+        $this->markTestIncomplete('Should be fixed in scope of MAGETWO-29613');
+        $this->actionValidatorMock = $this->getMock(
+            '\Magento\Framework\Model\ActionValidator\RemoveAction',
+            array(),
+            array(),
+            '',
+            false
+        );
+        $this->contextMock = new \Magento\Framework\Model\Context(
+            $this->getMock('Magento\Framework\Logger', array(), array(), '', false),
+            $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false),
+            $this->getMock('Magento\Framework\App\CacheInterface', array(), array(), '', false),
+            $this->getMock('Magento\Framework\App\State', array(), array(), '', false),
+            $this->actionValidatorMock
+        );
+        $this->registryMock = $this->getMock('Magento\Framework\Registry', array(), array(), '', false);
+        $this->resourceMock = $this->getMock(
+            'Magento\Framework\Model\Resource\Db\AbstractDb',
+            array(
+                '_construct',
+                '_getReadAdapter',
+                '_getWriteAdapter',
+                '__wakeup',
+                'commit',
+                'delete',
+                'getIdFieldName',
+                'rollBack'
+            ),
+            array(),
+            '',
+            false
+        );
+        $this->resourceCollectionMock = $this->getMock(
+            'Magento\Framework\Data\Collection\Db',
+            array(),
+            array(),
+            '',
+            false
+        );
+        $this->model = $this->getMockForAbstractClass(
+            'Magento\Framework\Model\AbstractExtensibleModel',
+            array($this->contextMock, $this->registryMock, $this->resourceMock, $this->resourceCollectionMock)
+        );
+    }
+
+    /**
+     * Test implementation of interface for work with custom attributes.
+     */
+    public function testCustomAttributes()
+    {
+        $this->assertEquals(
+            [],
+            $this->model->getCustomAttributes(),
+            "Empty array is expected as a result of getCustomAttributes() when custom attributes are not set."
+        );
+        $this->assertEquals(
+            null,
+            $this->model->getCustomAttribute('not_existing_custom_attribute'),
+            "Null is expected as a result of getCustomAttribute(\$code) when custom attribute is not set."
+        );
+        $attributesAsArray = ['attribute1' => true, 'attribute2' => 'Attribute Value', 'attribute3' => 333];
+        $addedAttributes = $this->addCustomAttributesToModel($attributesAsArray, $this->model);
+        $this->assertEquals(
+            $addedAttributes,
+            $this->model->getCustomAttributes(),
+            'Custom attributes retrieved from the model using getCustomAttributes() are invalid.'
+        );
+    }
+
+    /**
+     * Test if getData works with custom attributes as expected
+     */
+    public function testGetDataWithCustomAttributes()
+    {
+        $attributesAsArray = ['attribute1' => true, 'attribute2' => 'Attribute Value', 'attribute3' => 333];
+        $modelData = ['key1' => 'value1', 'key2' => 222];
+        $this->model->setData($modelData);
+        $addedAttributes = $this->addCustomAttributesToModel($attributesAsArray, $this->model);
+        $modelDataAsFlatArray = array_merge($modelData, $addedAttributes);
+        $this->assertEquals(
+            $modelDataAsFlatArray,
+            $this->model->getData(),
+            'All model data should be represented as a flat array, including custom attributes.'
+        );
+        foreach ($modelDataAsFlatArray as $field => $value) {
+            $this->assertEquals(
+                $value,
+                $this->model->getData($field),
+                "Model data item '{$field}' was retrieved incorrectly."
+            );
+        }
+    }
+
+    /**
+     * @expectedException \LogicException
+     */
+    public function testRestrictedCustomAttributesGet()
+    {
+        $this->model->getData(\Magento\Framework\Model\AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY);
+    }
+
+    /**
+     * @expectedException \LogicException
+     */
+    public function testRestrictedCustomAttributesSet()
+    {
+        $this->model->setData(\Magento\Framework\Model\AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY, 'value');
+    }
+
+    /**
+     * @param string[] $attributesAsArray
+     * @param \Magento\Framework\Model\AbstractExtensibleModel $model
+     * @return \Magento\Framework\Api\AttributeInterface[]
+     */
+    protected function addCustomAttributesToModel($attributesAsArray, $model)
+    {
+        $objectManager = new ObjectManagerHelper($this);
+        /** @var \Magento\Framework\Service\Data\AttributeValueBuilder $attributeValueBuilder */
+        $attributeValueBuilder = $objectManager->getObject('Magento\Framework\Service\Data\AttributeValueBuilder');
+        $addedAttributes = [];
+        foreach ($attributesAsArray as $attributeCode => $attributeValue) {
+            $addedAttributes[$attributeCode] = $attributeValueBuilder
+                ->setAttributeCode($attributeCode)
+                ->setValue($attributeValue)
+                ->create();
+            $model->setCustomAttribute($addedAttributes[$attributeCode]);
+            $model->getCustomAttribute(
+                $attributeCode,
+                $addedAttributes[$attributeCode],
+                "Custom attribute '$attributeCode' retrieved from the model is invalid."
+            );
+        }
+        return $addedAttributes;
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php
index abce177ec601d12b2393be77690c5175b996203b..29d916c2745ed24bee2b3b3e57c6552b8553476f 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Model/AbstractModelTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\Model;
 
+use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper;
+
 class AbstractModelTest extends \PHPUnit_Framework_TestCase
 {
     /**
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php
index dcba394b0c7a9b684acee59fc575f18dde9926a4..6b7e524902d60dd3c2a95514a2e99681e89a0893 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/FileResolverTest.php
@@ -77,10 +77,11 @@ class FileResolverTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFileResolver($baseDir)
     {
-        $filesystem = new \Magento\Framework\App\Filesystem(
+        $driverPool = new \Magento\Framework\Filesystem\DriverPool;
+        $filesystem = new \Magento\Framework\Filesystem(
             new \Magento\Framework\App\Filesystem\DirectoryList($baseDir),
-            new \Magento\Framework\Filesystem\Directory\ReadFactory(),
-            new \Magento\Framework\Filesystem\Directory\WriteFactory()
+            new \Magento\Framework\Filesystem\Directory\ReadFactory($driverPool),
+            new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool)
         );
         $iteratorFactory = new \Magento\Framework\Config\FileIteratorFactory();
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php
index 52f19ed5882b8fb0e80d5bcdd15c49a7e993da2f..729d6079a0c54ce11ec56fa6e754e5426c51ecf2 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Declaration/Reader/FilesystemTest.php
@@ -108,10 +108,11 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFileResolver($baseDir)
     {
-        $filesystem = new \Magento\Framework\App\Filesystem(
+        $driverPool = new \Magento\Framework\Filesystem\DriverPool;
+        $filesystem = new \Magento\Framework\Filesystem(
             new \Magento\Framework\App\Filesystem\DirectoryList($baseDir),
-            new \Magento\Framework\Filesystem\Directory\ReadFactory(),
-            new \Magento\Framework\Filesystem\Directory\WriteFactory()
+            new \Magento\Framework\Filesystem\Directory\ReadFactory($driverPool),
+            new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool)
         );
         $iteratorFactory = new \Magento\Framework\Config\FileIteratorFactory();
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php
index 15fd1965cb42811eb7fa4aa1492fb56625646a12..7f5722d065f5df818bcfbd3e5e13d203216e573e 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Dir/ReaderTest.php
@@ -28,7 +28,8 @@
  */
 namespace Magento\Framework\Module\Dir;
 
-use \Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use \Magento\Framework\Config\FileIteratorFactory;
 
 class ReaderTest extends \PHPUnit_Framework_TestCase
@@ -89,7 +90,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         );
         $this->_moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface');
         $this->_filesystemMock = $this->getMock(
-            '\Magento\Framework\App\Filesystem',
+            '\Magento\Framework\Filesystem',
             array(),
             array(),
             '',
@@ -151,7 +152,7 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
         $modulesDirectoryMock->expects($this->any())->method('isExist')
             ->with($configPath)
             ->will($this->returnValue(true));
-        $this->_filesystemMock->expects($this->any())->method('getDirectoryRead')->with(Filesystem::MODULES_DIR)
+        $this->_filesystemMock->expects($this->any())->method('getDirectoryRead')->with(DirectoryList::MODULES)
             ->will($this->returnValue($modulesDirectoryMock));
 
         $this->_moduleListMock->expects($this->once())->method('getModules')->will($this->returnValue($modules));
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php
index c9a5f02e1f95750ea8b5e2264231b59978f1c43a..3704c21245b39d9cfcba5f0e9e3113bd20796b45 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Module/DirTest.php
@@ -31,7 +31,7 @@ class DirTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\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\Framework\App\Filesystem', array(), array(), '', false, false);
+        $this->filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false, false);
         $this->directoryMock = $this->getMock(
             'Magento\Framework\Filesystem\Directory\Read',
             array(),
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php
index 3a72b40b8f3aaaaac53077f87cc2dada4e8f209c..ffd87dcf7176c04e4dd881c93cf7761659636a44 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php
@@ -160,7 +160,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
         $moduleListMock = $this->getMock('Magento\Framework\Module\ModuleListInterface');
         $moduleListMock->expects($this->once())->method('getModule')->will($this->returnValue(array()));
 
-        $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $modulesDirMock = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false);
         $filesystemMock->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($modulesDirMock));
 
@@ -252,7 +252,7 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
 
         $setupModel = new \Magento\Framework\Module\Setup\Migration(
             $this->getMock('Magento\Framework\App\Resource', array(), array(), '', false, false),
-            $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false),
+            $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false),
             $this->getMock('Magento\Core\Helper\Data', array(), array(), '', false),
             $this->getMock('Magento\Framework\Logger', array(), array(), '', false),
             $this->getMock('Magento\Framework\Event\ManagerInterface', array(), array(), '', false),
@@ -305,11 +305,11 @@ class MigrationTest extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\Filesystem
+     * @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem
      */
     protected function _getFilesystemMock()
     {
-        $mock = $this->getMockBuilder('Magento\Framework\App\Filesystem')->disableOriginalConstructor()->getMock();
+        $mock = $this->getMockBuilder('Magento\Framework\Filesystem')->disableOriginalConstructor()->getMock();
         return $mock;
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php
index 8bd2585e948f9571aec314855ba2a9f13cea8fe2..0ca4c386deaebcc604c0126bd3d7d5ad5b93ab87 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Mview/Config/ReaderTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Mview\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ReaderTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -52,13 +54,13 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
 
         $this->_converter = $this->getMock('Magento\Framework\Mview\Config\Converter', array('convert'));
 
-        $fsDirList = $this->getMock('\Magento\Framework\Filesystem\DirectoryList', array('getDir'), array(), '', false);
+        $fsDirList = $this->getMock('Magento\Framework\Filesystem\DirectoryList', array('getPath'), array(), '', false);
         $fsDirList->expects(
             $this->once()
         )->method(
-            'getDir'
+            'getPath'
         )->with(
-            \Magento\Framework\App\Filesystem::LIB_INTERNAL
+            DirectoryList::LIB_INTERNAL
         )->will(
             $this->returnValue('stub')
         );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php
index 945a6f623c2dbbd0340543271a046d9443cc6d4c..fefc99e96b0bb47f3f33c1ff04d58862b00ea775 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Object/Copy/Config/SchemaLocatorTest.php
@@ -24,14 +24,11 @@
 
 namespace Magento\Framework\Object\Copy\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
 {
 
-    /**
-     * @var \PHPUnit_Framework_MockObject_MockObject
-     */
-    protected $fileSystemMock;
-
     /**
      * @var \Magento\Framework\Object\Copy\Config\SchemaLocator
      */
@@ -39,20 +36,26 @@ class SchemaLocatorTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->fileSystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+        $rootDirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
+        $rootDirMock->expects($this->exactly(2))
+            ->method('getAbsolutePath')
+            ->will($this->returnCallback(function ($path) {
+                return 'schema_dir/' . $path;
+            }));
+        $fileSystemMock = $this->getMock(
+            'Magento\Framework\Filesystem',
             array(),
             array(),
             '',
             false
         );
-        $this->fileSystemMock->expects($this->any())
-            ->method('getPath')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
-            ->will($this->returnValue('schema_dir'));
+        $fileSystemMock->expects($this->once())
+            ->method('getDirectoryRead')
+            ->with(DirectoryList::ROOT)
+            ->will($this->returnValue($rootDirMock));
 
         $this->model = new \Magento\Framework\Object\Copy\Config\SchemaLocator(
-            $this->fileSystemMock,
+            $fileSystemMock,
             'schema.xsd',
             'perFileSchema.xsd'
         );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomFactoryTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..40fd92d06da315882ca8fd81022c6a2972b5b31e
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomFactoryTest.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Framework\ObjectManager\Config\Reader;
+
+class DomFactoryTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var DomFactory
+     */
+    protected $_factory;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_object;
+
+    /**
+     * @var \Magento\Framework\ObjectManager\ObjectManager|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_objectManager;
+
+    public function setUp()
+    {
+        $this->_object = $this->getMock('Magento\Framework\ObjectManager\Config\Reader\Dom', [], [], '', false);
+        $this->_objectManager = $this->getMock(
+            '\Magento\Framework\ObjectManager\ObjectManager',
+            ['create'],
+            [],
+            '',
+            false
+        );
+        $this->_factory = new DomFactory($this->_objectManager);
+    }
+
+    public function testCreate()
+    {
+        $this->_objectManager->expects($this->once())
+            ->method('create')
+            ->with('Magento\Framework\ObjectManager\Config\Reader\Dom')
+            ->will($this->returnValue($this->_object));
+
+        $this->_factory->create([1]);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php
index 92b49789943639969c39b83f551e5026bc0ffa22..1ee8f927ce61751c017226afe1da4d31269dc829 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/RequireJs/ConfigTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\RequireJs;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -58,10 +60,10 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         );
         $this->design = $this->getMockForAbstractClass('\Magento\Framework\View\DesignInterface');
         $this->baseDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($this->baseDir));
         $repo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false);
         $this->context = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\ContextInterface');
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php b/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php
index 66c7601bb16bed53235c3668b030740b179aae02..e0642ecb660c090c13ccf3575924ad1dd8b9c7c4 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Builder/Query/MatchTest.php
@@ -34,6 +34,11 @@ class MatchTest extends \PHPUnit_Framework_TestCase
      */
     private $scoreBuilder;
 
+    /**
+     * @var \Magento\Framework\Search\Adapter\Mysql\Field\ResolverInterface|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $resolver;
+
     /**
      * @var \Magento\Framework\Search\Adapter\Mysql\Query\Builder\Match
      */
@@ -48,7 +53,15 @@ class MatchTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->getMock();
 
-        $this->match = $helper->getObject('Magento\Framework\Search\Adapter\Mysql\Query\Builder\Match');
+        $this->resolver = $this->getMockBuilder('Magento\Framework\Search\Adapter\Mysql\Field\ResolverInterface')
+            ->setMethods(['resolve'])
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+
+        $this->match = $helper->getObject(
+            'Magento\Framework\Search\Adapter\Mysql\Query\Builder\Match',
+            ['resolver' => $this->resolver]
+        );
     }
 
     public function testBuildQuery()
@@ -71,6 +84,8 @@ class MatchTest extends \PHPUnit_Framework_TestCase
                 $this->equalTo(Select::FULLTEXT_MODE_BOOLEAN)
             );
 
+        $this->resolver->expects($this->once())->method('resolve')->willReturnArgument(0);
+
         /** @var \Magento\Framework\Search\Request\Query\Match|\PHPUnit_Framework_MockObject_MockObject $query */
         $query = $this->getMockBuilder('Magento\Framework\Search\Request\Query\Match')
             ->setMethods(['getMatches', 'getValue', 'getBoost'])
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Filter/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Filter/BuilderTest.php
index adbd5ce90bec435a0773fd6ad93027fffd16e1a3..f6cc1fb2872bde31ad61b692c53abcbe83716499 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Filter/BuilderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/Filter/BuilderTest.php
@@ -25,8 +25,9 @@
 namespace Magento\Framework\Search\Adapter\Mysql\Filter;
 
 use Magento\Framework\Search\Adapter\Mysql\ConditionManager;
+use Magento\Framework\Search\Request\FilterInterface;
+use Magento\Framework\Search\Request\Query\Bool as RequestBoolQuery;
 use Magento\TestFramework\Helper\ObjectManager;
-use \Magento\Framework\Search\Request\Query\Bool as RequestBoolQuery;
 
 class BuilderTest extends \PHPUnit_Framework_TestCase
 {
@@ -36,6 +37,16 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
      */
     private $builder;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject|PreprocessorInterface
+     */
+    private $preprocessor;
+
+    /**
+     * @var ConditionManager|\PHPUnit_Framework_MockObject_MockObject $conditionManager
+     */
+    private $conditionManager;
+
     /**
      * Set up
      */
@@ -43,12 +54,11 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
     {
         $objectManager = new ObjectManager($this);
 
-        /** @var ConditionManager|\PHPUnit_Framework_MockObject_MockObject $conditionManager */
-        $conditionManager = $this->getMockBuilder('\Magento\Framework\Search\Adapter\Mysql\ConditionManager')
+        $this->conditionManager = $this->getMockBuilder('Magento\Framework\Search\Adapter\Mysql\ConditionManager')
             ->disableOriginalConstructor()
             ->setMethods(['generateCondition', 'combineQueries', 'wrapBrackets'])
             ->getMock();
-        $conditionManager->expects($this->any())
+        $this->conditionManager->expects($this->any())
             ->method('generateCondition')
             ->will(
                 $this->returnCallback(
@@ -57,7 +67,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
                     }
                 )
             );
-        $conditionManager->expects($this->any())
+        $this->conditionManager->expects($this->any())
             ->method('combineQueries')
             ->will(
                 $this->returnCallback(
@@ -69,7 +79,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
                     }
                 )
             );
-        $conditionManager->expects($this->any())
+        $this->conditionManager->expects($this->any())
             ->method('wrapBrackets')
             ->will(
                 $this->returnCallback(
@@ -87,16 +97,14 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
             ->method('buildFilter')
             ->will(
                 $this->returnCallback(
-                    function (\Magento\Framework\Search\Request\FilterInterface $filter, $isNegation) use (
-                        $conditionManager
-                    ) {
+                    function (FilterInterface $filter, $isNegation) {
                         /**
                          * @var \Magento\Framework\Search\Request\Filter\Range $filter
                          * @var \Magento\Framework\DB\Adapter\AdapterInterface $adapter
                          */
                         $fromCondition = '';
                         if (!is_null($filter->getFrom())) {
-                            $fromCondition = $conditionManager->generateCondition(
+                            $fromCondition = $this->conditionManager->generateCondition(
                                 $filter->getField(),
                                 ($isNegation ? '<' : '>='),
                                 $filter->getFrom()
@@ -104,7 +112,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
                         }
                         $toCondition = '';
                         if (!is_null($filter->getTo())) {
-                            $toCondition = $conditionManager->generateCondition(
+                            $toCondition = $this->conditionManager->generateCondition(
                                 $filter->getField(),
                                 ($isNegation ? '>=' : '<'),
                                 $filter->getTo()
@@ -112,7 +120,7 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
                         }
                         $unionOperator = $isNegation ? \Zend_Db_Select::SQL_OR : \Zend_Db_Select::SQL_AND;
 
-                        return $conditionManager->combineQueries([$fromCondition, $toCondition], $unionOperator);
+                        return $this->conditionManager->combineQueries([$fromCondition, $toCondition], $unionOperator);
                     }
                 )
             );
@@ -125,14 +133,12 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
             ->method('buildFilter')
             ->will(
                 $this->returnCallback(
-                    function (\Magento\Framework\Search\Request\FilterInterface $filter, $isNegation) use (
-                        $conditionManager
-                    ) {
+                    function (FilterInterface $filter, $isNegation) {
                         /**
                          * @var \Magento\Framework\Search\Request\Filter\Term $filter
                          * @var \Magento\Framework\DB\Adapter\AdapterInterface $adapter
                          */
-                        return $conditionManager->generateCondition(
+                        return $this->conditionManager->generateCondition(
                             $filter->getField(),
                             ($isNegation ? '!=' : '='),
                             $filter->getValue()
@@ -141,18 +147,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
                 )
             );
 
+        $this->preprocessor = $this->getMockBuilder(
+            'Magento\Framework\Search\Adapter\Mysql\Filter\PreprocessorInterface'
+        )
+            ->setMethods(['process'])
+            ->disableOriginalConstructor()
+            ->getMockForAbstractClass();
+        $this->preprocessor->expects($this->any())->method('process')->willReturnCallback(
+            function ($filter, $isNegation, $queryString) {
+                return $this->conditionManager->wrapBrackets($queryString);
+            }
+        );
+
         $this->builder = $objectManager->getObject(
             'Magento\Framework\Search\Adapter\Mysql\Filter\Builder',
             [
                 'range' => $rangeBuilder,
                 'term' => $termBuilder,
-                'conditionManager' => $conditionManager,
+                'conditionManager' => $this->conditionManager,
+                'preprocessor' => $this->preprocessor
             ]
         );
     }
 
     /**
-     * @param \Magento\Framework\Search\Request\FilterInterface|\PHPUnit_Framework_MockObject_MockObject $filter
+     * @param FilterInterface|\PHPUnit_Framework_MockObject_MockObject $filter
      * @param string $conditionType
      * @param string $expectedResult
      * @dataProvider buildFilterDataProvider
@@ -194,6 +213,27 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
         ];
     }
 
+    /**
+     * @param $field
+     * @param $value
+     * @return \Magento\Framework\Search\Request\Filter\Bool|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private function createTermFilter($field, $value)
+    {
+        $filter = $this->getMockBuilder('Magento\Framework\Search\Request\Filter\Term')
+            ->setMethods(['getField', 'getValue'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $filter->expects($this->exactly(1))
+            ->method('getField')
+            ->will($this->returnValue($field));
+        $filter->expects($this->once())
+            ->method('getValue')
+            ->will($this->returnValue($value));
+        return $filter;
+    }
+
     /**
      * Data provider for BuildFilter
      *
@@ -216,6 +256,31 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
         ];
     }
 
+    /**
+     * @param $field
+     * @param $from
+     * @param $to
+     * @return \Magento\Framework\Search\Request\Filter\Bool|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private function createRangeFilter($field, $from, $to)
+    {
+        $filter = $this->getMockBuilder('Magento\Framework\Search\Request\Filter\Range')
+            ->setMethods(['getField', 'getFrom', 'getTo'])
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $filter->expects($this->exactly(2))
+            ->method('getField')
+            ->will($this->returnValue($field));
+        $filter->expects($this->atLeastOnce())
+            ->method('getFrom')
+            ->will($this->returnValue($from));
+        $filter->expects($this->atLeastOnce())
+            ->method('getTo')
+            ->will($this->returnValue($to));
+        return $filter;
+    }
+
     /**
      * @return array
      */
@@ -325,68 +390,6 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
         ];
     }
 
-    /**
-     * @expectedException \InvalidArgumentException
-     * @expectedExceptionMessage Unknown filter type 'unknownType'
-     */
-    public function testUnknownFilterType()
-    {
-        /** @var \Magento\Framework\Search\Request\FilterInterface|\PHPUnit_Framework_MockObject_MockObject $filter */
-        $filter = $this->getMockBuilder('Magento\Framework\Search\Request\FilterInterface')
-            ->setMethods(['getType'])
-            ->getMockForAbstractClass();
-        $filter->expects($this->exactly(2))
-            ->method('getType')
-            ->will($this->returnValue('unknownType'));
-        $this->builder->build($filter, RequestBoolQuery::QUERY_CONDITION_MUST);
-    }
-
-    /**
-     * @param $field
-     * @param $value
-     * @return \Magento\Framework\Search\Request\Filter\Bool|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private function createTermFilter($field, $value)
-    {
-        $filter = $this->getMockBuilder('Magento\Framework\Search\Request\Filter\Term')
-            ->setMethods(['getField', 'getValue'])
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $filter->expects($this->exactly(1))
-            ->method('getField')
-            ->will($this->returnValue($field));
-        $filter->expects($this->once())
-            ->method('getValue')
-            ->will($this->returnValue($value));
-        return $filter;
-    }
-
-    /**
-     * @param $field
-     * @param $from
-     * @param $to
-     * @return \Magento\Framework\Search\Request\Filter\Bool|\PHPUnit_Framework_MockObject_MockObject
-     */
-    private function createRangeFilter($field, $from, $to)
-    {
-        $filter = $this->getMockBuilder('Magento\Framework\Search\Request\Filter\Range')
-            ->setMethods(['getField', 'getFrom', 'getTo'])
-            ->disableOriginalConstructor()
-            ->getMock();
-
-        $filter->expects($this->exactly(2))
-            ->method('getField')
-            ->will($this->returnValue($field));
-        $filter->expects($this->atLeastOnce())
-            ->method('getFrom')
-            ->will($this->returnValue($from));
-        $filter->expects($this->atLeastOnce())
-            ->method('getTo')
-            ->will($this->returnValue($to));
-        return $filter;
-    }
-
     /**
      * @param array $must
      * @param array $should
@@ -411,4 +414,19 @@ class BuilderTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($mustNot));
         return $filter;
     }
+
+    /**
+     * @expectedException \InvalidArgumentException
+     */
+    public function testUnknownFilterType()
+    {
+        /** @var FilterInterface|\PHPUnit_Framework_MockObject_MockObject $filter */
+        $filter = $this->getMockBuilder('Magento\Framework\Search\Request\FilterInterface')
+            ->setMethods(['getType'])
+            ->getMockForAbstractClass();
+        $filter->expects($this->any())
+            ->method('getType')
+            ->will($this->returnValue('unknownType'));
+        $this->builder->build($filter, RequestBoolQuery::QUERY_CONDITION_MUST);
+    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/ScoreBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/ScoreBuilderTest.php
index 73e066efbbd1f1414cee345493988b0cb5d97669..c50679a70e388f7e5eede5e3e7407368acbe01e6 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/ScoreBuilderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Search/Adapter/Mysql/ScoreBuilderTest.php
@@ -57,11 +57,14 @@ class ScoreBuilderTest extends \PHPUnit_Framework_TestCase
         $builder->endQuery(10.3); // start two query
         $builder->endQuery(10.4); // start one query
 
+        $builder->startQuery();
+        $builder->endQuery(1);
+
         $result = $builder->build();
 
         $expected = '((someCondition1 * 1.1 + (someCondition2 * 1.2 + someCondition3 * 1.3 + ' .
             '(someCondition4 * 1.4 + someCondition5 * 1.5) * 10.1 + (someCondition6 * 1.6 + ' .
-            'someCondition7 * 1.7) * 10.2) * 10.3) * 10.4) AS global_score';
+            'someCondition7 * 1.7) * 10.2) * 10.3) * 10.4 + (0)) AS global_score';
 
         $this->assertEquals($expected, $result);
     }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..3ee9d291f3c40c17f17e7c7b9c9b05e51740d710
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.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\Framework\Service\Code\Generator;
+
+use Magento\Framework\Code\Generator\Io;
+use Magento\TestFramework\Helper\ObjectManager;
+
+/**
+ * Class BuilderTest
+ */
+class DataBuilderTest extends \PHPUnit_Framework_TestCase
+{
+    /*
+     * The test is based on assumption that the classes will be injecting "DataBuilder" as dependency which will
+     * indicate the compiler to identify and code generate based on ExtensibleSample implementations' interface
+     */
+    const SOURCE_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\ExtensibleSample';
+    const RESULT_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\ExtensibleSampleDataBuilder';
+    const GENERATOR_CLASS_NAME = 'Magento\Framework\Service\Code\Generator\DataBuilder';
+    const OUTPUT_FILE_NAME = 'ExtensibleSampleDataBuilder.php';
+    /**
+     * @var Io | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $ioObjectMock;
+
+    /**
+     * @var \Magento\Framework\Code\Generator\EntityAbstract
+     */
+    protected $generator;
+
+    /**
+     * @var \Magento\Framework\Autoload\IncludePath | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $autoloaderMock;
+
+    /**
+     * @var \Magento\Framework\Code\Generator\CodeGenerator\Zend | \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $classGenerator;
+
+    protected function setUp()
+    {
+        require_once __DIR__ . '/_files/ExtensibleSampleInterface.php';
+        require_once __DIR__ . '/_files/ExtensibleSample.php';
+        $this->ioObjectMock = $this->getMock(
+            'Magento\Framework\Code\Generator\Io',
+            [],
+            [],
+            '',
+            false
+        );
+        $this->autoloaderMock = $this->getMock(
+            'Magento\Framework\Autoload\IncludePath',
+            [],
+            [],
+            '',
+            false
+        );
+        $objectManager = new ObjectManager($this);
+        $this->classGenerator = $objectManager->getObject('Magento\Framework\Code\Generator\CodeGenerator\Zend');
+            $this->getMock(
+            'Magento\Framework\Code\Generator\CodeGenerator\Zend',
+            [],
+            [],
+            '',
+            false
+        );
+
+
+        $this->generator = $objectManager->getObject(
+            self::GENERATOR_CLASS_NAME,
+            [
+                'sourceClassName' => self::SOURCE_CLASS_NAME,
+                'resultClassName' => self::RESULT_CLASS_NAME,
+                'ioObject' => $this->ioObjectMock,
+                'classGenerator' => $this->classGenerator,
+                'autoLoader' => $this->autoloaderMock
+            ]
+        );
+    }
+
+    /**
+     * generate repository name
+     */
+    public function testGenerate()
+    {
+        //$this->markTestIncomplete('Incomplete feature');
+        $generatedCode = file_get_contents(__DIR__ . '/_files/ExtensibleSampleDataBuilder.txt');
+        $sourceFileName = 'ExtensibleSample.php';
+        $resultFileName = self::OUTPUT_FILE_NAME;
+
+        //Mocking _validateData call
+        $this->autoloaderMock->expects($this->at(0))
+            ->method('getFile')
+            ->with(self::SOURCE_CLASS_NAME)
+            ->will($this->returnValue($sourceFileName));
+        $this->autoloaderMock->expects($this->at(1))
+            ->method('getFile')
+            ->with(self::RESULT_CLASS_NAME)
+            ->will($this->returnValue(false));
+
+        $this->ioObjectMock->expects($this->once())
+            ->method('makeGenerationDirectory')
+            ->will($this->returnValue(true));
+        $this->ioObjectMock->expects($this->once())
+            ->method('makeResultFileDirectory')
+            ->with(self::RESULT_CLASS_NAME)
+            ->will($this->returnValue(true));
+        $this->ioObjectMock->expects($this->once())
+            ->method('fileExists')
+            ->with($resultFileName)
+            ->will($this->returnValue(false));
+
+        //Mocking generation
+        $this->ioObjectMock->expects($this->any())
+            ->method('getResultFileName')
+            ->with(self::RESULT_CLASS_NAME)
+            ->will($this->returnValue($resultFileName));
+
+        //Verify if the generated code is as expected
+        $this->ioObjectMock->expects($this->once())
+            ->method('writeResultFile')
+            ->with($resultFileName, $generatedCode);
+
+        $this->assertTrue($this->generator->generate());
+    }
+}
diff --git a/setup/module/Magento/Filesystem/config/di.config.php b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php
similarity index 55%
rename from setup/module/Magento/Filesystem/config/di.config.php
rename to dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php
index f41fd100237d4f20876f676618bfa345d1f221fc..ec8d8f28dd30751b85e8e5b329693b233a531e5d 100644
--- a/setup/module/Magento/Filesystem/config/di.config.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php
@@ -22,12 +22,45 @@
  * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-return [
-    'di' => [
-        'instance' => [
-            'preference' => [
-                'Magento\Filesystem\Driver\DriverInterface' => 'Magento\Filesystem\Driver\File',
-            ],
-        ],
-    ],
-];
+namespace Magento\Framework\Service\Code\Generator;
+
+use Magento\Framework\Model\AbstractExtensibleModel;
+
+/**
+ * Class ExtensibleSample
+ */
+class ExtensibleSample extends AbstractExtensibleModel implements
+    \Magento\Framework\Service\Code\Generator\ExtensibleSampleInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function getItems()
+    {
+        $this->getData('items');
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getName()
+    {
+        $this->getData('name');
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getCount()
+    {
+        $this->getData('count');
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getCreatedAt()
+    {
+        $this->getData('created_at');
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a01defa3a7b73c3b48a102a15eed2091aeeb44e2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt
@@ -0,0 +1,53 @@
+namespace Magento\Framework\Service\Code\Generator;
+
+/**
+ * DataBuilder class for \Magento\Framework\Service\Code\Generator\ExtensibleSample
+ */
+class ExtensibleSampleDataBuilder extends \Magento\Framework\Service\Data\ExtensibleDataBuilder
+{
+    /**
+     * @param array $items
+     */
+    public function setItems($items)
+    {
+        $this->data['items'] = $items;
+        return $this;
+    }
+
+    /**
+     * @param string $name
+     */
+    public function setName($name)
+    {
+        $this->data['name'] = $name;
+        return $this;
+    }
+
+    /**
+     * @param int $count
+     */
+    public function setCount($count)
+    {
+        $this->data['count'] = $count;
+        return $this;
+    }
+
+    /**
+     * @param int $createdAt
+     */
+    public function setCreatedAt($createdAt)
+    {
+        $this->data['created_at'] = $createdAt;
+        return $this;
+    }
+
+    /**
+     * Initialize the builder
+     *
+     * @param \Magento\Framework\ObjectManager $objectManager
+     */
+    public function __construct(\Magento\Framework\ObjectManager $objectManager)
+    {
+        parent::__construct($objectManager, 'Magento\Framework\Service\Code\Generator\ExtensibleSampleInterface');
+    }
+}
diff --git a/setup/module/Magento/Filesystem/Module.php b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php
similarity index 66%
rename from setup/module/Magento/Filesystem/Module.php
rename to dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php
index fa65d5da7600a87073d665ee5db5fd61b6bac1a4..4046f9f351be2c6a33525c2facc487ed9deb282c 100644
--- a/setup/module/Magento/Filesystem/Module.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php
@@ -22,19 +22,32 @@
  * @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Filesystem;
+namespace Magento\Framework\Service\Code\Generator;
 
-use Zend\ModuleManager\Feature\ConfigProviderInterface;
+use Magento\Framework\Api\ExtensibleDataInterface;
 
-class Module implements ConfigProviderInterface
+/**
+ * Interface for ExtensibleSample
+ */
+interface ExtensibleSampleInterface extends ExtensibleDataInterface
 {
     /**
-     * @return array|mixed|\Traversable
+     * @return array
+     */
+    public function getItems();
+
+    /**
+     * @return string
+     */
+    public function getName();
+
+    /**
+     * @return int
+     */
+    public function getCount();
+
+    /**
+     * @return int
      */
-    public function getConfig()
-    {
-        return array_merge(
-            include __DIR__ . '/config/di.config.php'
-        );
-    }
+    public function getCreatedAt();
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php
index bb1e9132c80da15560907d48b52d5713b6b15543..00eee19fa4b545e991f031268a0e29d901553792 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/Session/ConfigTest.php
@@ -60,7 +60,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected $requestMock;
 
     /**
-     * @var \Magento\Framework\App\Filesystem | \PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem | \PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -459,6 +459,12 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $this->configMock->method('getValue')
             ->will($this->returnValueMap($getValueReturnMap));
 
+        $filesystemMock = $this->getMock('\Magento\Framework\Filesystem', [], [], '', false);
+        $dirMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface');
+        $filesystemMock->expects($this->any())
+            ->method('getDirectoryWrite')
+            ->will($this->returnValue($dirMock));
+
         $this->config = $this->helper->getObject(
             'Magento\Framework\Session\Config',
             [
@@ -468,6 +474,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
                 'cacheLimiter' => \Magento\Framework\Session\SaveHandlerInterface::DEFAULT_HANDLER,
                 'lifetimePath' => 'test_web/test_cookie/test_cookie_lifetime',
                 'request' => $this->requestMock,
+                'filesystem' => $filesystemMock,
             ]
 
         );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php b/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php
index 9c6296ef00dacff4cc08d1240009b77e5c1c3096..74a32cb3e52c25497c404fd2205a5a4ccb732340 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/TranslateTest.php
@@ -58,7 +58,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject */
     protected $appState;
 
-    /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject */
     protected $filesystem;
 
     /** @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject */
@@ -88,7 +88,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
         $this->csvParser = $this->getMock('\Magento\Framework\File\Csv', [], [], '', false);
         $this->packDictionary = $this->getMock('\Magento\Framework\App\Language\Dictionary', [], [], '', false);
         $this->directory = $this->getMock('\Magento\Framework\Filesystem\Directory\ReadInterface', [], [], '', false);
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', [], [], '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', [], [], '', false);
         $filesystem->expects($this->once())->method('getDirectoryRead')->will($this->returnValue($this->directory));
 
         $this->translate = new Translate(
@@ -179,7 +179,7 @@ class TranslateTest extends \PHPUnit_Framework_TestCase
         ];
         $this->resource->expects($this->any())->method('getTranslationArray')->will($this->returnValue($dbData));
 
-        $this->cache->expects($this->exactly($forceReload ? 0 : 1))
+        $this->cache->expects($this->exactly(1))
             ->method('save');
 
         $this->translate->loadData($area, $forceReload);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php
index a32ac508192121577dacd6c46d88be0be9d7fb22..352919491ebb59e15ada1548724ba0078563416f 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeServiceTest.php
@@ -59,7 +59,7 @@ class MergeServiceTest extends \PHPUnit_Framework_TestCase
     {
         $this->_objectManager = $this->getMockForAbstractClass('Magento\Framework\ObjectManager', array('create'));
         $this->_config = $this->getMock('Magento\Framework\View\Asset\ConfigInterface', array(), array(), '', false);
-        $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock(
             '\Magento\Framework\Filesystem\Directory\Write',
             array(),
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php
index 007cc337fb8e64127e8d826a4b95203c0bdc0787..7017317589bbb589e99b126a9736f62f22d639f7 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/ChecksumTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset\MergeStrategy;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ChecksumTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -55,15 +57,15 @@ class ChecksumTest extends \PHPUnit_Framework_TestCase
         $this->mergerMock = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\MergeStrategyInterface');
         $this->sourceDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
         $this->targetDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($this->sourceDir))
         ;
         $filesystem->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->will($this->returnValue($this->targetDir))
         ;
         $this->checksum = new Checksum($this->mergerMock, $filesystem);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php
index 38aa0f56f91e7ef1f9d1f97262a88efa9958a641..7825191180e5734b046c279a562710026046f79c 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/DirectTest.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Framework\View\Asset\MergeStrategy;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\Write;
 
 class DirectTest extends \PHPUnit_Framework_TestCase
@@ -50,11 +51,11 @@ class DirectTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->cssUrlResolver = $this->getMock('\Magento\Framework\View\Url\CssResolver');
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $this->writeDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
         $filesystem->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->will($this->returnValue($this->writeDir))
         ;
         $this->resultAsset = $this->getMock('\Magento\Framework\View\Asset\File', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php
index c060df9ea210d89d2463a74e6076ef42fcf85fc0..2de92896005fbcfa1d0de2322d357752f36dfcdb 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MergeStrategy/FileExistsTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset\MergeStrategy;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileExistsTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -49,10 +51,10 @@ class FileExistsTest extends \PHPUnit_Framework_TestCase
     {
         $this->mergerMock = $this->getMockForAbstractClass('\Magento\Framework\View\Asset\MergeStrategyInterface');
         $this->dirMock = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->will($this->returnValue($this->dirMock))
         ;
         $this->fileExists = new FileExists($this->mergerMock, $filesystem);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php
index d9f26b914003a1d8f840229f71c86efa9297973c..e1747f8aee2ea48997c222868cadaae00366c97d 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/MinifiedTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class MinifiedTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -51,7 +53,7 @@ class MinifiedTest extends \PHPUnit_Framework_TestCase
     protected $_baseUrl;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -74,16 +76,16 @@ class MinifiedTest extends \PHPUnit_Framework_TestCase
             '\Magento\Framework\Filesystem\Directory\WriteInterface'
         );
         $this->_rootDir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\ReadInterface');
-        $this->_filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_filesystem->expects($this->any())
             ->method('getDirectoryRead')
             ->will($this->returnValueMap([
-                [\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->_staticViewDir],
-                [\Magento\Framework\App\Filesystem::ROOT_DIR, $this->_rootDir],
+                [DirectoryList::STATIC_VIEW, $this->_staticViewDir],
+                [DirectoryList::ROOT, $this->_rootDir],
             ]));
         $this->_filesystem->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->will($this->returnValue($this->_staticViewDir));
         $this->_adapter = $this->getMockForAbstractClass('Magento\Framework\Code\Minifier\AdapterInterface');
         $this->_model = new Minified(
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php
index 96d75f9928cd415c971cbe4090bc77fdb7841b88..d76c19792d7d9930b4e8fda4bc4bd9f03ea9bd8e 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/SourceTest.php
@@ -24,13 +24,15 @@
 
 namespace Magento\Framework\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class SourceTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     private $filesystem;
 
@@ -138,7 +140,7 @@ class SourceTest extends \PHPUnit_Framework_TestCase
         $this->cache->expects($this->once())
             ->method('load')
             ->with("some/file.ext:{$filePath}")
-            ->will($this->returnValue(serialize(array(\Magento\Framework\App\Filesystem::VAR_DIR, $filePath))));
+            ->will($this->returnValue(serialize(array(DirectoryList::VAR_DIR, $filePath))));
 
         $this->varDir->expects($this->once())->method('getAbsolutePath')
             ->with($filePath)
@@ -188,7 +190,7 @@ class SourceTest extends \PHPUnit_Framework_TestCase
             $this->cache->expects($this->once())
                 ->method('save')
                 ->with(
-                    serialize([\Magento\Framework\App\Filesystem::VAR_DIR, 'view_preprocessed/source/some/file.ext']),
+                    serialize([DirectoryList::VAR_DIR, 'view_preprocessed/source/some/file.ext']),
                     $cacheValue
                 );
             $this->varDir->expects($this->once())
@@ -198,7 +200,7 @@ class SourceTest extends \PHPUnit_Framework_TestCase
             $this->varDir->expects($this->never())->method('writeFile');
             $this->cache->expects($this->once())
                 ->method('save')
-                ->with(serialize([\Magento\Framework\App\Filesystem::ROOT_DIR, 'source/some/file.ext']), $cacheValue);
+                ->with(serialize([DirectoryList::ROOT, 'source/some/file.ext']), $cacheValue);
             $this->rootDirRead->expects($this->once())
                 ->method('getAbsolutePath')
                 ->with('source/some/file.ext')
@@ -255,15 +257,15 @@ class SourceTest extends \PHPUnit_Framework_TestCase
 
     protected function initFilesystem()
     {
-        $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->rootDirRead = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface');
         $this->staticDirRead = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface');
         $this->varDir = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\WriteInterface');
 
         $readDirMap = [
-            [\Magento\Framework\App\Filesystem::ROOT_DIR, $this->rootDirRead],
-            [\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->staticDirRead],
-            [\Magento\Framework\App\Filesystem::VAR_DIR, $this->varDir],
+            [DirectoryList::ROOT, $this->rootDirRead],
+            [DirectoryList::STATIC_VIEW, $this->staticDirRead],
+            [DirectoryList::VAR_DIR, $this->varDir],
         ];
 
         $this->filesystem->expects($this->any())
@@ -271,7 +273,7 @@ class SourceTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValueMap($readDirMap));
         $this->filesystem->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::VAR_DIR)
+            ->with(DirectoryList::VAR_DIR)
             ->will($this->returnValue($this->varDir));
     }
 
@@ -293,7 +295,7 @@ class SourceTest extends \PHPUnit_Framework_TestCase
         } else {
             $context = new \Magento\Framework\View\Asset\File\Context(
                 'http://example.com/static/',
-                \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR,
+                DirectoryList::STATIC_VIEW,
                 ''
             );
         }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/ConfigTest.php
index 81ec3b6d814bcb9e668cdb45e3d08c47536e145e..02aa263f66758d596b12c7e6245ce1c599c7fc48 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/ConfigTest.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\View;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper;
 
 class ConfigTest extends \PHPUnit_Framework_TestCase
@@ -37,7 +38,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Framework\Module\Dir\Reader|\PHPUnit_Framework_MockObject_MockObject */
     protected $readerMock;
 
-    /** @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject */
+    /** @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject */
     protected $filesystemMock;
 
     /** @var \Magento\Framework\View\Asset\Repository|\PHPUnit_Framework_MockObject_MockObject */
@@ -55,11 +56,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->readerMock = $this->getMock('Magento\Framework\Module\Dir\Reader', [], [], '', false);
-        $this->filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', [], [], '', false);
+        $this->filesystemMock = $this->getMock('Magento\Framework\Filesystem', [], [], '', false);
         $this->directoryReadMock = $this->getMock('Magento\Framework\Filesystem\Directory\ReadInterface');
         $this->filesystemMock->expects($this->once())
             ->method('getDirectoryRead')
-            ->with($this->equalTo(\Magento\Framework\App\Filesystem::ROOT_DIR))
+            ->with($this->equalTo(DirectoryList::ROOT))
             ->will($this->returnValue($this->directoryReadMock));
         $this->repositoryMock = $this->getMock('Magento\Framework\View\Asset\Repository', [], [], '', false);
         $this->fileSystemMock = $this->getMock('Magento\Framework\View\FileSystem', [], [], '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php
index f02f39d5e5fbf9fc34131a6f9cb1d92e0ad044ef..67dc6c39e904edb0c3874dd5749a03e1bfbd58b5 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Fallback/RulePoolTest.php
@@ -23,6 +23,9 @@
  */
 namespace Magento\Framework\View\Design\Fallback;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Factory Test
  */
@@ -40,32 +43,19 @@ class RulePoolTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $filesystemMock = $this->getMock(
-            '\Magento\Framework\App\Filesystem',
-            array('getPath', 'getDirectoryRead', '__wakeup'),
-            array(
-                'dir' => array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => 'themes',
-                    \Magento\Framework\App\Filesystem::MODULES_DIR => 'modules',
-                    \Magento\Framework\App\Filesystem::LIB_WEB => 'lib_web',
-                )
-            ),
-            '',
-            false
-        );
-        $filesystemMock->expects(
-            $this->any()
-        )->method(
-            'getPath'
-        )->will(
-            $this->returnValueMap(
-                array(
-                    \Magento\Framework\App\Filesystem::THEMES_DIR => 'themes',
-                    \Magento\Framework\App\Filesystem::MODULES_DIR => 'modules',
-                    \Magento\Framework\App\Filesystem::LIB_WEB => 'lib_web',
-                )
-            )
-        );
+        $filesystemMock = $this->getMock('Magento\Framework\Filesystem', [], [], '', false);
+        $filesystemMock->expects($this->any())
+            ->method('getDirectoryRead')
+            ->will($this->returnCallback(function ($code) {
+                $dirMock = $this->getMockForAbstractClass('Magento\Framework\Filesystem\Directory\ReadInterface');
+                $dirMock->expects($this->any())
+                    ->method('getAbsolutePath')
+                    ->will($this->returnCallback(function ($path) use ($code) {
+                        $path = empty($path) ? $path : '/' . $path;
+                        return rtrim($code, '/') . $path;
+                    }));
+                return $dirMock;
+            }));
 
         $this->model = new RulePool($filesystemMock);
 
@@ -209,50 +199,56 @@ class RulePoolTest extends \PHPUnit_Framework_TestCase
             'locale' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_LOCALE_FILE,
                 [],
-                ['/area/current_theme_path', '/area/parent_theme_path'],
+                [
+                    DirectoryList::THEMES . '/area/current_theme_path',
+                    DirectoryList::THEMES . '/area/parent_theme_path',
+                ],
             ],
             'file, modular' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE,
                 [],
                 [
-                    '/area/current_theme_path/namespace_module',
-                    '/area/parent_theme_path/namespace_module',
-                    '/namespace/module/view/area',
-                    '/namespace/module/view/base',
+                    DirectoryList::THEMES . '/area/current_theme_path/namespace_module',
+                    DirectoryList::THEMES . '/area/parent_theme_path/namespace_module',
+                    DirectoryList::MODULES . '/namespace/module/view/area',
+                    DirectoryList::MODULES . '/namespace/module/view/base',
                 ],
             ],
             'file, non-modular' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_FILE,
                 ['namespace' => null, 'module' => null],
-                ['/area/current_theme_path', '/area/parent_theme_path',],
+                [
+                    DirectoryList::THEMES . '/area/current_theme_path',
+                    DirectoryList::THEMES . '/area/parent_theme_path',
+                ],
             ],
 
             'template, modular' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE,
                 [],
                 [
-                    '/area/current_theme_path/namespace_module/templates',
-                    '/area/parent_theme_path/namespace_module/templates',
-                    '/namespace/module/view/area/templates',
-                    '/namespace/module/view/base/templates',
+                    DirectoryList::THEMES . '/area/current_theme_path/namespace_module/templates',
+                    DirectoryList::THEMES . '/area/parent_theme_path/namespace_module/templates',
+                    DirectoryList::MODULES . '/namespace/module/view/area/templates',
+                    DirectoryList::MODULES . '/namespace/module/view/base/templates',
                 ],
             ],
             'template, non-modular' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE,
                 ['namespace' => null, 'module' => null],
                 [
-                    '/area/current_theme_path/templates',
-                    '/area/parent_theme_path/templates',
+                    DirectoryList::THEMES . '/area/current_theme_path/templates',
+                    DirectoryList::THEMES . '/area/parent_theme_path/templates',
                 ],
             ],
             'template, non-modular-magento-core' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE,
                 ['namespace' => 'Magento', 'module' => 'Core'],
                 [
-                    '/area/current_theme_path/Magento_Core/templates',
-                    '/area/parent_theme_path/Magento_Core/templates',
-                    '/Magento/Core/view/area/templates',
-                    '/Magento/Core/view/base/templates',
+                    DirectoryList::THEMES . '/area/current_theme_path/Magento_Core/templates',
+                    DirectoryList::THEMES . '/area/parent_theme_path/Magento_Core/templates',
+                    DirectoryList::MODULES . '/Magento/Core/view/area/templates',
+                    DirectoryList::MODULES . '/Magento/Core/view/base/templates',
                 ],
             ],
 
@@ -260,44 +256,44 @@ class RulePoolTest extends \PHPUnit_Framework_TestCase
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE,
                 [],
                 [
-                    '/area/current_theme_path/namespace_module/web/i18n/en_US',
-                    '/area/current_theme_path/namespace_module/web',
-                    '/area/parent_theme_path/namespace_module/web/i18n/en_US',
-                    '/area/parent_theme_path/namespace_module/web',
-                    '/namespace/module/view/area/web/i18n/en_US',
-                    '/namespace/module/view/base/web/i18n/en_US',
-                    '/namespace/module/view/area/web',
-                    '/namespace/module/view/base/web',
+                    DirectoryList::THEMES . '/area/current_theme_path/namespace_module/web/i18n/en_US',
+                    DirectoryList::THEMES . '/area/current_theme_path/namespace_module/web',
+                    DirectoryList::THEMES . '/area/parent_theme_path/namespace_module/web/i18n/en_US',
+                    DirectoryList::THEMES . '/area/parent_theme_path/namespace_module/web',
+                    DirectoryList::MODULES . '/namespace/module/view/area/web/i18n/en_US',
+                    DirectoryList::MODULES . '/namespace/module/view/base/web/i18n/en_US',
+                    DirectoryList::MODULES . '/namespace/module/view/area/web',
+                    DirectoryList::MODULES . '/namespace/module/view/base/web',
                 ],
             ],
             'view, modular non-localized' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE,
                 ['locale' => null],
                 [
-                    '/area/current_theme_path/namespace_module/web',
-                    '/area/parent_theme_path/namespace_module/web',
-                    '/namespace/module/view/area/web',
-                    '/namespace/module/view/base/web',
+                    DirectoryList::THEMES . '/area/current_theme_path/namespace_module/web',
+                    DirectoryList::THEMES . '/area/parent_theme_path/namespace_module/web',
+                    DirectoryList::MODULES . '/namespace/module/view/area/web',
+                    DirectoryList::MODULES . '/namespace/module/view/base/web',
                 ],
             ],
             'view, non-modular localized' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE,
                 ['module' => null, 'namespace' => null],
                 [
-                    '/area/current_theme_path/web/i18n/en_US',
-                    '/area/current_theme_path/web',
-                    '/area/parent_theme_path/web/i18n/en_US',
-                    '/area/parent_theme_path/web',
-                    '',
+                    DirectoryList::THEMES . '/area/current_theme_path/web/i18n/en_US',
+                    DirectoryList::THEMES . '/area/current_theme_path/web',
+                    DirectoryList::THEMES . '/area/parent_theme_path/web/i18n/en_US',
+                    DirectoryList::THEMES . '/area/parent_theme_path/web',
+                    DirectoryList::LIB_WEB,
                 ],
             ],
             'view, non-modular non-localized' => [
                 \Magento\Framework\View\Design\Fallback\RulePool::TYPE_STATIC_FILE,
                 ['module' => null, 'namespace' => null, 'locale' => null],
                 [
-                    '/area/current_theme_path/web',
-                    '/area/parent_theme_path/web',
-                    '',
+                    DirectoryList::THEMES . '/area/current_theme_path/web',
+                    DirectoryList::THEMES . '/area/parent_theme_path/web',
+                    DirectoryList::LIB_WEB,
                 ],
             ],
         ];
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php
index 49e394df6e270762476de1e99511cf7c8f614252..c09ad59515e58422890df4f23abaeaf07c2d8368 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/AlternativeTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class AlternativeTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -47,10 +49,10 @@ class AlternativeTest extends \PHPUnit_Framework_TestCase
         $this->directory->expects($this->any())
             ->method('getRelativePath')
             ->will($this->returnArgument(0));
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($this->directory));
         $this->rule = $this->getMock(
             '\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', array(), array(), '', false
@@ -79,7 +81,7 @@ class AlternativeTest extends \PHPUnit_Framework_TestCase
         $this->setExpectedException('\InvalidArgumentException', "\$alternativeExtensions must be an array with format:"
             . " array('ext1' => array('ext1', 'ext2'), 'ext3' => array(...)]");
 
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $rulePool = $this->getMock('Magento\Framework\View\Design\Fallback\RulePool', array(), array(), '', false);
         $cache = $this->getMockForAbstractClass(
             'Magento\Framework\View\Design\FileResolution\Fallback\CacheDataInterface'
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php
index 4a3ddeebb9fa385c33e15e4e8714d4cbf21e5eac..d0191ddbdf23a0f313d8c9582f38713674507cfa 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/SimpleTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class SimpleTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -52,10 +54,10 @@ class SimpleTest extends \PHPUnit_Framework_TestCase
         $this->directory->expects($this->any())
             ->method('getRelativePath')
             ->will($this->returnArgument(0));
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($this->directory));
         $this->rule = $this->getMock(
             '\Magento\Framework\View\Design\Fallback\Rule\RuleInterface', array(), array(), '', false
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php
index 9cdd19427987d1bceba7b787983a06cc0b34f911..8401fb232b80f3feb7733baa453a3b306fdbe7c0 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Framework\View\Design\Theme\Customization;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class AbstractFileTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -65,7 +67,7 @@ class AbstractFileTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
 
         $this->_modelBuilder = $this->getMockBuilder(
             'Magento\Framework\View\Design\Theme\Customization\AbstractFile'
@@ -254,7 +256,7 @@ class AbstractFileTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
+            DirectoryList::ROOT
         )->will(
             $this->returnValue($directoryMock)
         );
@@ -295,7 +297,7 @@ class AbstractFileTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::ROOT_DIR
+            DirectoryList::ROOT
         )->will(
             $this->returnValue($directoryMock)
         );
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php
index 6977d88a90b7e6750e708843f5c38d8d243b2dc4..3029a1bb4f89b5eeb5350045eb931d16342fdc6e 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php
@@ -61,7 +61,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\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_directory = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false);
         $filesystem->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($this->_directory));
         $this->_directory->expects($this->once())->method('getAbsolutePath')->will($this->returnArgument(0));
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php
index c9cea67987e4b6d34b64e241c2b0053f973c2c1c..eb66059c8fa35ea61b532b815ea6eb0c7bf40194 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php
@@ -56,7 +56,7 @@ class UploaderTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_transferAdapterMock = $this->getMock('Zend_File_Transfer_Adapter_Http', array(), array(), '', false);
         $this->_fileUploader = $this->getMock('Magento\Framework\File\Uploader', array(), array(), '', false);
 
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php
index 8fb588b01408db38b0c811fc3eaa2512db6ead90..1c6f511e0f30d0df09d5a6235fdb7b2d878a3af2 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Framework\View\Design\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ImageTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -35,7 +37,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
     protected $_model;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystemMock;
 
@@ -84,7 +86,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase
             array('isExist', 'copyFile', 'getRelativePath', 'delete'), array(), '', false, false
         );
         $this->_filesystemMock = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryWrite', '__wakeup'),
             array(),
             '',
@@ -93,11 +95,11 @@ class ImageTest extends \PHPUnit_Framework_TestCase
         );
         $this->_filesystemMock->expects($this->at(0))
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)
+            ->with(DirectoryList::MEDIA)
             ->will($this->returnValue($this->_mediaDirectoryMock));
         $this->_filesystemMock->expects($this->at(1))
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($this->_rootDirectoryMock));
         $imageFactory = $this->getMock('Magento\Framework\Image\Factory', array(), array(), '', false, false);
         $this->_imageMock = $this->getMock('Magento\Framework\Image', array(), array(), '', false, false);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php
index 2e293bd765059e12779319049d075bb03648e124..a0bd575d04b760d171c9afa980106543dd1882dc 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php
@@ -31,7 +31,7 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     protected $_block;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -45,11 +45,35 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
      */
     protected $_viewFileSystem;
 
+    /**
+     * @var \Magento\Framework\Filesystem\Directory\Read|\PHPUnit_Framework_MockObject_MockObject
+     */
+    private $rootDirMock;
+
     protected function setUp()
     {
         $this->_viewFileSystem = $this->getMock('\Magento\Framework\View\FileSystem', array(), array(), '', false);
 
-        $this->_filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->rootDirMock = $this->getMock('Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false);
+        $this->rootDirMock->expects($this->any())
+            ->method('getRelativePath')
+            ->will($this->returnArgument(0))
+        ;
+        $appDirMock = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false);
+        $themesDirMock = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false);
+        $themesDirMock->expects($this->any())
+            ->method('getAbsolutePath')
+            ->will($this->returnValue('themedir'));
+
+        $this->_filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
+        $this->_filesystem->expects($this->any())
+            ->method('getDirectoryRead')
+            ->will($this->returnValueMap([
+                [\Magento\Framework\App\Filesystem\DirectoryList::THEMES, $themesDirMock],
+                [\Magento\Framework\App\Filesystem\DirectoryList::APP, $appDirMock],
+                [\Magento\Framework\App\Filesystem\DirectoryList::ROOT, $this->rootDirMock],
+            ]))
+        ;
 
         $this->_templateEngine = $this->getMock(
             'Magento\Framework\View\TemplateEnginePool',
@@ -86,58 +110,31 @@ class TemplateTest extends \PHPUnit_Framework_TestCase
     public function testFetchView()
     {
         $this->expectOutputString('');
-        $directoryMock = $this->getMock('\Magento\Framework\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)
-        );
+        $template = 'themedir/template.phtml';
+        $this->rootDirMock->expects($this->once())
+            ->method('isFile')
+            ->with($template)
+            ->will($this->returnValue(true))
+        ;
 
         $output = '<h1>Template Contents</h1>';
         $vars = array('var1' => 'value1', 'var2' => 'value2');
         $this->_templateEngine->expects($this->once())->method('render')->will($this->returnValue($output));
         $this->_block->assign($vars);
-        $this->assertEquals($output, $this->_block->fetchView('themedir/template.phtml'));
+        $this->assertEquals($output, $this->_block->fetchView($template));
     }
 
     public function testSetTemplateContext()
     {
-        $directoryMock = $this->getMock('\Magento\Framework\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)
-        );
-
+        $template = 'themedir/template.phtml';
+        $this->rootDirMock->expects($this->once())
+            ->method('isFile')
+            ->with($template)
+            ->will($this->returnValue(true))
+        ;
         $context = new \Magento\Framework\Object();
         $this->_templateEngine->expects($this->once())->method('render')->with($context);
         $this->_block->setTemplateContext($context);
-        $this->_block->fetchView('themedir/template.phtml');
+        $this->_block->fetchView($template);
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php
index 19bde27a256e75e94a58176616d4fdf793b63645..ba3029d1a96963524d7059883f0eadcf23e6866d 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/BaseTest.php
@@ -24,15 +24,17 @@
 
 namespace Magento\Framework\View\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class BaseTest extends \PHPUnit_Framework_TestCase
 {
     public function testGetFiles()
     {
         $directory = $this->getMock('Magento\Framework\Filesystem\Directory\Read', [], [], '', false);
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', ['getDirectoryRead'], [], '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', ['getDirectoryRead'], [], '', false);
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::MODULES_DIR)
+            ->with(DirectoryList::MODULES)
             ->will($this->returnValue($directory));
         $globalFiles = [
             'Namespace/One/view/base/layout/one.xml',
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php
index ceb41484248b519a049316dadc08c2e04b198e06..80bbcbbb3702406c4e635bd9f9086871b4aa2ab8 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/BaseTest.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\View\File\Collector\Override;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\Read,
     Magento\Framework\View\File\Factory;
 
@@ -51,11 +52,11 @@ class BaseTest extends \PHPUnit_Framework_TestCase
             array('getAbsolutePath', 'search'), array(), '', false
         );
         $filesystem = $this->getMock(
-            'Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false
+            'Magento\Framework\Filesystem', array('getDirectoryRead'), array(), '', false
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::THEMES_DIR)
+            ->with(DirectoryList::THEMES)
             ->will($this->returnValue($this->directory));
         $this->fileFactory = $this->getMock('Magento\Framework\View\File\Factory', array(), array(), '', false);
         $this->model = new \Magento\Framework\View\File\Collector\Override\Base(
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php
index e75ffb95e4622f76ba59fe350e8c8b961c65f501..12e7faa71c641cd710689e67621bc0b7daaf48b8 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/Override/ThemeModularTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\View\File\Collector\Override;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ThemeModularTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -43,14 +45,14 @@ class ThemeModularTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array('getDirectoryRead'), array(), '', false);
         $this->_directory = $this->getMock('Magento\Framework\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\Framework\App\Filesystem::THEMES_DIR))
+            ->with($this->equalTo(DirectoryList::THEMES))
             ->will($this->returnValue($this->_directory));
         $this->_fileFactory = $this->getMock('Magento\Framework\View\File\Factory', array(), array(), '', false);
         $this->_model = new \Magento\Framework\View\File\Collector\Override\ThemeModular(
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php
index f4c468b43a31e30104ad9c8f786b540729c7abe6..992d65bc29476780c4a3e30bf1cc6d3c9486b8b7 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeModularTest.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\View\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\Read;
 use Magento\Framework\View\File\Factory;
 
@@ -54,7 +55,7 @@ class ThemeModularTest extends \PHPUnit_Framework_TestCase
             false
         );
         $filesystem = $this->getMock(
-            'Magento\Framework\App\Filesystem',
+            'Magento\Framework\Filesystem',
             array('getDirectoryRead', '__wakeup'),
             array(),
             '',
@@ -62,7 +63,7 @@ class ThemeModularTest extends \PHPUnit_Framework_TestCase
         );
         $filesystem->expects($this->once())
             ->method('getDirectoryRead')
-            ->with(\Magento\Framework\App\Filesystem::THEMES_DIR)
+            ->with(DirectoryList::THEMES)
             ->will($this->returnValue($this->directory));
         $this->fileFactory = $this->getMock('Magento\Framework\View\File\Factory', array(), array(), '', false);
         $this->model = new \Magento\Framework\View\File\Collector\ThemeModular(
diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeTest.php
index 2bd0fe28b290c988c9a6a7a631c19207420010ea..b16e3f6c5c0cf69fc50ef07d8a7f554357c6ce8c 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeTest.php
+++ b/dev/tests/unit/testsuite/Magento/Framework/View/File/Collector/ThemeTest.php
@@ -31,7 +31,7 @@ use Magento\Framework\View\File\Factory;
 class ThemeTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem|PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystemMock;
 
@@ -52,7 +52,7 @@ class ThemeTest extends \PHPUnit_Framework_TestCase
 
     public function setup()
     {
-        $this->filesystemMock = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $this->filesystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()->getMock();
 
         $this->themesDirectoryMock = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\ReadInterface')
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
index 9f4f2a1e1fe45c682b386d3332fda57053b94de2..d6e77e5663fa1c2ef88dd3e05e3958dcc9e07701 100644
--- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php
+++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/GroupedTest.php
@@ -56,7 +56,7 @@ class GroupedTest extends \PHPUnit_Framework_TestCase
         $eventManager = $this->getMock('Magento\Framework\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\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $coreRegistry = $this->getMock('Magento\Framework\Registry', array(), array(), '', false);
         $this->product = $this->getMock('Magento\Catalog\Model\Product', array(), array(), '', false);
         $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
index a0157688d733204b5e2655ff57111f4d95755071..2f1a7ab11999bf090e0f815eb1d1fd7dd23c284b 100644
--- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
+++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/ExportTest.php
@@ -77,7 +77,7 @@ class ExportTest extends \PHPUnit_Framework_TestCase
         );
 
         $logger = $this->getMock('Magento\Framework\Logger', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $adapterFactory = $this->getMock('Magento\Framework\Logger\AdapterFactory', array(), array(), '', false);
         $entityFactory = $this->getMock(
             'Magento\ImportExport\Model\Export\Entity\Factory',
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 38be21da4ccd897ce1f70a6f4a5b4cdfb9d8c9e2..af8a3d3c7525df5e681579b1c50502aa97c21bbe 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
@@ -26,7 +26,7 @@ namespace Magento\ImportExport\Model\Import\Source;
 class CsvTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -40,7 +40,7 @@ class CsvTest extends \PHPUnit_Framework_TestCase
      */
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_directoryMock = $this->getMock(
             'Magento\Framework\Filesystem\Directory\Write',
             array(),
diff --git a/dev/tests/unit/testsuite/Magento/Log/Model/ShellTest.php b/dev/tests/unit/testsuite/Magento/Log/Model/ShellTest.php
index f30086880340e3e84af9ffa23772470e2a42e7d8..80604e89d892f275668b20abe0958339c447ea14 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\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_model = $this->getMock(
             'Magento\Log\Model\Shell',
             array('_applyPhpVariables'),
diff --git a/dev/tests/unit/testsuite/Magento/Log/Model/VisitorTest.php b/dev/tests/unit/testsuite/Magento/Log/Model/VisitorTest.php
index ea5565936bebdcdf0065c434f78954d0d3bcc90a..50f951eaa3e7a91b9658bf0b76fd7dc779895462 100644
--- a/dev/tests/unit/testsuite/Magento/Log/Model/VisitorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Log/Model/VisitorTest.php
@@ -68,6 +68,12 @@ class VisitorTest extends \PHPUnit_Framework_TestCase
      */
     protected $dateTime;
 
+    /**
+     * @var \Magento\Customer\Model\Resource\Visitor|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $resource;
+
+
     public function setUp()
     {
         $this->registry = $this->getMock('Magento\Framework\Registry');
@@ -81,7 +87,7 @@ class VisitorTest extends \PHPUnit_Framework_TestCase
         $store = $this->getMock('\Magento\Store\Model\Store', [], [], '', false, false);
         $this->storeManagerInterface->expects($this->any())->method('getStore')->will($this->returnValue($store));
 
-        $resource = $this->getMockBuilder('Magento\Customer\Model\Resource\Visitor')
+        $this->resource = $this->getMockBuilder('Magento\Customer\Model\Resource\Visitor')
             ->setMethods([
                 'beginTransaction',
                 '__sleep',
@@ -91,8 +97,8 @@ class VisitorTest extends \PHPUnit_Framework_TestCase
                 'addCommitCallback',
                 'commit'
             ])->disableOriginalConstructor()->getMock();
-        $resource->expects($this->any())->method('getIdFieldName')->will($this->returnValue('visitor_id'));
-        $resource->expects($this->any())->method('addCommitCallback')->will($this->returnSelf());
+        $this->resource->expects($this->any())->method('getIdFieldName')->will($this->returnValue('visitor_id'));
+        $this->resource->expects($this->any())->method('addCommitCallback')->will($this->returnSelf());
 
         $objectManagerHelper = new ObjectManagerHelper($this);
         $arguments = $objectManagerHelper->getConstructArguments(
@@ -105,7 +111,7 @@ class VisitorTest extends \PHPUnit_Framework_TestCase
                 'remoteAddress' => $this->remoteAddress,
                 'serverAddress' => $this->serverAddress,
                 'dateTime' => $this->dateTime,
-                'resource' => $resource
+                'resource' => $this->resource
             ]
         );
 
@@ -154,6 +160,10 @@ class VisitorTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()->getMock();
         $visitor->expects($this->once())->method('setData')->will($this->returnSelf());
         $visitor->expects($this->once())->method('getData')->will($this->returnValue([]));
+
+        $this->resource->expects($this->once())->method('save')->will($this->returnSelf());
+        $this->resource->expects($this->never())->method('beginTransaction');
+
         $event = new \Magento\Framework\Object(['visitor' => $visitor]);
         $observer = new \Magento\Framework\Object(['event' => $event]);
         $this->assertSame($this->visitor, $this->visitor->logNewVisitor($observer));
@@ -166,6 +176,9 @@ class VisitorTest extends \PHPUnit_Framework_TestCase
         $visitor->expects($this->once())->method('setData')->will($this->returnSelf());
         $visitor->expects($this->once())->method('getData')->will($this->returnValue(['visitor_id' => 1]));
 
+        $this->resource->expects($this->once())->method('save')->will($this->returnSelf());
+        $this->resource->expects($this->never())->method('beginTransaction');
+
         $event = new \Magento\Framework\Object(['visitor' => $visitor]);
         $observer = new \Magento\Framework\Object(['event' => $event]);
         $this->assertSame($this->visitor, $this->visitor->logVisitorActivity($observer));
diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfigTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfigTest.php
index edf8939a6de56680ddb88a6e7c72a33644e683ae..291494e0c84e287518424a63f2592a5c4317119f 100644
--- a/dev/tests/unit/testsuite/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/PageCache/Controller/Adminhtml/PageCache/ExportVarnishConfigTest.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\PageCache\Controller\Adminhtml\PageCache;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class PageCacheTest
  *
@@ -113,7 +115,7 @@ class ExportVarnishConfigTest extends \PHPUnit_Framework_TestCase
         )->with(
             $this->equalTo($filename),
             $this->equalTo($fileContent),
-            $this->equalTo(\Magento\Framework\App\Filesystem::VAR_DIR)
+            $this->equalTo(DirectoryList::VAR_DIR)
         )->will(
             $this->returnValue($responseMock)
         );
diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Model/ConfigTest.php
index 09d714b9f05178ec518bb5b5bc836da0794ddf35..703a0e7db06ed9685186ce822882074e37766265 100644
--- a/dev/tests/unit/testsuite/Magento/PageCache/Model/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/PageCache/Model/ConfigTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\PageCache\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class ConfigTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -46,7 +48,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
     public function setUp()
     {
         $filesystemMock =
-            $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryRead'), array(), '', false);
+            $this->getMock('Magento\Framework\Filesystem', array('getDirectoryRead'), array(), '', false);
         $this->_coreConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface');
         $this->_cacheState =
             $this->getMock('\Magento\Framework\App\Cache\State', array('isEnabled'), array(), '', false);
@@ -63,7 +65,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryRead'
         )->with(
-            \Magento\Framework\App\Filesystem::MODULES_DIR
+            DirectoryList::MODULES
         )->will(
             $this->returnValue($modulesDirectoryMock)
         );
diff --git a/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php
index c1ac9481ec47b8fb0c63d9ad2d51bc65359b65e6..49f7da2a14f3d135e704aad185c489d8ec10bb3f 100644
--- a/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Payment/Helper/DataTest.php
@@ -24,38 +24,50 @@
 
 namespace Magento\Payment\Helper;
 
+use Magento\TestFramework\Matcher\MethodInvokedAtIndex;
+
 class DataTest extends \PHPUnit_Framework_TestCase
 {
     /** @var \Magento\Payment\Helper\Data */
-    protected $_helper;
+    private $helper;
 
     /**  @var \PHPUnit_Framework_MockObject_MockObject */
-    protected $_scopeConfig;
+    private $scopeConfig;
 
     /**  @var \PHPUnit_Framework_MockObject_MockObject */
-    protected $_initialConfig;
+    private $initialConfig;
 
     /**  @var \PHPUnit_Framework_MockObject_MockObject */
-    protected $_methodFactory;
+    private $methodFactory;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $layoutMock;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    private $appEmulation;
 
     protected function setUp()
     {
-        $context              = $this->getMock('Magento\Framework\App\Helper\Context', [], [], '', false);
-        $this->_scopeConfig   = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false);
-        $layout               = $this->getMock('Magento\Framework\View\LayoutInterface', [], [], '', false);
-        $this->_methodFactory = $this->getMock('Magento\Payment\Model\Method\Factory', [], [], '', false);
-        $appEmulation         = $this->getMock('Magento\Core\Model\App\Emulation', [], [], '', false);
-        $paymentConfig        = $this->getMock('Magento\Payment\Model\Config', [], [], '', false);
-        $this->_initialConfig = $this->getMock('Magento\Framework\App\Config\Initial', [], [], '', false);
-
-        $this->_helper = new \Magento\Payment\Helper\Data(
+        $context = $this->getMock('Magento\Framework\App\Helper\Context', [], [], '', false);
+        $this->scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false);
+        $this->layoutMock = $this->getMock('Magento\Framework\View\LayoutInterface', [], [], '', false);
+        $this->methodFactory = $this->getMock('Magento\Payment\Model\Method\Factory', [], [], '', false);
+        $this->appEmulation = $this->getMock('Magento\Core\Model\App\Emulation', [], [], '', false);
+        $paymentConfig = $this->getMock('Magento\Payment\Model\Config', [], [], '', false);
+        $this->initialConfig = $this->getMock('Magento\Framework\App\Config\Initial', [], [], '', false);
+
+        $this->helper = new \Magento\Payment\Helper\Data(
             $context,
-            $this->_scopeConfig,
-            $layout,
-            $this->_methodFactory,
-            $appEmulation,
+            $this->scopeConfig,
+            $this->layoutMock,
+            $this->methodFactory,
+            $this->appEmulation,
             $paymentConfig,
-            $this->_initialConfig
+            $this->initialConfig
         );
     }
 
@@ -67,7 +79,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetMethodInstance($code, $class, $methodInstance)
     {
-        $this->_scopeConfig->expects(
+        $this->scopeConfig->expects(
             $this->once()
         )->method(
             'getValue'
@@ -76,7 +88,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
                 $class
             )
         );
-        $this->_methodFactory->expects(
+        $this->methodFactory->expects(
             $this->any()
         )->method(
             'create'
@@ -88,70 +100,181 @@ class DataTest extends \PHPUnit_Framework_TestCase
             )
         );
 
-        $this->assertEquals($methodInstance, $this->_helper->getMethodInstance($code));
+        $this->assertEquals($methodInstance, $this->helper->getMethodInstance($code));
     }
 
     /**
-     * @param $method1 array
-     * @param $method2 array
+     * @param array $methodA
+     * @param array $methodB
      *
      * @dataProvider getSortMethodsDataProvider
      */
-    public function testSortMethods($method1, $method2)
+    public function testSortMethods(array $methodA, array $methodB)
     {
-        $this->_initialConfig->expects($this->once())
+        $this->initialConfig->expects($this->once())
             ->method('getData')
-            ->will($this->returnValue(
-                array(\Magento\Payment\Helper\Data::XML_PATH_PAYMENT_METHODS => array(
-                    'method1' => $method1,
-                    'method2 '=> $method2
-                ))
-            ));
-
-        $this->_scopeConfig->expects($this->any())
+            ->will(
+                $this->returnValue(
+                    [
+                        \Magento\Payment\Helper\Data::XML_PATH_PAYMENT_METHODS => [
+                            $methodA['code'] => $methodA['data'],
+                            $methodB['code'] => $methodB['data'],
+                            'empty' => [],
+
+                        ]
+                    ]
+                )
+            );
+
+        $this->scopeConfig->expects(new MethodInvokedAtIndex(0))
+            ->method('getValue')
+            ->with(
+                    sprintf('%s/%s/model', Data::XML_PATH_PAYMENT_METHODS, $methodA['code'])
+            )
+            ->will($this->returnValue('Magento\Payment\Model\Method\AbstractMethod'));
+        $this->scopeConfig->expects(new MethodInvokedAtIndex(1))
             ->method('getValue')
+            ->with(
+                sprintf('%s/%s/model', Data::XML_PATH_PAYMENT_METHODS, $methodB['code'])
+            )
             ->will($this->returnValue('Magento\Payment\Model\Method\AbstractMethod'));
+        $this->scopeConfig->expects(new MethodInvokedAtIndex(2))
+            ->method('getValue')
+            ->with(sprintf('%s/%s/model', Data::XML_PATH_PAYMENT_METHODS, 'empty'))
+            ->will($this->returnValue(null));
 
-        $methodInstanceMock1 = $this->getMock(
+        $methodInstanceMockA = $this->getMock(
             'Magento\Framework\Object',
             array('isAvailable','getConfigData'),
             array(),
             '',
             false
         );
-        $methodInstanceMock1->expects($this->any())
+        $methodInstanceMockA->expects($this->any())
             ->method('isAvailable')
             ->will($this->returnValue(true));
-        $methodInstanceMock1->expects($this->any())
+        $methodInstanceMockA->expects($this->any())
             ->method('getConfigData')
-            ->will($this->returnValue($method1['sort_order']));
+            ->will($this->returnValue($methodA['data']['sort_order']));
 
-        $methodInstanceMock2 = $this->getMock(
+        $methodInstanceMockB = $this->getMock(
             'Magento\Framework\Object',
             array('isAvailable','getConfigData'),
             array(),
             '',
             false
         );
-        $methodInstanceMock2->expects($this->any())
+        $methodInstanceMockB->expects($this->any())
             ->method('isAvailable')
             ->will($this->returnValue(true));
-        $methodInstanceMock2->expects($this->any())
+        $methodInstanceMockB->expects($this->any())
             ->method('getConfigData')
-            ->will($this->returnValue($method2['sort_order']));
+            ->will($this->returnValue($methodB['data']['sort_order']));
 
-        $this->_methodFactory->expects($this->at(0))
+        $this->methodFactory->expects($this->at(0))
             ->method('create')
-            ->will($this->returnValue($methodInstanceMock1));
+            ->will($this->returnValue($methodInstanceMockA));
 
-        $this->_methodFactory->expects($this->at(1))
+        $this->methodFactory->expects($this->at(1))
             ->method('create')
-            ->will($this->returnValue($methodInstanceMock2));
+            ->will($this->returnValue($methodInstanceMockB));
 
-        $sortedMethods = $this->_helper->getStoreMethods();
+        $sortedMethods = $this->helper->getStoreMethods();
         $this->assertTrue(array_shift($sortedMethods)->getSortOrder() < array_shift($sortedMethods)->getSortOrder());
     }
 
+    public function testGetMethodFormBlock()
+    {
+        list($blockType, $methodCode) = ['method_block_type', 'method_code'];
+
+        $methodMock = $this->getMockBuilder('Magento\Payment\Model\MethodInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMock();
+        $layoutMock = $this->getMockBuilder('Magento\Framework\View\LayoutInterface')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMock();
+        $blockMock = $this->getMockBuilder('Magento\Framework\View\Element\BlockInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['setMethod', 'toHtml'])
+            ->getMock();
+
+        $methodMock->expects($this->once())->method('getFormBlockType')->willReturn($blockType);
+        $methodMock->expects($this->once())->method('getCode')->willReturn($methodCode);
+        $layoutMock->expects($this->once())->method('createBlock')
+            ->with($blockType, $methodCode)
+            ->willReturn($blockMock);
+        $blockMock->expects($this->once())->method('setMethod')->with($methodMock);
+
+        $this->assertSame($blockMock, $this->helper->getMethodFormBlock($methodMock, $layoutMock));
+    }
+
+    public function testGetInfoBlock()
+    {
+        $blockType = 'method_block_type';
+
+        $methodMock = $this->getMockBuilder('Magento\Payment\Model\MethodInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['getCode', 'getFormBlockType', 'getTitle', 'getInfoBlockType'])
+            ->getMock();
+        $infoMock = $this->getMockBuilder('Magento\Payment\Model\Info')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMock();
+        $blockMock = $this->getMockBuilder('Magento\Framework\View\Element\BlockInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['setInfo', 'toHtml'])
+            ->getMock();
+
+        $infoMock->expects($this->once())->method('getMethodInstance')->willReturn($methodMock);
+        $methodMock->expects($this->once())->method('getInfoBlockType')->willReturn($blockType);
+        $this->layoutMock->expects($this->once())->method('createBlock')
+            ->with($blockType)
+            ->willReturn($blockMock);
+        $blockMock->expects($this->once())->method('setInfo')->with($infoMock);
+
+        $this->assertSame($blockMock, $this->helper->getInfoBlock($infoMock));
+    }
+
+    public function testGetInfoBlockHtml()
+    {
+        list($storeId, $blockHtml, $secureMode, $blockType) = [1, 'HTML MARKUP', true, 'method_block_type'];
+
+        $methodMock = $this->getMockBuilder('Magento\Payment\Model\MethodInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['getCode', 'getFormBlockType', 'getTitle', 'getInfoBlockType', 'setStore'])
+            ->getMock();
+        $infoMock = $this->getMockBuilder('Magento\Payment\Model\Info')
+            ->disableOriginalConstructor()
+            ->setMethods([])
+            ->getMock();
+        $paymentBlockMock = $this->getMockBuilder('Magento\Framework\View\Element\BlockInterface')
+            ->disableOriginalConstructor()
+            ->setMethods(['setArea', 'setIsSecureMode', 'getMethod', 'setStore', 'toHtml', 'setInfo'])
+            ->getMock();
+
+        $this->appEmulation->expects($this->once())->method('startEnvironmentEmulation')->with($storeId);
+        $infoMock->expects($this->once())->method('getMethodInstance')->willReturn($methodMock);
+        $methodMock->expects($this->once())->method('getInfoBlockType')->willReturn($blockType);
+        $this->layoutMock->expects($this->once())->method('createBlock')
+            ->with($blockType)
+            ->willReturn($paymentBlockMock);
+        $paymentBlockMock->expects($this->once())->method('setInfo')->with($infoMock);
+        $paymentBlockMock->expects($this->once())->method('setArea')
+            ->with(\Magento\Framework\App\Area::AREA_FRONTEND)
+            ->willReturnSelf();
+        $paymentBlockMock->expects($this->once())->method('setIsSecureMode')
+            ->with($secureMode);
+        $paymentBlockMock->expects($this->once())->method('getMethod')
+            ->willReturn($methodMock);
+        $methodMock->expects($this->once())->method('setStore')->with($storeId);
+        $paymentBlockMock->expects($this->once())->method('toHtml')
+            ->willReturn($blockHtml);
+        $this->appEmulation->expects($this->once())->method('stopEnvironmentEmulation');
+
+        $this->assertEquals($blockHtml, $this->helper->getInfoBlockHtml($infoMock, $storeId));
+    }
 
     public function getMethodInstanceDataProvider()
     {
@@ -165,12 +288,12 @@ class DataTest extends \PHPUnit_Framework_TestCase
     {
         return array(
             array(
-                array('sort_order' => 0),
-                array('sort_order' => 1)
+                array('code' => 'methodA', 'data' => ['sort_order' => 0]),
+                array('code' => 'methodB', 'data' => ['sort_order' => 1])
             ),
             array(
-                array('sort_order' => 2),
-                array('sort_order' => 1),
+                array('code' => 'methodA', 'data' => ['sort_order' => 2]),
+                array('code' => 'methodB', 'data' => ['sort_order' => 1]),
             )
         );
     }
diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Helper/DataTest.php
index 737a7aaf9d158afdca81adad9157d783afcac243..1c7d05f21eb83ccfa30f7782ada09c0304d8ee2d 100644
--- a/dev/tests/unit/testsuite/Magento/Paypal/Helper/DataTest.php
+++ b/dev/tests/unit/testsuite/Magento/Paypal/Helper/DataTest.php
@@ -72,16 +72,6 @@ class DataTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals($expectedResult, $this->_helper->getBillingAgreementMethods($store, $quote));
     }
 
-    /**
-     * @dataProvider canManageBillingAgreementsDataProvider
-     * @param $expectedResult
-     * @param $methodInstance
-     */
-    public function testCanManageBillingAgreements($expectedResult, $methodInstance)
-    {
-        $this->assertEquals($expectedResult, $this->_helper->canManageBillingAgreements($methodInstance));
-    }
-
     /**
      * @return array
      */
@@ -101,15 +91,4 @@ class DataTest extends \PHPUnit_Framework_TestCase
             array('1', $quoteMock, array(new \StdClass()), array())
         );
     }
-
-    /**
-     * @return array
-     */
-    public function canManageBillingAgreementsDataProvider()
-    {
-        $methodInterfaceMock = $this->getMockBuilder(
-            'Magento\Paypal\Model\Billing\Agreement\MethodInterface'
-        )->getMock();
-        return array(array(true, $methodInterfaceMock), array(false, new \StdClass()));
-    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Paypal/Model/Report/Settlement/RowTest.php b/dev/tests/unit/testsuite/Magento/Paypal/Model/Report/Settlement/RowTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..6cdef6a9f2db3faf3f1b5862d945e1fa4d715dc2
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Paypal/Model/Report/Settlement/RowTest.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\Paypal\Model\Report\Settlement;
+
+use Magento\TestFramework\Helper\ObjectManager as ObjectManagerHelper;
+
+class RowTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var \Magento\Paypal\Model\Report\Settlement\Row
+     */
+    protected $row;
+
+
+    public function setUp()
+    {
+        $objectManagerHelper = new ObjectManagerHelper($this);
+        $this->row = $objectManagerHelper->getObject('Magento\Paypal\Model\Report\Settlement\Row');
+    }
+
+    /**
+     * @param string $code
+     * @param string $expectation
+     * @dataProvider getReferenceTypeDataProvider
+     */
+    public function testGetReferenceType($code, $expectation)
+    {
+        $this->assertEquals($expectation, $this->row->getReferenceType($code));
+    }
+
+    /**
+     * @param string $code
+     * @param string $expectation
+     * @dataProvider getTransactionEventDataProvider
+     */
+    public function testGetTransactionEvent($code, $expectation)
+    {
+        $this->assertEquals($expectation, $this->row->getTransactionEvent($code));
+    }
+
+    /**
+     * @param string $code
+     * @param string $expectation
+     * @dataProvider getDebitCreditTextDataProvider
+     */
+    public function testGetDebitCreditText($code, $expectation)
+    {
+        $this->assertEquals($expectation, $this->row->getDebitCreditText($code));
+    }
+
+    /**
+     * @param string $code
+     * @param array $modelData
+     * @param int $expectation
+     * @dataProvider getCastedAmountDataProvider
+     */
+    public function testGetCastedAmount($code, $modelData, $expectation)
+    {
+        $this->row->setData($modelData);
+        $this->assertEquals($expectation, $this->row->getCastedAmount($code));
+    }
+
+    public function testGetTransactionEvents()
+    {
+        $this->assertArrayHasKey('T1502', $this->row->getTransactionEvents());
+    }
+
+    /**
+     * @return array
+     */
+    public function getReferenceTypeDataProvider()
+    {
+        return [
+            ['ODR', __('Order ID')],
+            ['EX_VALUE', 'EX_VALUE']
+        ];
+    }
+
+    /**
+     * @return array
+     */
+    public function getTransactionEventDataProvider()
+    {
+        return [
+            ['T1502', __('ACH Deposit (Hold for Dispute or Other Investigation)')],
+            ['EX_VALUE', 'EX_VALUE']
+        ];
+    }
+
+    /**
+     * @return array
+     */
+    public function getDebitCreditTextDataProvider()
+    {
+        return [
+            ['CR', __('Credit')],
+            ['EX_VALUE', 'EX_VALUE']
+        ];
+    }
+
+    /**
+     * @return array
+     */
+    public function getCastedAmountDataProvider()
+    {
+        return [
+            ['fee_amount', ['fee_amount' => 100, 'fee_debit_or_credit' => 'CR'], -1],
+            ['fee_amount', ['fee_amount' => 100, 'fee_debit_or_credit' => 'DB'], 1]
+        ];
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserverTest.php b/dev/tests/unit/testsuite/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserverTest.php
index 557cde30ee81a1a1fa84be049cd1d28f148e082b..22172db18f6753deb0f169b1cef3d9d5e3f0c48a 100644
--- a/dev/tests/unit/testsuite/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserverTest.php
+++ b/dev/tests/unit/testsuite/Magento/RecurringPayment/Model/Observer/CheckoutManagerObserverTest.php
@@ -65,8 +65,26 @@ class CheckoutManagerObserverTest extends \PHPUnit_Framework_TestCase
      */
     protected $_checkoutSession;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
     protected $_quote;
 
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_specification;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_quotePayment;
+
+    /**
+     * @var \PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_quoteSales;
+
     protected function setUp()
     {
         $this->_observer = $this->getMock('Magento\Framework\Event\Observer', array(), array(), '', false);
@@ -108,9 +126,34 @@ class CheckoutManagerObserverTest extends \PHPUnit_Framework_TestCase
 
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
 
+        $this->_specification = $this->getMock(
+            'Magento\RecurringPayment\Model\Method\RecurringPaymentSpecification',
+            ['isSatisfiedBy'],
+            [],
+            '',
+            false
+        );
         $this->_testModel = $helper->getObject(
             'Magento\RecurringPayment\Model\Observer\CheckoutManagerObserver',
-            array('checkoutSession' => $this->_checkoutSession, 'quoteImporter' => $this->_quote)
+            array(
+                'checkoutSession' => $this->_checkoutSession,
+                'quoteImporter' => $this->_quote,
+                'specification' => $this->_specification
+            )
+        );
+        $this->_quotePayment = $this->getMock(
+            'Magento\Sales\Model\Quote\Payment',
+            ['getCode', '__wakeup'],
+            [],
+            '',
+            false
+        );
+        $this->_quoteSales = $this->getMock(
+            'Magento\Sales\Model\Quote',
+            ['getPayment', 'getTotalsCollectedFlag', '__sleep', '__wakeup', 'getAllVisibleItems'],
+            [],
+            '',
+            false
         );
 
         $this->_event = $this->getMock(
@@ -120,7 +163,6 @@ class CheckoutManagerObserverTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-
         $this->_observer->expects($this->any())->method('getEvent')->will($this->returnValue($this->_event));
         $this->_payment = $this->getMock(
             'Magento\RecurringPayment\Model\Payment',
@@ -144,7 +186,6 @@ class CheckoutManagerObserverTest extends \PHPUnit_Framework_TestCase
     {
         $this->_prepareRecurringPayments();
         $this->_quote->expects($this->once())->method('import')->will($this->returnValue(array($this->_payment)));
-
         $this->_payment->expects($this->once())->method('isValid')->will($this->returnValue(true));
         $this->_payment->expects($this->once())->method('submit');
 
@@ -191,14 +232,18 @@ class CheckoutManagerObserverTest extends \PHPUnit_Framework_TestCase
             false
         );
 
-        $quote = $this->getMock(
-            'Magento\Sales\Model\Quote',
-            array('getTotalsCollectedFlag', '__sleep', '__wakeup', 'getAllVisibleItems'),
-            array(),
-            '',
-            false
-        );
-
-        $this->_event->expects($this->any())->method('getQuote')->will($this->returnValue($quote));
+        $this->_quotePayment->expects($this->once())
+            ->method('getCode')
+            ->will($this->returnValue('paypal_express'));
+        $this->_specification->expects($this->once())
+            ->method('isSatisfiedBy')
+            ->with('paypal_express')
+            ->will($this->returnValue(true));
+        $this->_quoteSales->expects($this->once())
+            ->method('getPayment')
+            ->will($this->returnValue($this->_quotePayment));
+        $this->_event->expects($this->exactly(2))
+            ->method('getQuote')
+            ->will($this->returnValue($this->_quoteSales));
     }
 }
diff --git a/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php b/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php
index 4a345655c6926f6ac1fb64d11d1df100d92a47db..afb191e0e9b9edb62c97cafd7833f7822ec8d04a 100644
--- a/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php
+++ b/dev/tests/unit/testsuite/Magento/RequireJs/Model/FileManagerTest.php
@@ -24,6 +24,8 @@
 
 namespace Magento\RequireJs\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileManagerTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -32,7 +34,7 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
     private $config;
 
     /**
-     * @var \Magento\Framework\App\FileSystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     private $fileSystem;
 
@@ -59,14 +61,14 @@ class FileManagerTest extends \PHPUnit_Framework_TestCase
     protected function setUp()
     {
         $this->config = $this->getMock('\Magento\Framework\RequireJs\Config', array(), array(), '', false);
-        $this->fileSystem = $this->getMock('\Magento\Framework\App\FileSystem', array(), array(), '', false);
+        $this->fileSystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $this->appState = $this->getMock('\Magento\Framework\App\State', array(), array(), '', false);
         $assetRepo = $this->getMock('\Magento\Framework\View\Asset\Repository', array(), array(), '', false);
         $this->object = new FileManager($this->config, $this->fileSystem, $this->appState, $assetRepo);
         $this->dir = $this->getMockForAbstractClass('\Magento\Framework\Filesystem\Directory\WriteInterface');
         $this->fileSystem->expects($this->once())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+            ->with(DirectoryList::STATIC_VIEW)
             ->will($this->returnValue($this->dir))
         ;
         $this->config->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/DownloadTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/DownloadTest.php
index 13a3e8e474c71065002742f958aa35828e81646d..3cb95863368aa6b23af28afae22830d2e8334681 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/DownloadTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/DownloadTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Sales\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class DownloadTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -60,12 +62,12 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
         $this->writeDirectoryMock = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\Write')
             ->disableOriginalConstructor()
             ->getMock();
-        $this->filesystemMock = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $this->filesystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $this->filesystemMock->expects($this->any())
             ->method('getDirectoryWrite')
-            ->with(\Magento\Framework\App\Filesystem::ROOT_DIR)
+            ->with(DirectoryList::ROOT)
             ->will($this->returnValue($this->writeDirectoryMock));
 
         $this->storageMock = $this->getMockBuilder('Magento\Core\Helper\File\Storage\Database')
@@ -236,7 +238,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
             ->with(
                 $info['title'],
                 ['value' => $info['order_path'], 'type' => 'filename'],
-                \Magento\Framework\App\Filesystem::ROOT_DIR,
+                DirectoryList::ROOT,
                 'application/octet-stream',
                 null
             );
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 e2df8df0b737d51bb4dc0697b3e626266860554c..c5d888f19e39a049db8bbc0260535a2562ce4c8c 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
@@ -43,7 +43,7 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
         $string = $this->getMock('Magento\Framework\Stdlib\String', array(), array(), '', false);
         $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface');
         $translate = $this->getMock('Magento\Framework\Translate\Inline\StateInterface', array(), array(), '', false);
-        $filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $pdfItemsFactory = $this->getMock('Magento\Sales\Model\Order\Pdf\ItemsFactory', array(), array(), '', false);
         $localeMock = $this->getMock(
             'Magento\Framework\Stdlib\DateTime\TimezoneInterface',
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 34f8172365cd05c5e061d0c10273e8bbf06df936..5eccdbf2007d583a4631a76a5b5ae340c7961417 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
@@ -55,7 +55,7 @@ class InvoiceTest extends \PHPUnit_Framework_TestCase
                 }
             )
         );
-        $filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false, false);
+        $filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false, false);
         $filesystemMock->expects($this->any())->method('getDirectoryRead')->will($this->returnValue($directoryMock));
         $filesystemMock->expects($this->any())->method('getDirectoryWrite')->will($this->returnValue($directoryMock));
 
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php
index 3a112d361b0c72364809cff2eb12b32815f0b567..24a947e2be6464ca346ba33ff851ccfcc78d15bf 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/OrderTest.php
@@ -48,16 +48,6 @@ class OrderTest extends \PHPUnit_Framework_TestCase
      */
     protected $incrementId;
 
-    /**
-     * @var array
-     */
-    protected $calculatedTaxInfo = [
-        'title'           => 'My Mocked Tax Rate',
-        'percent'         => 10.0,
-        'tax_amount'      => 1.23,
-        'base_tax_amount' => 2.46,
-    ];
-
     protected function setUp()
     {
         $helper = new \Magento\TestFramework\Helper\ObjectManager($this);
@@ -77,21 +67,11 @@ class OrderTest extends \PHPUnit_Framework_TestCase
         );
         $this->incrementId = '#00000001';
 
-        // mock tax helper
-        $taxHelperMock = $this->getMockBuilder('Magento\Tax\Helper\Data')
-            ->setMethods(['getCalculatedTaxes'])
-            ->disableOriginalConstructor()
-            ->getMock();
-        $taxHelperMock->expects($this->any())
-            ->method('getCalculatedTaxes')
-            ->will($this->returnValue($this->calculatedTaxInfo));
-
         $this->order = $helper->getObject(
             'Magento\Sales\Model\Order',
             [
                 'paymentCollectionFactory' => $this->paymentCollectionFactoryMock,
                 'orderItemCollectionFactory' => $this->orderItemCollectionFactoryMock,
-                'taxHelper' => $taxHelperMock,
                 'data' => ['increment_id' => $this->incrementId]
             ]
         );
@@ -392,15 +372,4 @@ class OrderTest extends \PHPUnit_Framework_TestCase
     {
         $this->assertEquals('order', $this->order->getEntityType());
     }
-
-
-    /**
-     * test method getFullTaxInfo()
-     */
-    public function testGetFullTaxInfo()
-    {
-        $actualResult = $this->order->getFullTaxInfo();
-        $expectedResult = $this->calculatedTaxInfo;
-        $this->assertSame($expectedResult, $actualResult);
-    }
 }
diff --git a/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php b/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php
index c679f53cb3c18f9574f509e3c941e465f0f9b276..9a9d6f84c599d43cfc8bcb6df19a334371d148a3 100644
--- a/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sales/Model/Quote/ItemTest.php
@@ -165,7 +165,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase
     public function testGetAddress()
     {
         $quote = $this->getMockBuilder('Magento\Sales\Model\Quote')
-            ->setMethods(['getShippingAddress', 'getBillingAddress', '__wakeup'])
+            ->setMethods(['getShippingAddress', 'getBillingAddress', 'getStoreId', '__wakeup'])
             ->disableOriginalConstructor()
             ->getMock();
         $quote->expects($this->once())
@@ -174,6 +174,9 @@ class ItemTest extends \PHPUnit_Framework_TestCase
         $quote->expects($this->once())
             ->method('getBillingAddress')
             ->will($this->returnValue('billing'));
+        $quote->expects($this->any())
+            ->method('getStoreId')
+            ->will($this->returnValue(1));
 
         $this->model->setQuote($quote);
 
@@ -191,12 +194,15 @@ class ItemTest extends \PHPUnit_Framework_TestCase
         $idValue = "id_value";
 
         $quote = $this->getMockBuilder('Magento\Sales\Model\Quote')
-            ->setMethods(['getId', '__wakeup'])
+            ->setMethods(['getId', 'getStoreId', '__wakeup'])
             ->disableOriginalConstructor()
             ->getMock();
         $quote->expects($this->once())
             ->method('getId')
             ->will($this->returnValue($idValue));
+        $quote->expects($this->any())
+            ->method('getStoreId')
+            ->will($this->returnValue(1));
 
         $this->model->setQuote($quote);
 
@@ -286,13 +292,17 @@ class ItemTest extends \PHPUnit_Framework_TestCase
 
         $quoteMock = $this->getMockBuilder('Magento\Sales\Model\Quote')
             ->disableOriginalConstructor()
-            ->setMethods(['getIgnoreOldQty', '__wakeup'])
+            ->setMethods(['getIgnoreOldQty', 'getStoreId', '__wakeup'])
             ->getMock();
         $quoteMock->expects($this->once())
             ->method('getIgnoreOldQty')
             ->will($this->returnValue(true));
+        $quoteMock->expects($this->any())
+            ->method('getStoreId')
+            ->will($this->returnValue(1));
 
         $this->model->setQuote($quoteMock);
+
         $this->model->setData('qty', $existingQuantity);
 
         $this->eventDispatcher->expects($this->once())
@@ -378,7 +388,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase
             ->with('sales_quote_item_set_product', ['product' => $productMock, 'quote_item' => $this->model]);
 
         $isQtyDecimal = true;
-        $this->stockItemDoMock->expects($this->once())
+        $this->stockItemDoMock->expects($this->any())
             ->method('getStockId')
             ->will($this->returnValue(99));
         $this->stockItemDoMock->expects($this->once())
@@ -391,7 +401,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()
             ->setMethods(['getStoreId', 'getCustomerGroupId', '__wakeup'])
             ->getMock();
-        $quoteMock->expects($this->once())
+        $quoteMock->expects($this->any())
             ->method('getStoreId')
             ->will($this->returnValue($storeId));
         $quoteMock->expects($this->once())
diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/ValidatorTest.php
index 80651335dd6defc62f7fe60e91250a780b2086b7..fc0dcccbd77bc25a5604a3c32e2b1fd3ecdf50d1 100644
--- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/ValidatorTest.php
+++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/ValidatorTest.php
@@ -151,8 +151,15 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase
         $itemSimple->expects($this->any())->method('getAddress')->will($this->returnValue(new \stdClass()));
 
         /** @var $quote \Magento\Sales\Model\Quote */
-        $quote = $this->getMock('Magento\Sales\Model\Quote', ['hasNominalItems', '__wakeup'], [], '', false);
+        $quote = $this->getMock(
+            'Magento\Sales\Model\Quote',
+            ['hasNominalItems', 'getStoreId', '__wakeup'],
+            [],
+            '',
+            false
+        );
         $quote->expects($this->any())->method('hasNominalItems')->will($this->returnValue(false));
+        $quote->expects($this->any())->method('getStoreId')->will($this->returnValue(1));
 
         $itemData = include $fixturePath . 'quote_item_downloadable.php';
         $itemDownloadable->addData($itemData);
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Search/AdapterFactoryTest.php b/dev/tests/unit/testsuite/Magento/Search/Model/AdapterFactoryTest.php
similarity index 94%
rename from dev/tests/unit/testsuite/Magento/Framework/Search/AdapterFactoryTest.php
rename to dev/tests/unit/testsuite/Magento/Search/Model/AdapterFactoryTest.php
index e1632324707dae1a67f5d9ddbc6dde8e790d66e3..2cfbd972ea082d10491fef14072bb47724c4b7a3 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Search/AdapterFactoryTest.php
+++ b/dev/tests/unit/testsuite/Magento/Search/Model/AdapterFactoryTest.php
@@ -21,14 +21,14 @@
  * @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\Framework\Search;
+namespace Magento\Search\Model;
 
 use Magento\TestFramework\Helper\ObjectManager;
 
 class AdapterFactoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\Search\AdapterFactory |\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Search\Model\AdapterFactory|\PHPUnit_Framework_MockObject_MockObject
      */
     private $adapterFactory;
 
@@ -55,7 +55,7 @@ class AdapterFactoryTest extends \PHPUnit_Framework_TestCase
             ->getMock();
 
         $this->adapterFactory = $helper->getObject(
-            '\Magento\Framework\Search\AdapterFactory',
+            '\Magento\Search\Model\AdapterFactory',
             [
                 'objectManager' => $this->objectManager,
                 'scopeConfig' => $scopeConfig,
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Search/SearchEngineTest.php b/dev/tests/unit/testsuite/Magento/Search/Model/SearchEngineTest.php
similarity index 91%
rename from dev/tests/unit/testsuite/Magento/Framework/Search/SearchEngineTest.php
rename to dev/tests/unit/testsuite/Magento/Search/Model/SearchEngineTest.php
index 2089b8da4ee51dacc60662cffeded79ae1c53d36..5a7b324cf22ff9a3f949f635b5a491297f9fbfc4 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Search/SearchEngineTest.php
+++ b/dev/tests/unit/testsuite/Magento/Search/Model/SearchEngineTest.php
@@ -21,14 +21,14 @@
  * @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\Framework\Search;
+namespace Magento\Search\Model;
 
 use Magento\TestFramework\Helper\ObjectManager;
 
 class SearchEngineTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\Search\SearchEngine
+     * @var SearchEngine
      */
     private $searchEngine;
 
@@ -41,7 +41,7 @@ class SearchEngineTest extends \PHPUnit_Framework_TestCase
     {
         $helper = new ObjectManager($this);
 
-        $adapterFactory = $this->getMockBuilder('Magento\Framework\Search\AdapterFactory')
+        $adapterFactory = $this->getMockBuilder('Magento\Search\Model\AdapterFactory')
             ->disableOriginalConstructor()
             ->getMock();
 
@@ -52,7 +52,7 @@ class SearchEngineTest extends \PHPUnit_Framework_TestCase
         $adapterFactory->expects($this->once())->method('create')->will($this->returnValue($this->adapter));
 
         $this->searchEngine = $helper->getObject(
-            'Magento\Framework\Search\SearchEngine',
+            'Magento\Search\Model\SearchEngine',
             [
                 'adapterFactory' => $adapterFactory,
             ]
diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackageTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackageTest.php
index 3424b10accd36714b6a2ade4a075d889b66df8a9..c78207c4d27796fa4ad440716e8730d978aa1585 100644
--- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/PrintPackageTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Shipping\Controller\Adminhtml\Order\Shipment;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class PrintPackageTest
  */
@@ -211,7 +213,7 @@ class PrintPackageTest extends \PHPUnit_Framework_TestCase
             ->with(
                 'packingslip' . $date . '.pdf',
                 $content,
-                \Magento\Framework\App\Filesystem::VAR_DIR,
+                DirectoryList::VAR_DIR,
                 'application/pdf'
             )->will($this->returnValue('result-pdf-content'));
 
diff --git a/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php b/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php
index b916433e8a4cd8773bc5b70cb4ee9d8283bd562f..8a35609ae7cdf8a18505d79a9a8e5dfbb04f0242 100644
--- a/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php
+++ b/dev/tests/unit/testsuite/Magento/Sitemap/Model/SitemapTest.php
@@ -59,7 +59,7 @@ class SitemapTest extends \PHPUnit_Framework_TestCase
     protected $_sitemapCmsPageMock;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystemMock;
 
@@ -154,7 +154,7 @@ class SitemapTest extends \PHPUnit_Framework_TestCase
         $this->_directoryMock->expects($this->any())->method('openFile')->will($this->returnValue($this->_fileMock));
 
         $this->_filesystemMock = $this->getMockBuilder(
-            'Magento\Framework\App\Filesystem'
+            'Magento\Framework\Filesystem'
         )->setMethods(
             array('getDirectoryWrite')
         )->disableOriginalConstructor()->getMock();
diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php
index 4b264695e01dd49697bd950cd524693e78f0b13d..0221d4523c035a93dfc85589f129ea4d5e506d85 100644
--- a/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php
+++ b/dev/tests/unit/testsuite/Magento/Store/Model/Storage/DbTest.php
@@ -74,12 +74,36 @@ class DbTest extends \PHPUnit_Framework_TestCase
      */
     protected $_groupMock;
 
+    /**
+     * @var \Magento\Store\Model\Resource\Website\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_websiteCollectionFactoryMock;
+
+    /**
+     * @var \Magento\Store\Model\Resource\Store\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_storeCollectionFactoryMock;
+
+    /**
+     * @var \Magento\Store\Model\Resource\Group\CollectionFactory|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $_groupCollectionFactoryMock;
+
     protected function setUp()
     {
         $this->_storeFactoryMock = $this->getClassMock('Magento\Store\Model\StoreFactory', array('create'));
         $this->_websiteFactoryMock = $this->getClassMock('Magento\Store\Model\WebsiteFactory', array('create'));
         $this->_groupFactoryMock = $this->getClassMock('Magento\Store\Model\GroupFactory', array('create'));
         $this->_scopeConfig = $this->getClassMock('Magento\Framework\App\Config\ScopeConfigInterface');
+        $this->_websiteCollectionFactoryMock = $this->getClassMock(
+            'Magento\Store\Model\Resource\Website\CollectionFactory', array('create')
+        );
+        $this->_groupCollectionFactoryMock = $this->getClassMock(
+            'Magento\Store\Model\Resource\Group\CollectionFactory', array('create')
+        );
+        $this->_storeCollectionFactoryMock = $this->getClassMock(
+            'Magento\Store\Model\Resource\Store\CollectionFactory', array('create')
+        );
         $this->_appStateMock = $this->getClassMock('Magento\Framework\App\State');
         $this->_groupMock = $this->getClassMock('Magento\Store\Model\Group');
         $this->_websiteMock = $this->getClassMock('Magento\Store\Model\Website');
@@ -90,6 +114,9 @@ class DbTest extends \PHPUnit_Framework_TestCase
             $this->_websiteFactoryMock,
             $this->_groupFactoryMock,
             $this->_scopeConfig,
+            $this->_websiteCollectionFactoryMock,
+            $this->_groupCollectionFactoryMock,
+            $this->_storeCollectionFactoryMock,
             $this->_appStateMock,
             true
         );
@@ -225,6 +252,11 @@ class DbTest extends \PHPUnit_Framework_TestCase
             ->expects($this->any())
             ->method('getIterator')
             ->will($this->returnValue(new \ArrayIterator(array($this->_storeMock))));
+        $storeCollection
+            ->expects($this->any())
+            ->method('getLastItem')
+            ->will($this->returnValue($this->_storeMock));
+
         $this->_storeFactoryMock
             ->expects($this->any())
             ->method('create')
@@ -234,6 +266,21 @@ class DbTest extends \PHPUnit_Framework_TestCase
             ->method('getCollection')
             ->will($this->returnValue($storeCollection));
 
+        $this->_websiteCollectionFactoryMock
+            ->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($websiteCollection));
+
+        $this->_groupCollectionFactoryMock
+            ->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($groupCollection));
+
+        $this->_storeCollectionFactoryMock
+            ->expects($this->any())
+            ->method('create')
+            ->will($this->returnValue($storeCollection));
+
         $this->_storeMock->expects($this->any())->method('getWebsiteId')->will($this->returnValue($websiteId));
         $this->_storeMock->expects($this->any())->method('getGroupId')->will($this->returnValue($groupId));
         $this->_storeMock->expects($this->any())->method('getId')->will($this->returnValue($storeId));
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php
index e6302c509d1acbe50ca5e6a55591b8f157998e1d..3627a68540ff286e5305ac4649acdb13ff8f256d 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php
@@ -30,7 +30,7 @@ class LogoTest extends \PHPUnit_Framework_TestCase
      */
     public function testGetLogoSrc()
     {
-        $filesystem = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystem = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $mediaDirectory = $this->getMock('\Magento\Framework\Filesystem\Directory\Read', array(), array(), '', false);
         $scopeConfig = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface');
 
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php b/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php
index 52e3a1e7f6157a1ac84524b24b68b0b727c0f89c..5cc272cfdbe79a8f27c1d84e3144a78c16f10151 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php
@@ -30,7 +30,7 @@ namespace Magento\Theme\Helper;
 class StorageTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $filesystem;
 
@@ -86,7 +86,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
         $this->customizationPath = '/' . implode('/', array('var', 'theme'));
 
         $this->request = $this->getMock('\Magento\Framework\App\Request\Http', array(), array(), '', false);
-        $this->filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->session = $this->getMock('Magento\Backend\Model\Session', array(), array(), '', false);
         $this->contextHelper = $this->getMock('Magento\Framework\App\Helper\Context', array(), array(), '', false);
         $this->directoryWrite = $this->getMock(
diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php
index 4454c45d87d2d863be5a4acb9ed5a771900a90a7..918201269da65d53b82d2b01a3ad18033de909ef 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Theme\Model;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class CopyServiceTest extends \PHPUnit_Framework_TestCase
 {
     /**#@+
@@ -166,7 +168,7 @@ class CopyServiceTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->_filesystem =
-            $this->getMock('Magento\Framework\App\Filesystem', array('getDirectoryWrite'), array(), '', false);
+            $this->getMock('Magento\Framework\Filesystem', array('getDirectoryWrite'), array(), '', false);
         $this->_dirWriteMock = $this->getMock(
             'Magento\Framework\Filesystem\Directory\Write',
             array('isDirectory', 'search', 'copy', 'delete', 'read', 'copyFile', 'isExist'),
@@ -179,7 +181,7 @@ class CopyServiceTest extends \PHPUnit_Framework_TestCase
         )->method(
             'getDirectoryWrite'
         )->with(
-            \Magento\Framework\App\Filesystem::MEDIA_DIR
+            DirectoryList::MEDIA
         )->will(
             $this->returnValue($this->_dirWriteMock)
         );
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 08f9ed0aad2aa6b12d675025f6167c7119366ffe..aa32871755d26df0570d297e69873cec00050b53 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Model/Uploader/ServiceTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Uploader/ServiceTest.php
@@ -50,7 +50,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
     protected $_fileSizeMock;
 
     /**
-     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\App\Filesystem
+     * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Filesystem
      */
     protected $_filesystemMock;
 
@@ -82,7 +82,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
             '',
             false
         );
-        $this->_filesystemMock = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystemMock = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_filesystemMock->expects(
             $this->any()
         )->method(
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 70ecf4554c27378031b3c058e86dd874ec7dcd35..218f33944cebba2bf19c22531fadbfaf7c3cca1a 100644
--- a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
+++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
@@ -35,7 +35,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
     protected $_storageRoot;
 
     /**
-     * @var \Magento\Framework\App\Filesystem|\PHPUnit_Framework_MockObject_MockObject
+     * @var \Magento\Framework\Filesystem|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $_filesystem;
 
@@ -66,7 +66,7 @@ class StorageTest extends \PHPUnit_Framework_TestCase
 
     protected function setUp()
     {
-        $this->_filesystem = $this->getMock('Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $this->_filesystem = $this->getMock('Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_helperStorage = $this->getMock('Magento\Theme\Helper\Storage', array(), array(), '', false);
         $this->_objectManager = $this->getMock('Magento\Framework\ObjectManager', array(), array(), '', false);
         $this->_imageFactory = $this->getMock('Magento\Framework\Image\AdapterFactory', array(), array(), '', false);
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
index c16b6c0f3ccd72d0d015d89b4e9856c0a15dcc13..40328c44690504e94fe5df31333531456ad1f2e3 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/ErrorProcessorTest.php
@@ -56,7 +56,7 @@ class ErrorProcessorTest extends \PHPUnit_Framework_TestCase
 
         $this->_loggerMock = $this->getMockBuilder('Magento\Framework\Logger')->disableOriginalConstructor()->getMock();
 
-        $filesystemMock = $this->getMockBuilder('\Magento\Framework\App\Filesystem')
+        $filesystemMock = $this->getMockBuilder('\Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
 
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php
index 680ddc7fe1c033d2bc80dfba0af0917c2a563256..60a7e22a6b2aaf5bec2e02e19e2cf90a6dceead6 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/RestTest.php
@@ -98,6 +98,11 @@ class RestTest extends \PHPUnit_Framework_TestCase
      */
     protected $userContextMock;
 
+    /**
+     * @var \Magento\Webapi\Model\DataObjectProcessor|\PHPUnit_Framework_MockObject_MockObject
+     */
+    protected $dataObjectProcessorMock;
+
     const SERVICE_METHOD = 'testMethod';
 
     const SERVICE_ID = 'Magento\Webapi\Controller\TestService';
@@ -125,6 +130,8 @@ class RestTest extends \PHPUnit_Framework_TestCase
             ->disableOriginalConstructor()->getMock();
         $this->userContextMock = $this->getMockBuilder('Magento\Authorization\Model\UserContextInterface')
             ->disableOriginalConstructor()->setMethods(['getUserId'])->getMockForAbstractClass();
+        $this->dataObjectProcessorMock = $this->getMockBuilder('Magento\Webapi\Model\DataObjectProcessor')
+            ->disableOriginalConstructor()->setMethods(['getMethodReturnType'])->getMockForAbstractClass();
     }
 
     protected function setUp()
@@ -157,6 +164,7 @@ class RestTest extends \PHPUnit_Framework_TestCase
                     'errorProcessor' => $errorProcessorMock,
                     'areaList' => $this->areaListMock,
                     'userContext' => $this->userContextMock,
+                    'dataObjectProcessor' => $this->dataObjectProcessorMock
                 ]
             );
         // Set default expectations used by all tests
@@ -167,6 +175,9 @@ class RestTest extends \PHPUnit_Framework_TestCase
         $this->_objectManagerMock->expects($this->any())->method('get')->will($this->returnValue($this->_serviceMock));
         $this->_responseMock->expects($this->any())->method('prepareResponse')->will($this->returnValue([]));
         $this->_serviceMock->expects($this->any())->method(self::SERVICE_METHOD)->will($this->returnValue(null));
+        $this->dataObjectProcessorMock->expects($this->any())->method('getMethodReturnType')
+            ->with(self::SERVICE_ID, self::SERVICE_METHOD)
+            ->will($this->returnValue('null'));
         parent::setUp();
     }
 
@@ -321,6 +332,9 @@ class RestTest extends \PHPUnit_Framework_TestCase
 
 class TestService
 {
+    /**
+     * @return null
+     */
     public function testMethod()
     {
         return null;
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php
index 25f780582ddf058df514f6fc0602cb57feb7c5f8..8cb3d2286f4b5b56cf85747265bb39df52717ba4 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Controller/Soap/Request/HandlerTest.php
@@ -52,6 +52,9 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
     /** @var \Magento\Webapi\Helper\Data|\PHPUnit_Framework_MockObject_MockObject */
     protected $_serializerMock;
 
+    /** @var \Magento\Framework\Service\DataObjectProcessor|\PHPUnit_Framework_MockObject_MockObject */
+    protected $_dataObjectProcessorMock;
+
     /** @var array */
     protected $_arguments;
 
@@ -71,6 +74,13 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
             false
         );
         $this->_serializerMock = $this->getMock('Magento\Webapi\Controller\ServiceArgsSerializer', [], [], '', false);
+        $this->_dataObjectProcessorMock = $this->getMock(
+            'Magento\Webapi\Model\DataObjectProcessor',
+            ['getMethodReturnType'],
+            [],
+            '',
+            false);
+
         /** Initialize SUT. */
         $this->_handler = new \Magento\Webapi\Controller\Soap\Request\Handler(
             $this->_requestMock,
@@ -78,7 +88,8 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
             $this->_apiConfigMock,
             $this->_authorizationMock,
             $this->_dataObjectConverter,
-            $this->_serializerMock
+            $this->_serializerMock,
+            $this->_dataObjectProcessorMock
         );
         parent::setUp();
     }
@@ -123,6 +134,10 @@ class HandlerTest extends \PHPUnit_Framework_TestCase
             ->will($this->returnValue($serviceMock));
         $this->_serializerMock->expects($this->once())->method('getInputData')->will($this->returnArgument(2));
 
+        $this->_dataObjectProcessorMock->expects($this->any())->method('getMethodReturnType')
+            ->with($className, $methodName)
+            ->will($this->returnValue('string'));
+
         /** Execute SUT. */
         $this->assertEquals(
             array('result' => $serviceResponse),
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php
new file mode 100644
index 0000000000000000000000000000000000000000..bf82cc4a2f11a59768b24fde572c509c06c226dc
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Webapi\Model;
+
+use Magento\Webapi\Model\Config as ModelConfig;
+
+class DataObjectProcessorTest extends \PHPUnit_Framework_TestCase
+{
+    /**
+     * @var DataObjectProcessor
+     */
+    protected $dataObjectProcessor;
+
+    /**
+     * @var ModelConfig
+     */
+    protected $config;
+
+    protected function setup()
+    {
+        $objectManager = new \Magento\TestFramework\Helper\ObjectManager($this);
+        $this->dataObjectProcessor = $objectManager->getObject('Magento\Webapi\Model\DataObjectProcessor');
+        parent::setUp();
+    }
+
+    public function testDataObjectProcessor()
+    {
+        $objectManager =  new \Magento\TestFramework\Helper\ObjectManager($this);
+        /** @var \Magento\Webapi\Model\Files\TestDataObject $testDataObject */
+        $testDataObject = $objectManager->getObject('Magento\Webapi\Model\Files\TestDataObject');
+
+        $expectedOutputDataArray = [
+            'id' => '1',
+            'address' => 'someAddress',
+            'default_shipping' => 'true',
+            'required_billing' => 'false'
+        ];
+
+        $testDataObjectType = 'Magento\Webapi\Model\Files\TestDataInterface';
+        $outputData = $this->dataObjectProcessor->buildOutputDataArray($testDataObject, $testDataObjectType);
+        $this->assertEquals($expectedOutputDataArray, $outputData);
+    }
+}
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataInterface.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..e45e842930ffb2f4568f73406020843bb6090b43
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataInterface.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+
+namespace Magento\Webapi\Model\Files;
+
+interface TestDataInterface
+{
+    public function getId();
+
+    public function getAddress();
+
+    public function isDefaultShipping();
+
+    public function isRequiredBilling();
+}
diff --git a/dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataObject.php b/dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataObject.php
new file mode 100644
index 0000000000000000000000000000000000000000..70786f57a37c0b9dcd572e3927fbd258e10cec02
--- /dev/null
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataObject.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Webapi\Model\Files;
+
+class TestDataObject implements TestDataInterface
+{
+    public function getId()
+    {
+        return '1';
+    }
+
+    public function getAddress()
+    {
+        return 'someAddress';
+    }
+
+    public function isDefaultShipping()
+    {
+        return 'true';
+    }
+
+    public function isRequiredBilling()
+    {
+        return 'false';
+    }
+}
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 7c70376414014ed945206ff214ab4fbeedc33357..ba9edd8a1e049f623aed294c3f6004c5a7bd0ddc 100644
--- a/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
+++ b/dev/tests/unit/testsuite/Magento/Webapi/Model/Soap/ConfigTest.php
@@ -49,7 +49,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
         $objectManagerMock = $this->getMockBuilder(
             'Magento\Framework\App\ObjectManager'
         )->disableOriginalConstructor()->getMock();
-        $fileSystemMock = $this->getMockBuilder('Magento\Framework\App\Filesystem')
+        $fileSystemMock = $this->getMockBuilder('Magento\Framework\Filesystem')
             ->disableOriginalConstructor()
             ->getMock();
         $classReflection = $this->getMock(
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 5785a936212d83ccc47d625a299f502f15298371..fd9367055a584ec76baabeae965de4588efeea91 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
             'Magento\Widget\Model\Config\Reader'
         )->disableOriginalConstructor()->getMock();
 
-        $filesystemMock = $this->getMock('\Magento\Framework\App\Filesystem', array(), array(), '', false);
+        $filesystemMock = $this->getMock('\Magento\Framework\Filesystem', array(), array(), '', false);
         $this->_directoryMock = $this->getMock(
             '\Magento\Framework\Filesystem\Directory\Read',
             array(),
diff --git a/dev/tools/Magento/Tools/View/Deployer.php b/dev/tools/Magento/Tools/View/Deployer.php
index 19a6314980a839da1d6c53f82aeeb99358f74eb6..2db6fbe07189709dada117476a7eddefee12f01e 100644
--- a/dev/tools/Magento/Tools/View/Deployer.php
+++ b/dev/tools/Magento/Tools/View/Deployer.php
@@ -89,12 +89,11 @@ class Deployer
     /**
      * Populate all static view files for specified root path and list of languages
      *
-     * @param string $rootPath
      * @param ObjectManagerFactory $omFactory
      * @param array $locales
      * @return void
      */
-    public function deploy($rootPath, ObjectManagerFactory $omFactory, array $locales)
+    public function deploy(ObjectManagerFactory $omFactory, array $locales)
     {
         $this->omFactory = $omFactory;
         if ($this->isDryRun) {
@@ -105,7 +104,7 @@ class Deployer
         $libFiles = $this->filesUtil->getStaticLibraryFiles();
         list($areas, $appFiles) = $this->collectAppFiles($locales);
         foreach ($areas as $area => $themes) {
-            $this->emulateApplicationArea($rootPath, $area);
+            $this->emulateApplicationArea($area);
             foreach ($locales as $locale) {
                 foreach ($themes as $themePath) {
                     $this->logger->logMessage("=== {$area} -> {$themePath} -> {$locale} ===");
@@ -168,14 +167,12 @@ class Deployer
     /**
      * Emulate application area and various services that are necessary for populating files
      *
-     * @param string $rootPath
      * @param string $areaCode
      * @return void
      */
-    private function emulateApplicationArea($rootPath, $areaCode)
+    private function emulateApplicationArea($areaCode)
     {
         $objectManager = $this->omFactory->create(
-            $rootPath,
             [\Magento\Framework\App\State::PARAM_MODE => \Magento\Framework\App\State::MODE_DEFAULT]
         );
         /** @var \Magento\Framework\App\State $appState */
diff --git a/dev/tools/Magento/Tools/View/deploy.php b/dev/tools/Magento/Tools/View/deploy.php
index 741fd25f77ebeffc6c86bfb98c7b4b58b13a11b1..10a6c88aefd195b486a6774dc25915a75c1a09ce 100644
--- a/dev/tools/Magento/Tools/View/deploy.php
+++ b/dev/tools/Magento/Tools/View/deploy.php
@@ -58,9 +58,8 @@ if (isset($options['verbose'])) {
 
 // run the deployment logic
 $filesUtil = new \Magento\TestFramework\Utility\Files(BP);
-$omFactory = new \Magento\Framework\App\ObjectManagerFactory();
+$omFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, []);
 $objectManager = $omFactory->create(
-    BP,
     [\Magento\Framework\App\State::PARAM_MODE => \Magento\Framework\App\State::MODE_DEFAULT]
 );
 $logger = new \Magento\Tools\View\Deployer\Log($verbosity);
@@ -69,5 +68,5 @@ $deployer = $objectManager->create(
     'Magento\Tools\View\Deployer',
     ['filesUtil' => $filesUtil, 'logger' => $logger, 'isDryRun' => $isDryRun]
 );
-$deployer->deploy(BP, $omFactory, $langs);
+$deployer->deploy($omFactory, $langs);
 exit(0);
diff --git a/dev/tools/Magento/Tools/classmap/fs_generator.php b/dev/tools/Magento/Tools/classmap/fs_generator.php
index edcd9498e7eaca0ba9177a3fd0434ee11b153eed..6b37bc5e001d088464662c24078d8a00db043501 100644
--- a/dev/tools/Magento/Tools/classmap/fs_generator.php
+++ b/dev/tools/Magento/Tools/classmap/fs_generator.php
@@ -21,79 +21,108 @@
  * @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)
  */
+$basePath = realpath(__DIR__ . '/../../../../../') . DIRECTORY_SEPARATOR;
+set_include_path(get_include_path() . PATH_SEPARATOR . $basePath);
 
-$path = false;
-if (isset($argv[1])) {
-    if (realpath($argv[1])) {
-        $path = realpath($argv[1]);
-    } elseif (realpath(getcwd() . '/' . $argv[1])) {
-        $path = realpath(getcwd() . '/' . $argv[1]);
-    }
-}
-
-if (!$path) {
-    echo "Please specify directory for scan: php -f fs_generator.php path/to/code";
-    exit;
-}
+echo
+'Magento classmap generator', PHP_EOL,
+PHP_EOL,
+'Usage:', PHP_EOL,
+'   php -f ', str_replace(dirname(__FILE__), __FILE__, ''),
+' -- -t classmap.ser -i app/code;lib/internal -p ";"', PHP_EOL,
+PHP_EOL,
+'Parameters:', PHP_EOL,
+'   -t   - Target file [optional, default - "{magento_root}/var/classmap.ser"]', PHP_EOL,
+'   -i   - Include path [optional, default - "{magento_root}/app/code;{magento_root}/lib/internal"]', PHP_EOL,
+'   -p   - Paths separator for include path [optional, default - ";"]', PHP_EOL;
 
+$args = getopt('t:i::p::');
+$includePath = isset($args['i']) ? $args['i'] : "{$basePath}app/code;{$basePath}lib/internal";
+$pathSeparator = isset($args['p']) ? $args['p'] : ';';
+$targetFile = isset($args['i']) ? $args['i'] : "{$basePath}var/classmap.ser";
+$map = array();
 
-$basePath = realpath(__DIR__ . '/../../../') . '/';
-$directory = new RecursiveDirectoryIterator($path);
-$iterator = new RecursiveIteratorIterator($directory);
-$regex = new RegexIterator($iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH);
+foreach (array_reverse(explode($pathSeparator, $includePath)) as $path) {
+    echo 'Scanning: ' . $path . PHP_EOL;
+    $directory = new RecursiveDirectoryIterator($path);
+    $iterator = new RecursiveIteratorIterator($directory);
+    $regex = new RegexIterator($iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH);
 
+    foreach ($regex as $file) {
+        $filePath = str_replace('\\', '/', str_replace($basePath, '', $file[0]));
+        if (strpos($filePath, 'dev') === 0 || strpos($filePath, 'shell') === 0) {
+            continue;
+        }
 
-$map = array();
-foreach ($regex as $file) {
-    $filePath = str_replace('\\', '/', str_replace($basePath, '', $file[0]));
-    if (strpos($filePath, 'dev') === 0 || strpos($filePath, 'shell') === 0) {
-        continue;
-    }
+        $code = file_get_contents($file[0]);
+        $tokens = token_get_all($code);
 
-    $code = file_get_contents($file[0]);
-    $tokens = token_get_all($code);
+        $count = count($tokens);
+        $i = 0;
+        $namespace = '';
+        while ($i < $count) {
+            $token = $tokens[$i];
 
-    $count = count($tokens);
-    $i = 0;
-    while ($i < $count) {
-        $token = $tokens[$i];
+            if (!is_array($token)) {
+                $i++;
+                continue;
+            }
 
-        if (!is_array($token)) {
-            $i++;
-            continue;
-        }
+            list($id, $content, $line) = $token;
 
-        list($id, $content, $line) = $token;
+            switch ($id) {
+                case T_NAMESPACE:
+                    $namespace = '';
+                    do {
+                        ++$i;
+                        if (isset($tokens[$i])) {
+                            $token = $tokens[$i];
+                            if (is_string($token)) {
+                                continue;
+                            }
+                            list($type, $content, $line) = $token;
+                            switch ($type) {
+                                case T_STRING:
+                                case T_NS_SEPARATOR:
+                                    $namespace .= $content;
+                                    break;
+                            }
+                        }
+                    } while ($token !== ';' && $i < $count);
+                    break;
+                case T_CLASS:
+                case T_INTERFACE:
+                    $class = '';
+                    do {
+                        ++$i;
+                        if (isset($tokens[$i])) {
+                            $token = $tokens[$i];
+                            if (is_string($token)) {
+                                continue;
+                            }
+                            list($type, $content, $line) = $token;
+                            switch ($type) {
+                                case T_STRING:
+                                    $class = $content;
+                                    break;
+                            }
+                        }
+                    } while (empty($class) && $i < $count);
 
-        switch ($id) {
-            case T_CLASS:
-            case T_INTERFACE:
-                $class = '';
-                do {
-                    ++$i;
-                    $token = $tokens[$i];
-                    if (is_string($token)) {
-                        continue;
+                    // If a classname was found, set it in the object, and
+                    // return boolean true (found)
+                    if (!empty($class)) {
+                        $map[(empty($namespace) ? '' : ($namespace . '\\')) . $class] = $filePath;
                     }
-                    list($type, $content, $line) = $token;
-                    switch ($type) {
-                        case T_STRING:
-                            $class = $content;
-                            break;
-                    }
-                } while (empty($class) && $i < $count);
-
-                // If a classname was found, set it in the object, and
-                // return boolean true (found)
-                if (!empty($class)) {
-                    $map[$class] = $filePath;
-                }
-                break;
-            default:
-                break;
+                    break;
+                default:
+                    break;
+            }
+            ++$i;
         }
-        ++$i;
     }
 }
 
-echo serialize($map);
+file_put_contents($targetFile, serialize($map));
+
+echo 'Done!';
diff --git a/dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/Application.php b/dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/Application.php
index 78343e70782ea1cccbbf76d501427c21a4e388e5..cbaf3b9e39a7f71b1bc647bd0a8e9e8c242647e4 100644
--- a/dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/Application.php
+++ b/dev/tools/performance-toolkit/framework/Magento/ToolkitFramework/Application.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\ToolkitFramework;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Application
 {
     /**
@@ -81,8 +83,8 @@ class Application
     protected function _updateFilesystemPermissions()
     {
         /** @var \Magento\Framework\Filesystem\Directory\Write $varDirectory */
-        $varDirectory = $this->getObjectManager()->get('Magento\Framework\App\Filesystem')
-            ->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $varDirectory = $this->getObjectManager()->get('Magento\Framework\Filesystem')
+            ->getDirectoryWrite(DirectoryList::VAR_DIR);
         $varDirectory->changePermissions('', 0777);
     }
 
@@ -169,8 +171,8 @@ class Application
     public function getObjectManager()
     {
         if (!$this->_objectManager) {
-            $locatorFactory = new \Magento\Framework\App\ObjectManagerFactory();
-            $this->_objectManager = $locatorFactory->create(BP, $_SERVER);
+            $objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER);
+            $this->_objectManager = $objectManagerFactory->create($_SERVER);
             $this->_objectManager->get('Magento\Framework\App\State')->setAreaCode(self::AREA_CODE);
         }
         return $this->_objectManager;
diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php b/lib/internal/Magento/Framework/Api/AttributeInterface.php
similarity index 75%
rename from dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php
rename to lib/internal/Magento/Framework/Api/AttributeInterface.php
index 2036587c3f85a5f9dda79fc689c62719355f10f9..277417ab28422c601e5dcf5f7558985861cb298b 100644
--- a/dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php
+++ b/lib/internal/Magento/Framework/Api/AttributeInterface.php
@@ -22,22 +22,24 @@
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-namespace Magento\Framework\Filesystem\Stub;
+namespace Magento\Framework\Api;
 
 /**
- * Class Wrapper
+ * Interface for custom attribute value.
  */
-class Wrapper
+interface AttributeInterface
 {
     /**
-     * Driver
+     * Get attribute code
      *
-     * @var \Magento\Framework\Filesystem\DriverInterface
+     * @return string
      */
-    protected $driver;
+    public function getAttributeCode();
 
-    public function __construct(\Magento\Framework\Filesystem\DriverInterface $driver)
-    {
-        $this->driver = $driver;
-    }
-} 
\ No newline at end of file
+    /**
+     * Get attribute value
+     *
+     * @return mixed
+     */
+    public function getValue();
+}
diff --git a/setup/module/Magento/Filesystem/src/Directory/WriteInterface.php b/lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php
similarity index 56%
rename from setup/module/Magento/Filesystem/src/Directory/WriteInterface.php
rename to lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php
index e952d2d35b8dbbe6b5d560eed71c69d1e783eee9..981fbadac50973416d7021161e2b03d1d0d9cda7 100644
--- a/setup/module/Magento/Filesystem/src/Directory/WriteInterface.php
+++ b/lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php
@@ -21,35 +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\Filesystem\Directory;
 
-interface WriteInterface extends ReadInterface
+namespace Magento\Framework\Api;
+
+/**
+ * Base builder interface for \Magento\Framework\Api\ExtensibleDataInterface types.
+ */
+interface ExtensibleDataBuilderInterface
 {
     /**
-     * Check if given path is writable
+     * Set custom attribute value.
      *
-     * @param string $path [optional]
-     * @return bool
+     * @param \Magento\Framework\Api\AttributeInterface $attribute
+     * @return $this
      */
-    public function isWritable($path = null);
+    public function setCustomAttribute(\Magento\Framework\Api\AttributeInterface $attribute);
 
     /**
-     * Change permissions of given path
+     * Set array of custom attributes
      *
-     * @param string $path
-     * @param int $permissions
-     * @return bool
-     * @throws \Magento\Filesystem\FilesystemException
+     * @param \Magento\Framework\Service\Data\AttributeValue[] $attributes
+     * @return $this
+     * @throws \LogicException If array elements are not of AttributeValue type
      */
-    public function changePermissions($path, $permissions);
+    public function setCustomAttributes(array $attributes);
 
     /**
-     * Write contents to file in given mode
+     * Return created DataInterface object
      *
-     * @param string $path
-     * @param string $content
-     * @param string|null $mode
-     * @return int The number of bytes that were written.
+     * @return ExtensibleDataInterface
      */
-    public function writeFile($path, $content, $mode = 'w+');
+    public function create();
 }
diff --git a/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php b/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..f9c6d5f88c76b4683507e8fb7938b4f10ecf4c09
--- /dev/null
+++ b/lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Framework\Api;
+
+/**
+ * Interface for entities which can be extended with custom attributes.
+ */
+interface ExtensibleDataInterface
+{
+    /**
+     * Get an attribute value.
+     *
+     * @param string $attributeCode
+     * @return \Magento\Framework\Service\Data\AttributeValue|null null if the attribute has not been set
+     */
+    public function getCustomAttribute($attributeCode);
+
+    /**
+     * Retrieve custom attributes values.
+     *
+     * @return \Magento\Framework\Service\Data\AttributeValue[]|null
+     */
+    public function getCustomAttributes();
+}
diff --git a/lib/internal/Magento/Framework/App/AbstractShell.php b/lib/internal/Magento/Framework/App/AbstractShell.php
index 9a0730f858b9f16d39084cb76304c31dcd3a092a..06f336a108475c67526c7eba4528598be9fa12b2 100644
--- a/lib/internal/Magento/Framework/App/AbstractShell.php
+++ b/lib/internal/Magento/Framework/App/AbstractShell.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\App;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Shell scripts abstract class
  */
@@ -57,17 +59,17 @@ abstract class AbstractShell
     /**
      * Initializes application and parses input parameters
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $entryPoint
      * @throws \Exception
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, $entryPoint)
+    public function __construct(\Magento\Framework\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\Framework\App\Filesystem::ROOT_DIR);
+        $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->_entryPoint = $entryPoint;
         $this->_rawArgs = $_SERVER['argv'];
         $this->_applyPhpVariables();
diff --git a/lib/internal/Magento/Framework/App/Arguments/FileResolver/Primary.php b/lib/internal/Magento/Framework/App/Arguments/FileResolver/Primary.php
index 3e722c9d065a9e5b26653ee9720c0a947a2f8bcf..78b79104d1b3e6c10664b919f4f6813517a4b39f 100644
--- a/lib/internal/Magento/Framework/App/Arguments/FileResolver/Primary.php
+++ b/lib/internal/Magento/Framework/App/Arguments/FileResolver/Primary.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\App\Arguments\FileResolver;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Primary implements \Magento\Framework\Config\FileResolverInterface
 {
     /**
@@ -45,14 +47,14 @@ class Primary implements \Magento\Framework\Config\FileResolverInterface
     protected $iteratorFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Config\FileIteratorFactory $iteratorFactory
     ) {
-        $this->configDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::CONFIG_DIR);
+        $this->configDirectory = $filesystem->getDirectoryRead(DirectoryList::CONFIG);
         $this->iteratorFactory = $iteratorFactory;
     }
 
diff --git a/lib/internal/Magento/Framework/App/Arguments/Loader.php b/lib/internal/Magento/Framework/App/Arguments/Loader.php
index 0188574158ec79c38dd7dbca4e417895b78efc0b..edb980bb7dc95c087b55b2da73de036eea74952e 100644
--- a/lib/internal/Magento/Framework/App/Arguments/Loader.php
+++ b/lib/internal/Magento/Framework/App/Arguments/Loader.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\App\Arguments;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Loader
 {
     /**
@@ -69,7 +71,7 @@ class Loader
      */
     public function __construct(\Magento\Framework\App\Filesystem\DirectoryList $dirList, $customFile = null)
     {
-        $this->_dir = $dirList->getDir(\Magento\Framework\App\Filesystem::CONFIG_DIR);
+        $this->_dir = $dirList->getPath(DirectoryList::CONFIG);
         $this->_customFile = $customFile;
     }
 
diff --git a/lib/internal/Magento/Framework/App/Bootstrap.php b/lib/internal/Magento/Framework/App/Bootstrap.php
index 3e1e88961bce9fef8788dc2e1aff3a7803fad957..86b601cf4ed4c84d7d095afb568fb87eb9669459 100644
--- a/lib/internal/Magento/Framework/App/Bootstrap.php
+++ b/lib/internal/Magento/Framework/App/Bootstrap.php
@@ -24,8 +24,10 @@
 
 namespace Magento\Framework\App;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem\DriverPool;
 use Magento\Framework\Profiler;
-use \Magento\Framework\AppInterface;
+use Magento\Framework\AppInterface;
 
 /**
  * A bootstrap of Magento application
@@ -37,14 +39,14 @@ use \Magento\Framework\AppInterface;
  */
 class Bootstrap
 {
-    /**#+
+    /**#@+
      * Possible errors that can be triggered by the bootstrap
      */
     const ERR_MAINTENANCE = 901;
     const ERR_IS_INSTALLED = 902;
-    /**#- */
+    /**#@- */
 
-    /**#+
+    /**#@+
      * Initialization parameters that allow control bootstrap behavior of asserting maintenance mode or is installed
      *
      * Possible values:
@@ -58,14 +60,24 @@ class Bootstrap
      */
     const PARAM_REQUIRE_MAINTENANCE = 'MAGE_REQUIRE_MAINTENANCE';
     const PARAM_REQUIRE_IS_INSTALLED = 'MAGE_REQUIRE_IS_INSTALLED';
-    /**#- */
+    /**#@- */
 
-    /**#+
+    /**#@+
      * Default behavior of bootstrap assertions
      */
     const DEFAULT_REQUIRE_MAINTENANCE = false;
     const DEFAULT_REQUIRE_IS_INSTALLED = true;
-    /**#- */
+    /**#@- */
+
+    /**
+     * Initialization parameter for custom directory paths
+     */
+    const INIT_PARAM_FILESYSTEM_DIR_PATHS = 'MAGE_DIRS';
+
+    /**
+     * Initialization parameter for additional filesystem drivers
+     */
+    const INIT_PARAM_FILESYSTEM_DRIVERS = 'MAGE_FILESYSTEM_DRIVERS';
 
     /**
      * The initialization parameters (normally come from the $_SERVER)
@@ -88,13 +100,6 @@ class Bootstrap
      */
     private $objectManager;
 
-    /**
-     * Directory list
-     *
-     * @var Filesystem\DirectoryList
-     */
-    private $dirList;
-
     /**
      * Configuration directory
      *
@@ -134,11 +139,56 @@ class Bootstrap
     public static function create($rootDir, array $initParams, ObjectManagerFactory $factory = null)
     {
         if ($factory === null) {
-            $factory = new ObjectManagerFactory;
+            $factory = self::createObjectManagerFactory($rootDir, $initParams);
         }
         return new self($factory, $rootDir, $initParams);
     }
 
+    /**
+     * Creates instance of object manager factory
+     *
+     * @param string $rootDir
+     * @param array $initParams
+     * @return ObjectManagerFactory
+     */
+    public static function createObjectManagerFactory($rootDir, array $initParams)
+    {
+        $dirList = self::createFilesystemDirectoryList($rootDir, $initParams);
+        $driverPool = self::createFilesystemDriverPool($initParams);
+        return new ObjectManagerFactory($dirList, $driverPool);
+    }
+
+    /**
+     * Creates instance of filesystem directory list
+     *
+     * @param string $rootDir
+     * @param array $initParams
+     * @return DirectoryList
+     */
+    public static function createFilesystemDirectoryList($rootDir, array $initParams)
+    {
+        $customDirs = [];
+        if (isset($initParams[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS])) {
+            $customDirs = $initParams[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS];
+        }
+        return new DirectoryList($rootDir, $customDirs);
+    }
+
+    /**
+     * Creates instance of filesystem driver pool
+     *
+     * @param array $initParams
+     * @return DriverPool
+     */
+    public static function createFilesystemDriverPool(array $initParams)
+    {
+        $extraDrivers = [];
+        if (isset($initParams[Bootstrap::INIT_PARAM_FILESYSTEM_DRIVERS])) {
+            $extraDrivers = $initParams[Bootstrap::INIT_PARAM_FILESYSTEM_DRIVERS];
+        };
+        return new DriverPool($extraDrivers);
+    }
+
     /**
      * Constructor
      *
@@ -304,17 +354,6 @@ class Bootstrap
         return $this->objectManager;
     }
 
-    /**
-     * Gets the directory list instance
-     *
-     * @return Filesystem\DirectoryList
-     */
-    public function getDirList()
-    {
-        $this->init();
-        return $this->dirList;
-    }
-
     /**
      * Sets a custom error handler
      *
@@ -334,12 +373,11 @@ class Bootstrap
     private function init()
     {
         if (!$this->objectManager) {
-            $this->objectManager = $this->factory->create($this->rootDir, $this->server);
-            $this->dirList = $this->objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
+            $this->objectManager = $this->factory->create($this->server);
             $this->maintenance = $this->objectManager->get('Magento\Framework\App\MaintenanceMode');
-            /** @var $fileSystem \Magento\Framework\App\Filesystem */
-            $fileSystem = $this->objectManager->get('Magento\Framework\App\Filesystem');
-            $this->configDir = $fileSystem->getDirectoryRead(Filesystem::CONFIG_DIR);
+            /** @var $fileSystem \Magento\Framework\Filesystem */
+            $fileSystem = $this->objectManager->get('Magento\Framework\Filesystem');
+            $this->configDir = $fileSystem->getDirectoryRead(DirectoryList::CONFIG);
         }
     }
 
diff --git a/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php
index 284779365e1d847d46e7dd2a983990ba6b14d4ca..38998521099c13c58884e49bfb7689aa44e4e08a 100644
--- a/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php
+++ b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php
@@ -27,6 +27,9 @@
  */
 namespace Magento\Framework\App\Cache\Frontend;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Factory
 {
     /**
@@ -44,7 +47,7 @@ class Factory
     private $_objectManager;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var Filesystem
      */
     private $_filesystem;
 
@@ -93,14 +96,14 @@ class Factory
 
     /**
      * @param \Magento\Framework\ObjectManager $objectManager
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param \Magento\Framework\App\Resource $resource
      * @param array $enforcedOptions
      * @param array $decorators
      */
     public function __construct(
         \Magento\Framework\ObjectManager $objectManager,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         \Magento\Framework\App\Resource $resource,
         array $enforcedOptions = array(),
         array $decorators = array()
@@ -124,21 +127,20 @@ class Factory
 
         foreach (array('backend_options', 'slow_backend_options') as $section) {
             if (!empty($options[$section]['cache_dir'])) {
-                $directory = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+                $directory = $this->_filesystem->getDirectoryWrite(DirectoryList::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\Framework\App\Filesystem::CACHE_DIR);
-
         $idPrefix = isset($options['id_prefix']) ? $options['id_prefix'] : '';
         if (!$idPrefix && isset($options['prefix'])) {
             $idPrefix = $options['prefix'];
         }
         if (empty($idPrefix)) {
+            $configDirPath = $this->_filesystem->getDirectoryRead(DirectoryList::CONFIG)->getAbsolutePath();
             $idPrefix =
-                substr(md5($this->_filesystem->getPath(\Magento\Framework\App\Filesystem::CONFIG_DIR)), 0, 3) . '_';
+                substr(md5($configDirPath), 0, 3) . '_';
         }
         $options['frontend_options']['cache_id_prefix'] = $idPrefix;
 
@@ -291,6 +293,9 @@ class Factory
         }
         if (!$backendType) {
             $backendType = $this->_defaultBackend;
+            $cacheDir = $this->_filesystem->getDirectoryWrite(DirectoryList::CACHE);
+            $this->_backendOptions['cache_dir'] = $cacheDir->getAbsolutePath();
+            $cacheDir->create();
         }
         foreach ($this->_backendOptions as $option => $value) {
             if (!array_key_exists($option, $options)) {
diff --git a/lib/internal/Magento/Framework/App/Cache/README.md b/lib/internal/Magento/Framework/App/Cache/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4f6964d150fef2382b998c607b2d3cc68d7a11a7
--- /dev/null
+++ b/lib/internal/Magento/Framework/App/Cache/README.md
@@ -0,0 +1,7 @@
+Components of Magento application use caches in their implementation. The **Magento\Cache** library provides an interface for cache storage and segmentation (a.k.a. "types").
+
+**Magento\Framework\App\Cache** extends **Magento\Cache** and provides more specific features:
+ * State of cache segments (enabled/disabled) and managing their state
+ * Pool of cache frontends
+ * List of cache segments (types)
+ * Specific cache segments: blocks, collections, configurations, layouts, translations
diff --git a/lib/internal/Magento/Framework/App/Config/FileResolver.php b/lib/internal/Magento/Framework/App/Config/FileResolver.php
index 1d9559abeda926d9c16ff6498c9ca47f1c41810f..5a7ec4996a784f82dc0dabb125f939076e9236e3 100644
--- a/lib/internal/Magento/Framework/App/Config/FileResolver.php
+++ b/lib/internal/Magento/Framework/App/Config/FileResolver.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\App\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileResolver implements \Magento\Framework\Config\FileResolverInterface
 {
     /**
@@ -43,12 +45,12 @@ class FileResolver implements \Magento\Framework\Config\FileResolverInterface
 
     /**
      * @param \Magento\Framework\Module\Dir\Reader $moduleReader
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Config\FileIteratorFactory $iteratorFactory
      */
     public function __construct(
         \Magento\Framework\Module\Dir\Reader $moduleReader,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Config\FileIteratorFactory $iteratorFactory
     ) {
         $this->iteratorFactory = $iteratorFactory;
@@ -63,7 +65,7 @@ class FileResolver implements \Magento\Framework\Config\FileResolverInterface
     {
         switch ($scope) {
             case 'primary':
-                $directory = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::CONFIG_DIR);
+                $directory = $this->filesystem->getDirectoryRead(DirectoryList::CONFIG);
                 $iterator = $this->iteratorFactory->create(
                     $directory,
                     $directory->search('{' . $filename . ',*/' . $filename . '}')
diff --git a/lib/internal/Magento/Framework/App/Filesystem.php b/lib/internal/Magento/Framework/App/Filesystem.php
deleted file mode 100644
index 7f2e54059dca82ac9cf8e4fe502294c157d30015..0000000000000000000000000000000000000000
--- a/lib/internal/Magento/Framework/App/Filesystem.php
+++ /dev/null
@@ -1,148 +0,0 @@
-<?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\Framework\App;
-
-class Filesystem extends \Magento\Framework\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_INTERNAL = 'lib_internal';
-
-    /**
-     * Libraries/components that need to be accessible publicly through web-server (such as various DHTML components)
-     */
-    const LIB_WEB = 'lib_web';
-
-    /**
-     * Language packages
-     */
-    const LOCALE_DIR = 'i18n';
-
-    /**
-     * \Directory within document root of a web-server to access static view files publicly
-     */
-    const PUB_DIR = 'pub';
-
-    /**
-     * 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';
-
-    /**
-     * 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';
-
-    /**
-     * Retrieve absolute path for for given code
-     *
-     * @param string $code
-     * @return string
-     */
-    public function getPath($code = self::ROOT_DIR)
-    {
-        $config = $this->directoryList->getConfig($code);
-        $path = isset($config['path']) ? $config['path'] : '';
-        return str_replace('\\', '/', $path);
-    }
-}
diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php
index bb23e7cb07d0d4403fdcf88c70b8bdbe1471bb79..c3536495b1381bdcce8575e159b917f2f232acf4 100644
--- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php
+++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php
@@ -23,72 +23,140 @@
  */
 namespace Magento\Framework\App\Filesystem;
 
-use Magento\Framework\App\Filesystem;
-
 /**
- * Class DirectoryList
+ * A Magento application specific list of directories
  */
 class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList
 {
     /**
-     * Directory for dynamically generated public view files, relative to STATIC_VIEW_DIR
-     */
-    const CACHE_VIEW_REL_DIR = '_cache';
-
-    /**
-     * 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_INTERNAL => array('path' => 'lib/internal'),
-        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' => 'app/i18n'),
-        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())
+     * 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_INTERNAL = 'lib_internal';
+
+    /**
+     * Libraries/components that need to be accessible publicly through web-server (such as various DHTML components)
+     */
+    const LIB_WEB = 'lib_web';
+
+    /**
+     * Language packages
+     */
+    const LOCALE = 'i18n';
+
+    /**
+     * \Directory within document root of a web-server to access static view files publicly
+     */
+    const PUB = 'pub';
+
+    /**
+     * 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';
+
+    /**
+     * 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';
+
+    /**
+     * {@inheritdoc}
+     */
+    public static function getDefaultConfig()
+    {
+        $result = [
+            self::ROOT => [parent::PATH => ''],
+            self::APP => [parent::PATH => 'app'],
+            self::MODULES => [parent::PATH => 'app/code'],
+            self::CONFIG => [parent::PATH => 'app/etc'],
+            self::LIB_INTERNAL => [parent::PATH => 'lib/internal'],
+            self::VAR_DIR => [parent::PATH => 'var'],
+            self::CACHE => [parent::PATH => 'var/cache'],
+            self::LOG => [parent::PATH => 'var/log'],
+            self::DI => [parent::PATH => 'var/di'],
+            self::GENERATION => [parent::PATH => 'var/generation'],
+            self::LOCALE => [parent::PATH => 'app/i18n'],
+            self::SESSION => [parent::PATH => 'var/session'],
+            self::MEDIA => [parent::PATH => 'pub/media', parent::URL_PATH => 'pub/media'],
+            self::STATIC_VIEW => [parent::PATH => 'pub/static', parent::URL_PATH => 'pub/static'],
+            self::PUB => [parent::PATH => 'pub', parent::URL_PATH => 'pub'],
+            self::LIB_WEB => [parent::PATH => 'lib/web'],
+            self::TMP => [parent::PATH => 'var/tmp'],
+            self::THEMES => [parent::PATH => 'app/design'],
+            self::UPLOAD => [parent::PATH => 'pub/media/upload', parent::URL_PATH => 'pub/media/upload'],
+        ];
+        return parent::getDefaultConfig() + $result;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function __construct($root, array $config = array())
     {
-        $this->directories[Filesystem::SYS_TMP_DIR]['path'] = sys_get_temp_dir();
-        parent::__construct($root, $directories);
+        parent::__construct($root, [self::ROOT => $root] + $config);
     }
 }
diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php
deleted file mode 100644
index 918642ed2b5c2a7bfd570fb6887cbfb2ac9be3a4..0000000000000000000000000000000000000000
--- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Framework\App\Filesystem\DirectoryList;
-
-use Magento\Framework\App\Filesystem;
-use Magento\Framework\Filesystem\DirectoryList;
-
-/**
- * Class Configuration
- */
-class Configuration
-{
-    /**
-     * Path to filesystem directory configuration
-     *
-     * @var string
-     */
-    const XML_FILESYSTEM_DIRECTORY_PATH = 'system/filesystem/directory';
-
-    /**
-     * Declaration wrapper configuration
-     */
-    const XML_FILESYSTEM_WRAPPER_PATH = 'system/filesystem/protocol';
-
-    /**
-     * Filesystem Directory configuration
-     *
-     * @var array
-     */
-    protected $directories;
-
-    /**
-     * Filesystem protocols configuration
-     *
-     * @var array
-     */
-    protected $protocols;
-
-    /**
-     * Store directory configuration
-     *
-     * @param \Magento\Framework\App\Config\ScopeConfigInterface $config
-     */
-    public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $config)
-    {
-        $this->directories = $config->getValue(self::XML_FILESYSTEM_DIRECTORY_PATH) ?: array();
-        $this->protocols = $config->getValue(self::XML_FILESYSTEM_WRAPPER_PATH) ?: array();
-    }
-
-    /**
-     * Add directories from configuration to Filesystem
-     *
-     * @param DirectoryList $directoryList
-     * @return void
-     */
-    public function configure(DirectoryList $directoryList)
-    {
-        foreach ($this->directories as $code => $directoryConfiguration) {
-            if ($directoryList->isConfigured($code)) {
-                $existingDirectoryConfiguration = $directoryList->getConfig($code);
-                $directoryConfiguration = array_merge($directoryConfiguration, $existingDirectoryConfiguration);
-            }
-            $directoryList->setDirectory($code, $directoryConfiguration);
-        }
-
-        foreach ($this->protocols as $code => $protocolConfiguration) {
-            $directoryList->addProtocol($code, $protocolConfiguration);
-        }
-    }
-}
diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Verification.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Verification.php
deleted file mode 100644
index 90fd518e9ac1509c37dfee0e30466ba09db68633..0000000000000000000000000000000000000000
--- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Verification.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-/**
- * The class, which verifies existence and write access to the needed application directories
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in 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\Framework\App\Filesystem\DirectoryList;
-
-use Magento\Framework\App\State;
-use Magento\Framework\App\InitException;
-use Magento\Framework\App\Filesystem;
-use Magento\Framework\Filesystem\FilesystemException;
-
-class Verification
-{
-    /**
-     * Codes of directories to create and verify in production mode
-     *
-     * @var string[]
-     */
-    protected static $productionDirs = array(Filesystem::SESSION_DIR, Filesystem::CACHE_DIR, Filesystem::LOG_DIR);
-
-    /**
-     * Codes of directories to create and verify in non-production mode
-     *
-     * @var string[]
-     */
-    protected static $nonProductionDirs = array(Filesystem::SESSION_DIR, Filesystem::CACHE_DIR, Filesystem::LOG_DIR);
-
-    /**
-     * @var \Magento\Framework\App\Filesystem
-     */
-    protected $filesystem;
-
-    /**
-     * Cached list of directories to create and verify write access
-     *
-     * @var string[]
-     */
-    protected $dirsToVerify = array();
-
-    /**
-     * Constructor - initialize object with required dependencies, determine application state
-     *
-     * @param Filesystem $filesystem
-     * @param State $appState
-     */
-    public function __construct(Filesystem $filesystem, State $appState)
-    {
-        $this->filesystem = $filesystem;
-        $this->dirsToVerify = $this->_getDirsToVerify($appState);
-    }
-
-    /**
-     * Return list of directories, that must be verified according to the application mode
-     *
-     * @param State $appState
-     * @return string[]
-     */
-    protected function _getDirsToVerify(State $appState)
-    {
-        $codes = $appState->getMode() == State::MODE_PRODUCTION ? self::$productionDirs : self::$nonProductionDirs;
-        return $codes;
-    }
-
-    /**
-     * Create the required directories, if they don't exist, and verify write access for existing directories
-     *
-     * @return void
-     * @throws InitException
-     */
-    public function createAndVerifyDirectories()
-    {
-        $fails = array();
-        foreach ($this->dirsToVerify as $code) {
-            $directory = $this->filesystem->getDirectoryWrite($code);
-            if ($directory->isExist()) {
-                if (!$directory->isWritable()) {
-                    $fails[] = $directory->getAbsolutePath();
-                }
-            } else {
-                try {
-                    $directory->create();
-                } catch (FilesystemException $e) {
-                    $fails[] = $directory->getAbsolutePath();
-                }
-            }
-        }
-
-        if ($fails) {
-            $dirList = implode(', ', $fails);
-            throw new InitException("Cannot create or verify write access: {$dirList}");
-        }
-    }
-}
diff --git a/lib/internal/Magento/Framework/App/Filesystem/README.md b/lib/internal/Magento/Framework/App/Filesystem/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..a327d7404896a5bd0347d43eb131ebd7c3d3d007
--- /dev/null
+++ b/lib/internal/Magento/Framework/App/Filesystem/README.md
@@ -0,0 +1,2 @@
+The **\Magento\Framework\App\Filesystem** library extends **\Magento\Framework\Filesystem** by defining list of directories available in the application.
+Refer directory codes from **\Magento\Framework\App\Filesystem\DirectoryList** class in **\Magento\Framework\Filesystem** operations to get access to available application directories.
diff --git a/lib/internal/Magento/Framework/App/Http.php b/lib/internal/Magento/Framework/App/Http.php
index c20801d4c1b6d5b67d6d6ada07a0a4299a44969a..e1dedf7043de24b4108a7c2f8244dfd7324531ae 100644
--- a/lib/internal/Magento/Framework/App/Http.php
+++ b/lib/internal/Magento/Framework/App/Http.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\App;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\App\ObjectManager\ConfigLoader;
 use Magento\Framework\App\Request\Http as RequestHttp;
 use Magento\Framework\App\Response\Http as ResponseHttp;
@@ -154,6 +156,10 @@ class Http implements \Magento\Framework\AppInterface
     private function handleDeveloperMode(Bootstrap $bootstrap, \Exception $exception)
     {
         if ($bootstrap->isDeveloperMode()) {
+            if (Bootstrap::ERR_IS_INSTALLED == $bootstrap->getErrorCode()) {
+                $this->redirectToSetup($bootstrap);
+                return true;
+            }
             $this->_response->setHttpResponseCode(500);
             $this->_response->setHeader('Content-Type', 'text/plain');
             $this->_response->setBody($exception->getMessage() . "\n" . $exception->getTraceAsString());
@@ -163,6 +169,19 @@ class Http implements \Magento\Framework\AppInterface
         return false;
     }
 
+    /**
+     * If not installed, redirect to setup
+     *
+     * @param Bootstrap $bootstrap
+     * @return void
+     */
+    private function redirectToSetup(Bootstrap $bootstrap)
+    {
+        $path = $this->getInstallerRedirectPath($bootstrap->getParams());
+        $this->_response->setRedirect($path);
+        $this->_response->sendHeaders();
+    }
+
     /**
      * Handler for bootstrap errors
      *
@@ -173,13 +192,11 @@ class Http implements \Magento\Framework\AppInterface
     {
         $bootstrapCode = $bootstrap->getErrorCode();
         if (Bootstrap::ERR_MAINTENANCE == $bootstrapCode) {
-            require $this->_filesystem->getPath(Filesystem::PUB_DIR) . '/errors/503.php';
+            require $this->_filesystem->getDirectoryRead(DirectoryList::PUB)->getAbsolutePath('errors/503.php');
             return true;
         }
         if (Bootstrap::ERR_IS_INSTALLED == $bootstrapCode) {
-            $path = $this->getInstallerRedirectPath($bootstrap->getParams());
-            $this->_response->setRedirect($path);
-            $this->_response->sendHeaders();
+            $this->redirectToSetup($bootstrap);
             return true;
         }
         return false;
@@ -212,7 +229,7 @@ class Http implements \Magento\Framework\AppInterface
     private function handleInitException(\Exception $exception)
     {
         if ($exception instanceof \Magento\Framework\App\InitException) {
-            require $this->_filesystem->getPath(Filesystem::PUB_DIR) . '/errors/404.php';
+            require $this->_filesystem->getDirectoryRead(DirectoryList::PUB)->getAbsolutePath('errors/404.php');
             return true;
         }
         return false;
@@ -235,7 +252,7 @@ class Http implements \Magento\Framework\AppInterface
         if (isset($params['SCRIPT_NAME'])) {
             $reportData['script_name'] = $params['SCRIPT_NAME'];
         }
-        require $this->_filesystem->getPath(Filesystem::PUB_DIR) . '/errors/report.php';
+        require $this->_filesystem->getDirectoryRead(DirectoryList::PUB)->getAbsolutePath('errors/report.php');
         return true;
     }
 
diff --git a/lib/internal/Magento/Framework/App/Language/Dictionary.php b/lib/internal/Magento/Framework/App/Language/Dictionary.php
index 622a01adc6718e71e6f411f9784acc0ca46ae936..43e3142bb973ef98cc2d00e38f8f25a415d954ea 100644
--- a/lib/internal/Magento/Framework/App/Language/Dictionary.php
+++ b/lib/internal/Magento/Framework/App/Language/Dictionary.php
@@ -24,7 +24,8 @@
 
 namespace Magento\Framework\App\Language;
 
-use \Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * A service for reading language package dictionaries
@@ -54,7 +55,7 @@ class Dictionary
         Filesystem $filesystem,
         ConfigFactory $configFactory
     ) {
-        $this->dir = $filesystem->getDirectoryRead(Filesystem::LOCALE_DIR);
+        $this->dir = $filesystem->getDirectoryRead(DirectoryList::LOCALE);
         $this->configFactory = $configFactory;
     }
 
diff --git a/lib/internal/Magento/Framework/App/MaintenanceMode.php b/lib/internal/Magento/Framework/App/MaintenanceMode.php
index 92107be00197b017f14089dcafb75f894a3133f1..eed50d83212271be3e7e26983ac4f9808807c00a 100644
--- a/lib/internal/Magento/Framework/App/MaintenanceMode.php
+++ b/lib/internal/Magento/Framework/App/MaintenanceMode.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Framework\App;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
@@ -47,7 +47,7 @@ class MaintenanceMode
     /**
      * Maintenance flag dir
      */
-    const FLAG_DIR = Filesystem::VAR_DIR;
+    const FLAG_DIR = DirectoryList::VAR_DIR;
 
     /**
      * Path to store files
@@ -59,7 +59,7 @@ class MaintenanceMode
     /**
      * Constructor
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(Filesystem $filesystem)
     {
diff --git a/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php b/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php
index 6be9ce7382a1a123f1db33e92d8c16f416eab463..0809ae3914882eaf2910047f4878fc14b2451aa8 100644
--- a/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php
+++ b/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader.php
@@ -28,12 +28,19 @@ namespace Magento\Framework\App\ObjectManager;
 class ConfigLoader
 {
     /**
-     * Config reader factory
+     * Config reader
      *
      * @var \Magento\Framework\ObjectManager\Config\Reader\Dom
      */
     protected $_reader;
 
+    /**
+     * Config reader factory
+     *
+     * @var \Magento\Framework\ObjectManager\Config\Reader\DomFactory
+     */
+    protected $_readerFactory;
+
     /**
      * Cache
      *
@@ -43,14 +50,27 @@ class ConfigLoader
 
     /**
      * @param \Magento\Framework\Config\CacheInterface $cache
-     * @param \Magento\Framework\ObjectManager\Config\Reader\Dom $reader
+     * @param \Magento\Framework\ObjectManager\Config\Reader\DomFactory $readerFactory
      */
     public function __construct(
         \Magento\Framework\Config\CacheInterface $cache,
-        \Magento\Framework\ObjectManager\Config\Reader\Dom $reader
+        \Magento\Framework\ObjectManager\Config\Reader\DomFactory $readerFactory
     ) {
         $this->_cache = $cache;
-        $this->_reader = $reader;
+        $this->_readerFactory = $readerFactory;
+    }
+
+    /**
+     * Get reader instance
+     *
+     * @return \Magento\Framework\ObjectManager\Config\Reader\Dom
+     */
+    protected function _getReader()
+    {
+        if (empty($this->_reader)) {
+            $this->_reader = $this->_readerFactory->create();
+        }
+        return $this->_reader;
     }
 
     /**
@@ -65,7 +85,7 @@ class ConfigLoader
         $data = $this->_cache->load($cacheId);
 
         if (!$data) {
-            $data = $this->_reader->read($area);
+            $data = $this->_getReader()->read($area);
             $this->_cache->save(serialize($data), $cacheId);
         } else {
             $data = unserialize($data);
diff --git a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
index 7bd5ccebdc5b043fc71296481b35af32e75ced0e..9e326b4451f53fb2d1d89ea8f8a61e00197fb6fa 100644
--- a/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
+++ b/lib/internal/Magento/Framework/App/ObjectManagerFactory.php
@@ -27,6 +27,7 @@ namespace Magento\Framework\App;
 
 use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Profiler;
+use Magento\Framework\Filesystem\DriverPool;
 
 /**
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -48,6 +49,20 @@ class ObjectManagerFactory
      */
     protected $_configClassName = 'Magento\Framework\Interception\ObjectManager\Config';
 
+    /**
+     * Filesystem directory list
+     *
+     * @var DirectoryList
+     */
+    protected $directoryList;
+
+    /**
+     * Filesystem driver pool
+     *
+     * @var DriverPool
+     */
+    protected $driverPool;
+
     /**
      * Factory
      *
@@ -55,33 +70,39 @@ class ObjectManagerFactory
      */
     protected $factory;
 
+    /**
+     * Constructor
+     *
+     * @param DirectoryList $directoryList
+     * @param DriverPool $driverPool
+     */
+    public function __construct(DirectoryList $directoryList, DriverPool $driverPool)
+    {
+        $this->directoryList = $directoryList;
+        $this->driverPool = $driverPool;
+    }
+
     /**
      * Create ObjectManager
      *
-     * @param string $rootDir
      * @param array $arguments
      * @param bool $useCompiled
      * @return \Magento\Framework\ObjectManager
      *
      * @SuppressWarnings(PHPMD.NPathComplexity)
      */
-    public function create($rootDir, array $arguments, $useCompiled = true)
+    public function create(array $arguments, $useCompiled = true)
     {
-        $directories = isset(
-            $arguments[Filesystem::PARAM_APP_DIRS]
-        ) ? $arguments[Filesystem::PARAM_APP_DIRS] : array();
-        $directoryList = new DirectoryList($rootDir, $directories);
-
         (new \Magento\Framework\Autoload\IncludePath())->addIncludePath(
-            array($directoryList->getDir(Filesystem::GENERATION_DIR))
+            array($this->directoryList->getPath(DirectoryList::GENERATION))
         );
 
-        $appArguments = $this->createAppArguments($directoryList, $arguments);
+        $appArguments = $this->createAppArguments($this->directoryList, $arguments);
 
         $definitionFactory = new \Magento\Framework\ObjectManager\DefinitionFactory(
-            new \Magento\Framework\Filesystem\Driver\File(),
-            $directoryList->getDir(Filesystem::DI_DIR),
-            $directoryList->getDir(Filesystem::GENERATION_DIR),
+            $this->driverPool->getDriver(DriverPool::FILE),
+            $this->directoryList->getPath(DirectoryList::DI),
+            $this->directoryList->getPath(DirectoryList::GENERATION),
             $appArguments->get('definition.format', 'serialized')
         );
 
@@ -96,7 +117,7 @@ class ObjectManagerFactory
         $argInterpreter = $this->createArgumentInterpreter($booleanUtils);
 
         $argumentMapper = new \Magento\Framework\ObjectManager\Config\Mapper\Dom($argInterpreter);
-        $configData = $this->_loadPrimaryConfig($directoryList, $argumentMapper, $appMode);
+        $configData = $this->_loadPrimaryConfig($this->directoryList, $this->driverPool, $argumentMapper, $appMode);
 
         if ($configData) {
             $diConfig->extend($configData);
@@ -119,8 +140,9 @@ class ObjectManagerFactory
 
         $sharedInstances = [
             'Magento\Framework\App\Arguments' => $appArguments,
-            'Magento\Framework\App\Filesystem\DirectoryList' => $directoryList,
-            'Magento\Framework\Filesystem\DirectoryList' => $directoryList,
+            'Magento\Framework\App\Filesystem\DirectoryList' => $this->directoryList,
+            'Magento\Framework\Filesystem\DirectoryList' => $this->directoryList,
+            'Magento\Framework\Filesystem\DriverPool' => $this->driverPool,
             'Magento\Framework\ObjectManager\Relations' => $relations,
             'Magento\Framework\Interception\Definition' => $definitionFactory->createPluginDefinition(),
             'Magento\Framework\ObjectManager\Config' => $diConfig,
@@ -137,10 +159,6 @@ class ObjectManagerFactory
         $this->factory->setObjectManager($objectManager);
         ObjectManager::setInstance($objectManager);
 
-        /** @var \Magento\Framework\App\Filesystem\DirectoryList\Verification $verification */
-        $verification = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList\Verification');
-        $verification->createAndVerifyDirectories();
-
         $diConfig->setCache($objectManager->get('Magento\Framework\App\ObjectManager\ConfigCache'));
         $objectManager->configure(
             $objectManager->get('Magento\Framework\App\ObjectManager\ConfigLoader')->load('global')
@@ -151,8 +169,6 @@ class ObjectManagerFactory
         $interceptionConfig = $objectManager->get('Magento\Framework\Interception\Config\Config');
         $diConfig->setInterceptionConfig($interceptionConfig);
 
-        $this->configureDirectories($objectManager);
-
         return $objectManager;
     }
 
@@ -203,35 +219,25 @@ class ObjectManagerFactory
         return $result;
     }
 
-    /**
-     * @param \Magento\Framework\ObjectManager $objectManager
-     * @return void
-     */
-    protected function configureDirectories(\Magento\Framework\ObjectManager $objectManager)
-    {
-        $directoryList = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList');
-        $directoryListConfig = $objectManager->get('Magento\Framework\App\Filesystem\DirectoryList\Configuration');
-        $directoryListConfig->configure($directoryList);
-    }
-
     /**
      * Load primary config
      *
      * @param DirectoryList $directoryList
+     * @param DriverPool $driverPool
      * @param mixed $argumentMapper
      * @param string $appMode
      * @return array
      * @throws \Magento\Framework\App\InitException
      */
-    protected function _loadPrimaryConfig(DirectoryList $directoryList, $argumentMapper, $appMode)
+    protected function _loadPrimaryConfig(DirectoryList $directoryList, $driverPool, $argumentMapper, $appMode)
     {
         $configData = null;
         try {
             $fileResolver = new \Magento\Framework\App\Arguments\FileResolver\Primary(
-                new \Magento\Framework\App\Filesystem(
+                new \Magento\Framework\Filesystem(
                     $directoryList,
-                    new \Magento\Framework\Filesystem\Directory\ReadFactory(),
-                    new \Magento\Framework\Filesystem\Directory\WriteFactory()
+                    new \Magento\Framework\Filesystem\Directory\ReadFactory($driverPool),
+                    new \Magento\Framework\Filesystem\Directory\WriteFactory($driverPool)
                 ),
                 new \Magento\Framework\Config\FileIteratorFactory()
             );
diff --git a/lib/internal/Magento/Framework/App/PageCache/README.md b/lib/internal/Magento/Framework/App/PageCache/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..f2fb4fd5acf63bf1193f5cd7e97469ac080ac6d0
--- /dev/null
+++ b/lib/internal/Magento/Framework/App/PageCache/README.md
@@ -0,0 +1,3 @@
+Provides a "pre-wiring" for implementation of full page caching feature.
+
+The Magento application framework runs this as an indirection layer, while another component is expected to plugin into it with its own full page cache implementation.
diff --git a/lib/internal/Magento/Framework/App/README.md b/lib/internal/Magento/Framework/App/README.md
index 6d56530498afb52e3b39503dd47e9dbfa3b308c2..87665be48425a81c9f9031dc7afb1ba741d6c301 100644
--- a/lib/internal/Magento/Framework/App/README.md
+++ b/lib/internal/Magento/Framework/App/README.md
@@ -1,16 +1,18 @@
-# App
+**Magento\Framework\App** implements most of the Magento application framework.
 
-**App** library provides a bootstrap of the Magento application and various components that support Magento application. The bootstrap is called from Magento entry point scripts, such as index.php. It uses this bootstrap to perform initialization routines – such as set preference of error handling, initialize autoloader, set profiling options, set default timezone, etc.
+Unlike other components of **Magento\Framework** that are generic libraries not specific to Magento application, the **Magento\Framework\App** is "aware of" Magento application intentionally.
 
- * A few **entry point applications** that are provided in this library:
-  * HTTP - *\Magento\Framework\App\Http* implements the Magento HTTP application.
-  * Static Resource - *\Magento\Framework\App\StaticResource* is an application for retrieving static resources (e.g., CSS, JS, images). It allows postponing any actions with a file until it is requested.
-  * Cron - \Magento\Framework\App\Cron is an application for running some jobs by schedule.
-  
-**Request dispatching** is supported in this library. *FrontController* is used as an interface for application. It accepts *RequestInterface* and sends a *ResponseInterface*. It requests routing with implementations of *RouterInterface* that can be configured as arguments for *RouterList*. Control is passed to *Router\DefaultRouter* when request is not matched by any router. *Router\NoRouteHandlerList* can be used to configure custom NoRoute handlers. After request matching router uses *ActionFactory* to create instances of *ActionInterface* responsible for request processing. *ActionInterface* implementations can use *ResponseFactory* to create instances of *ResponseInterface*. *Action\ActionAbstract* provides some basic behavior for application actions. *Action\Forward* is used for forwarding request to different action within same process. *Action\Redirect* is used to do redirects to different url.  Response interfaces provided with this library:
-
-  * \Magento\Framework\App\ResponseInterface - base response interface
-  * \Magento\Framework\App\Response\HttpInterface - response interface with methods specific for HTTP response
-  * \Magento\Framework\App\Response\FileInterface - HTTP response interface with methods specific for sending files content via HTTP request
-  
-**Application Deployment Configuration** is supported in this library. It supports basic settings for Magento initializations and cache configuration
\ No newline at end of file
+The library implements a variety of features of the Magento application:
+ * bootstrap and initialization parameters
+ * error handling
+ * entry point handlers (application scripts):
+  * HTTP -- the web-application entry point for serving pages of Storefront, Admin, etc
+  * Static Resource -- for retrieving and serving static content (CSS, JavaScript, images)
+  * Cron -- for launching cron jobs
+ * Object manager, filesystem components (inheritors specific to Magento application)
+ * Caching, cache types
+ * Language packages, dictionaries
+ * DB connection configuration and pool
+ * Request dispatching, routing, front controller
+ * Services for view layer
+ * Application areas
diff --git a/lib/internal/Magento/Framework/App/Request/Http.php b/lib/internal/Magento/Framework/App/Request/Http.php
index b3423de5f1a61579707b03decac6f6e18da91129..87a52f5cc7d9006134046f58e52f2f097ad2ce01 100644
--- a/lib/internal/Magento/Framework/App/Request/Http.php
+++ b/lib/internal/Magento/Framework/App/Request/Http.php
@@ -105,14 +105,14 @@ class Http extends \Zend_Controller_Request_Http implements \Magento\Framework\A
     protected $_cookieManager;
 
     /**
-     * @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
+     * @param \Magento\Framework\App\Route\ConfigInterface\Proxy $routeConfig
      * @param PathInfoProcessorInterface $pathInfoProcessor
      * @param \Magento\Framework\Stdlib\CookieManager $cookieManager
      * @param string $uri
      * @param array $directFrontNames
      */
     public function __construct(
-        \Magento\Framework\App\Route\ConfigInterface $routeConfig,
+        \Magento\Framework\App\Route\ConfigInterface\Proxy $routeConfig,
         PathInfoProcessorInterface $pathInfoProcessor,
         \Magento\Framework\Stdlib\CookieManager $cookieManager,
         $uri = null,
diff --git a/lib/internal/Magento/Framework/App/Response/Http/FileFactory.php b/lib/internal/Magento/Framework/App/Response/Http/FileFactory.php
index 34e75ec86b06289cd7a164d0e8cf85ab17650ac5..404274009b24e5c517d2f532a7174350367acb5c 100644
--- a/lib/internal/Magento/Framework/App/Response/Http/FileFactory.php
+++ b/lib/internal/Magento/Framework/App/Response/Http/FileFactory.php
@@ -24,6 +24,8 @@
  */
 namespace Magento\Framework\App\Response\Http;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class FileFactory
 {
     /**
@@ -32,17 +34,17 @@ class FileFactory
     protected $_response;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
     /**
      * @param \Magento\Framework\App\ResponseInterface $response
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\App\ResponseInterface $response,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_response = $response;
         $this->_filesystem = $filesystem;
@@ -68,7 +70,7 @@ class FileFactory
     public function create(
         $fileName,
         $content,
-        $baseDir = \Magento\Framework\App\Filesystem::ROOT_DIR,
+        $baseDir = DirectoryList::ROOT,
         $contentType = 'application/octet-stream',
         $contentLength = null
     ) {
diff --git a/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php b/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php
new file mode 100644
index 0000000000000000000000000000000000000000..0d88852e5885a6df46e7139f84a997243e4d91aa
--- /dev/null
+++ b/lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php
@@ -0,0 +1,156 @@
+<?php
+/**
+ * Routes configuration model proxy
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Framework\App\Route\ConfigInterface;
+
+/**
+ * Proxy class for \Magento\Framework\App\Resource
+ */
+class Proxy implements \Magento\Framework\App\Route\ConfigInterface
+{
+    /**
+     * Object Manager instance
+     *
+     * @var \Magento\Framework\ObjectManager
+     */
+    protected $_objectManager = null;
+
+    /**
+     * Proxied instance name
+     *
+     * @var string
+     */
+    protected $_instanceName = null;
+
+    /**
+     * Proxied instance
+     *
+     * @var \Magento\Framework\App\Resource
+     */
+    protected $_subject = null;
+
+    /**
+     * Instance shareability flag
+     *
+     * @var bool
+     */
+    protected $_isShared = null;
+
+    /**
+     * Proxy constructor
+     *
+     * @param \Magento\Framework\ObjectManager $objectManager
+     * @param string $instanceName
+     * @param bool $shared
+     */
+    public function __construct(
+        \Magento\Framework\ObjectManager $objectManager,
+        $instanceName = 'Magento\Framework\App\Route\ConfigInterface',
+        $shared = true
+    ) {
+        $this->_objectManager = $objectManager;
+        $this->_instanceName = $instanceName;
+        $this->_isShared = $shared;
+    }
+
+    /**
+     * @return array
+     */
+    public function __sleep()
+    {
+        return array('_subject', '_isShared');
+    }
+
+    /**
+     * Retrieve ObjectManager from global scope
+     *
+     * @return void
+     */
+    public function __wakeup()
+    {
+        $this->_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
+    }
+
+    /**
+     * Clone proxied instance
+     *
+     * @return void
+     */
+    public function __clone()
+    {
+        $this->_subject = clone $this->_getSubject();
+    }
+
+    /**
+     * Get proxied instance
+     *
+     * @return \Magento\Framework\App\Route\ConfigInterface
+     */
+    protected function _getSubject()
+    {
+        if (!$this->_subject) {
+            $this->_subject = true === $this->_isShared
+                ? $this->_objectManager->get($this->_instanceName)
+                : $this->_objectManager->create($this->_instanceName);
+        }
+        return $this->_subject;
+    }
+
+    /**
+     * Retrieve route front name
+     *
+     * @param string $routeId
+     * @param string $scope
+     * @return string
+     */
+    public function getRouteFrontName($routeId, $scope = null)
+    {
+        return $this->_getSubject()->getRouteFrontName($routeId, $scope);
+    }
+
+    /**
+     * Get route id by route front name
+     *
+     * @param string $frontName
+     * @param string $scope
+     * @return string
+     */
+    public function getRouteByFrontName($frontName, $scope = null)
+    {
+        return $this->_getSubject()->getRouteByFrontName($frontName, $scope);
+    }
+
+    /**
+     * Retrieve list of modules by route front name
+     *
+     * @param string $frontName
+     * @param string $scope
+     * @return array
+     */
+    public function getModulesByFrontName($frontName, $scope = null)
+    {
+        $this->_getSubject()->getModulesByFrontName($frontName, $scope);
+    }
+}
diff --git a/lib/internal/Magento/Framework/App/View/Asset/Publisher.php b/lib/internal/Magento/Framework/App/View/Asset/Publisher.php
index 37b49184c248648016d6246150c7597b5915f04c..65cfd40d55e543b49c11f49654051a55d625fe33 100644
--- a/lib/internal/Magento/Framework/App/View/Asset/Publisher.php
+++ b/lib/internal/Magento/Framework/App/View/Asset/Publisher.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\App\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Asset;
 
 /**
@@ -37,17 +38,17 @@ class Publisher
     protected $appState;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\Framework\App\State $appState
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\App\State $appState,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->appState = $appState;
         $this->filesystem = $filesystem;
@@ -61,7 +62,7 @@ class Publisher
         if ($this->appState->getMode() === \Magento\Framework\App\State::MODE_DEVELOPER) {
             return false;
         }
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $dir = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
         if ($dir->isExist($asset->getPath())) {
             return true;
         }
@@ -76,8 +77,8 @@ class Publisher
      */
     private function publishAsset(Asset\LocalInterface $asset)
     {
-        $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
-        $rootDir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $dir = $this->filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW);
+        $rootDir = $this->filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $source = $rootDir->getRelativePath($asset->getSourceFile());
         $destination = $asset->getPath();
         return $rootDir->copyFile($source, $destination, $dir);
diff --git a/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php b/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php
index 02b6d14ffa8823d0e31503f2f7be46b2530ee72b..e93ee8eca9ea4d182b58f4d2d83c3b155addc10e 100644
--- a/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php
+++ b/lib/internal/Magento/Framework/App/View/Deployment/Version/Storage/File.php
@@ -40,12 +40,12 @@ class File implements \Magento\Framework\App\View\Deployment\Version\StorageInte
     private $fileName;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $directoryCode
      * @param string $fileName
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $directoryCode,
         $fileName
     ) {
diff --git a/lib/internal/Magento/Framework/AppInterface.php b/lib/internal/Magento/Framework/AppInterface.php
index 6880c2c954699eb25f6a4e4bad079440c97b6a12..887e9b7b820a62ed9a46ad9214d1f4c493f92560 100644
--- a/lib/internal/Magento/Framework/AppInterface.php
+++ b/lib/internal/Magento/Framework/AppInterface.php
@@ -35,7 +35,7 @@ interface AppInterface
     /**
      * Magento version
      */
-    const VERSION = '0.1.0-alpha100';
+    const VERSION = '0.1.0-alpha101';
 
     /**
      * Launch application
diff --git a/lib/internal/Magento/Framework/Archive/README.md b/lib/internal/Magento/Framework/Archive/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4fa38a201db6e79d2deade3d5f2ae9858264bc2f
--- /dev/null
+++ b/lib/internal/Magento/Framework/Archive/README.md
@@ -0,0 +1,4 @@
+Archive library provides functionalities for archiving files including following formats:
+* tar
+* gz
+* bzip2
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/Backup/Media.php b/lib/internal/Magento/Framework/Backup/Media.php
index 5e2efbf5cf1a03071e55dba1643b798064b971aa..41c5ac65853bd9c3a334c08253d551c3b35b0e8d 100644
--- a/lib/internal/Magento/Framework/Backup/Media.php
+++ b/lib/internal/Magento/Framework/Backup/Media.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Backup;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Class to work media folder and database backups
  *
@@ -74,7 +76,7 @@ class Media extends Snapshot
     {
         $rootDir = $this->getRootDir();
         $map = array(
-            $rootDir => array('media', 'var', 'pub'),
+            $rootDir => array('var', 'pub'),
             $rootDir . '/pub' => array('media'),
             $rootDir . '/var' => array($this->getDbBackupFilename())
         );
@@ -83,7 +85,7 @@ class Media extends Snapshot
             foreach (new \DirectoryIterator($path) as $item) {
                 $filename = $item->getFilename();
                 if (!$item->isDot() && !in_array($filename, $whiteList)) {
-                    $this->addIgnorePaths($item->getPathname());
+                    $this->addIgnorePaths(str_replace('\\', '/', $item->getPathname()));
                 }
             }
         }
diff --git a/lib/internal/Magento/Framework/Backup/README.md b/lib/internal/Magento/Framework/Backup/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..e3785a3025e338f10e3c835cd660d0fc23c517c6
--- /dev/null
+++ b/lib/internal/Magento/Framework/Backup/README.md
@@ -0,0 +1 @@
+The Backup library provides functions to create and rollback backup types such as database, filesystem and media. It also provides an archiving facility.
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/Backup/Snapshot.php b/lib/internal/Magento/Framework/Backup/Snapshot.php
index 36b5732757211d64644611aa0c10a085dddbedec..af2c46529e64e8929205088e29752108a405a736 100644
--- a/lib/internal/Magento/Framework/Backup/Snapshot.php
+++ b/lib/internal/Magento/Framework/Backup/Snapshot.php
@@ -29,6 +29,9 @@
  */
 namespace Magento\Framework\Backup;
 
+use Magento\Framework\Filesystem as AppFilesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Snapshot extends Filesystem
 {
     /**
@@ -41,7 +44,7 @@ class Snapshot extends Filesystem
     /**
      * Filesystem facade
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var AppFilesystem
      */
     protected $_filesystem;
 
@@ -51,10 +54,10 @@ class Snapshot extends Filesystem
     protected $_backupFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param AppFilesystem $filesystem
      * @param Factory $backupFactory
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, Factory $backupFactory)
+    public function __construct(AppFilesystem $filesystem, Factory $backupFactory)
     {
         $this->_filesystem = $filesystem;
         $this->_backupFactory = $backupFactory;
@@ -127,17 +130,12 @@ class Snapshot extends Filesystem
      */
     protected function _createDbBackupInstance()
     {
-        return $this->_backupFactory->create(
-            Factory::TYPE_DB
-        )->setBackupExtension(
-            'gz'
-        )->setTime(
-            $this->getTime()
-        )->setBackupsDir(
-            $this->_filesystem->getPath(\Magento\Framework\App\Filesystem::VAR_DIR)
-        )->setResourceModel(
-            $this->getResourceModel()
-        );
+        return $this->_backupFactory->create(Factory::TYPE_DB)
+            ->setBackupExtension('gz')
+            ->setTime($this->getTime())
+            ->setBackupsDir($this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR)->getAbsolutePath())
+            ->setResourceModel($this->getResourceModel())
+        ;
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Convert/README.md b/lib/internal/Magento/Framework/Convert/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..97d2ba362561df2e83534a607a835f90efde18f2
--- /dev/null
+++ b/lib/internal/Magento/Framework/Convert/README.md
@@ -0,0 +1,6 @@
+A set of utility classes that can convert structured data from one type to another. Available features:
+
+ * Converting an associative array to an XML-document and vice versa
+ * Converting an object to array or to set of "key/label" arrays
+ * Converting a set of objects/arrays to a Microsoft Excel spreadsheet
+ * Allows using custom callbacks in the conversion process
diff --git a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
index f5b64b944fdb104f82cf5a55b7705612a4321884..e0767ebff6803b2f630556aad5070e1740832b9a 100644
--- a/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
+++ b/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php
@@ -25,7 +25,8 @@
  */
 namespace Magento\Framework\DB\Adapter\Pdo;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Cache\FrontendInterface;
 use Magento\Framework\DB\Adapter\AdapterInterface;
 use Magento\Framework\DB\Ddl\Table;
@@ -1468,7 +1469,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface
     {
         $str = '## ' . date('Y-m-d H:i:s') . "\r\n" . $str;
 
-        $stream = $this->_filesystem->getDirectoryWrite(Filesystem::ROOT_DIR)->openFile($this->_debugFile, 'a');
+        $stream = $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT)->openFile($this->_debugFile, 'a');
         $stream->lock();
         $stream->write($str);
         $stream->unlock();
diff --git a/lib/internal/Magento/Framework/Encryption/README.md b/lib/internal/Magento/Framework/Encryption/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..a2bc6aa0f67f32def1d6d62c7c6b23f51a903908
--- /dev/null
+++ b/lib/internal/Magento/Framework/Encryption/README.md
@@ -0,0 +1 @@
+The Encryption library provides functionalities such as hashing passwords, encrypting/decrypting data, URLs encoding, using cryptographic algorithms.
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/File/README.md b/lib/internal/Magento/Framework/File/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..ca5f3168cf58f221019213d1c73d56ce9adab643
--- /dev/null
+++ b/lib/internal/Magento/Framework/File/README.md
@@ -0,0 +1,7 @@
+A set of utility classes for handling files:
+
+ * Reading/writing data from/to CSV-files
+ * Determining mime-type of files based on their extension
+ * Calculating file size
+ * Sending contents of a file via HTTP (for download)
+ * Uploading files
diff --git a/lib/internal/Magento/Framework/File/Uploader.php b/lib/internal/Magento/Framework/File/Uploader.php
index 13b008e248467c6359ec5a65aaa77cfe5d559584..b74861c1d66b4122e2860bf9eec2300d608ef0a0 100644
--- a/lib/internal/Magento/Framework/File/Uploader.php
+++ b/lib/internal/Magento/Framework/File/Uploader.php
@@ -169,7 +169,7 @@ class Uploader
     /**
      * Init upload
      *
-     * @param string $fileId
+     * @param string|array $fileId
      * @throws \Exception
      */
     public function __construct($fileId)
@@ -502,7 +502,7 @@ class Uploader
     /**
      * Set upload field id
      *
-     * @param string $fileId
+     * @param string|array $fileId
      * @return void
      * @throws \Exception
      */
diff --git a/lib/internal/Magento/Framework/Filesystem.php b/lib/internal/Magento/Framework/Filesystem.php
index c2c17f8430d2e4e4d810429be20b0e64428c070a..ce775fdf69de8c015573db35a4af3e785a6a899f 100644
--- a/lib/internal/Magento/Framework/Filesystem.php
+++ b/lib/internal/Magento/Framework/Filesystem.php
@@ -25,44 +25,10 @@
  */
 namespace Magento\Framework;
 
-use Magento\Framework\Filesystem\FilesystemException;
 use Magento\Framework\Filesystem\File\ReadInterface;
 
 class Filesystem
 {
-    /**#@+
-     * Content wrappers
-     */
-    const WRAPPER_CONTENT_ZLIB = 'compress.zlib';
-
-    const WRAPPER_CONTENT_PHAR = 'phar';
-
-    const WRAPPER_CONTENT_RAR = 'rar';
-
-    const WRAPPER_CONTENT_OGG = 'ogg';
-
-    /**#@-*/
-
-    /**#@+
-     * Directories for remote access
-     */
-    const FTP = 'ftp';
-
-    const FTPS = 'ftps';
-
-    const SSH2 = 'ssh2';
-
-    /**#@-*/
-
-    /**#@+
-     * Remote resource Access Protocols
-     */
-    const HTTP = 'http';
-
-    const HTTPS = 'https';
-
-    /**#@-*/
-
     /**
      * @var \Magento\Framework\Filesystem\DirectoryList
      */
@@ -88,11 +54,6 @@ class Filesystem
      */
     protected $readInstances = array();
 
-    /**
-     * @var \Magento\Framework\Filesystem\WrapperFactory
-     */
-    protected $wrapperFactory;
-
     /**
      * @var \Magento\Framework\Filesystem\Directory\WriteInterface[]
      */
@@ -108,22 +69,17 @@ class Filesystem
      * @param Filesystem\Directory\ReadFactory $readFactory
      * @param Filesystem\Directory\WriteFactory $writeFactory
      * @param Filesystem\File\ReadFactory $fileReadFactory
-     * @param Filesystem\File\WriteFactory $fileWriteFactory
      */
     public function __construct(
         \Magento\Framework\Filesystem\DirectoryList $directoryList,
         \Magento\Framework\Filesystem\Directory\ReadFactory $readFactory,
         \Magento\Framework\Filesystem\Directory\WriteFactory $writeFactory,
-        \Magento\Framework\Filesystem\File\ReadFactory $fileReadFactory = null,
-        \Magento\Framework\Filesystem\File\WriteFactory $fileWriteFactory = null
+        \Magento\Framework\Filesystem\File\ReadFactory $fileReadFactory = null
     ) {
         $this->directoryList = $directoryList;
         $this->readFactory = $readFactory;
         $this->writeFactory = $writeFactory;
         $this->fileReadFactory = $fileReadFactory;
-        $this->fileWriteFactory = $fileWriteFactory;
-
-        $this->driverFactory = new \Magento\Framework\Filesystem\DriverFactory($this->directoryList);
     }
 
     /**
@@ -135,8 +91,7 @@ class Filesystem
     public function getDirectoryRead($code)
     {
         if (!array_key_exists($code, $this->readInstances)) {
-            $config = $this->directoryList->getConfig($code);
-            $this->readInstances[$code] = $this->readFactory->create($config, $this->driverFactory);
+            $this->readInstances[$code] = $this->readFactory->create($this->getDirPath($code));
         }
         return $this->readInstances[$code];
     }
@@ -151,16 +106,22 @@ class Filesystem
     public function getDirectoryWrite($code)
     {
         if (!array_key_exists($code, $this->writeInstances)) {
-            $config = $this->directoryList->getConfig($code);
-            if (isset($config['read_only']) && $config['read_only']) {
-                throw new FilesystemException(sprintf('The "%s" directory doesn\'t allow write operations', $code));
-            }
-
-            $this->writeInstances[$code] = $this->writeFactory->create($config, $this->driverFactory);
+            $this->writeInstances[$code] = $this->writeFactory->create($this->getDirPath($code));
         }
         return $this->writeInstances[$code];
     }
 
+    /**
+     * Gets configuration of a directory
+     *
+     * @param string $code
+     * @return string
+     */
+    protected function getDirPath($code)
+    {
+        return $this->directoryList->getPath($code);
+    }
+
     /**
      * @param string $path
      * @param string|null $protocol
@@ -195,7 +156,6 @@ class Filesystem
      */
     public function getUri($code)
     {
-        $config = $this->directoryList->getConfig($code);
-        return isset($config['uri']) ? $config['uri'] : '';
+        return $this->directoryList->getUrlPath($code);
     }
 }
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php
index 24ec02db57bf0c6f45c9ab8212979d20b43ffc9e..9f04342ba8462167b436cded3d596c08b138da50 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/Read.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/Read.php
@@ -34,11 +34,6 @@ class Read implements ReadInterface
      */
     protected $path;
 
-    /**
-     * @var string
-     */
-    protected $scheme;
-
     /**
      * File factory
      *
@@ -56,35 +51,30 @@ class Read implements ReadInterface
     /**
      * Constructor. Set properties.
      *
-     * @param array $config
      * @param \Magento\Framework\Filesystem\File\ReadFactory $fileFactory
      * @param \Magento\Framework\Filesystem\DriverInterface $driver
+     * @param string $path
      */
     public function __construct(
-        array $config,
         \Magento\Framework\Filesystem\File\ReadFactory $fileFactory,
-        \Magento\Framework\Filesystem\DriverInterface $driver
+        \Magento\Framework\Filesystem\DriverInterface $driver,
+        $path
     ) {
-        $this->setProperties($config);
         $this->fileFactory = $fileFactory;
         $this->driver = $driver;
+        $this->setPath($path);
     }
 
     /**
-     * Set properties from config
+     * Sets base path
      *
-     * @param array $config
+     * @param string $path
      * @return void
-     * @throws \Magento\Framework\Filesystem\FilesystemException
      */
-    protected function setProperties(array $config)
+    protected function setPath($path)
     {
-        if (!empty($config['path'])) {
-            $this->path = rtrim(str_replace('\\', '/', $config['path']), '/') . '/';
-        }
-
-        if (!empty($config['protocol'])) {
-            $this->scheme = $config['protocol'];
+        if (!empty($path)) {
+            $this->path = rtrim(str_replace('\\', '/', $path), '/') . '/';
         }
     }
 
@@ -196,11 +186,11 @@ class Read implements ReadInterface
     /**
      * Check permissions for reading file or directory
      *
-     * @param string $path
+     * @param string $path [optional]
      * @return bool
      * @throws \Magento\Framework\Filesystem\FilesystemException
      */
-    public function isReadable($path)
+    public function isReadable($path = null)
     {
         return $this->driver->isReadable($this->driver->getAbsolutePath($this->path, $path));
     }
@@ -259,10 +249,10 @@ class Read implements ReadInterface
     /**
      * Check whether given path is directory
      *
-     * @param string $path
+     * @param string $path [optional]
      * @return bool
      */
-    public function isDirectory($path)
+    public function isDirectory($path = null)
     {
         return $this->driver->isDirectory($this->driver->getAbsolutePath($this->path, $path));
     }
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php
index 512ac6eab997978f56c586049a21033ccc326ccc..d2e4dd27d20f3b3b7b7b6b30d4be3e16dca3849e 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/ReadFactory.php
@@ -23,22 +23,38 @@
  */
 namespace Magento\Framework\Filesystem\Directory;
 
+use Magento\Framework\Filesystem\DriverPool;
+
 class ReadFactory
 {
+    /**
+     * Pool of filesystem drivers
+     *
+     * @var DriverPool
+     */
+    private $driverPool;
+
+    /**
+     * Constructor
+     *
+     * @param DriverPool $driverPool
+     */
+    public function __construct(DriverPool $driverPool)
+    {
+        $this->driverPool = $driverPool;
+    }
+
     /**
      * Create a readable directory
      *
-     * @param array $config
-     * @param \Magento\Framework\Filesystem\DriverFactory $driverFactory
+     * @param string $path
+     * @param string $protocol
      * @return ReadInterface
      */
-    public function create(array $config, \Magento\Framework\Filesystem\DriverFactory $driverFactory)
+    public function create($path, $protocol = DriverPool::FILE)
     {
-        $protocolCode = isset($config['protocol']) ? $config['protocol'] : null;
-        $driverClass = isset($config['driver']) ? $config['driver'] : null;
-        $driver = $driverFactory->get($protocolCode, $driverClass);
-        $factory = new \Magento\Framework\Filesystem\File\ReadFactory($driverFactory);
-
-        return new Read($config, $factory, $driver);
+        $driver = $this->driverPool->getDriver($protocol);
+        $factory = new \Magento\Framework\Filesystem\File\ReadFactory($this->driverPool);
+        return new Read($factory, $driver, $path);
     }
 }
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php b/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php
index 6d42100c24d497d9cb40b28d217254af27816287..77c42abea28d4764f86e10a230b4882363e5a4ef 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/ReadInterface.php
@@ -77,10 +77,10 @@ interface ReadInterface
     /**
      * Check permissions for reading file or directory
      *
-     * @param string $path
+     * @param string $path [optional]
      * @return bool
      */
-    public function isReadable($path);
+    public function isReadable($path = null);
 
     /**
      * Check whether given path is file
@@ -93,10 +93,10 @@ interface ReadInterface
     /**
      * Check whether given path is directory
      *
-     * @param string $path
+     * @param string $path [optional]
      * @return bool
      */
-    public function isDirectory($path);
+    public function isDirectory($path = null);
 
     /**
      * Open file in read mode
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php
index d69771f6a8964f12e8485ce10613a77f8b4eb465..69bcb65a44fffd5e5aea17df50742d688302c1ea 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/Write.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/Write.php
@@ -28,14 +28,7 @@ use Magento\Framework\Filesystem\FilesystemException;
 class Write extends Read implements WriteInterface
 {
     /**
-     * Is directory creation
-     *
-     * @var bool
-     */
-    protected $allowCreateDirs;
-
-    /**
-     * Permissions for new directories and files
+     * Permissions for new sub-directories
      *
      * @var int
      */
@@ -44,35 +37,22 @@ class Write extends Read implements WriteInterface
     /**
      * Constructor
      *
-     * @param array $config
      * @param \Magento\Framework\Filesystem\File\WriteFactory $fileFactory
      * @param \Magento\Framework\Filesystem\DriverInterface $driver
+     * @param string $path
+     * @param int $createPermissions
      */
     public function __construct(
-        array $config,
         \Magento\Framework\Filesystem\File\WriteFactory $fileFactory,
-        \Magento\Framework\Filesystem\DriverInterface $driver
+        \Magento\Framework\Filesystem\DriverInterface $driver,
+        $path,
+        $createPermissions = null
     ) {
-        $this->setProperties($config);
         $this->fileFactory = $fileFactory;
         $this->driver = $driver;
-    }
-
-    /**
-     * Set properties from config
-     *
-     * @param array $config
-     * @return void
-     * @throws \Magento\Framework\Filesystem\FilesystemException
-     */
-    protected function setProperties(array $config)
-    {
-        parent::setProperties($config);
-        if (isset($config['permissions'])) {
-            $this->permissions = $config['permissions'];
-        }
-        if (isset($config['allow_create_dirs'])) {
-            $this->allowCreateDirs = (bool)$config['allow_create_dirs'];
+        $this->setPath($path);
+        if (null !== $createPermissions) {
+            $this->permissions = $createPermissions;
         }
     }
 
@@ -108,7 +88,7 @@ class Write extends Read implements WriteInterface
     }
 
     /**
-     * Create directory if it does not exists
+     * Create directory if it does not exist
      *
      * @param string $path
      * @return bool
diff --git a/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php
index 24451d6167aeebfc6f86f3275c843bba1a919b8e..ff0caa611288733bd410ff10c3ce38473761d9ec 100644
--- a/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php
+++ b/lib/internal/Magento/Framework/Filesystem/Directory/WriteFactory.php
@@ -23,22 +23,39 @@
  */
 namespace Magento\Framework\Filesystem\Directory;
 
+use Magento\Framework\Filesystem\DriverPool;
+
 class WriteFactory
 {
+    /**
+     * Pool of filesystem drivers
+     *
+     * @var DriverPool
+     */
+    private $driverPool;
+
+    /**
+     * Constructor
+     *
+     * @param DriverPool $driverPool
+     */
+    public function __construct(DriverPool $driverPool)
+    {
+        $this->driverPool = $driverPool;
+    }
+
     /**
      * Create a readable directory
      *
-     * @param array $config
-     * @param \Magento\Framework\Filesystem\DriverFactory $driverFactory
+     * @param string $path
+     * @param string $protocol
+     * @param int $createPermissions
      * @return \Magento\Framework\Filesystem\Directory\Write
      */
-    public function create(array $config, \Magento\Framework\Filesystem\DriverFactory $driverFactory)
+    public function create($path, $protocol = DriverPool::FILE, $createPermissions = null)
     {
-        $protocolCode = isset($config['protocol']) ? $config['protocol'] : null;
-        $driverClass = isset($config['driver']) ? $config['driver'] : null;
-        $driver = $driverFactory->get($protocolCode, $driverClass);
-        $factory = new \Magento\Framework\Filesystem\File\WriteFactory($driverFactory);
-
-        return new \Magento\Framework\Filesystem\Directory\Write($config, $factory, $driver);
+        $driver = $this->driverPool->getDriver($protocol);
+        $factory = new \Magento\Framework\Filesystem\File\WriteFactory($this->driverPool);
+        return new Write($factory, $driver, $path, $createPermissions);
     }
 }
diff --git a/lib/internal/Magento/Framework/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/Filesystem/DirectoryList.php
index d25e898f880adea6ecf88554d9386fbd8a1b2ea8..0da123241e952f4091be3dd6763b5ccda334141b 100644
--- a/lib/internal/Magento/Framework/Filesystem/DirectoryList.php
+++ b/lib/internal/Magento/Framework/Filesystem/DirectoryList.php
@@ -28,131 +28,134 @@
  */
 namespace Magento\Framework\Filesystem;
 
+/**
+ * A list of directories
+ *
+ * Each list item consists of:
+ * - a directory path in the filesystem
+ * - optionally, a URL path
+ *
+ * This object is intended to be immutable (a "value object").
+ * The defaults are pre-defined and can be modified only by inheritors of this class.
+ * Through the constructor, it is possible to inject custom paths or URL paths, but impossible to inject new types.
+ */
 class DirectoryList
 {
+    /**#@+
+     * Keys of directory configuration
+     */
+    const PATH = 'path';
+    const URL_PATH = 'uri';
+    /**#@- */
+
+    /**
+     * System base temporary directory
+     */
+    const SYS_TMP = 'sys_tmp';
+
     /**
      * Root path
      *
      * @var string
      */
-    protected $root;
+    private $root;
 
     /**
      * Directories configurations
      *
      * @var array
      */
-    protected $directories = array();
+    private $directories;
 
     /**
-     * @var array
+     * Predefined types/paths
+     *
+     * @return array
      */
-    protected $protocol = array();
+    public static function getDefaultConfig()
+    {
+        return [self::SYS_TMP => [self::PATH => '']];
+    }
 
     /**
+     * Constructor
+     *
      * @param string $root
-     * @param array $directories
+     * @param array $config
      */
-    public function __construct($root, array $directories = array())
+    public function __construct($root, array $config = array())
     {
-        $this->root = str_replace('\\', '/', $root);
-
-        foreach ($this->directories as $code => $directoryConfig) {
-            if (!$this->isAbsolute($directoryConfig['path'])) {
-                $this->directories[$code]['path'] = $this->makeAbsolute($directoryConfig['path']);
+        $this->root = $this->filterPath($root);
+        $this->directories = static::getDefaultConfig();
+        $this->directories[self::SYS_TMP] = [self::PATH => sys_get_temp_dir()];
+
+        // inject custom values from constructor
+        foreach ($this->directories as $code => $dir) {
+            foreach ([self::PATH, self::URL_PATH] as $key) {
+                if (isset($config[$code][$key])) {
+                    $this->directories[$code][$key] = $config[$code][$key];
+                }
             }
         }
 
-        foreach ($directories as $code => $directoryConfig) {
-            $baseConfiguration = isset($this->directories[$code]) ? $this->directories[$code] : array();
-            $this->directories[$code] = array_merge($baseConfiguration, $directoryConfig);
-
-            if (isset($directoryConfig['path'])) {
-                $this->setPath($code, $directoryConfig['path']);
+        // filter/validate values
+        foreach ($this->directories as $code => $dir) {
+            $path = $this->filterPath($dir[self::PATH]);
+            if (!$this->isAbsolute($path)) {
+                $path = $this->prependRoot($path);
             }
-            if (isset($directoryConfig['uri'])) {
-                $this->setUri($code, $directoryConfig['uri']);
+            $this->directories[$code][self::PATH] = $path;
+
+            if (isset($dir[self::URL_PATH])) {
+                $this->assertUrlPath($dir[self::URL_PATH]);
             }
         }
     }
 
     /**
-     * Add directory configuration
+     * Converts slashes in path to a conventional unix-style
      *
-     * @param string $code
-     * @param array $directoryConfig
-     * @return void
-     * @throws \Magento\Framework\Filesystem\FilesystemException
+     * @param string $path
+     * @return string
      */
-    public function addDirectory($code, array $directoryConfig)
+    private function filterPath($path)
     {
-        if (isset($this->directories[$code])) {
-            throw new \Magento\Framework\Filesystem\FilesystemException("Configuration for '{$code}' already defined");
-        }
-
-        $this->setDirectory($code, $directoryConfig);
+        return str_replace('\\', '/', $path);
     }
 
     /**
-     * Set a directory configuration
+     * Validates a URL path
      *
-     * @param string $code
-     * @param array $directoryConfig
-     * @return void
-     */
-    public function setDirectory($code, array $directoryConfig)
-    {
-        if (!isset($directoryConfig['path'])) {
-            $directoryConfig['path'] = null;
-        }
-        if (!$this->isAbsolute($directoryConfig['path'])) {
-            $directoryConfig['path'] = $this->makeAbsolute($directoryConfig['path']);
-        }
-
-        $this->directories[$code] = $directoryConfig;
-    }
-
-    /**
-     * Set protocol wrapper
+     * Path must be usable as a fragment of a URL path.
+     * For interoperability and security purposes, no uppercase or "upper directory" paths like "." or ".."
      *
-     * @param string $wrapperCode
-     * @param array $configuration
+     * @param string $urlPath
      * @return void
+     * @throws \InvalidArgumentException
      */
-    public function addProtocol($wrapperCode, array $configuration)
+    private function assertUrlPath($urlPath)
     {
-        $wrapperCode = isset($configuration['protocol']) ? $configuration['protocol'] : $wrapperCode;
-        if (isset($configuration['wrapper'])) {
-            $flag = isset($configuration['url_stream']) ? $configuration['url_stream'] : 0;
-            $wrapperClass = $configuration['wrapper'];
-            stream_wrapper_register($wrapperCode, $wrapperClass, $flag);
+        if (!preg_match('/^([a-z0-9_]+[a-z0-9\._]*(\/[a-z0-9_]+[a-z0-9\._]*)*)?$/', $urlPath)) {
+            throw new \InvalidArgumentException(
+                "URL path must be relative directory path in lowercase with '/' directory separator: '{$urlPath}'"
+            );
         }
-
-        $this->protocol[$wrapperCode] = $configuration;
     }
 
     /**
-     * Add root dir for relative path
+     * Concatenates root directory path with a relative path
      *
      * @param string $path
      * @return string
      */
-    protected function makeAbsolute($path)
+    protected function prependRoot($path)
     {
-        if ($path === null) {
-            $result = '';
-        } else {
-            $result = $this->getRoot();
-            if (!empty($path)) {
-                $result .= '/' . $path;
-            }
-        }
-
-        return $result;
+        $root = $this->getRoot();
+        return $root . ($root && $path ? '/' : '') . $path;
     }
 
     /**
-     * Verify if path is absolute
+     * Determine if a path is absolute
      *
      * @param string $path
      * @return bool
@@ -160,15 +163,23 @@ class DirectoryList
     protected function isAbsolute($path)
     {
         $path = strtr($path, '\\', '/');
-        $isUnixRoot = strpos($path, '/') === 0;
-        $isWindowsRoot = preg_match('#^\w{1}:/#', $path);
-        $isWindowsLetter = parse_url($path, PHP_URL_SCHEME) !== null;
 
-        return $isUnixRoot || $isWindowsRoot || $isWindowsLetter;
+        if (strpos($path, '/') === 0) {
+            //is UnixRoot
+            return true;
+        } elseif (preg_match('#^\w{1}:/#', $path)) {
+            //is WindowsRoot
+            return true;
+        } elseif (parse_url($path, PHP_URL_SCHEME) !== null) {
+            //is WindowsLetter
+            return true;
+        }
+
+        return false;
     }
 
     /**
-     * Retrieve root path
+     * Gets a filesystem path of the root directory
      *
      * @return string
      */
@@ -178,87 +189,43 @@ class DirectoryList
     }
 
     /**
-     * Check whether configured directory
+     * Gets a filesystem path of a directory
      *
      * @param string $code
-     * @return bool
+     * @return string
      */
-    public function isConfigured($code)
+    public function getPath($code)
     {
-        return isset($this->directories[$code]);
+        $this->assertCode($code);
+        return $this->directories[$code][self::PATH];
     }
 
     /**
-     * Get configuration for directory code
+     * Gets URL path of a directory
      *
      * @param string $code
-     * @return array
-     * @throws \Magento\Framework\Filesystem\FilesystemException
-     */
-    public function getConfig($code)
-    {
-        if (!isset($this->directories[$code])) {
-            throw new \Magento\Framework\Filesystem\FilesystemException(
-                sprintf('The "%s" directory is not specified in configuration', $code)
-            );
-        }
-        return $this->directories[$code];
-    }
-
-    /**
-     * Return protocol configuration
-     *
-     * @param string $wrapperCode
-     * @return null|array
-     */
-    public function getProtocolConfig($wrapperCode)
-    {
-        return isset($this->protocol[$wrapperCode]) ? $this->protocol[$wrapperCode] : null;
-    }
-
-    /**
-     * \Directory path getter
-     *
-     * @param string $code One of self const
      * @return string|bool
      */
-    public function getDir($code)
-    {
-        return isset($this->directories[$code]['path']) ? $this->directories[$code]['path'] : false;
-    }
-
-    /**
-     * Set URI
-     *
-     * The method is private on purpose: it must be used only in constructor. Users of this object must not be able
-     * to alter its state, otherwise it may compromise application integrity.
-     * Path must be usable as a fragment of a URL path.
-     * For interoperability and security purposes, no uppercase or "upper directory" paths like "." or ".."
-     *
-     * @param string $code
-     * @param string $uri
-     * @return void
-     * @throws \InvalidArgumentException
-     */
-    private function setUri($code, $uri)
+    public function getUrlPath($code)
     {
-        if (!preg_match('/^([a-z0-9_]+[a-z0-9\._]*(\/[a-z0-9_]+[a-z0-9\._]*)*)?$/', $uri)) {
-            throw new \InvalidArgumentException(
-                "Must be relative directory path in lowercase with '/' directory separator: '{$uri}'"
-            );
+        $this->assertCode($code);
+        if (!isset($this->directories[$code][self::URL_PATH])) {
+            return false;
         }
-        $this->directories[$code]['uri'] = $uri;
+        return $this->directories[$code][self::URL_PATH];
     }
 
     /**
-     * Set directory
+     * Asserts that specified directory code is in the registry
      *
      * @param string $code
-     * @param string $path
+     * @throws FilesystemException
      * @return void
      */
-    private function setPath($code, $path)
+    private function assertCode($code)
     {
-        $this->directories[$code]['path'] = str_replace('\\', '/', $path);
+        if (!isset($this->directories[$code])) {
+            throw new FilesystemException("Unknown directory type: '$code'");
+        }
     }
 }
diff --git a/lib/internal/Magento/Framework/Filesystem/DriverFactory.php b/lib/internal/Magento/Framework/Filesystem/DriverFactory.php
deleted file mode 100644
index 5bba7d23c0b47eaf19f63b69e1d61c309429e397..0000000000000000000000000000000000000000
--- a/lib/internal/Magento/Framework/Filesystem/DriverFactory.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 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\Framework\Filesystem;
-
-class DriverFactory
-{
-    /**
-     * @var \Magento\Framework\Filesystem\DriverInterface[]
-     */
-    protected $drivers = array();
-
-    /**
-     * @var DirectoryList
-     */
-    protected $directoryList;
-
-    /**
-     * @param DirectoryList $directoryList
-     */
-    public function __construct(DirectoryList $directoryList)
-    {
-        $this->directoryList = $directoryList;
-    }
-
-    /**
-     * Get a driver instance according the given scheme.
-     *
-     * @param null|string $protocolCode
-     * @param string $driverClass
-     * @return DriverInterface
-     * @throws FilesystemException
-     */
-    public function get($protocolCode = null, $driverClass = null)
-    {
-        if (!$driverClass) {
-            $driverClass = $protocolCode ? $this->directoryList->getProtocolConfig($protocolCode)['driver']
-                : '\Magento\Framework\Filesystem\Driver\File';
-        }
-        if (!isset($this->drivers[$driverClass])) {
-            $this->drivers[$driverClass] = new $driverClass();
-            if (!$this->drivers[$driverClass] instanceof DriverInterface) {
-                throw new FilesystemException("Invalid filesystem driver class: " . $driverClass);
-            }
-        }
-        return $this->drivers[$driverClass];
-    }
-}
diff --git a/lib/internal/Magento/Framework/Filesystem/DriverPool.php b/lib/internal/Magento/Framework/Filesystem/DriverPool.php
new file mode 100644
index 0000000000000000000000000000000000000000..5d20a4070a5b4fd27402e7c168e3a2b524e548fd
--- /dev/null
+++ b/lib/internal/Magento/Framework/Filesystem/DriverPool.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.
+ *
+ * @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\Framework\Filesystem;
+
+/**
+ * A pool of stream wrappers
+ */
+class DriverPool
+{
+    /**#@+
+     * Available driver types
+     */
+    const FILE = 'file';
+    const HTTP = 'http';
+    const HTTPS = 'https';
+    const ZLIB = 'compress.zlib';
+    /**#@- */
+
+    /**
+     * Supported types
+     *
+     * @var string[]
+     */
+    protected $types = [
+        self::FILE => 'Magento\Framework\Filesystem\Driver\File',
+        self::HTTP => 'Magento\Framework\Filesystem\Driver\Http',
+        self::HTTPS => 'Magento\Framework\Filesystem\Driver\Https',
+        self::ZLIB => 'Magento\Framework\Filesystem\Driver\Zlib',
+    ];
+
+    /**
+     * The pool
+     *
+     * @var DriverInterface[]
+     */
+    private $pool = [];
+
+    /**
+     * Obtain extra types in constructor
+     *
+     * @param array $extraTypes
+     * @throws \InvalidArgumentException
+     */
+    public function __construct($extraTypes = [])
+    {
+        foreach ($extraTypes as $code => $typeOrObject) {
+            if (is_object($typeOrObject)) {
+                $type = get_class($typeOrObject);
+                $object = $typeOrObject;
+            } else {
+                $type = $typeOrObject;
+                $object = false;
+            }
+            if (!is_subclass_of($type, '\Magento\Framework\Filesystem\DriverInterface')) {
+                throw new \InvalidArgumentException("The specified type '{$type}' does not implement DriverInterface.");
+            }
+            $this->types[$code] = $type;
+            if ($object) {
+                $this->pool[$code] = $typeOrObject;
+            }
+        }
+    }
+
+    /**
+     * Gets a driver instance by code
+     *
+     * @param string $code
+     * @return DriverInterface
+     */
+    public function getDriver($code)
+    {
+        if (!isset($this->types[$code])) {
+            $code = self::FILE;
+        }
+        if (!isset($this->pool[$code])) {
+            $class = $this->types[$code];
+            $this->pool[$code] = new $class;
+        }
+        return $this->pool[$code];
+    }
+}
diff --git a/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php
index c3cef19a6cfddd80252094a4595f0117c79083bd..2c536f18e7b95fef5e67549921ca85ae641dc503 100644
--- a/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php
+++ b/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php
@@ -24,20 +24,25 @@
 namespace Magento\Framework\Filesystem\File;
 
 use Magento\Framework\Filesystem\DriverInterface;
+use Magento\Framework\Filesystem\DriverPool;
 
 class ReadFactory
 {
     /**
-     * @var \Magento\Framework\Filesystem\DriverFactory
+     * Pool of filesystem drivers
+     *
+     * @var DriverPool
      */
-    protected $driverFactory;
+    private $driverPool;
 
     /**
-     * @param \Magento\Framework\Filesystem\DriverFactory $driverFactory
+     * Constructor
+     *
+     * @param DriverPool $driverPool
      */
-    public function __construct(\Magento\Framework\Filesystem\DriverFactory $driverFactory)
+    public function __construct(DriverPool $driverPool)
     {
-        $this->driverFactory = $driverFactory;
+        $this->driverPool = $driverPool;
     }
 
     /**
@@ -47,11 +52,15 @@ class ReadFactory
      * @param string|null $protocol [optional]
      * @param DriverInterface $driver [optional]
      * @return \Magento\Framework\Filesystem\File\ReadInterface
+     * @throws \InvalidArgumentException
      */
     public function create($path, $protocol = null, DriverInterface $driver = null)
     {
-        $driverClassName = is_null($driver) ? null : get_class($driver);
-        $driver = $protocol ? $this->driverFactory->get($protocol, $driverClassName) : $driver;
-        return new \Magento\Framework\Filesystem\File\Read($path, $driver);
+        if ($protocol) {
+            $driver = $this->driverPool->getDriver($protocol);
+        } elseif (!$driver) {
+            throw new \InvalidArgumentException('Either driver or protocol must be specified.');
+        }
+        return new Read($path, $driver);
     }
 }
diff --git a/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php
index 4414be7ea5b6a5e65e62d0c244a389f848a3556a..1b7207a2f96351b792603684557bd263ae1b3905 100644
--- a/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php
+++ b/lib/internal/Magento/Framework/Filesystem/File/WriteFactory.php
@@ -24,20 +24,25 @@
 namespace Magento\Framework\Filesystem\File;
 
 use Magento\Framework\Filesystem\DriverInterface;
+use Magento\Framework\Filesystem\DriverPool;
 
 class WriteFactory
 {
     /**
-     * @var \Magento\Framework\Filesystem\DriverFactory
+     * Pool of filesystem drivers
+     *
+     * @var DriverPool
      */
-    protected $driverFactory;
+    private $driverPool;
 
     /**
-     * @param \Magento\Framework\Filesystem\DriverFactory $driverFactory
+     * Constructor
+     *
+     * @param DriverPool $driverPool
      */
-    public function __construct(\Magento\Framework\Filesystem\DriverFactory $driverFactory)
+    public function __construct(DriverPool $driverPool)
     {
-        $this->driverFactory = $driverFactory;
+        $this->driverPool = $driverPool;
     }
 
     /**
@@ -48,10 +53,15 @@ class WriteFactory
      * @param DriverInterface $driver [optional]
      * @param string $mode [optional]
      * @return Write
+     * @throws \InvalidArgumentException
      */
     public function create($path, $protocol = null, DriverInterface $driver = null, $mode = 'r')
     {
-        $driver = $protocol ? $this->driverFactory->get($protocol, get_class($driver)) : $driver;
-        return new \Magento\Framework\Filesystem\File\Write($path, $driver, $mode);
+        if ($protocol) {
+            $driver = $this->driverPool->getDriver($protocol);
+        } elseif (!$driver) {
+            throw new \InvalidArgumentException('Either driver or protocol must be specified.');
+        }
+        return new Write($path, $driver, $mode);
     }
 }
diff --git a/lib/internal/Magento/Framework/Filesystem/README.md b/lib/internal/Magento/Framework/Filesystem/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..81eb838a2797937d0730c58887a99e12e8732364
--- /dev/null
+++ b/lib/internal/Magento/Framework/Filesystem/README.md
@@ -0,0 +1,3 @@
+The **\Magento\Framework\Filesystem** library provides interface for file system operations, such as read, write, list directories, etc.
+The library includes File, HTTP, HTTPS and Zlib drivers.
+**\Magento\Framework\Filesystem\DirectoryList** class defines list of directories available in the application. The library supports only system temporary directory, while application classes may extend the list in order to define directories used in the application. Paths to pre-defined directories can be customized by configuration, while the list is finite in runtime. Use directory codes represented by the class's constants (or its descendants) to operate with the file system objects.
diff --git a/lib/internal/Magento/Framework/Filesystem/WrapperInterface.php b/lib/internal/Magento/Framework/Filesystem/WrapperInterface.php
deleted file mode 100644
index 687a6c4757c4b477659d9f29da601d78e9259f66..0000000000000000000000000000000000000000
--- a/lib/internal/Magento/Framework/Filesystem/WrapperInterface.php
+++ /dev/null
@@ -1,171 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Framework\Filesystem;
-
-interface WrapperInterface
-{
-    /**
-     * @return mixed
-     */
-    public function dir_closedir();
-
-    /**
-     * @param string $path
-     * @param array $options
-     * @return mixed
-     */
-    public function dir_opendir($path, $options);
-
-    /**
-     * @return mixed
-     */
-    public function dir_readdir();
-
-    /**
-     * @return mixed
-     */
-    public function dir_rewinddir();
-
-    /**
-     * @param string $path
-     * @param int $mode
-     * @param array $options
-     * @return mixed
-     */
-    public function mkdir($path, $mode, $options);
-
-    /**
-     * @param string $from
-     * @param string $to
-     * @return mixed
-     */
-    public function rename($from, $to);
-
-    /**
-     * @param string $path
-     * @param array $options
-     * @return mixed
-     */
-    public function rmdir($path, $options);
-
-    /**
-     * @param mixed $cast
-     * @return mixed
-     */
-    public function stream_cast($cast);
-
-    /**
-     * @return mixed
-     */
-    public function stream_close();
-
-    /**
-     * @return mixed
-     */
-    public function stream_eof();
-
-    /**
-     * @return mixed
-     */
-    public function stream_flush();
-
-    /**
-     * @param mixed $operation
-     * @return mixed
-     */
-    public function stream_lock($operation);
-
-    /**
-     * @param string $path
-     * @param mixed $option
-     * @param mixed $value
-     * @return mixed
-     */
-    public function stream_metadata($path, $option, $value);
-
-    /**
-     * @param string $path
-     * @param int $mode
-     * @param array $options
-     * @param string $openedPath
-     * @return mixed
-     */
-    public function stream_open($path, $mode, $options, &$openedPath);
-
-    /**
-     * @param int $count
-     * @return mixed
-     */
-    public function stream_read($count);
-
-    /**
-     * @param int $offset
-     * @param int $whence
-     * @return mixed
-     */
-    public function stream_seek($offset, $whence = SEEK_SET);
-
-    /**
-     * @param mixed $option
-     * @param mixed $arg1
-     * @param mixed $arg2
-     * @return mixed
-     */
-    public function stream_set_option($option, $arg1, $arg2);
-
-    /**
-     * @return mixed
-     */
-    public function stream_stat();
-
-    /**
-     * @return mixed
-     */
-    public function stream_tell();
-
-    /**
-     * @param int $newSize
-     * @return mixed
-     */
-    public function stream_truncate($newSize);
-
-    /**
-     * @param array $data
-     * @return mixed
-     */
-    public function stream_write($data);
-
-    /**
-     * @param string $path
-     * @return mixed
-     */
-    public function unlink($path);
-
-    /**
-     * @param string $path
-     * @param mixed $flags
-     * @return mixed
-     */
-    public function url_stat($path, $flags);
-}
diff --git a/lib/internal/Magento/Framework/Flag/README.md b/lib/internal/Magento/Framework/Flag/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..6d4aeff0422419e458ca94a65fc17b884d795e35
--- /dev/null
+++ b/lib/internal/Magento/Framework/Flag/README.md
@@ -0,0 +1 @@
+The Flag library provides a resource model that allows saving permanently a flag (binary indicator), for example, to prevent repetitive actions, if it's not necessary.
diff --git a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php
index 84f8b355189b92e4d80f54280f5bfd55849929d4..2a7407a8dc5b870b024c9fbada74c5431bfe65a0 100644
--- a/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php
+++ b/lib/internal/Magento/Framework/Image/Adapter/AbstractAdapter.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Image\Adapter;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * @file        Abstract.php
  * @author      Magento Core Team <core@magentocommerce.com>
@@ -160,7 +162,7 @@ abstract class AbstractAdapter implements AdapterInterface
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -276,13 +278,13 @@ abstract class AbstractAdapter implements AdapterInterface
     /**
      * Initialize default values
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param array $data
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, array $data = array())
+    public function __construct(\Magento\Framework\Filesystem $filesystem, array $data = array())
     {
         $this->_filesystem = $filesystem;
-        $this->directoryWrite = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->directoryWrite = $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Image/README.md b/lib/internal/Magento/Framework/Image/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..00e5e78b30cc649c992b6c6f1600d71289276f46
--- /dev/null
+++ b/lib/internal/Magento/Framework/Image/README.md
@@ -0,0 +1,6 @@
+A library for processing images (photos, pictures in digital format). Features:
+
+ * Resizing
+ * Watermarking
+ * Supports Jpeg, PNG, GIF, BMP, XBM formats and different degrees of opacity
+ * Comes with GD (php-gd2) and ImageMagick (php-imagick) adapters out of the box
diff --git a/lib/internal/Magento/Framework/Less/File/Collector/Library.php b/lib/internal/Magento/Framework/Less/File/Collector/Library.php
index 87fb0db48356dbca74cf471049145da8dfcaa14c..d2287281d75489bb57d07a14056719a9ec9f9726 100644
--- a/lib/internal/Magento/Framework/Less/File/Collector/Library.php
+++ b/lib/internal/Magento/Framework/Less/File/Collector/Library.php
@@ -23,9 +23,10 @@
  */
 namespace Magento\Framework\Less\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\File\CollectorInterface;
 use Magento\Framework\View\Design\ThemeInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 use Magento\Framework\View\File\Factory;
 use Magento\Framework\View\File\FileList\Factory as FileListFactory;
@@ -66,8 +67,8 @@ class Library implements CollectorInterface
         Factory $fileFactory
     ) {
         $this->fileListFactory = $fileListFactory;
-        $this->libraryDirectory = $filesystem->getDirectoryRead(Filesystem::LIB_WEB);
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
+        $this->libraryDirectory = $filesystem->getDirectoryRead(DirectoryList::LIB_WEB);
+        $this->themesDirectory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
         $this->fileFactory = $fileFactory;
     }
 
diff --git a/lib/internal/Magento/Framework/Less/FileGenerator.php b/lib/internal/Magento/Framework/Less/FileGenerator.php
index e9c7793caa0f7cded9f41b9d5178beb557a4d588..1702dc2d319c5c4ce55ca34457bb24518f27e8d6 100644
--- a/lib/internal/Magento/Framework/Less/FileGenerator.php
+++ b/lib/internal/Magento/Framework/Less/FileGenerator.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\Less;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Asset\LocalInterface;
 use Magento\Framework\View\Asset\Source;
 
@@ -55,18 +56,18 @@ class FileGenerator
     private $importProcessor;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport $magentoImportProcessor
      * @param \Magento\Framework\Less\PreProcessor\Instruction\Import $importProcessor
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\Less\PreProcessor\Instruction\MagentoImport $magentoImportProcessor,
         \Magento\Framework\Less\PreProcessor\Instruction\Import $importProcessor
     ) {
-        $this->tmpDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->tmpDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $this->assetRepo = $assetRepo;
         $this->magentoImportProcessor = $magentoImportProcessor;
         $this->importProcessor = $importProcessor;
diff --git a/lib/internal/Magento/Framework/Logger.php b/lib/internal/Magento/Framework/Logger.php
index 9b34ce3512bd8982c2f0b65bc289f81083c0e90e..e9664e80ab8b05c3ad122b2b02dc9cdc6dcbf0ef 100644
--- a/lib/internal/Magento/Framework/Logger.php
+++ b/lib/internal/Magento/Framework/Logger.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Logger model
  */
@@ -43,15 +45,15 @@ class Logger
     protected $_loggers = array();
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $defaultFile
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, $defaultFile = '')
+    public function __construct(\Magento\Framework\Filesystem $filesystem, $defaultFile = '')
     {
         $this->_filesystem = $filesystem;
         $this->addStreamLog(self::LOGGER_SYSTEM, $defaultFile)->addStreamLog(self::LOGGER_EXCEPTION, $defaultFile);
@@ -72,7 +74,7 @@ class Logger
     {
         $file = $fileOrWrapper ?: "{$loggerKey}.log";
         if (!preg_match('#^[a-z][a-z0-9+.-]*\://#i', $file)) {
-            $logDir = $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::LOG_DIR);
+            $logDir = $this->_filesystem->getDirectoryWrite(DirectoryList::LOG);
             $logDir->create();
             $file = $logDir->getAbsolutePath($file);
         }
diff --git a/lib/internal/Magento/Framework/Math/README.md b/lib/internal/Magento/Framework/Math/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d7b31ad3765635a82fad0ea9181b7abb5eb114f8
--- /dev/null
+++ b/lib/internal/Magento/Framework/Math/README.md
@@ -0,0 +1 @@
+The Math module provides mathematical functionality including price rounding, finding floating point remainder of a division, random number and string generation, and unique hash generation.
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php
new file mode 100644
index 0000000000000000000000000000000000000000..e426c624796a8bc599524221e6b6e7922dc87617
--- /dev/null
+++ b/lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php
@@ -0,0 +1,191 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Framework\Model;
+
+use Magento\Framework\Service\Data\MetadataServiceInterface;
+
+/**
+ * Abstract model with custom attributes support.
+ *
+ * This class defines basic data structure of how custom attributes are stored in an ExtensibleModel.
+ * Implementations may choose to process custom attributes as their persistence requires them to.
+ */
+abstract class AbstractExtensibleModel extends AbstractModel implements \Magento\Framework\Api\ExtensibleDataInterface
+{
+    const CUSTOM_ATTRIBUTES_KEY = 'custom_attributes';
+
+    /**
+     * @var MetadataServiceInterface
+     */
+    protected $metadataService;
+
+    /**
+     * @var string[]
+     */
+    protected $customAttributesCodes = null;
+
+    /**
+     * @param \Magento\Framework\Model\Context $context
+     * @param \Magento\Framework\Registry $registry
+     * @param MetadataServiceInterface $metadataService
+     * @param \Magento\Framework\Model\Resource\AbstractResource $resource
+     * @param \Magento\Framework\Data\Collection\Db $resourceCollection
+     * @param array $data
+     */
+    public function __construct(
+        \Magento\Framework\Model\Context $context,
+        \Magento\Framework\Registry $registry,
+        MetadataServiceInterface $metadataService,
+        \Magento\Framework\Model\Resource\AbstractResource $resource = null,
+        \Magento\Framework\Data\Collection\Db $resourceCollection = null,
+        array $data = array()
+    ) {
+        $this->metadataService = $metadataService;
+        $data = $this->filterCustomAttributes($data);
+        parent::__construct($context, $registry, $resource, $resourceCollection, $data);
+    }
+
+    /**
+     * Verify custom attributes set on $data and unset if not a valid custom attribute
+     *
+     * @param array $data
+     * @return array processed data
+     */
+    protected function filterCustomAttributes($data)
+    {
+        if (empty($data[self::CUSTOM_ATTRIBUTES_KEY])) {
+            return $data;
+        }
+        $customAttributesCodes = $this->getCustomAttributesCodes();
+        $data[self::CUSTOM_ATTRIBUTES_KEY] =
+            array_intersect_key($data[self::CUSTOM_ATTRIBUTES_KEY], $customAttributesCodes);
+        return $data;
+    }
+
+    /**
+     * Retrieve custom attributes values.
+     *
+     * @return \Magento\Framework\Service\Data\AttributeValue[]|null
+     */
+    public function getCustomAttributes()
+    {
+        // Returning as a sequential array (instead of stored associative array) to be compatible with the interface
+        return isset($this->_data[self::CUSTOM_ATTRIBUTES_KEY])
+            ? array_values($this->_data[self::CUSTOM_ATTRIBUTES_KEY])
+            : [];
+    }
+
+    /**
+     * Get an attribute value.
+     *
+     * @param string $attributeCode
+     * @return \Magento\Framework\Service\Data\AttributeValue|null null if the attribute has not been set
+     */
+    public function getCustomAttribute($attributeCode)
+    {
+        return isset($this->_data[self::CUSTOM_ATTRIBUTES_KEY][$attributeCode])
+            ? $this->_data[self::CUSTOM_ATTRIBUTES_KEY][$attributeCode]
+            : null;
+    }
+
+    /**
+     * Overwrite data in the object.
+     *
+     * The $key parameter can be string or array.
+     * If $key is string, the attribute value will be overwritten by $value
+     *
+     * If $key is an array, it will overwrite all the data in the object.
+     *
+     * @param string|array  $key
+     * @param mixed         $value
+     * @return $this
+     */
+    public function setData($key, $value = null)
+    {
+        if ($key == self::CUSTOM_ATTRIBUTES_KEY) {
+            throw new \LogicException("Custom attributes must be set only using setCustomAttribute() method.");
+        }
+        return parent::setData($key, $value);
+    }
+
+    /**
+     * Object data getter
+     *
+     * If $key is not defined will return all the data as an array.
+     * Otherwise it will return value of the element specified by $key.
+     * It is possible to use keys like a/b/c for access nested array data
+     *
+     * If $index is specified it will assume that attribute data is an array
+     * and retrieve corresponding member. If data is the string - it will be explode
+     * by new line character and converted to array.
+     *
+     * In addition to parent implementation custom attributes support is added.
+     *
+     * @param string     $key
+     * @param string|int $index
+     * @return mixed
+     */
+    public function getData($key = '', $index = null)
+    {
+        if ($key == self::CUSTOM_ATTRIBUTES_KEY) {
+            throw new \LogicException("Custom attributes array should be retrieved via getCustomAttributes() only.");
+        } else if ($key == '') {
+            /** Represent model data and custom attributes as a flat array */
+            $data = array_merge($this->_data, $this->getCustomAttributes());
+            unset($data[self::CUSTOM_ATTRIBUTES_KEY]);
+        } else {
+            $data = parent::getData($key, $index);
+            if ($data === null) {
+                /** Try to find necessary data in custom attributes */
+                $data = parent::getData(self::CUSTOM_ATTRIBUTES_KEY . "/{$key}", $index);
+            }
+        }
+        return $data;
+    }
+
+    /**
+     * Fetch all custom attributes for the given extensible model
+     * //TODO : check if the custom attribute is already defined as a getter on the data interface
+     *
+     * @return string[]
+     */
+    protected function getCustomAttributesCodes()
+    {
+        if (!is_null($this->customAttributesCodes)) {
+            return $this->customAttributesCodes;
+        }
+        $attributeCodes = [];
+        $customAttributesMetadata = $this->metadataService->getCustomAttributesMetadata(get_class($this));
+        if (is_array($customAttributesMetadata)) {
+            /** @var $attribute \Magento\Framework\Service\Data\MetadataObjectInterface */
+            foreach ($customAttributesMetadata as $attribute) {
+                // Create a map for easier processing
+                $attributeCodes[$attribute->getAttributeCode()] = $attribute->getAttributeCode();
+            }
+        }
+        $this->customAttributesCodes = $attributeCodes;
+        return $attributeCodes;
+    }
+}
diff --git a/lib/internal/Magento/Framework/Model/AbstractModel.php b/lib/internal/Magento/Framework/Model/AbstractModel.php
index 1954871119059bfe0387598c699f4808d6f09c57..85c2f2092137892835ed4e3e4ea7d50f885e36f2 100644
--- a/lib/internal/Magento/Framework/Model/AbstractModel.php
+++ b/lib/internal/Magento/Framework/Model/AbstractModel.php
@@ -21,6 +21,7 @@
  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
+
 namespace Magento\Framework\Model;
 
 /**
@@ -142,7 +143,7 @@ abstract class AbstractModel extends \Magento\Framework\Object
     protected $_actionValidator;
 
     /**
-     * @param Context $context
+     * @param \Magento\Framework\Model\Context $context
      * @param \Magento\Framework\Registry $registry
      * @param \Magento\Framework\Model\Resource\AbstractResource $resource
      * @param \Magento\Framework\Data\Collection\Db $resourceCollection
diff --git a/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php b/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php
index d64cce206b8b4102ffb02e3dc846cae8fc5abe9a..21585168dce3b917ccd41f23704d7ed818319c4a 100644
--- a/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php
+++ b/lib/internal/Magento/Framework/Model/Resource/Type/Db/Pdo/Mysql.php
@@ -28,7 +28,7 @@ class Mysql extends \Magento\Framework\Model\Resource\Type\Db implements \Magent
     /**
      * Filesystem class
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -58,7 +58,7 @@ class Mysql extends \Magento\Framework\Model\Resource\Type\Db implements \Magent
     protected $_isActive;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Stdlib\String $string
      * @param \Magento\Framework\Stdlib\DateTime $dateTime
      * @param string $host
@@ -71,7 +71,7 @@ class Mysql extends \Magento\Framework\Model\Resource\Type\Db implements \Magent
      * @param bool $active
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Stdlib\String $string,
         \Magento\Framework\Stdlib\DateTime $dateTime,
         $host,
diff --git a/lib/internal/Magento/Framework/Module/Declaration/Converter/Dom.php b/lib/internal/Magento/Framework/Module/Declaration/Converter/Dom.php
index 02fcca1f2187e209f99ef2eecc8c2c1c8bcebaa0..c7b5a4540991b6660e599970acc877d46d90a2d2 100644
--- a/lib/internal/Magento/Framework/Module/Declaration/Converter/Dom.php
+++ b/lib/internal/Magento/Framework/Module/Declaration/Converter/Dom.php
@@ -44,14 +44,15 @@ class Dom implements \Magento\Framework\Config\ConverterInterface
                 throw new \Exception('Attribute "name" is required for module node.');
             }
             $moduleData['name'] = $nameNode->nodeValue;
+            $name = $moduleData['name'];
             $versionNode = $moduleAttributes->getNamedItem('schema_version');
             if (is_null($versionNode)) {
-                throw new \Exception('Attribute "schema_version" is required for module node.');
+                throw new \Exception("Attribute 'schema_version' is missing for module '{$name}'.");
             }
             $moduleData['schema_version'] = $versionNode->nodeValue;
             $activeNode = $moduleAttributes->getNamedItem('active');
             if (is_null($activeNode)) {
-                throw new \Exception('Attribute "active" is required for module node.');
+                throw new \Exception("Attribute 'active' is missing for module '{$name}'.");
             }
             $moduleData['active'] = $activeNode->nodeValue == 'false' ? false : true;
             $moduleData['dependencies'] = array(
diff --git a/lib/internal/Magento/Framework/Module/Declaration/FileIterator.php b/lib/internal/Magento/Framework/Module/Declaration/FileIterator.php
index 05fb8b7542e0cf370bd2ed96a96dc7f7625827ff..e89dc8393a9dde21cb55e0befdb958620aee833e 100644
--- a/lib/internal/Magento/Framework/Module/Declaration/FileIterator.php
+++ b/lib/internal/Magento/Framework/Module/Declaration/FileIterator.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Framework\Module\Declaration;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 class FileIterator extends \Magento\Framework\Config\FileIterator
 {
@@ -35,6 +36,6 @@ class FileIterator extends \Magento\Framework\Config\FileIterator
      */
     public function __construct(Filesystem $filesystem, array $paths)
     {
-        parent::__construct($filesystem->getDirectoryRead(Filesystem::APP_DIR), $paths);
+        parent::__construct($filesystem->getDirectoryRead(DirectoryList::APP), $paths);
     }
 }
diff --git a/lib/internal/Magento/Framework/Module/Declaration/FileResolver.php b/lib/internal/Magento/Framework/Module/Declaration/FileResolver.php
index 07fba50d6407dd275116dfd6f19bac86cb70ca4c..ab38bf83d43f4f028f24143a4503a67560040aae 100644
--- a/lib/internal/Magento/Framework/Module/Declaration/FileResolver.php
+++ b/lib/internal/Magento/Framework/Module/Declaration/FileResolver.php
@@ -25,7 +25,8 @@
  */
 namespace Magento\Framework\Module\Declaration;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 
 class FileResolver implements \Magento\Framework\Config\FileResolverInterface
@@ -65,9 +66,9 @@ class FileResolver implements \Magento\Framework\Config\FileResolverInterface
     public function __construct(Filesystem $filesystem, \Magento\Framework\Config\FileIteratorFactory $iteratorFactory)
     {
         $this->iteratorFactory = $iteratorFactory;
-        $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
-        $this->configDirectory = $filesystem->getDirectoryRead(Filesystem::CONFIG_DIR);
-        $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
+        $this->configDirectory = $filesystem->getDirectoryRead(DirectoryList::CONFIG);
+        $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Module/Dir.php b/lib/internal/Magento/Framework/Module/Dir.php
index 964197f80cb551da767ef0d56a95a07b8edd37e1..9d148e924c7ed94ad01d7ab99e65e35fd4b0dcbb 100644
--- a/lib/internal/Magento/Framework/Module/Dir.php
+++ b/lib/internal/Magento/Framework/Module/Dir.php
@@ -25,7 +25,8 @@
  */
 namespace Magento\Framework\Module;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 
 class Dir
@@ -48,7 +49,7 @@ class Dir
      */
     public function __construct(Filesystem $filesystem, \Magento\Framework\Stdlib\String $string)
     {
-        $this->_modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
+        $this->_modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->_string = $string;
     }
 
diff --git a/lib/internal/Magento/Framework/Module/Dir/Reader.php b/lib/internal/Magento/Framework/Module/Dir/Reader.php
index db88b5c0d6b4aa3a75e852b0d75f0319913ca8cc..ce9d4111cb2b2f28511935c944351ee3bda4aa57 100644
--- a/lib/internal/Magento/Framework/Module/Dir/Reader.php
+++ b/lib/internal/Magento/Framework/Module/Dir/Reader.php
@@ -25,7 +25,8 @@
  */
 namespace Magento\Framework\Module\Dir;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Config\FileIterator;
 use Magento\Framework\Config\FileIteratorFactory;
 use Magento\Framework\Filesystem\Directory\Read;
@@ -80,7 +81,7 @@ class Reader
         $this->moduleDirs = $moduleDirs;
         $this->modulesList = $moduleList;
         $this->fileIteratorFactory = $fileIteratorFactory;
-        $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Module/Setup.php b/lib/internal/Magento/Framework/Module/Setup.php
index bd4c35dd6d882168f144f8ce8b2cd123f29a25aa..bf5e06c4641dbd18f911f232078cbbaeeb30d6bd 100644
--- a/lib/internal/Magento/Framework/Module/Setup.php
+++ b/lib/internal/Magento/Framework/Module/Setup.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\Module;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class Setup implements \Magento\Framework\Module\Updater\SetupInterface
 {
     /**
@@ -112,7 +114,7 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -142,7 +144,7 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface
         $this->_migrationFactory = $context->getMigrationFactory();
         $this->_moduleConfig = $context->getModuleList()->getModule($moduleName);
         $this->filesystem = $context->getFilesystem();
-        $this->modulesDir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->modulesDir = $this->filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->_connectionName = $connectionName;
     }
 
@@ -781,7 +783,7 @@ class Setup implements \Magento\Framework\Module\Updater\SetupInterface
     }
 
     /**
-     * @return \Magento\Framework\App\Filesystem
+     * @return \Magento\Framework\Filesystem
      */
     public function getFilesystem()
     {
diff --git a/lib/internal/Magento/Framework/Module/Setup/Context.php b/lib/internal/Magento/Framework/Module/Setup/Context.php
index 96c350f5a69d358ea141e81c1a0a83227c9bf7ab..3a84122fb34c8e0cd63ce39720c36b6ea6e49650 100644
--- a/lib/internal/Magento/Framework/Module/Setup/Context.php
+++ b/lib/internal/Magento/Framework/Module/Setup/Context.php
@@ -66,7 +66,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface
     protected $_encryptor;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -81,7 +81,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface
      * @param \Magento\Framework\Module\ResourceInterface $resourceResource
      * @param \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory
      * @param \Magento\Framework\Encryption\EncryptorInterface $encryptor
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\Logger $logger,
@@ -92,7 +92,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface
         \Magento\Framework\Module\ResourceInterface $resourceResource,
         \Magento\Framework\Module\Setup\MigrationFactory $migrationFactory,
         \Magento\Framework\Encryption\EncryptorInterface $encryptor,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_logger = $logger;
         $this->_eventManager = $eventManager;
@@ -170,7 +170,7 @@ class Context implements \Magento\Framework\ObjectManager\ContextInterface
     }
 
     /**
-     * @return \Magento\Framework\App\Filesystem
+     * @return \Magento\Framework\Filesystem
      */
     public function getFilesystem()
     {
diff --git a/lib/internal/Magento/Framework/Module/Setup/Migration.php b/lib/internal/Magento/Framework/Module/Setup/Migration.php
index 87f106bbad8adf475f9866a920b50beeca35b0d4..cf1831e8327a61010b7b4c6085c3380326e28328 100644
--- a/lib/internal/Magento/Framework/Module/Setup/Migration.php
+++ b/lib/internal/Magento/Framework/Module/Setup/Migration.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Module\Setup;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Resource setup model with methods needed for migration process between Magento versions
  * @SuppressWarnings(PHPMD.ExcessiveParameterList)
@@ -157,7 +159,7 @@ class Migration extends \Magento\Framework\Module\Setup
         $connectionName = \Magento\Framework\Module\Updater\SetupInterface::DEFAULT_SETUP_CONNECTION,
         $compositeModules = array()
     ) {
-        $this->_directory = $context->getFilesystem()->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->_directory = $context->getFilesystem()->getDirectoryRead(DirectoryList::ROOT);
         $this->_pathToMapFile = $confPathToMapFile;
         $this->_migrationData = $migrationData;
         $this->_replacePatterns = array(
diff --git a/lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php
index ed13030d2fee071d2145be19e28b4b7400c72203..a87490124f200c32a9f596195553f604cd93d594 100644
--- a/lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php
+++ b/lib/internal/Magento/Framework/Mview/Config/SchemaLocator.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\Mview\Config;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
 {
     /**
@@ -44,7 +46,7 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
      */
     public function __construct(\Magento\Framework\Filesystem\DirectoryList $directoryList)
     {
-        $etcDir = $directoryList->getDir(\Magento\Framework\App\Filesystem::LIB_INTERNAL)
+        $etcDir = $directoryList->getPath(DirectoryList::LIB_INTERNAL)
             . '/Magento/Framework/Mview/etc';
         $this->_schema = $etcDir . '/mview.xsd';
         $this->_perFileSchema = $etcDir . '/mview.xsd';
diff --git a/lib/internal/Magento/Framework/Object/Copy/Config/SchemaLocator.php b/lib/internal/Magento/Framework/Object/Copy/Config/SchemaLocator.php
index 35ed5b9017cad2ce0618a80978cc982a9399a484..8ebd74414c2761b875f8c447ab0ded7d86323fb9 100644
--- a/lib/internal/Magento/Framework/Object/Copy/Config/SchemaLocator.php
+++ b/lib/internal/Magento/Framework/Object/Copy/Config/SchemaLocator.php
@@ -25,6 +25,9 @@
  */
 namespace Magento\Framework\Object\Copy\Config;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
 {
     /**
@@ -42,14 +45,15 @@ class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
     protected $_perFileSchema;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param string $schema
      * @param string $perFileSchema
      */
-    public function __construct(\Magento\Framework\App\Filesystem $filesystem, $schema, $perFileSchema)
+    public function __construct(Filesystem $filesystem, $schema, $perFileSchema)
     {
-        $this->_schema = $filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR) . '/' . $schema;
-        $this->_perFileSchema = $filesystem->getPath(\Magento\Framework\App\Filesystem::ROOT_DIR) . '/' . $perFileSchema;
+        $rootDir = $filesystem->getDirectoryRead(DirectoryList::ROOT);
+        $this->_schema = $rootDir->getAbsolutePath($schema);
+        $this->_perFileSchema = $rootDir->getAbsolutePath($perFileSchema);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/ObjectManager/Config/Reader/DomFactory.php b/lib/internal/Magento/Framework/ObjectManager/Config/Reader/DomFactory.php
new file mode 100644
index 0000000000000000000000000000000000000000..ce7bd28cfbc4810dd790825d6cf6ff318114d56a
--- /dev/null
+++ b/lib/internal/Magento/Framework/ObjectManager/Config/Reader/DomFactory.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Config reader factory
+ *
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Framework\ObjectManager\Config\Reader;
+
+/**
+ * Factory class for \Magento\Framework\ObjectManager\Config\Reader\Dom
+ */
+class DomFactory
+{
+    /**
+     * Object Manager instance
+     *
+     * @var \Magento\Framework\ObjectManager
+     */
+    protected $_objectManager = null;
+
+    /**
+     * Instance name to create
+     *
+     * @var string
+     */
+    protected $_instanceName = null;
+
+    /**
+     * Factory constructor
+     *
+     * @param \Magento\Framework\ObjectManager $objectManager
+     * @param string $instanceName
+     */
+    public function __construct(
+        \Magento\Framework\ObjectManager $objectManager,
+        $instanceName = 'Magento\Framework\ObjectManager\Config\Reader\Dom'
+    ) {
+        $this->_objectManager = $objectManager;
+        $this->_instanceName = $instanceName;
+    }
+
+    /**
+     * Create class instance with specified parameters
+     *
+     * @param array $data
+     * @return \Magento\Framework\ObjectManager\Config\Reader\Dom
+     */
+    public function create(array $data = array())
+    {
+        return $this->_objectManager->create($this->_instanceName, $data);
+    }
+}
diff --git a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php
index 1a5335a836eb36c5920736bd9712fd7b554a57ca..e408f8e207faddbab2226ee28c54a7827d2d9c3b 100644
--- a/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php
+++ b/lib/internal/Magento/Framework/ObjectManager/DefinitionFactory.php
@@ -32,6 +32,7 @@ use Magento\Framework\ObjectManager\Relations;
 use Magento\Framework\ObjectManager\Code\Generator;
 use Magento\Framework\Interception\Code\Generator as InterceptionGenerator;
 use Magento\Framework\Service\Code\Generator\Builder as BuilderGenerator;
+use Magento\Framework\Service\Code\Generator\DataBuilder as DataBuilderGenerator;
 use Magento\Framework\Service\Code\Generator\Mapper as MapperGenerator;
 use Magento\Framework\ObjectManager\Code\Generator\Converter as ConverterGenerator;
 use Magento\Framework\Service\Code\Generator\SearchResults;
@@ -138,6 +139,8 @@ class DefinitionFactory
                         => '\Magento\Framework\ObjectManager\Code\Generator\Repository',
                     InterceptionGenerator\Interceptor::ENTITY_TYPE
                         => '\Magento\Framework\Interception\Code\Generator\Interceptor',
+                    DataBuilderGenerator::ENTITY_TYPE
+                    => '\Magento\Framework\Service\Code\Generator\DataBuilder',
                     BuilderGenerator::ENTITY_TYPE
                         => '\Magento\Framework\Service\Code\Generator\Builder',
                     MapperGenerator::ENTITY_TYPE
diff --git a/lib/internal/Magento/Framework/Option/README.md b/lib/internal/Magento/Framework/Option/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..689cc2023dedeb518999d9402dd8767769dad0fe
--- /dev/null
+++ b/lib/internal/Magento/Framework/Option/README.md
@@ -0,0 +1 @@
+This module is used to create option values in models to value-label pairs that are used in forms. The model must implement Magento\Framework\Option\ArrayInterface or an exception will be thrown.
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/Profiler/README.md b/lib/internal/Magento/Framework/Profiler/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..c83756b934f7f65a5c69adc8c664eab3f395a995
--- /dev/null
+++ b/lib/internal/Magento/Framework/Profiler/README.md
@@ -0,0 +1,8 @@
+A library for profiling source code. This is a manual type of profiler, when programmer adds profiling instructions explicitly inline to the source code.
+
+Features:
+ * Measures time between tags (events), number of calls and calculates average time
+ * Measures memory usage
+ * Allows nesting of events and enforces its integrity, and measures aggregated stats of nested elements
+ * Allows configuring filters for tags
+ * Provides various output formats out of the box: direct HTML output, CSV-file, Firebug console
diff --git a/lib/internal/Magento/Framework/RequireJs/Config.php b/lib/internal/Magento/Framework/RequireJs/Config.php
index e8b5be8027d9075282bc3b4135a623095e4681fb..1e390d1368183f4ebd86759388f7c4c2a449883a 100644
--- a/lib/internal/Magento/Framework/RequireJs/Config.php
+++ b/lib/internal/Magento/Framework/RequireJs/Config.php
@@ -21,9 +21,10 @@
  * @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\Framework\RequireJs;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Provider of RequireJs config information
  */
@@ -90,18 +91,18 @@ config;
     /**
      * @param \Magento\Framework\RequireJs\Config\File\Collector\Aggregated $fileSource
      * @param \Magento\Framework\View\DesignInterface $design
-     * @param \Magento\Framework\App\Filesystem $appFilesystem
+     * @param \Magento\Framework\Filesystem $appFilesystem
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      */
     public function __construct(
         \Magento\Framework\RequireJs\Config\File\Collector\Aggregated $fileSource,
         \Magento\Framework\View\DesignInterface $design,
-        \Magento\Framework\App\Filesystem $appFilesystem,
+        \Magento\Framework\Filesystem $appFilesystem,
         \Magento\Framework\View\Asset\Repository $assetRepo
     ) {
         $this->fileSource = $fileSource;
         $this->design = $design;
-        $this->baseDir = $appFilesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->baseDir = $appFilesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->staticContext = $assetRepo->getStaticViewFileContext();
     }
 
diff --git a/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php b/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php
index 7223ee8f4bc8a45323394f3f48067fbdb328a979..e6e3f57e1b8546989b8022e86b551eec0076062d 100644
--- a/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php
+++ b/lib/internal/Magento/Framework/RequireJs/Config/File/Collector/Aggregated.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\RequireJs\Config\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\ThemeInterface;
 use Magento\Framework\View\File\CollectorInterface;
 
@@ -64,20 +65,20 @@ class Aggregated implements CollectorInterface
     protected $fileFactory;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\File\Factory $fileFactory
      * @param CollectorInterface $baseFiles
      * @param CollectorInterface $themeFiles
      * @param CollectorInterface $themeModularFiles
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\File\Factory $fileFactory,
         CollectorInterface $baseFiles,
         CollectorInterface $themeFiles,
         CollectorInterface $themeModularFiles
     ) {
-        $this->libDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::LIB_WEB);
+        $this->libDirectory = $filesystem->getDirectoryRead(DirectoryList::LIB_WEB);
         $this->fileFactory = $fileFactory;
         $this->baseFiles = $baseFiles;
         $this->themeFiles = $themeFiles;
diff --git a/setup/module/Magento/Filesystem/src/Directory/ReadFactory.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/Resolver.php
similarity index 77%
rename from setup/module/Magento/Filesystem/src/Directory/ReadFactory.php
rename to lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/Resolver.php
index 638c4ddd641c80371c69b53b9bf6a9e1f8510239..c48cb4402fffb168f0c56fa0a93bb349c5c753d0 100644
--- a/setup/module/Magento/Filesystem/src/Directory/ReadFactory.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/Resolver.php
@@ -21,20 +21,15 @@
  * @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\Directory;
+namespace Magento\Framework\Search\Adapter\Mysql\Field;
 
-use Magento\Filesystem\Driver\File;
-
-class ReadFactory
+class Resolver implements ResolverInterface
 {
     /**
-     * Create a readable directory
-     *
-     * @param array $config
-     * @return ReadInterface
+     * {@inheritdoc}
      */
-    public function create(array $config)
+    public function resolve($fields)
     {
-        return new Read(new File(), $config);
+        return $fields;
     }
 }
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/ResolverInterface.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/ResolverInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..88af227dd0f8f36bcdee5aaac03b19cbebe1d2e8
--- /dev/null
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/ResolverInterface.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
+ */
+namespace Magento\Framework\Search\Adapter\Mysql\Field;
+
+interface ResolverInterface
+{
+    /**
+     * Resolve field
+     *
+     * @param string|array $fields
+     * @return string|array
+     */
+    public function resolve($fields);
+}
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Builder.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Builder.php
index aa665eb216ec5d5b0f68d714c04273f165153987..14452ae4ecc1b8b3e675fefbeac95726748cfc2a 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Builder.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Builder.php
@@ -24,9 +24,10 @@
 namespace Magento\Framework\Search\Adapter\Mysql\Filter;
 
 use Magento\Framework\DB\Select;
+use Magento\Framework\Search\Adapter\Mysql\ConditionManager;
+use Magento\Framework\Search\Adapter\Mysql\Filter\Builder\FilterInterface;
 use Magento\Framework\Search\Adapter\Mysql\Filter\Builder\Range;
 use Magento\Framework\Search\Adapter\Mysql\Filter\Builder\Term;
-use Magento\Framework\Search\Adapter\Mysql\ConditionManager;
 use Magento\Framework\Search\Adapter\Mysql\Filter\Builder\Wildcard;
 use Magento\Framework\Search\Request\FilterInterface as RequestFilterInterface;
 use Magento\Framework\Search\Request\Query\Bool;
@@ -34,41 +35,41 @@ use Magento\Framework\Search\Request\Query\Bool;
 class Builder implements BuilderInterface
 {
     /**
-     * @var Range
-     */
-    private $range;
-
-    /**
-     * @var Term
+     * @var ConditionManager
      */
-    private $term;
+    private $conditionManager;
 
     /**
-     * @var ConditionManager
+     * @var FilterInterface[]
      */
-    private $conditionManager;
+    private $filters;
 
     /**
-     * @var Wildcard
+     * @var PreprocessorInterface
      */
-    private $wildcard;
+    private $preprocessor;
 
     /**
      * @param Range $range
      * @param Term $term
      * @param Wildcard $wildcard
      * @param ConditionManager $conditionManager
+     * @param PreprocessorInterface $preprocessor
      */
     public function __construct(
         Range $range,
         Term $term,
         Wildcard $wildcard,
-        ConditionManager $conditionManager
+        ConditionManager $conditionManager,
+        PreprocessorInterface $preprocessor
     ) {
-        $this->range = $range;
-        $this->term = $term;
+        $this->filters = [
+            RequestFilterInterface::TYPE_RANGE => $range,
+            RequestFilterInterface::TYPE_TERM => $term,
+            RequestFilterInterface::TYPE_WILDCARD => $wildcard
+        ];
         $this->conditionManager = $conditionManager;
-        $this->wildcard = $wildcard;
+        $this->preprocessor = $preprocessor;
     }
 
     /**
@@ -86,33 +87,18 @@ class Builder implements BuilderInterface
      */
     private function processFilter(RequestFilterInterface $filter, $isNegation)
     {
-        switch ($filter->getType()) {
-            case RequestFilterInterface::TYPE_BOOL:
-                $query = $this->processBoolFilter($filter, $isNegation);
-                break;
-            case RequestFilterInterface::TYPE_TERM:
-                $query = $this->processTermFilter($filter, $isNegation);
-                break;
-            case RequestFilterInterface::TYPE_RANGE:
-                $query = $this->processRangeFilter($filter, $isNegation);
-                break;
-            case RequestFilterInterface::TYPE_WILDCARD:
-                /** @var \Magento\Framework\Search\Request\Filter\Wildcard $filter */
-                $query = $this->wildcard->buildFilter($filter, $isNegation);
-                break;
-            default:
-                throw new \InvalidArgumentException(sprintf('Unknown filter type \'%s\'', $filter->getType()));
+        if ($filter->getType() == RequestFilterInterface::TYPE_BOOL) {
+            $query = $this->processBoolFilter($filter, $isNegation);
+            $query = $this->conditionManager->wrapBrackets($query);
+        } else {
+            if (!isset($this->filters[$filter->getType()])) {
+                throw new \InvalidArgumentException('Unknown filter type ' . $filter->getType());
+            }
+            $query = $this->filters[$filter->getType()]->buildFilter($filter, $isNegation);
+            $query = $this->preprocessor->process($filter, $isNegation, $query);
         }
-        return $this->conditionManager->wrapBrackets($query);
-    }
 
-    /**
-     * @param string $conditionType
-     * @return bool
-     */
-    private function isNegation($conditionType)
-    {
-        return Bool::QUERY_CONDITION_NOT === $conditionType;
+        return $query;
     }
 
     /**
@@ -139,26 +125,6 @@ class Builder implements BuilderInterface
         return $this->conditionManager->combineQueries($queries, Select::SQL_AND);
     }
 
-    /**
-     * @param RequestFilterInterface|\Magento\Framework\Search\Request\Filter\Term $filter
-     * @param bool $isNegation
-     * @return string
-     */
-    private function processTermFilter(RequestFilterInterface $filter, $isNegation)
-    {
-        return $this->term->buildFilter($filter, $isNegation);
-    }
-
-    /**
-     * @param RequestFilterInterface|\Magento\Framework\Search\Request\Filter\Range $filter
-     * @param bool $isNegation
-     * @return string
-     */
-    private function processRangeFilter(RequestFilterInterface $filter, $isNegation)
-    {
-        return $this->range->buildFilter($filter, $isNegation);
-    }
-
     /**
      * @param \Magento\Framework\Search\Request\FilterInterface[] $filters
      * @param string $unionOperator
@@ -173,4 +139,13 @@ class Builder implements BuilderInterface
         }
         return $this->conditionManager->combineQueries($queries, $unionOperator);
     }
+
+    /**
+     * @param string $conditionType
+     * @return bool
+     */
+    private function isNegation($conditionType)
+    {
+        return Bool::QUERY_CONDITION_NOT === $conditionType;
+    }
 }
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Preprocessor.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Preprocessor.php
new file mode 100644
index 0000000000000000000000000000000000000000..6d6f623d937a947d66cc5b04ef5affca4a3c6571
--- /dev/null
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Preprocessor.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @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\Framework\Search\Adapter\Mysql\Filter;
+
+use Magento\Framework\Search\Adapter\Mysql\ConditionManager;
+use Magento\Framework\Search\Request\FilterInterface;
+
+class Preprocessor implements PreprocessorInterface
+{
+    /**
+     * @var ConditionManager
+     */
+    private $conditionManager;
+
+    /**
+     * @param ConditionManager $conditionManager
+     */
+    public function __construct(ConditionManager $conditionManager)
+    {
+        $this->conditionManager = $conditionManager;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function process(FilterInterface $filter, $isNegation, $query)
+    {
+        return $query;
+    }
+}
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/PreprocessorInterface.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/PreprocessorInterface.php
new file mode 100644
index 0000000000000000000000000000000000000000..38e302eeb0e57e312b4d02122c27f787eafecd43
--- /dev/null
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/PreprocessorInterface.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright   Copyright (c) 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\Framework\Search\Adapter\Mysql\Filter;
+
+use Magento\Framework\Search\Request\FilterInterface;
+
+interface PreprocessorInterface
+{
+    /**
+     * @param FilterInterface $filter
+     * @param bool $isNegation
+     * @param string $query
+     * @return string
+     */
+    public function process(FilterInterface $filter, $isNegation, $query);
+}
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php
index 26ba3aa6f220aaa370fffc94857d31950bfde3ab..1e0dddbeb57d7a3abe21fc306cb35a99cdaaff22 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Mapper.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Framework\Search\Adapter\Mysql;
 
-use Magento\Framework\App\Resource\Config;
+use Magento\Framework\App\Resource;
+use Magento\Framework\App\ScopeResolverInterface;
 use Magento\Framework\DB\Select;
 use Magento\Framework\Search\Adapter\Mysql\Filter\Builder;
 use Magento\Framework\Search\Adapter\Mysql\Query\Builder\Match as MatchQueryBuilder;
@@ -39,7 +40,7 @@ use Magento\Framework\Search\RequestInterface;
 class Mapper
 {
     /**
-     * @var \Magento\Framework\App\Resource
+     * @var Resource
      */
     private $resource;
 
@@ -68,6 +69,11 @@ class Mapper
      */
     private $conditionManager;
 
+    /**
+     * @var ScopeResolverInterface
+     */
+    private $scopeResolver;
+
     /**
      * @param \Magento\Framework\App\Resource $resource
      * @param ScoreBuilderFactory $scoreBuilderFactory
@@ -75,14 +81,16 @@ class Mapper
      * @param Builder $filterBuilder
      * @param Dimensions $dimensionsBuilder
      * @param ConditionManager $conditionManager
+     * @param ScopeResolverInterface $scopeResolver
      */
     public function __construct(
-        \Magento\Framework\App\Resource $resource,
+        Resource $resource,
         ScoreBuilderFactory $scoreBuilderFactory,
         MatchQueryBuilder $matchQueryBuilder,
         Builder $filterBuilder,
         Dimensions $dimensionsBuilder,
-        ConditionManager $conditionManager
+        ConditionManager $conditionManager,
+        ScopeResolverInterface $scopeResolver
     ) {
         $this->resource = $resource;
         $this->scoreBuilderFactory = $scoreBuilderFactory;
@@ -90,6 +98,7 @@ class Mapper
         $this->filterBuilder = $filterBuilder;
         $this->dimensionsBuilder = $dimensionsBuilder;
         $this->conditionManager = $conditionManager;
+        $this->scopeResolver = $scopeResolver;
     }
 
     /**
@@ -110,7 +119,7 @@ class Mapper
         );
         $select = $this->processDimensions($request, $select);
         $tableName = $this->resource->getTableName($request->getIndex());
-        $select->from($tableName)
+        $select->from($tableName, ['entity_id' =>'product_id'])
             ->columns($scoreBuilder->build())
             ->order($scoreBuilder->getScoreAlias() . ' ' . Select::SQL_DESC);
         return $select;
@@ -226,18 +235,18 @@ class Mapper
      */
     private function processFilterQuery(ScoreBuilder $scoreBuilder, FilterQuery $query, Select $select, $conditionType)
     {
+        $scoreBuilder->startQuery();
         switch ($query->getReferenceType()) {
             case FilterQuery::REFERENCE_QUERY:
-                $scoreBuilder->startQuery();
                 $select = $this->processQuery($scoreBuilder, $query->getReference(), $select, $conditionType);
                 $scoreBuilder->endQuery($query->getBoost());
                 break;
             case FilterQuery::REFERENCE_FILTER:
                 $filterCondition = $this->filterBuilder->build($query->getReference(), $conditionType);
                 $select->where($filterCondition);
-                $scoreBuilder->addCondition(1, $query->getBoost());
                 break;
         }
+        $scoreBuilder->endQuery($query->getBoost());
         return $select;
     }
 
@@ -248,7 +257,7 @@ class Mapper
      */
     private function getSelect()
     {
-        return $this->resource->getConnection(\Magento\Framework\App\Resource::DEFAULT_READ_RESOURCE)->select();
+        return $this->resource->getConnection(Resource::DEFAULT_READ_RESOURCE)->select();
     }
 
     /**
@@ -265,7 +274,7 @@ class Mapper
             $dimensions[] = $this->dimensionsBuilder->build($dimension);
         }
 
-        $query = $this->conditionManager->combineQueries($dimensions, \Zend_Db_Select::SQL_OR);
+        $query = $this->conditionManager->combineQueries($dimensions, Select::SQL_OR);
         if (!empty($query)) {
             $select->where($this->conditionManager->wrapBrackets($query));
         }
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Query/Builder/Match.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Query/Builder/Match.php
index 04c347d8decb276d6a162b551d82f145df78d1fb..e20e041e26a6cdc397692ec310528de7a0a6113b 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/Query/Builder/Match.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/Query/Builder/Match.php
@@ -24,12 +24,26 @@
 namespace Magento\Framework\Search\Adapter\Mysql\Query\Builder;
 
 use Magento\Framework\DB\Select;
+use Magento\Framework\Search\Adapter\Mysql\Field\ResolverInterface;
 use Magento\Framework\Search\Adapter\Mysql\ScoreBuilder;
 use Magento\Framework\Search\Request\Query\Bool;
 use Magento\Framework\Search\Request\QueryInterface as RequestQueryInterface;
 
 class Match implements QueryInterface
 {
+    /**
+     * @var ResolverInterface
+     */
+    private $resolver;
+
+    /**
+     * @param ResolverInterface $resolver
+     */
+    public function __construct(ResolverInterface $resolver)
+    {
+        $this->resolver = $resolver;
+    }
+
     /**
      * {@inheritdoc}
      */
@@ -46,18 +60,19 @@ class Match implements QueryInterface
         } elseif ($conditionType === Bool::QUERY_CONDITION_NOT) {
             $queryValue = '-' . $queryValue;
         }
-
+        
         $fieldList = [];
         foreach ($query->getMatches() as $match) {
             $fieldList[] = $match['field'];
         }
+        $resolvedFieldList = $this->resolver->resolve($fieldList);
 
         $queryBoost = $query->getBoost();
         $scoreBuilder->addCondition(
-            $select->getMatchQuery($fieldList, $queryValue, Select::FULLTEXT_MODE_BOOLEAN),
+            $select->getMatchQuery($resolvedFieldList, $queryValue, Select::FULLTEXT_MODE_BOOLEAN),
             !is_null($queryBoost) ? $queryBoost : 1
         );
-        $select->match($fieldList, $queryValue, true, Select::FULLTEXT_MODE_BOOLEAN);
+        $select->match($resolvedFieldList, $queryValue, true, Select::FULLTEXT_MODE_BOOLEAN);
 
         return $select;
     }
diff --git a/lib/internal/Magento/Framework/Search/Adapter/Mysql/ScoreBuilder.php b/lib/internal/Magento/Framework/Search/Adapter/Mysql/ScoreBuilder.php
index 554d2a0768d56022a6e79878d39b4d315d4b3e59..5026bac57db39ab3f1a3966f040ebe56d25b4c37 100644
--- a/lib/internal/Magento/Framework/Search/Adapter/Mysql/ScoreBuilder.php
+++ b/lib/internal/Magento/Framework/Search/Adapter/Mysql/ScoreBuilder.php
@@ -76,7 +76,11 @@ class ScoreBuilder
      */
     public function endQuery($boost)
     {
-        $this->scoreCondition .= ") * {$boost}";
+        if (!empty($this->scoreCondition) && substr($this->scoreCondition, -1) != '(') {
+            $this->scoreCondition .= ") * {$boost}";
+        } else {
+            $this->scoreCondition .= '0)';
+        }
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/Search/Request/Binder.php b/lib/internal/Magento/Framework/Search/Request/Binder.php
index 776b5ef2bb12fd0c8c2b337993b088af42f5d80e..c4b90e0a560655e5bad761ed40cc31d50e027819 100644
--- a/lib/internal/Magento/Framework/Search/Request/Binder.php
+++ b/lib/internal/Magento/Framework/Search/Request/Binder.php
@@ -57,6 +57,7 @@ class Binder
                 $data[$limit] = $bindData[$limit];
             }
         }
+
         return $data;
     }
 
@@ -72,6 +73,7 @@ class Binder
                 $data[$name]['value'] = $bindData[$name];
             }
         }
+
         return $data;
     }
 
@@ -87,10 +89,19 @@ class Binder
         foreach ($data as $key => $value) {
             if (is_array($value)) {
                 $data[$key] = $this->processData($value, $bindData);
-            } elseif (!empty($bindData[$value])) {
-                $data[$key] = $bindData[$value];
+            } else {
+                foreach ($bindData as $bindKey => $bindValue) {
+                    if (strpos($value, $bindKey) !== false) {
+                        if (is_string($bindValue)) {
+                            $data[$key] = str_replace($bindKey, $bindValue, $value);
+                        } else {
+                            $data[$key] = $bindValue;
+                        }
+                    }
+                }
             }
         }
+
         return $data;
     }
 }
diff --git a/lib/internal/Magento/Framework/Search/Request/Cleaner.php b/lib/internal/Magento/Framework/Search/Request/Cleaner.php
index b2e26b76f815e0555c139fa14c085353495f020f..099a30ebf18c1886df138a9d2f3eb91afefd9228 100644
--- a/lib/internal/Magento/Framework/Search/Request/Cleaner.php
+++ b/lib/internal/Magento/Framework/Search/Request/Cleaner.php
@@ -140,10 +140,13 @@ class Cleaner
                 $keys = ['from', 'to'];
                 foreach ($keys as $key) {
                     if (isset($filter[$key]) && preg_match('/\$(.+)\$/si', $filter[$key], $matches)) {
-                        unset($this->requestData['filters'][$filterName]);
-                        break;
+                        unset($this->requestData['filters'][$filterName][$key]);
                     }
                 }
+                $filterKeys = array_keys($this->requestData['filters'][$filterName]);
+                if (count(array_diff($keys, $filterKeys)) == count($keys)) {
+                    unset($this->requestData['filters'][$filterName]);
+                }
                 break;
             case FilterInterface::TYPE_BOOL:
                 $filterReference = $this->processFilterReference($filter['filterReference']);
diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/Builder.php b/lib/internal/Magento/Framework/Service/Code/Generator/Builder.php
index 757058e48d0427aeb6f952e1e278fd141d3b73fd..3d19dfd98bf3cdca82a8881a2fd0e56f286f9f3c 100644
--- a/lib/internal/Magento/Framework/Service/Code/Generator/Builder.php
+++ b/lib/internal/Magento/Framework/Service/Code/Generator/Builder.php
@@ -58,7 +58,7 @@ class Builder extends EntityAbstract
     }
 
     /**
-     * Returns list of methods for class generator
+     * Return a list of methods for class generator
      *
      * @return array
      */
diff --git a/lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php b/lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php
new file mode 100644
index 0000000000000000000000000000000000000000..fd49284c1ae1d2f05e9a110059d179303f791549
--- /dev/null
+++ b/lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php
@@ -0,0 +1,193 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in 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\Framework\Service\Code\Generator;
+
+use Magento\Framework\Code\Generator\EntityAbstract;
+use Zend\Code\Reflection\ClassReflection;
+
+/**
+ * Class Builder
+ */
+class DataBuilder extends EntityAbstract
+{
+    /**
+     * Entity type
+     */
+    const ENTITY_TYPE = 'dataBuilder';
+
+    /**
+     * Data Model property name
+     */
+    const DATA_PROPERTY_NAME = 'data';
+
+    /**
+     * Retrieve class properties
+     *
+     * @return array
+     */
+    protected function _getClassProperties()
+    {
+        return [];
+    }
+
+    /**
+     * Get default constructor definition for generated class
+     *
+     * @return array
+     */
+    protected function _getDefaultConstructorDefinition()
+    {
+        $constructorDefinition = [
+            'name' => '__construct',
+            'parameters' => [
+                ['name' => 'objectManager', 'type' => '\Magento\Framework\ObjectManager']
+            ],
+            'docblock' => [
+                'shortDescription' => 'Initialize the builder',
+                'tags' => [['name' => 'param', 'description' => '\Magento\Framework\ObjectManager $objectManager']]
+            ],
+            'body' => "parent::__construct(\$objectManager, "
+            . "'" . $this->_getSourceClassName() . "Interface');"
+        ];
+
+        return $constructorDefinition;
+    }
+
+    /**
+     * Return a list of methods for class generator
+     *
+     * @return array
+     */
+    protected function _getClassMethods()
+    {
+        $methods = [];
+        $className = $this->_getSourceClassName();
+        $reflectionClass = new \ReflectionClass($className);
+        $lowerCaseClassName = strtolower($className);
+        $publicMethods = $reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC);
+        foreach ($publicMethods as $method) {
+            //since methods are sorted - lowest inheritance first, no need to loop through everything
+            if ($lowerCaseClassName !== strtolower($method->class)) {
+                break;
+            }
+            if ($this->canUseMethodForGeneration($method)) {
+                $methods[] = $this->_getMethodInfo($method);
+            }
+        }
+        $methods[] = $this->_getDefaultConstructorDefinition();
+        return $methods;
+    }
+
+    /**
+     * Check if the specified method should be used during generation builder generation.
+     *
+     * @param \ReflectionMethod $method
+     * @return bool
+     */
+    protected function canUseMethodForGeneration($method)
+    {
+        $isGetter = (substr($method->getName(), 0, 3) == 'get');
+        $isSuitableMethodType = !($method->isConstructor() || $method->isFinal()
+            || $method->isStatic() || $method->isDestructor());
+        $isExcludedFromGeneration = in_array($method->getName(), array('__sleep', '__wakeup', '__clone'));
+        $isSuitableClass = $method->class !== 'Magento\Framework\Api\ExtensibleDataInterface';
+        return $isGetter && $isSuitableMethodType && !$isExcludedFromGeneration && $isSuitableClass;
+    }
+
+    /**
+     * Retrieve method info
+     *
+     * @param \ReflectionMethod $method
+     * @return array
+     */
+    protected function _getMethodInfo(\ReflectionMethod $method)
+    {
+        $propertyName = substr($method->getName(), 3);
+
+        $returnType = (new ClassReflection($this->_getSourceClassName() . 'Interface'))
+            ->getMethod($method->getName())
+            ->getDocBlock()
+            ->getTag('return')
+            ->getType();
+
+        $methodInfo = [
+            'name' => 'set' . $propertyName,
+            'parameters' => [
+                ['name' => lcfirst($propertyName)]
+            ],
+            'body' => "\$this->" . self::DATA_PROPERTY_NAME . "['"
+                . strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $propertyName))
+                . "'] = \$" . lcfirst($propertyName) . ";" . PHP_EOL . "return \$this;",
+            'docblock' => array('shortDescription' => '@param ' . $returnType . " \$" . lcfirst($propertyName))
+        ];
+
+        return $methodInfo;
+    }
+
+    /**
+     * Validate data
+     *
+     * @return bool
+     */
+    protected function _validateData()
+    {
+        $result = parent::_validateData();
+
+        if ($result) {
+            $sourceClassName = $this->_getSourceClassName();
+            $resultClassName = $this->_getResultClassName();
+
+            if ($resultClassName !== $sourceClassName . ucfirst(self::ENTITY_TYPE)) {
+                $this->_addError(
+                    'Invalid Builder class name [' . $resultClassName . ']. Use '
+                    . $sourceClassName
+                    . ucfirst(self::ENTITY_TYPE)
+                );
+                $result = false;
+            }
+        }
+        return $result;
+    }
+
+    /**
+     * Generate code
+     *
+     * @return string
+     */
+    protected function _generateCode()
+    {
+        $this->_classGenerator->setName(
+            $this->_getResultClassName()
+        )->addProperties(
+            $this->_getClassProperties()
+        )->addMethods(
+            $this->_getClassMethods()
+        )->setClassDocBlock(
+            $this->_getClassDocBlock()
+        )->setExtendedClass('\Magento\Framework\Service\Data\ExtensibleDataBuilder');
+
+        return $this->_getGeneratedCode();
+    }
+}
diff --git a/lib/internal/Magento/Framework/Service/Config/MetadataConfig.php b/lib/internal/Magento/Framework/Service/Config/MetadataConfig.php
index 972541d4a7e702a85e2b73ccca4070ae90e760ed..5b767cb17839e5ac344c82a6d25081fc7717137f 100644
--- a/lib/internal/Magento/Framework/Service/Config/MetadataConfig.php
+++ b/lib/internal/Magento/Framework/Service/Config/MetadataConfig.php
@@ -68,15 +68,32 @@ class MetadataConfig implements MetadataServiceInterface
              * Attribute metadata builder and data object class name are expected to be configured
              * via DI using virtual types. If configuration is missing, empty array should be returned.
              */
-            $allAttributes = $this->serviceConfigReader->read();
-            if (isset($allAttributes[$dataObjectClassName])
-                && is_array($allAttributes[$dataObjectClassName])
-            ) {
-                $attributeCodes = array_keys($allAttributes[$dataObjectClassName]);
-                foreach ($attributeCodes as $attributeCode) {
-                    $this->attributeMetadataBuilder->setAttributeCode($attributeCode);
-                    $attributes[$attributeCode] = $this->attributeMetadataBuilder->create();
-                }
+            $attributes = $this->getAttributesMetadata($dataObjectClassName);
+            $implementedInterfaces = (new \ReflectionClass($dataObjectClassName))->getInterfaceNames();
+            foreach ($implementedInterfaces as $interfaceName) {
+                $attributes = array_merge($attributes, $this->getAttributesMetadata($interfaceName));
+            }
+        }
+        return $attributes;
+    }
+
+    /**
+     * Get custom attribute metadata for the given class/interface.
+     *
+     * @param string $dataObjectClassName
+     * @return \Magento\Framework\Service\Data\MetadataObjectInterface[]
+     */
+    protected function getAttributesMetadata($dataObjectClassName)
+    {
+        $attributes = [];
+        $allAttributes = $this->serviceConfigReader->read();
+        if (isset($allAttributes[$dataObjectClassName])
+            && is_array($allAttributes[$dataObjectClassName])
+        ) {
+            $attributeCodes = array_keys($allAttributes[$dataObjectClassName]);
+            foreach ($attributeCodes as $attributeCode) {
+                $this->attributeMetadataBuilder->setAttributeCode($attributeCode);
+                $attributes[$attributeCode] = $this->attributeMetadataBuilder->create();
             }
         }
         return $attributes;
diff --git a/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php b/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php
index d05cb43c8609ebcb9907f2009dbceafb64787ac2..d73065cb9d78c303eac0b36197e30351f20cc8da 100644
--- a/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php
+++ b/lib/internal/Magento/Framework/Service/Data/AbstractExtensibleObject.php
@@ -23,11 +23,13 @@
  */
 namespace Magento\Framework\Service\Data;
 
+use Magento\Framework\Api\ExtensibleDataInterface;
+
 /**
  * Base Class for extensible data Objects
  * @SuppressWarnings(PHPMD.NumberOfChildren)
  */
-abstract class AbstractExtensibleObject extends AbstractSimpleObject
+abstract class AbstractExtensibleObject extends AbstractSimpleObject implements ExtensibleDataInterface
 {
     /**
      * Array key for custom attributes
@@ -38,7 +40,7 @@ abstract class AbstractExtensibleObject extends AbstractSimpleObject
      * Get an attribute value.
      *
      * @param string $attributeCode
-     * @return \Magento\Framework\Service\Data\AttributeValue|null The value. Null if the attribute has not been set
+     * @return \Magento\Framework\Service\Data\AttributeValue|null null if the attribute has not been set
      */
     public function getCustomAttribute($attributeCode)
     {
@@ -49,7 +51,7 @@ abstract class AbstractExtensibleObject extends AbstractSimpleObject
     }
 
     /**
-     * Retrieve custom attributes values as an associative array.
+     * Retrieve custom attributes values.
      *
      * @return \Magento\Framework\Service\Data\AttributeValue[]|null
      */
diff --git a/lib/internal/Magento/Framework/Service/Data/AttributeValue.php b/lib/internal/Magento/Framework/Service/Data/AttributeValue.php
index aeddbaeb9b2b42f857b7d0637418d5b1ac5cb2a6..ec5d17fe0a115895cb517bf5e2514dd40ec985b2 100644
--- a/lib/internal/Magento/Framework/Service/Data/AttributeValue.php
+++ b/lib/internal/Magento/Framework/Service/Data/AttributeValue.php
@@ -21,12 +21,15 @@
  * @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\Framework\Service\Data;
 
+use Magento\Framework\Api\AttributeInterface;
+
 /**
  * Custom Attribute Data object
  */
-class AttributeValue extends AbstractSimpleObject
+class AttributeValue extends AbstractSimpleObject implements AttributeInterface
 {
     /**#@+
      * Constant used as key into $_data
@@ -38,7 +41,7 @@ class AttributeValue extends AbstractSimpleObject
     /**
      * Get attribute code
      *
-     * @return string the attribute code
+     * @return string
      */
     public function getAttributeCode()
     {
@@ -48,7 +51,7 @@ class AttributeValue extends AbstractSimpleObject
     /**
      * Get attribute value
      *
-     * @return mixed the attribute value
+     * @return mixed
      */
     public function getValue()
     {
diff --git a/lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.php b/lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.php
new file mode 100644
index 0000000000000000000000000000000000000000..b665e1ac2ab70563b25bbf17120cb4d1115a4f51
--- /dev/null
+++ b/lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.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.
+ *
+ * @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\Framework\Service\Data;
+
+use Magento\Framework\Api\ExtensibleDataBuilderInterface;
+use Magento\Framework\Model\AbstractExtensibleModel;
+use Magento\Framework\ObjectManager;
+
+/**
+ * Implementation for \Magento\Framework\Api\ExtensibleDataBuilderInterface.
+ */
+class ExtensibleDataBuilder implements ExtensibleDataBuilderInterface
+{
+    /**
+     * @var string
+     */
+    protected $modelClassInterface;
+
+    /**
+     * @var array
+     */
+    protected $data;
+
+    /**
+     * @var ObjectManager
+     */
+    protected $objectManager;
+
+    /**
+     * Initialize the builder
+     *
+     * @param ObjectManager $objectManager
+     * @param string $modelClassInterface
+     */
+    public function __construct(ObjectManager $objectManager, $modelClassInterface)
+    {
+        $this->objectManager = $objectManager;
+        $this->modelClassInterface = $modelClassInterface;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setCustomAttribute(\Magento\Framework\Api\AttributeInterface $attribute)
+    {
+        // Store as an associative array for easier lookup and processing
+        $this->data[AbstractExtensibleModel::CUSTOM_ATTRIBUTES_KEY][$attribute->getAttributeCode()]
+            = $attribute;
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function setCustomAttributes(array $attributes)
+    {
+        foreach ($attributes as $attribute) {
+            $this->setCustomAttribute($attribute);
+        }
+        return $this;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function create()
+    {
+        return $this->objectManager->create(
+            $this->modelClassInterface,
+            ['data' => $this->data]
+        );
+    }
+}
diff --git a/lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php b/lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php
index 9c619623a0f7daff4822f4bcdf1d98b0e50b5ddb..6939d501a2c6f715e6505fc893d2813a4e82f474 100644
--- a/lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php
+++ b/lib/internal/Magento/Framework/Service/Data/MetadataServiceInterface.php
@@ -27,7 +27,7 @@ namespace Magento\Framework\Service\Data;
 interface MetadataServiceInterface
 {
     /**
-     *  Get custom attribute metadata for the given Data object's attribute set
+     *  Get custom attribute metadata for the given class or interfaces it implements.
      *
      * @param string|null $dataObjectClassName Data object class name
      * @return \Magento\Framework\Service\Data\MetadataObjectInterface[]
diff --git a/lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php b/lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php
index d1e4ec7853531dd0a0bd3af005209866f0a41fd3..c3e0c01aa8a5518ffa6d5c46ecf41a97f045a507 100644
--- a/lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php
+++ b/lib/internal/Magento/Framework/Service/SimpleDataObjectConverter.php
@@ -25,7 +25,6 @@ namespace Magento\Framework\Service;
 
 use Magento\Framework\Convert\ConvertArray;
 use Magento\Framework\Service\Data\AbstractExtensibleObject;
-use Magento\Framework\Service\Data\AbstractSimpleObject;
 
 class SimpleDataObjectConverter
 {
@@ -146,57 +145,16 @@ class SimpleDataObjectConverter
     }
 
     /**
-     * Converts the incoming data into scalar or an array of scalars format.
+     * Convert a CamelCase string read from method into field key in snake_case
      *
-     * If the data provided is null, then an empty array is returned.  Otherwise, if the data is an object, it is
-     * assumed to be a Data Object and converted to an associative array with keys representing the properties of the
-     * Data Object.
-     * Nested Data Objects are also converted.  If the data provided is itself an array, then we iterate through the
-     * contents and convert each piece individually.
+     * e.g. DefaultShipping => default_shipping
+     *      Postcode => postcode
      *
-     * @param mixed $data
-     * @return array|int|string|bool|float Scalar or array of scalars
-     */
-    public function processServiceOutput($data)
-    {
-        if (is_array($data)) {
-            $result = [];
-            foreach ($data as $datum) {
-                if ($datum instanceof AbstractSimpleObject) {
-                    $datum = $this->processDataObject($datum->__toArray());
-                }
-                $result[] = $datum;
-            }
-            return $result;
-        } else if ($data instanceof AbstractSimpleObject) {
-            return $this->processDataObject($data->__toArray());
-        } else if (is_null($data)) {
-            return [];
-        } else {
-            /** No processing is required for scalar types */
-            return $data;
-        }
-    }
-
-    /**
-     * Convert data object to array and process available custom attributes
-     *
-     * @param array $dataObjectArray
-     * @return array
+     * @param string $name
+     * @return string
      */
-    protected function processDataObject($dataObjectArray)
+    public static function camelCaseToSnakeCase($name)
     {
-        if (isset($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY])) {
-            $dataObjectArray = ExtensibleDataObjectConverter::convertCustomAttributesToSequentialArray(
-                $dataObjectArray
-            );
-        }
-        //Check for nested custom_attributes
-        foreach ($dataObjectArray as $key => $value) {
-            if (is_array($value)) {
-                $dataObjectArray[$key] = $this->processDataObject($value);
-            }
-        }
-        return $dataObjectArray;
+        return strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $name));
     }
 }
diff --git a/lib/internal/Magento/Framework/Session/Config.php b/lib/internal/Magento/Framework/Session/Config.php
index 0e3e3e9d266c279c4cb555e574f001332c891f08..26b3687598ed80255c8b51fa10b452ae83cceabb 100644
--- a/lib/internal/Magento/Framework/Session/Config.php
+++ b/lib/internal/Magento/Framework/Session/Config.php
@@ -25,6 +25,8 @@
  */
 namespace Magento\Framework\Session;
 
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Session\Config\ConfigInterface;
 
 /**
@@ -108,11 +110,6 @@ class Config implements ConfigInterface
         'session.cookie_httponly'
     );
 
-    /**
-     * @var \Magento\Framework\App\Filesystem
-     */
-    protected $_filesystem;
-
     /**
      * @var string
      */
@@ -126,7 +123,7 @@ class Config implements ConfigInterface
      * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
      * @param \Magento\Framework\Stdlib\String $stringHelper
      * @param \Magento\Framework\App\RequestInterface $request
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param Filesystem $filesystem
      * @param string $scopeType
      * @param string $saveMethod
      * @param null|string $savePath
@@ -138,7 +135,7 @@ class Config implements ConfigInterface
         \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
         \Magento\Framework\Stdlib\String $stringHelper,
         \Magento\Framework\App\RequestInterface $request,
-        \Magento\Framework\App\Filesystem $filesystem,
+        Filesystem $filesystem,
         $scopeType,
         $saveMethod = \Magento\Framework\Session\SaveHandlerInterface::DEFAULT_HANDLER,
         $savePath = null,
@@ -149,13 +146,14 @@ class Config implements ConfigInterface
         $this->_scopeConfig = $scopeConfig;
         $this->_stringHelper = $stringHelper;
         $this->_httpRequest = $request;
-        $this->_filesystem = $filesystem;
         $this->_scopeType = $scopeType;
 
         $this->setSaveHandler($saveMethod === 'db' ? 'user' : $saveMethod);
 
         if (!$savePath) {
-            $savePath = $this->_filesystem->getPath('session');
+            $sessionDir = $filesystem->getDirectoryWrite(DirectoryList::SESSION);
+            $savePath = $sessionDir->getAbsolutePath();
+            $sessionDir->create();
         }
         $this->setSavePath($savePath);
 
diff --git a/lib/internal/Magento/Framework/Shell/README.md b/lib/internal/Magento/Framework/Shell/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..5bfb194e6090cc93d30675b3eaf1241ec438be14
--- /dev/null
+++ b/lib/internal/Magento/Framework/Shell/README.md
@@ -0,0 +1,3 @@
+A library with object-oriented interface for executing shell commands. Provides an indirection layer that can be used for customizing or testing (mocking) `exec()` function.
+
+Implements placeholders for command arguments that are automatically escaped in format appropriate to the current OS. Provides ability for logging/capturing the commands and their output.
diff --git a/lib/internal/Magento/Framework/Stdlib/README.md b/lib/internal/Magento/Framework/Stdlib/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..4f077657cf89b2a1c16aa60ee5ed97ed2474819e
--- /dev/null
+++ b/lib/internal/Magento/Framework/Stdlib/README.md
@@ -0,0 +1,2 @@
+The Stdlib library contains utility classes that extend or relate to base PHP classes. Modules should use the CookieManager to get and set cookies instead of the built-in cookie functions for improved security.
+Other classes provide convenience methods for dealing with arrays, boolean, date/time, and strings.
\ No newline at end of file
diff --git a/lib/internal/Magento/Framework/Translate.php b/lib/internal/Magento/Framework/Translate.php
index 1bc59d063528e29c5f0f852478e604718733155d..21c49a4c5e3e98aab56a9ef2e552a8ec538f0da0 100644
--- a/lib/internal/Magento/Framework/Translate.php
+++ b/lib/internal/Magento/Framework/Translate.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Translate library
  *
@@ -134,7 +136,7 @@ class Translate implements \Magento\Framework\TranslateInterface
      * @param \Magento\Framework\Translate\ResourceInterface $translate
      * @param \Magento\Framework\Locale\ResolverInterface $locale
      * @param \Magento\Framework\App\State $appState
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\App\RequestInterface $request
      * @param \Magento\Framework\File\Csv $csvParser
      * @param \Magento\Framework\App\Language\Dictionary $packDictionary
@@ -151,7 +153,7 @@ class Translate implements \Magento\Framework\TranslateInterface
         \Magento\Framework\Translate\ResourceInterface $translate,
         \Magento\Framework\Locale\ResolverInterface $locale,
         \Magento\Framework\App\State $appState,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\App\RequestInterface $request,
         \Magento\Framework\File\Csv $csvParser,
         \Magento\Framework\App\Language\Dictionary $packDictionary
@@ -166,7 +168,7 @@ class Translate implements \Magento\Framework\TranslateInterface
         $this->_locale = $locale;
         $this->_appState = $appState;
         $this->request = $request;
-        $this->directory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->directory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->_csvParser = $csvParser;
         $this->packDictionary = $packDictionary;
     }
@@ -197,9 +199,7 @@ class Translate implements \Magento\Framework\TranslateInterface
         $this->_loadPackTranslation();
         $this->_loadDbTranslation();
 
-        if (!$forceReload) {
-            $this->_saveCache();
-        }
+        $this->_saveCache();
 
         return $this;
     }
diff --git a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php
index 3b867de1b2c87ab3cd6b3163b99dab4f4075504c..95ecd50d7164ef37442190320a5d2bc8d7af28c0 100644
--- a/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php
+++ b/lib/internal/Magento/Framework/Translate/Locale/Resolver/Plugin.php
@@ -69,7 +69,7 @@ class Plugin
     {
         if (!is_null($localeCode)) {
             $this->_translate->setLocale($localeCode)
-                ->loadData(null, true);
+                ->loadData();
         }
     }
 }
diff --git a/lib/internal/Magento/Framework/Validator/README.md b/lib/internal/Magento/Framework/Validator/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..f6921dc264d2e253fcccbc0a34d64cb5c80fc585
--- /dev/null
+++ b/lib/internal/Magento/Framework/Validator/README.md
@@ -0,0 +1 @@
+This library extends Zend Framework's validator library and is used for validating input data in forms. Implements an XML-configuration that allows defining validation constraints in a declarative way.
diff --git a/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php b/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php
index 4101639e3e97d40c157459e070c1d9deaa7dfe25..ca5f6568e7a303d9c9883371aa05b26f74fb88f3 100644
--- a/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php
+++ b/lib/internal/Magento/Framework/View/Asset/File/FallbackContext.php
@@ -24,6 +24,8 @@
 
 namespace Magento\Framework\View\Asset\File;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * An advanced context that contains information necessary for view files fallback system
  */
@@ -55,7 +57,7 @@ class FallbackContext extends Context
         $this->area = $areaType;
         $this->theme = $themePath;
         $this->locale = $localeCode;
-        parent::__construct($baseUrl, \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR, $this->generatePath());
+        parent::__construct($baseUrl, DirectoryList::STATIC_VIEW, $this->generatePath());
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/View/Asset/MergeService.php b/lib/internal/Magento/Framework/View/Asset/MergeService.php
index 250064eed6405f8bf2622409b81abb4d75bb5267..8f5c233f09f0c23f0154c93bd0abdc65c3ccef7e 100644
--- a/lib/internal/Magento/Framework/View/Asset/MergeService.php
+++ b/lib/internal/Magento/Framework/View/Asset/MergeService.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Service model responsible for making a decision of whether to use the merged asset in place of original ones
  */
@@ -45,7 +47,7 @@ class MergeService
     /**
      * Filesystem
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -61,13 +63,13 @@ class MergeService
      *
      * @param \Magento\Framework\ObjectManager $objectManager
      * @param ConfigInterface $config
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\App\State $state
      */
     public function __construct(
         \Magento\Framework\ObjectManager $objectManager,
         ConfigInterface $config,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\App\State $state
     ) {
         $this->objectManager = $objectManager;
@@ -118,7 +120,7 @@ class MergeService
      */
     public function cleanMergedJsCss()
     {
-        $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR)
+        $this->filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW)
             ->delete(Merged::getRelativeDir());
     }
 }
diff --git a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php
index 826eba61e1513e22e23ea74912872e66c23a79c9..5e9a725534133c8d724ea441174391312555fe25 100644
--- a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php
+++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Checksum.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset\MergeStrategy;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Skip merging if all of the files that need to be merged were not modified
  *
@@ -37,17 +39,17 @@ class Checksum implements \Magento\Framework\View\Asset\MergeStrategyInterface
     protected $strategy;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\Framework\View\Asset\MergeStrategyInterface $strategy
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\View\Asset\MergeStrategyInterface $strategy,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->strategy = $strategy;
         $this->filesystem = $filesystem;
@@ -58,7 +60,7 @@ class Checksum implements \Magento\Framework\View\Asset\MergeStrategyInterface
      */
     public function merge(array $assetsToMerge, \Magento\Framework\View\Asset\LocalInterface $resultAsset)
     {
-        $sourceDir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $sourceDir = $this->filesystem->getDirectoryRead(DirectoryList::ROOT);
         $mTime = null;
         /** @var \Magento\Framework\View\Asset\MergeableInterface $asset */
         foreach ($assetsToMerge as $asset) {
@@ -69,7 +71,7 @@ class Checksum implements \Magento\Framework\View\Asset\MergeStrategyInterface
         }
 
         $dat = $resultAsset->getPath() . '.dat';
-        $targetDir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $targetDir = $this->filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW);
         if (!$targetDir->isExist($dat) || strcmp($mTime, $targetDir->readFile($dat)) !== 0) {
             $this->strategy->merge($assetsToMerge, $resultAsset);
             $targetDir->writeFile($dat, $mTime);
diff --git a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php
index 0b0f7797e3c4767d0dd7db4f8b2bdf2e89a679f4..60bfc81a1bf1b70d2e9dbab6013e48ae25d90994 100644
--- a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php
+++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/Direct.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Framework\View\Asset\MergeStrategy;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Asset;
 
 /**
@@ -40,7 +41,7 @@ class Direct implements \Magento\Framework\View\Asset\MergeStrategyInterface
     /**#@-*/
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     private $filesystem;
 
@@ -50,11 +51,11 @@ class Direct implements \Magento\Framework\View\Asset\MergeStrategyInterface
     private $cssUrlResolver;
 
     /**
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Url\CssResolver $cssUrlResolver
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Url\CssResolver $cssUrlResolver
     ) {
         $this->filesystem = $filesystem;
@@ -67,7 +68,7 @@ class Direct implements \Magento\Framework\View\Asset\MergeStrategyInterface
     public function merge(array $assetsToMerge, Asset\LocalInterface $resultAsset)
     {
         $mergedContent = $this->composeMergedContent($assetsToMerge, $resultAsset);
-        $dir = $this->filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $dir = $this->filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW);
         $dir->writeFile($resultAsset->getPath(), $mergedContent);
     }
 
diff --git a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php
index 7294fa3d7c4e2ecd73acde0b8d5756216c61a56e..95b4f7b028a6eaacde8b6a23540f57aeca5e74bd 100644
--- a/lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php
+++ b/lib/internal/Magento/Framework/View/Asset/MergeStrategy/FileExists.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset\MergeStrategy;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Skip merging if the merged file already exists
  */
@@ -34,17 +36,17 @@ class FileExists implements \Magento\Framework\View\Asset\MergeStrategyInterface
     protected $strategy;
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
     /**
      * @param \Magento\Framework\View\Asset\MergeStrategyInterface $strategy
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\View\Asset\MergeStrategyInterface $strategy,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->strategy = $strategy;
         $this->filesystem = $filesystem;
@@ -55,7 +57,7 @@ class FileExists implements \Magento\Framework\View\Asset\MergeStrategyInterface
      */
     public function merge(array $assetsToMerge, \Magento\Framework\View\Asset\LocalInterface $resultAsset)
     {
-        $dir = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $dir = $this->filesystem->getDirectoryRead(DirectoryList::STATIC_VIEW);
         if (!$dir->isExist($resultAsset->getPath())) {
             $this->strategy->merge($assetsToMerge, $resultAsset);
         }
diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php
index 1593b47b47a8874678c34b1c6c05c812337eb6c0..6e432ec8abcca9ad8576aca4744a3eafd4112c3b 100644
--- a/lib/internal/Magento/Framework/View/Asset/Merged.php
+++ b/lib/internal/Magento/Framework/View/Asset/Merged.php
@@ -181,12 +181,12 @@ class Merged implements \Iterator
     }
 
     /**
-     * Returns directory for storing merged files relative to STATIC_VIEW_DIR
+     * Returns directory for storing merged files relative to STATIC_VIEW
      *
      * @return string
      */
     public static function getRelativeDir()
     {
-        return \Magento\Framework\App\Filesystem\DirectoryList::CACHE_VIEW_REL_DIR . '/merged';
+        return Minified::CACHE_VIEW_REL . '/merged';
     }
 }
diff --git a/lib/internal/Magento/Framework/View/Asset/Minified.php b/lib/internal/Magento/Framework/View/Asset/Minified.php
index a7c9a8078ff1e5600524569ce325b82fbc10b5a9..1b6d80c3053506d9ad20a8cb215a7671d8d597d7 100644
--- a/lib/internal/Magento/Framework/View/Asset/Minified.php
+++ b/lib/internal/Magento/Framework/View/Asset/Minified.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Minified page asset
  */
@@ -35,6 +37,11 @@ class Minified implements MergeableInterface
     const MTIME = 'mtime';
     /**#@-*/
 
+    /**
+     * Directory for dynamically generated public view files, relative to STATIC_VIEW
+     */
+    const CACHE_VIEW_REL = '_cache';
+
     /**
      * LocalInterface
      *
@@ -116,7 +123,7 @@ class Minified implements MergeableInterface
      *
      * @param LocalInterface $asset
      * @param \Magento\Framework\Logger $logger
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\UrlInterface $baseUrl
      * @param \Magento\Framework\Code\Minifier\AdapterInterface $adapter
      * @param string $strategy
@@ -124,7 +131,7 @@ class Minified implements MergeableInterface
     public function __construct(
         LocalInterface $asset,
         \Magento\Framework\Logger $logger,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\UrlInterface $baseUrl,
         \Magento\Framework\Code\Minifier\AdapterInterface $adapter,
         $strategy = self::FILE_EXISTS
@@ -132,8 +139,8 @@ class Minified implements MergeableInterface
         $this->originalAsset = $asset;
         $this->strategy = $strategy;
         $this->logger = $logger;
-        $this->rootDir = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
-        $this->staticViewDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::STATIC_VIEW_DIR);
+        $this->rootDir = $filesystem->getDirectoryRead(DirectoryList::ROOT);
+        $this->staticViewDir = $filesystem->getDirectoryWrite(DirectoryList::STATIC_VIEW);
         $this->baseUrl = $baseUrl;
         $this->adapter = $adapter;
     }
@@ -319,8 +326,8 @@ class Minified implements MergeableInterface
         $path = $this->originalAsset->getPath();
         $this->context = new \Magento\Framework\View\Asset\File\Context(
             $this->baseUrl->getBaseUrl(array('_type' => \Magento\Framework\UrlInterface::URL_TYPE_STATIC)),
-            \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR,
-            \Magento\Framework\App\Filesystem\DirectoryList::CACHE_VIEW_REL_DIR . '/minified'
+            DirectoryList::STATIC_VIEW,
+            self::CACHE_VIEW_REL . '/minified'
         );
         $this->filePath = md5($path) . '_' . $this->composeMinifiedName(basename($path));
         $this->path = $this->context->getPath() . '/' . $this->filePath;
diff --git a/lib/internal/Magento/Framework/View/Asset/Repository.php b/lib/internal/Magento/Framework/View/Asset/Repository.php
index 0c99415c885bfd470e666bce3ae72f32e70afbee..e588e438475712418954ab590b745c00bc244fba 100644
--- a/lib/internal/Magento/Framework/View/Asset/Repository.php
+++ b/lib/internal/Magento/Framework/View/Asset/Repository.php
@@ -24,9 +24,10 @@
 
 namespace Magento\Framework\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Asset\File;
 use \Magento\Framework\UrlInterface;
-use \Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 
 /**
  * A repository service for view assets
@@ -218,7 +219,7 @@ class Repository
     private function getFallbackContext($urlType, $isSecure, $area, $themePath, $locale)
     {
         $secureKey = null === $isSecure ? 'null' : (int)$isSecure;
-        $baseDirType = \Magento\Framework\App\Filesystem::STATIC_VIEW_DIR;
+        $baseDirType = DirectoryList::STATIC_VIEW;
         $id = implode('|', array($baseDirType, $urlType, $secureKey, $area, $themePath, $locale));
         if (!isset($this->fallbackContext[$id])) {
             $url = $this->baseUrl->getBaseUrl(array('_type' => $urlType, '_secure' => $isSecure));
@@ -269,7 +270,7 @@ class Repository
     public function createArbitrary(
         $filePath,
         $dirPath,
-        $baseDirType = Filesystem::STATIC_VIEW_DIR,
+        $baseDirType = DirectoryList::STATIC_VIEW,
         $baseUrlType = UrlInterface::URL_TYPE_STATIC
     ) {
         $context = $this->getFileContext($baseDirType, $baseUrlType, $dirPath);
diff --git a/lib/internal/Magento/Framework/View/Asset/Source.php b/lib/internal/Magento/Framework/View/Asset/Source.php
index 35824fc6af3d11deb6430476f781180162927571..cf348dc9950c60b28102d3b7fe974ff4491357c8 100644
--- a/lib/internal/Magento/Framework/View/Asset/Source.php
+++ b/lib/internal/Magento/Framework/View/Asset/Source.php
@@ -24,6 +24,7 @@
 
 namespace Magento\Framework\View\Asset;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\FileResolution\Fallback\Resolver\Simple;
 
 /**
@@ -39,7 +40,7 @@ class Source
     const TMP_MATERIALIZATION_DIR = 'view_preprocessed';
 
     /**
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     private $filesystem;
 
@@ -75,22 +76,22 @@ class Source
 
     /**
      * @param PreProcessor\Cache $cache
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param PreProcessor\Pool $preProcessorPool
      * @param \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallback
      * @param \Magento\Framework\View\Design\Theme\ListInterface $themeList
      */
     public function __construct(
         PreProcessor\Cache $cache,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         PreProcessor\Pool $preProcessorPool,
         \Magento\Framework\View\Design\FileResolution\Fallback\StaticFile $fallback,
         \Magento\Framework\View\Design\Theme\ListInterface $themeList
     ) {
         $this->cache = $cache;
         $this->filesystem = $filesystem;
-        $this->rootDir = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
-        $this->varDir = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::VAR_DIR);
+        $this->rootDir = $filesystem->getDirectoryRead(DirectoryList::ROOT);
+        $this->varDir = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $this->preProcessorPool = $preProcessorPool;
         $this->fallback = $fallback;
         $this->themeList = $themeList;
@@ -146,7 +147,7 @@ class Source
         if (!$sourceFile) {
             return false;
         }
-        $dirCode = \Magento\Framework\App\Filesystem::ROOT_DIR;
+        $dirCode = DirectoryList::ROOT;
         $path = $this->rootDir->getRelativePath($sourceFile);
         $cacheId = $path . ':' . $asset->getPath();
         $cached = $this->cache->load($cacheId);
@@ -165,7 +166,7 @@ class Source
         }
         $chain->assertValid();
         if ($chain->isChanged()) {
-            $dirCode = \Magento\Framework\App\Filesystem::VAR_DIR;
+            $dirCode = DirectoryList::VAR_DIR;
             $path = self::TMP_MATERIALIZATION_DIR . '/source/' . $asset->getPath();
             $this->varDir->writeFile($path, $chain->getContent());
         }
diff --git a/lib/internal/Magento/Framework/View/Config.php b/lib/internal/Magento/Framework/View/Config.php
index 4550ec84ed4ec43215b668bed544e8e6191308c8..97af4d8e4d3446b6d92dbaab2410f9a514936cc7 100644
--- a/lib/internal/Magento/Framework/View/Config.php
+++ b/lib/internal/Magento/Framework/View/Config.php
@@ -23,6 +23,7 @@
  */
 namespace Magento\Framework\View;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 
 /**
@@ -83,7 +84,7 @@ class Config implements \Magento\Framework\View\ConfigInterface
      * Constructor
      *
      * @param \Magento\Framework\Module\Dir\Reader $moduleReader
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\Asset\Repository $assetRepo
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory
@@ -91,14 +92,14 @@ class Config implements \Magento\Framework\View\ConfigInterface
      */
     public function __construct(
         \Magento\Framework\Module\Dir\Reader $moduleReader,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\Asset\Repository $assetRepo,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\Config\FileIteratorFactory $fileIteratorFactory,
         $filename = self::CONFIG_FILE_NAME
     ) {
         $this->moduleReader = $moduleReader;
-        $this->rootDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->assetRepo = $assetRepo;
         $this->viewFileSystem = $viewFileSystem;
         $this->filename = $filename;
diff --git a/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php b/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php
index c33f0e176eae3cdf9846fd401209c1e559a653f0..6e86aaa17cb9907fa8ed44fa96f448bf96b9560c 100644
--- a/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php
+++ b/lib/internal/Magento/Framework/View/Design/Fallback/RulePool.php
@@ -24,7 +24,8 @@
 
 namespace Magento\Framework\View\Design\Fallback;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\Fallback\Rule\Composite;
 use Magento\Framework\View\Design\Fallback\Rule\ModularSwitch;
 use Magento\Framework\View\Design\Fallback\Rule\RuleInterface;
@@ -76,7 +77,7 @@ class RulePool
      */
     protected function createLocaleFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
+        $themesDir = $this->filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath();
         return new Theme(
             new Simple("$themesDir/<area>/<theme_path>")
         );
@@ -89,8 +90,8 @@ class RulePool
      */
     protected function createTemplateFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
-        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR);
+        $themesDir = $this->filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath();
+        $modulesDir = $this->filesystem->getDirectoryRead(DirectoryList::MODULES)->getAbsolutePath();
         return new ModularSwitch(
             new Theme(
                 new Simple("$themesDir/<area>/<theme_path>/templates")
@@ -112,8 +113,8 @@ class RulePool
      */
     protected function createFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
-        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR);
+        $themesDir = $this->filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath();
+        $modulesDir = $this->filesystem->getDirectoryRead(DirectoryList::MODULES)->getAbsolutePath();
         return new ModularSwitch(
             new Theme(new Simple("$themesDir/<area>/<theme_path>")),
             new Composite(
@@ -133,9 +134,9 @@ class RulePool
      */
     protected function createViewFileRule()
     {
-        $themesDir = $this->filesystem->getPath(Filesystem::THEMES_DIR);
-        $modulesDir = $this->filesystem->getPath(Filesystem::MODULES_DIR);
-        $libDir = $this->filesystem->getPath(Filesystem::LIB_WEB);
+        $themesDir = rtrim($this->filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath(), '/');
+        $modulesDir = rtrim($this->filesystem->getDirectoryRead(DirectoryList::MODULES)->getAbsolutePath(), '/');
+        $libDir = rtrim($this->filesystem->getDirectoryRead(DirectoryList::LIB_WEB)->getAbsolutePath(), '/');
         return new ModularSwitch(
             new Composite(
                 array(
diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php
index 3a208e0e9b8c5ce316ef2e70c4c46bfe1d2f9190..e4aa989e964be78affb7e8f5fee29eb00149f439 100644
--- a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php
+++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Alternative.php
@@ -25,7 +25,7 @@
 namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver;
 
 use Magento\Framework\View\Design\FileResolution\Fallback;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\View\Design\Fallback\Rule\RuleInterface;
 
 /**
diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php
index e4bf3c390bbf0503eab0731dd64421ad6b90d400..91e8233500e073f9a68ca8e415332cf0ec0f6a42 100644
--- a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php
+++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/Resolver/Simple.php
@@ -24,7 +24,8 @@
 
 namespace Magento\Framework\View\Design\FileResolution\Fallback\Resolver;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\Design\FileResolution\Fallback;
 use Magento\Framework\View\Design\Fallback\Rule\RuleInterface;
 use Magento\Framework\View\Design\Fallback\RulePool;
@@ -57,7 +58,7 @@ class Simple implements Fallback\ResolverInterface
      */
     public function __construct(Filesystem $filesystem, RulePool $rulePool, Fallback\CacheDataInterface $cache)
     {
-        $this->rootDirectory = $filesystem->getDirectoryRead(Filesystem::ROOT_DIR);
+        $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::ROOT);
         $this->rulePool = $rulePool;
         $this->cache = $cache;
     }
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php
index 2a772aeea53f6425d69306c53024f98c4dbf1d4f..c9d0c3282859c00ecbf2224dc66a89adb85d7de9 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/Customization/AbstractFile.php
@@ -23,6 +23,8 @@
  */
 namespace Magento\Framework\View\Design\Theme\Customization;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Theme file service abstract class
  */
@@ -47,7 +49,7 @@ abstract class AbstractFile implements
     /**
      * File system
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -56,12 +58,12 @@ abstract class AbstractFile implements
      *
      * @param \Magento\Framework\View\Design\Theme\Customization\Path $customizationPath
      * @param \Magento\Framework\View\Design\Theme\FileFactory $fileFactory
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      */
     public function __construct(
         \Magento\Framework\View\Design\Theme\Customization\Path $customizationPath,
         \Magento\Framework\View\Design\Theme\FileFactory $fileFactory,
-        \Magento\Framework\App\Filesystem $filesystem
+        \Magento\Framework\Filesystem $filesystem
     ) {
         $this->_customizationPath = $customizationPath;
         $this->_fileFactory = $fileFactory;
@@ -221,6 +223,6 @@ abstract class AbstractFile implements
      */
     protected function getDirectoryWrite()
     {
-        return $this->_filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        return $this->_filesystem->getDirectoryWrite(DirectoryList::ROOT);
     }
 }
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/Customization/Path.php b/lib/internal/Magento/Framework/View/Design/Theme/Customization/Path.php
index d26ebcfb4344d9b9ad4556f2c17f2c3e8b2cdd9e..21bd8d8df7993bba4927997edd90e8115cce2c65 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/Customization/Path.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/Customization/Path.php
@@ -27,6 +27,8 @@
  */
 namespace Magento\Framework\View\Design\Theme\Customization;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
+
 /**
  * Theme Customization Path
  */
@@ -47,7 +49,7 @@ class Path
     /**
      * File system
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $filesystem;
 
@@ -68,17 +70,17 @@ class Path
     /**
      * Constructor
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param string $filename
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         $filename = \Magento\Framework\View\ConfigInterface::CONFIG_FILE_NAME
     ) {
         $this->filesystem = $filesystem;
         $this->filename = $filename;
-        $this->mediaDirectoryRead = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MEDIA_DIR);
-        $this->themeDirectoryRead = $this->filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::THEMES_DIR);
+        $this->mediaDirectoryRead = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA);
+        $this->themeDirectoryRead = $this->filesystem->getDirectoryRead(DirectoryList::THEMES);
     }
 
     /**
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/Image.php b/lib/internal/Magento/Framework/View/Design/Theme/Image.php
index dfd36776e0a4d083a86c2d6d870e3a3c5f84d9b9..327464e8437ae84f3f56abc5d8bc6adf5a286c60 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/Image.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/Image.php
@@ -23,11 +23,14 @@
  */
 namespace Magento\Framework\View\Design\Theme;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\Filesystem\Directory\WriteInterface;
 use Magento\Framework\View\Design\ThemeInterface;
 
 /**
  * Theme Image model class
+ *
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
  */
 class Image
 {
@@ -100,7 +103,7 @@ class Image
     /**
      * Initialize dependencies
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\Image\Factory $imageFactory
      * @param Image\Uploader $uploader
      * @param Image\PathInterface $themeImagePath
@@ -109,7 +112,7 @@ class Image
      * @param ThemeInterface $theme
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\Image\Factory $imageFactory,
         Image\Uploader $uploader,
         Image\PathInterface $themeImagePath,
@@ -117,8 +120,8 @@ class Image
         array $imageParams = array(self::PREVIEW_IMAGE_WIDTH, self::PREVIEW_IMAGE_HEIGHT),
         ThemeInterface $theme = null
     ) {
-        $this->mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::MEDIA_DIR);
-        $this->rootDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem::ROOT_DIR);
+        $this->mediaDirectory = $filesystem->getDirectoryWrite(DirectoryList::MEDIA);
+        $this->rootDirectory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
         $this->imageFactory = $imageFactory;
         $this->uploader = $uploader;
         $this->themeImagePath = $themeImagePath;
diff --git a/lib/internal/Magento/Framework/View/Design/Theme/Image/Uploader.php b/lib/internal/Magento/Framework/View/Design/Theme/Image/Uploader.php
index 0c33e6e27027e82553fd59a5f5388b73c661f04f..3bf72d26a0b9a587e97535ebfaba5c844a93fb6e 100644
--- a/lib/internal/Magento/Framework/View/Design/Theme/Image/Uploader.php
+++ b/lib/internal/Magento/Framework/View/Design/Theme/Image/Uploader.php
@@ -38,7 +38,7 @@ class Uploader
     /**
      * File system
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -59,12 +59,12 @@ class Uploader
     /**
      * Constructor
      *
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\HTTP\Adapter\FileTransferFactory $adapterFactory
      * @param \Magento\Framework\File\UploaderFactory $uploaderFactory
      */
     public function __construct(
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\HTTP\Adapter\FileTransferFactory $adapterFactory,
         \Magento\Framework\File\UploaderFactory $uploaderFactory
     ) {
diff --git a/lib/internal/Magento/Framework/View/Element/Template.php b/lib/internal/Magento/Framework/View/Element/Template.php
index 549aee5ab82af0135841c9dfedfa12e8d309b9de..a49b7624a3410458856c0b2080de9b1c4b6c6d84 100644
--- a/lib/internal/Magento/Framework/View/Element/Template.php
+++ b/lib/internal/Magento/Framework/View/Element/Template.php
@@ -23,7 +23,8 @@
  */
 namespace Magento\Framework\View\Element;
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 /**
  * Base html block
@@ -353,7 +354,7 @@ class Template extends AbstractBlock
     protected function getRootDirectory()
     {
         if (null === $this->directory) {
-            $this->directory = $this->_filesystem->getDirectoryRead(Filesystem::ROOT_DIR);
+            $this->directory = $this->_filesystem->getDirectoryRead(DirectoryList::ROOT);
         }
 
         return $this->directory;
@@ -367,7 +368,7 @@ class Template extends AbstractBlock
     protected function getMediaDirectory()
     {
         if (!$this->mediaDirectory) {
-            $this->mediaDirectory = $this->_filesystem->getDirectoryRead(Filesystem::MEDIA_DIR);
+            $this->mediaDirectory = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA);
         }
         return $this->mediaDirectory;
     }
@@ -387,8 +388,8 @@ class Template extends AbstractBlock
     {
         $fileName = str_replace('\\', '/', $fileName);
 
-        $themesDir = str_replace('\\', '/', $this->_filesystem->getPath(Filesystem::THEMES_DIR));
-        $appDir = str_replace('\\', '/', $this->_filesystem->getPath(Filesystem::APP_DIR));
+        $themesDir = $this->_filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath();
+        $appDir = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath();
         return ($this->isPathInDirectory(
             $fileName,
             $appDir
diff --git a/lib/internal/Magento/Framework/View/Element/Template/Context.php b/lib/internal/Magento/Framework/View/Element/Template/Context.php
index c7c344ff156a4758f47a24d88e09a407dcd19f66..5f4b1ca54992c0a0c77c73cb8b28615513a4e239 100644
--- a/lib/internal/Magento/Framework/View/Element/Template/Context.php
+++ b/lib/internal/Magento/Framework/View/Element/Template/Context.php
@@ -26,7 +26,7 @@ class Context extends \Magento\Framework\View\Element\Context
     /**
      * Filesystem instance
      *
-     * @var \Magento\Framework\App\Filesystem
+     * @var \Magento\Framework\Filesystem
      */
     protected $_filesystem;
 
@@ -82,7 +82,7 @@ class Context extends \Magento\Framework\View\Element\Context
      * @param \Magento\Framework\Filter\FilterManager $filterManager
      * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
      * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
-     * @param \Magento\Framework\App\Filesystem $filesystem
+     * @param \Magento\Framework\Filesystem $filesystem
      * @param \Magento\Framework\View\FileSystem $viewFileSystem
      * @param \Magento\Framework\View\TemplateEnginePool $enginePool
      * @param \Magento\Framework\App\State $appState
@@ -110,7 +110,7 @@ class Context extends \Magento\Framework\View\Element\Context
         \Magento\Framework\Filter\FilterManager $filterManager,
         \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
         \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
-        \Magento\Framework\App\Filesystem $filesystem,
+        \Magento\Framework\Filesystem $filesystem,
         \Magento\Framework\View\FileSystem $viewFileSystem,
         \Magento\Framework\View\TemplateEnginePool $enginePool,
         \Magento\Framework\App\State $appState,
@@ -150,7 +150,7 @@ class Context extends \Magento\Framework\View\Element\Context
     /**
      * Get filesystem instance
      *
-     * @return \Magento\Framework\App\Filesystem
+     * @return \Magento\Framework\Filesystem
      */
     public function getFilesystem()
     {
diff --git a/lib/internal/Magento/Framework/View/File/Collector/Base.php b/lib/internal/Magento/Framework/View/File/Collector/Base.php
index 0b75f079a9213f03cf158057f896de4938c25c2c..ed51fd1c566e3510881860c4698a9925c8f2ae21 100644
--- a/lib/internal/Magento/Framework/View/File/Collector/Base.php
+++ b/lib/internal/Magento/Framework/View/File/Collector/Base.php
@@ -23,9 +23,10 @@
  */
 namespace Magento\Framework\View\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\File\CollectorInterface;
 use Magento\Framework\View\Design\ThemeInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 use Magento\Framework\View\File\Factory;
 
@@ -67,7 +68,7 @@ class Base implements CollectorInterface
         Factory $fileFactory,
         $subDir = ''
     ) {
-        $this->modulesDirectory = $filesystem->getDirectoryRead(Filesystem::MODULES_DIR);
+        $this->modulesDirectory = $filesystem->getDirectoryRead(DirectoryList::MODULES);
         $this->fileFactory = $fileFactory;
         $this->subDir = $subDir ? $subDir . '/' : '';
     }
diff --git a/lib/internal/Magento/Framework/View/File/Collector/Override/Base.php b/lib/internal/Magento/Framework/View/File/Collector/Override/Base.php
index 6cad352478651c94b357e89828b04db96dd0edc9..7d85311a197c59a73d71138f0ab26abafc956c9b 100644
--- a/lib/internal/Magento/Framework/View/File/Collector/Override/Base.php
+++ b/lib/internal/Magento/Framework/View/File/Collector/Override/Base.php
@@ -24,9 +24,10 @@
 
 namespace Magento\Framework\View\File\Collector\Override;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\File\CollectorInterface;
 use Magento\Framework\View\Design\ThemeInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 use Magento\Framework\View\File\Factory;
 
@@ -66,7 +67,7 @@ class Base implements CollectorInterface
         Factory $fileFactory,
         $subDir = ''
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
+        $this->themesDirectory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
         $this->fileFactory = $fileFactory;
         $this->subDir = $subDir ? $subDir . '/' : '';
     }
diff --git a/lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php b/lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php
index 403c259c84ba17d5b628e1d76761568d1f9fc524..620ee923b4d2e45a58fd508e09a2081da29d1ac3 100644
--- a/lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php
+++ b/lib/internal/Magento/Framework/View/File/Collector/Override/ThemeModular.php
@@ -24,9 +24,10 @@
 
 namespace Magento\Framework\View\File\Collector\Override;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\File\CollectorInterface;
 use Magento\Framework\View\Design\ThemeInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 use Magento\Framework\View\File\Factory;
 use Magento\Framework\Exception;
@@ -67,7 +68,7 @@ class ThemeModular implements CollectorInterface
         Factory $fileFactory,
         $subDir = ''
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
+        $this->themesDirectory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
         $this->fileFactory = $fileFactory;
         $this->subDir = $subDir ? $subDir . '/' : '';
     }
diff --git a/lib/internal/Magento/Framework/View/File/Collector/Theme.php b/lib/internal/Magento/Framework/View/File/Collector/Theme.php
index b8ac9c03325f8a3ee3fb7f02217a78c03a61ec7e..917686ecf15a53406c8ddc7c5d5cdcfe73230692 100644
--- a/lib/internal/Magento/Framework/View/File/Collector/Theme.php
+++ b/lib/internal/Magento/Framework/View/File/Collector/Theme.php
@@ -23,9 +23,10 @@
  */
 namespace Magento\Framework\View\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\File\CollectorInterface;
 use Magento\Framework\View\Design\ThemeInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 use Magento\Framework\View\File\Factory;
 
@@ -65,7 +66,7 @@ class Theme implements CollectorInterface
         Factory $fileFactory,
         $subDir = ''
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
+        $this->themesDirectory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
         $this->fileFactory = $fileFactory;
         $this->subDir = $subDir ? $subDir . '/' : '';
     }
diff --git a/lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php b/lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php
index b7272c78b4b96785a3cc38689c81153cc9fa13e0..39a8ceae483241ea1932d052c9e219627efedb9b 100644
--- a/lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php
+++ b/lib/internal/Magento/Framework/View/File/Collector/ThemeModular.php
@@ -24,9 +24,10 @@
 
 namespace Magento\Framework\View\File\Collector;
 
+use Magento\Framework\App\Filesystem\DirectoryList;
 use Magento\Framework\View\File\CollectorInterface;
 use Magento\Framework\View\Design\ThemeInterface;
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Framework\Filesystem\Directory\ReadInterface;
 use Magento\Framework\View\File\Factory;
 
@@ -66,7 +67,7 @@ class ThemeModular implements CollectorInterface
         Factory $fileFactory,
         $subDir = ''
     ) {
-        $this->themesDirectory = $filesystem->getDirectoryRead(Filesystem::THEMES_DIR);
+        $this->themesDirectory = $filesystem->getDirectoryRead(DirectoryList::THEMES);
         $this->fileFactory = $fileFactory;
         $this->subDir = $subDir ? $subDir . '/' : '';
     }
diff --git a/lib/internal/Magento/Framework/composer.json b/lib/internal/Magento/Framework/composer.json
index 24101895903239ecd46d5331ea566bf80aa6da66..27e1482ca9b907003470d7ff6bf965ca30204ec8 100644
--- a/lib/internal/Magento/Framework/composer.json
+++ b/lib/internal/Magento/Framework/composer.json
@@ -2,7 +2,7 @@
     "name": "magento/framework",
     "description": "N/A",
     "type": "magento2-library",
-    "version": "0.1.0-alpha100",
+    "version": "0.1.0-alpha101",
     "require": {
         "php": "~5.4.11|~5.5.0",
         "ext-spl": "*",
diff --git a/pub/errors/processorFactory.php b/pub/errors/processorFactory.php
index 290fafb42d5c3262e496a40baadd7ed646c138e5..abd81b8e77991cd4988b407557e4e89170911077 100644
--- a/pub/errors/processorFactory.php
+++ b/pub/errors/processorFactory.php
@@ -38,9 +38,9 @@ class ProcessorFactory
      */
     public function createProcessor()
     {
-        $locatorFactory = new \Magento\Framework\App\ObjectManagerFactory();
-        $locator = $locatorFactory->create(BP, $_SERVER);
-        $response = $locator->create('\Magento\Framework\App\Response\Http');
+        $objectManagerFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, $_SERVER);
+        $objectManager = $objectManagerFactory->create($_SERVER);
+        $response = $objectManager->create('\Magento\Framework\App\Response\Http');
         return new Processor($response);
     }
 }
diff --git a/pub/index.php b/pub/index.php
index a140566bbe18d86c5a6c127fc78b4913fa91d9bb..ae3315441076147edbd072c32f06d7320b33e54e 100644
--- a/pub/index.php
+++ b/pub/index.php
@@ -24,15 +24,16 @@
  * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
  */
 
-use Magento\Framework\App\Filesystem;
+use Magento\Framework\App\Bootstrap;
+use Magento\Framework\App\Filesystem\DirectoryList;
 
 require __DIR__ . '/../app/bootstrap.php';
 $params = $_SERVER;
-$params[Filesystem::PARAM_APP_DIRS] = [
-    Filesystem::PUB_DIR => ['uri' => ''],
-    Filesystem::MEDIA_DIR => ['uri' => 'media'],
-    Filesystem::STATIC_VIEW_DIR => ['uri' => 'static'],
-    Filesystem::UPLOAD_DIR => ['uri' => 'media/upload'],
+$params[Bootstrap::INIT_PARAM_FILESYSTEM_DIR_PATHS] = [
+    DirectoryList::PUB => [DirectoryList::URL_PATH => ''],
+    DirectoryList::MEDIA => [DirectoryList::URL_PATH => 'media'],
+    DirectoryList::STATIC_VIEW => [DirectoryList::URL_PATH => 'static'],
+    DirectoryList::UPLOAD => [DirectoryList::URL_PATH => 'media/upload'],
 ];
 $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
 /** @var \Magento\Framework\App\Http $app */
diff --git a/setup/composer.json b/setup/composer.json
index 0de23fc2c2fcd7d1d98a4b4b302dd17614f8d834..887e92408ea8421dd60e4e8014ae0be7c0a695e1 100644
--- a/setup/composer.json
+++ b/setup/composer.json
@@ -3,7 +3,7 @@
     "version": "0.1.0",
     "require": {
         "zendframework/zendframework": "2.3.1",
-        "composer/composer": "1.0.*@dev"
+        "composer/composer": "1.0.0-alpha8"
     },
     "require-dev": {
         "phpunit/phpunit": "4.1.*",
diff --git a/setup/config/application.config.php b/setup/config/application.config.php
index 46e588b0b70b0d805c8547add0eef7bb57a54caf..e60400759ecccfbaa64a0a1780d82a063a96adbb 100644
--- a/setup/config/application.config.php
+++ b/setup/config/application.config.php
@@ -25,7 +25,6 @@
 return [
     'modules' => [
         'Magento\Config',
-        'Magento\Filesystem',
         'Magento\Setup',
     ],
     'module_listener_options' => [
diff --git a/setup/config/autoload/global.php b/setup/config/autoload/global.php
index 25c82bad048642a8f880e69da20e115230f0d7a9..54e90d7edb2ef6faee1882658543bbc31f4b6c23 100644
--- a/setup/config/autoload/global.php
+++ b/setup/config/autoload/global.php
@@ -33,12 +33,6 @@ return [
                 'module' => '/app/code/',
                 'config' => '/app/etc/',
                 'framework' => '/lib/internal/Magento/Framework/',
-                'permissions' => [
-                    'etc' => ['path' => 'app/etc'], // this is needed for installation only
-                    'var' => ['path' => 'var'], // to set maintenance mode, as well as for normal application runtime
-                    'media' => ['path' => 'pub/media'], // for normal application runtime
-                    'static' => ['path' => 'pub/static'] // for runtime, but actually depends on mode
-                ],
             ],
         ],
     ],
diff --git a/setup/module/Magento/Config/src/Config.php b/setup/module/Magento/Config/src/Config.php
index 4ff55abc4af3ac75b70adbe4bb08a3cb1791481a..326071a1216063ad8a709ebafd20a6ccc93ebbd6 100644
--- a/setup/module/Magento/Config/src/Config.php
+++ b/setup/module/Magento/Config/src/Config.php
@@ -92,16 +92,6 @@ class Config extends ZendConfig
         return $this->magento->filesystem->module;
     }
 
-    /**
-     * Retrieve the list of Magento file permissions
-     *
-     * @return mixed
-     */
-    public function getMagentoFilePermissions()
-    {
-        return $this->magento->filesystem->permissions;
-    }
-
     /**
      * Retrieve path to Magento config directory
      *
diff --git a/setup/module/Magento/Filesystem/src/Directory/Read.php b/setup/module/Magento/Filesystem/src/Directory/Read.php
deleted file mode 100644
index 84cd7a198b4482af2abc68f539f3cf83f3011880..0000000000000000000000000000000000000000
--- a/setup/module/Magento/Filesystem/src/Directory/Read.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
- */
-namespace Magento\Filesystem\Directory;
-
-use Magento\Filesystem\Driver\DriverInterface;
-use Magento\Filesystem\FilesystemException;
-
-class Read implements ReadInterface
-{
-    /**
-     * Directory path
-     *
-     * @var string
-     */
-    protected $path;
-
-    /**
-     * Filesystem driver
-     *
-     * @var \Magento\Filesystem\Driver\DriverInterface
-     */
-    protected $driver;
-
-    /**
-     * @param DriverInterface $driver
-     * @param array $config
-     */
-    public function __construct(
-        DriverInterface $driver,
-        array $config
-    ) {
-        $this->driver = $driver;
-        $this->setProperties($config);
-    }
-
-    /**
-     * Set properties from config
-     *
-     * @param array $config
-     * @return void
-     * @throws FilesystemException
-     */
-    protected function setProperties(array $config)
-    {
-        if (!empty($config['path'])) {
-            $this->path = rtrim(str_replace('\\', '/', $config['path']), '/') . '/';
-        }
-    }
-
-    /**
-     * Retrieves absolute path
-     * E.g.: /var/www/application/file.txt
-     *
-     * @param string $path
-     * @return string
-     */
-    public function getAbsolutePath($path = null)
-    {
-        return $this->driver->getAbsolutePath($this->path, $path);
-    }
-
-    /**
-     * Check a file or directory exists
-     *
-     * @param string $path [optional]
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isExist($path = null)
-    {
-        return $this->driver->isExists($this->driver->getAbsolutePath($this->path, $path));
-    }
-
-    /**
-     * Check permissions for reading file or directory
-     *
-     * @param string $path
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isReadable($path = null)
-    {
-        return $this->driver->isReadable($this->driver->getAbsolutePath($this->path, $path));
-    }
-
-    /**
-     * Check whether given path is directory
-     *
-     * @param string $path
-     * @return bool
-     */
-    public function isDirectory($path = null)
-    {
-        return $this->driver->isDirectory($this->driver->getAbsolutePath($this->path, $path));
-    }
-
-    /**
-     * Retrieve file contents from given path
-     *
-     * @param string $path
-     * @param string|null $flag
-     * @param resource|null $context
-     * @return string
-     * @throws FilesystemException
-     */
-    public function readFile($path, $flag = null, $context = null)
-    {
-        clearstatcache();
-        $result = @file_get_contents($this->getAbsolutePath($path), $flag, $context);
-        if (false === $result) {
-            throw new FilesystemException(
-                sprintf('Cannot read contents from file "%s"', $path)
-            );
-        }
-        return $result;
-    }
-}
diff --git a/setup/module/Magento/Filesystem/src/Directory/Write.php b/setup/module/Magento/Filesystem/src/Directory/Write.php
deleted file mode 100644
index 593a128f789c81e812fd0af56bf006a0d1dc13a7..0000000000000000000000000000000000000000
--- a/setup/module/Magento/Filesystem/src/Directory/Write.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.
- *
- * @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\Directory;
-
-use Magento\Filesystem\FilesystemException;
-
-class Write extends Read implements WriteInterface
-{
-    /**
-     * Check if given path is writable
-     *
-     * @param null $path
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isWritable($path = null)
-    {
-        return $this->driver->isWritable($this->driver->getAbsolutePath($this->path, $path));
-    }
-
-    /**
-     * Change permissions of given path
-     *
-     * @param string $path
-     * @param int $permissions
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function changePermissions($path, $permissions)
-    {
-        $absolutePath = $this->driver->getAbsolutePath($this->path, $path);
-        return $this->driver->changePermissions($absolutePath, $permissions);
-    }
-
-    /**
-     * Write contents to file in given mode
-     *
-     * @param string $path
-     * @param string $content
-     * @param string|null $mode
-     * @return int The number of bytes that were written.
-     * @throws FilesystemException
-     */
-    public function writeFile($path, $content, $mode = 'w+')
-    {
-        $result = @file_put_contents($this->getAbsolutePath($path), $content, $mode);
-        if (!$result) {
-            throw new FilesystemException(
-                sprintf('The specified "%s" file could not be written', $this->getAbsolutePath($path))
-            );
-        }
-        return $result;
-    }
-}
diff --git a/setup/module/Magento/Filesystem/src/DirectoryList.php b/setup/module/Magento/Filesystem/src/DirectoryList.php
deleted file mode 100644
index fec504358fc74175d50aeaf261b157db8f77de09..0000000000000000000000000000000000000000
--- a/setup/module/Magento/Filesystem/src/DirectoryList.php
+++ /dev/null
@@ -1,118 +0,0 @@
-<?php
-/**
- * Application file system directories dictionary
- *
- * Provides information about what directories are available in the application
- * Serves as customizaiton point to specify different directories or add own
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in 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\Filesystem;
-
-use Magento\Config\ConfigFactory;
-
-class DirectoryList
-{
-    /**
-     * @var ConfigFactory
-     */
-    protected $configFactory;
-
-    /**
-     * @var \Magento\Config\Config
-     */
-    protected $config;
-
-    /**
-     * @var string
-     */
-    protected $root;
-
-    /**
-     * @param ConfigFactory $configFactory
-     */
-    public function __construct(ConfigFactory $configFactory)
-    {
-        $this->configFactory = $configFactory;
-        $this->config = $this->configFactory->create();
-
-        $this->root = str_replace('\\', '/', $this->config->getMagentoBasePath());
-
-        foreach ($this->config->getMagentoFilePermissions() as $code => $config) {
-            if (!$this->isAbsolute($config['path'])) {
-                $this->directories[$code]['path'] = $this->makeAbsolute($config['path']);
-            }
-        }
-    }
-
-    /**
-     * Add root dir for relative path
-     *
-     * @param string $path
-     * @return string
-     */
-    protected function makeAbsolute($path)
-    {
-        if ($path === null) {
-            $result = '';
-        } else {
-            $result = $this->root;
-            if (!empty($path)) {
-                $result .= '/' . $path;
-            }
-        }
-        return $result;
-    }
-
-    /**
-     * Verify if path is absolute
-     *
-     * @param string $path
-     * @return bool
-     */
-    protected function isAbsolute($path)
-    {
-        $path = strtr($path, '\\', '/');
-        $isUnixRoot = strpos($path, '/') === 0;
-        $isWindowsRoot = preg_match('#^\w{1}:/#', $path);
-        $isWindowsLetter = parse_url($path, PHP_URL_SCHEME) !== null;
-
-        return $isUnixRoot || $isWindowsRoot || $isWindowsLetter;
-    }
-
-    /**
-     * Get configuration for directory code
-     *
-     * @param string $code
-     * @return array
-     * @throws FilesystemException
-     */
-    public function getConfig($code)
-    {
-        if (!isset($this->directories[$code])) {
-            throw new FilesystemException(
-                sprintf('The "%s" directory is not specified in configuration', $code)
-            );
-        }
-        return $this->directories[$code];
-    }
-}
diff --git a/setup/module/Magento/Filesystem/src/Driver/DriverInterface.php b/setup/module/Magento/Filesystem/src/Driver/DriverInterface.php
deleted file mode 100644
index 6844896369617219bda4218f676cb7bb862dcff2..0000000000000000000000000000000000000000
--- a/setup/module/Magento/Filesystem/src/Driver/DriverInterface.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-/**
- * Interface of Magento filesystem driver
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in 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\Filesystem\Driver;
-
-/**
- * Class Driver
- */
-interface DriverInterface
-{
-    /**
-     * @param string $path
-     * @return bool
-     * @throws \Magento\Filesystem\FilesystemException
-     */
-    public function isExists($path);
-
-    /**
-     * Check permissions for reading file or directory
-     *
-     * @param string $path
-     * @return bool
-     * @throws \Magento\Filesystem\FilesystemException
-     */
-    public function isReadable($path);
-
-    /**
-     * Tells whether the filename is a regular directory
-     *
-     * @param string $path
-     * @return bool
-     * @throws \Magento\Filesystem\FilesystemException
-     */
-    public function isDirectory($path);
-
-    /**
-     * Check if given path is writable
-     *
-     * @param string $path
-     * @return bool
-     * @throws \Magento\Filesystem\FilesystemException
-     */
-    public function isWritable($path);
-
-    /**
-     * @param string $basePath
-     * @param string $path
-     * @return mixed
-     */
-    public function getAbsolutePath($basePath, $path);
-
-    /**
-     * Change permissions of given path
-     *
-     * @param string $path
-     * @param int $permissions
-     * @return bool
-     */
-    public function changePermissions($path, $permissions);
-}
diff --git a/setup/module/Magento/Filesystem/src/Driver/File.php b/setup/module/Magento/Filesystem/src/Driver/File.php
deleted file mode 100644
index 0221aa567c339cdc4df93e0ddfaf45b159090e55..0000000000000000000000000000000000000000
--- a/setup/module/Magento/Filesystem/src/Driver/File.php
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-/**
- * Origin filesystem driver
- *
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in 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\Filesystem\Driver;
-
-use Magento\Filesystem\FilesystemException;
-
-class File implements DriverInterface
-{
-    /**
-     * Returns last warning message string
-     *
-     * @return string
-     */
-    protected function getWarningMessage()
-    {
-        $warning = error_get_last();
-        if ($warning && $warning['type'] == E_WARNING) {
-            return 'Warning!' . $warning['message'];
-        }
-        return null;
-    }
-
-    /**
-     * Is file or directory exist in file system
-     *
-     * @param string $path
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isExists($path)
-    {
-        clearstatcache();
-        $result = @file_exists($path);
-        if ($result === null) {
-            throw new FilesystemException(
-                sprintf('Error occurred during execution %s', $this->getWarningMessage())
-            );
-        }
-        return $result;
-    }
-
-    /**
-     * Check permissions for reading file or directory
-     *
-     * @param string $path
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isReadable($path)
-    {
-        clearstatcache();
-        $result = @is_readable($path);
-        if ($result === null) {
-            throw new FilesystemException(
-                sprintf('Error occurred during execution %s', $this->getWarningMessage())
-            );
-        }
-        return $result;
-    }
-
-    /**
-     * Tells whether the filename is a regular directory
-     *
-     * @param string $path
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isDirectory($path)
-    {
-        clearstatcache();
-        $result = @is_dir($path);
-        if ($result === null) {
-            throw new FilesystemException(
-                sprintf('Error occurred during execution %s', $this->getWarningMessage())
-            );
-        }
-        return $result;
-    }
-
-    /**
-     * Check if given path is writable
-     *
-     * @param string $path
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function isWritable($path)
-    {
-        clearstatcache();
-        $result = @is_writable($path);
-        if ($result === null) {
-            throw new FilesystemException(
-                sprintf('Error occurred during execution %s', $this->getWarningMessage())
-            );
-        }
-        return $result;
-    }
-
-    /**
-     * @param string $basePath
-     * @param string $path
-     * @return string
-     */
-    public function getAbsolutePath($basePath, $path)
-    {
-        return $basePath . ltrim($this->fixSeparator($path), '/');
-    }
-
-    /**
-     * Fixes path separator
-     * Utility method.
-     *
-     * @param string $path
-     * @return string
-     */
-    protected function fixSeparator($path)
-    {
-        return str_replace('\\', '/', $path);
-    }
-
-    /**
-     * Change permissions of given path
-     *
-     * @param string $path
-     * @param int $permissions
-     * @return bool
-     * @throws FilesystemException
-     */
-    public function changePermissions($path, $permissions)
-    {
-        $result = @chmod($path, $permissions);
-        if (!$result) {
-            throw new FilesystemException(
-                sprintf('Cannot change permissions for path "%s" %s', $path, $this->getWarningMessage())
-            );
-        }
-        return $result;
-    }
-}
diff --git a/setup/module/Magento/Filesystem/src/Filesystem.php b/setup/module/Magento/Filesystem/src/Filesystem.php
deleted file mode 100644
index 3d4b51c0e1acfc8ac3c9224215d132bdc098494d..0000000000000000000000000000000000000000
--- a/setup/module/Magento/Filesystem/src/Filesystem.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-/**
- * Magento 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\Filesystem;
-
-use Magento\Filesystem\Directory\ReadFactory;
-use Magento\Filesystem\Directory\ReadInterface;
-use Magento\Filesystem\Directory\WriteFactory;
-use Magento\Filesystem\Directory\WriteInterface;
-
-class Filesystem
-{
-    /**
-     * @var DirectoryList
-     */
-    protected $directoryList;
-
-    /**
-     * @var ReadFactory
-     */
-    protected $readFactory;
-
-    /**
-     * @var WriteFactory
-     */
-    protected $writeFactory;
-
-    /**
-     * @var ReadInterface[]
-     */
-    protected $readInstances = array();
-
-    /**
-     * @var WriteInterface[]
-     */
-    protected $writeInstances = array();
-
-    /**
-     * @param DirectoryList $directoryList
-     * @param ReadFactory $readFactory
-     * @param WriteFactory $writeFactory
-     */
-    public function __construct(
-        DirectoryList $directoryList,
-        ReadFactory $readFactory,
-        WriteFactory $writeFactory
-    ) {
-        $this->directoryList = $directoryList;
-        $this->readFactory = $readFactory;
-        $this->writeFactory = $writeFactory;
-    }
-
-    /**
-     * Create an instance of directory with write permissions
-     *
-     * @param string $code
-     * @return ReadInterface
-     */
-    public function getDirectoryRead($code)
-    {
-        if (!array_key_exists($code, $this->readInstances)) {
-            $config = $this->directoryList->getConfig($code);
-            $this->readInstances[$code] = $this->readFactory->create($config);
-        }
-        return $this->readInstances[$code];
-    }
-
-    /**
-     * Create an instance of directory with read permissions
-     *
-     * @param string $code
-     * @return WriteInterface
-     * @throws \Magento\Filesystem\FilesystemException
-     */
-    public function getDirectoryWrite($code)
-    {
-        if (!array_key_exists($code, $this->writeInstances)) {
-            $config = $this->directoryList->getConfig($code);
-            $this->writeInstances[$code] = $this->writeFactory->create($config);
-        }
-        return $this->writeInstances[$code];
-    }
-}
diff --git a/setup/module/Magento/Setup/src/Controller/ConsoleController.php b/setup/module/Magento/Setup/src/Controller/ConsoleController.php
index 4bc41436f3ed613031a234e612e3b288d8de6604..696d3b4e566d869986e1840a5a0d095da28e7927 100644
--- a/setup/module/Magento/Setup/src/Controller/ConsoleController.php
+++ b/setup/module/Magento/Setup/src/Controller/ConsoleController.php
@@ -78,7 +78,7 @@ class ConsoleController extends AbstractActionController
         self::CMD_INSTALL_DATA => 'installData',
         self::CMD_INSTALL_USER_CONFIG => 'installUserConfig',
         self::CMD_INSTALL_ADMIN_USER => 'installAdminUser',
-        self::CMD_UPDATE => 'updateAction',
+        self::CMD_UPDATE => 'update',
     ];
 
     /**
@@ -304,6 +304,7 @@ class ConsoleController extends AbstractActionController
      */
     public function installDeploymentConfigAction()
     {
+        $this->installer->checkInstallationFilePermissions();
         /** @var \Zend\Console\Request $request */
         $request = $this->getRequest();
         $this->installer->installDeploymentConfig($request->getParams());
@@ -328,6 +329,7 @@ class ConsoleController extends AbstractActionController
      */
     public function installDataAction()
     {
+        $this->installer->checkInstallationFilePermissions();
         $this->installer->installDataFixtures();
     }
 
@@ -339,6 +341,7 @@ class ConsoleController extends AbstractActionController
      */
     public function updateAction()
     {
+        $this->installer->checkInstallationFilePermissions();
         $this->installer->installSchema();
         $this->installer->installDataFixtures();
     }
diff --git a/setup/module/Magento/Setup/src/Controller/Data/FilePermissionsController.php b/setup/module/Magento/Setup/src/Controller/Data/FilePermissionsController.php
index 6135ab9765ca050589a6bcc69c1d44d471a91d38..79933d7982375d306f11dcbbc822403eca7fc88c 100644
--- a/setup/module/Magento/Setup/src/Controller/Data/FilePermissionsController.php
+++ b/setup/module/Magento/Setup/src/Controller/Data/FilePermissionsController.php
@@ -57,15 +57,15 @@ class FilePermissionsController extends AbstractActionController
     public function indexAction()
     {
         $responseType = ResponseTypeInterface::RESPONSE_TYPE_SUCCESS;
-        if ($this->permissions->checkPermission()) {
+        if ($this->permissions->getMissingWritableDirectoriesForInstallation()) {
             $responseType = ResponseTypeInterface::RESPONSE_TYPE_ERROR;
         }
 
         $data = [
             'responseType' => $responseType,
             'data' => [
-                'required' => $this->permissions->getRequired(),
-                'current' => $this->permissions->getCurrent(),
+                'required' => $this->permissions->getInstallationWritableDirectories(),
+                'current' => $this->permissions->getInstallationCurrentWritableDirectories(),
             ],
         ];
 
diff --git a/setup/module/Magento/Setup/src/Controller/Install/StartController.php b/setup/module/Magento/Setup/src/Controller/Install/StartController.php
index 6a2fab062c636dfab3b369509fd7cc33d9c7ef6e..ee3c10a6a448dea474dffa729d01bdc3012572e9 100644
--- a/setup/module/Magento/Setup/src/Controller/Install/StartController.php
+++ b/setup/module/Magento/Setup/src/Controller/Install/StartController.php
@@ -104,6 +104,7 @@ class StartController extends AbstractActionController
             $config->loadFromFile();
             $this->json->setVariable('key', $config->get(Config::KEY_ENCRYPTION_KEY));
             $this->json->setVariable('success', true);
+            $this->json->setVariable('messages', $this->installer->getMessages());
         } catch(\Exception $e) {
             $this->log->logError($e);
             $this->json->setVariable('success', false);
diff --git a/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php b/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php
index 75d6f635fed0e97b9d8bf69397f121be17458ffa..2fcc49bb11cdf583dbdc29fe722ac4863ec0e476 100644
--- a/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php
+++ b/setup/module/Magento/Setup/src/Framework/DB/Adapter/Pdo/Mysql.php
@@ -23,7 +23,7 @@
  */
 namespace Magento\Setup\Framework\DB\Adapter\Pdo;
 
-use Magento\Filesystem\Filesystem;
+use Magento\Framework\Filesystem;
 use Magento\Setup\Framework\DB\Adapter\AdapterInterface;
 use Magento\Setup\Framework\DB\Ddl\Table;
 use \Magento\Framework\DB\ExpressionConverter;
@@ -39,6 +39,7 @@ use Zend\Db\Adapter\Profiler;
 use Zend\Db\ResultSet;
 use Zend\Db\Sql\Expression;
 use Zend\Db\Sql\Sql;
+use Magento\Setup\Model\FilesystemFactory;
 
 class Mysql extends Adapter implements AdapterInterface
 {
@@ -183,16 +184,18 @@ class Mysql extends Adapter implements AdapterInterface
      * @param Platform\PlatformInterface $platform
      * @param ResultSet\ResultSetInterface $queryResultPrototype
      * @param Profiler\ProfilerInterface $profiler
-     * @param Filesystem $filesystem
+     * @param FilesystemFactory $filesystemFactory
      */
     public function __construct(
         $driver,
         Platform\PlatformInterface $platform = null,
         ResultSet\ResultSetInterface $queryResultPrototype = null,
         Profiler\ProfilerInterface $profiler = null,
-        Filesystem $filesystem = null
+        FilesystemFactory $filesystemFactory = null
     ) {
-        $this->_filesystem = $filesystem;
+        if ($filesystemFactory !== null) {
+            $this->_filesystem = $filesystemFactory->create();
+        }
         parent::__construct($driver, $platform, $queryResultPrototype, $profiler);
     }
 
diff --git a/setup/module/Magento/Setup/src/Model/AdminAccount.php b/setup/module/Magento/Setup/src/Model/AdminAccount.php
index d67c3b38138ce8957e99bd350d652d53bb5eb0ae..a7640ae756dbbc8c4aff2cffea7d1d3ff0993369 100644
--- a/setup/module/Magento/Setup/src/Model/AdminAccount.php
+++ b/setup/module/Magento/Setup/src/Model/AdminAccount.php
@@ -26,6 +26,9 @@ namespace Magento\Setup\Model;
 
 use Magento\Framework\Math\Random;
 use Magento\Setup\Module\Setup;
+use Magento\Authorization\Model\Acl\Role\User;
+use Magento\Authorization\Model\Acl\Role\Group;
+use Magento\Authorization\Model\UserContextInterface;
 
 class AdminAccount
 {
@@ -86,53 +89,150 @@ class AdminAccount
     }
 
     /**
-     * Save administrator account to DB
+     * Save administrator account and user role to DB.
+     *
+     * If the administrator account exists, update it.
      *
      * @return void
      */
     public function save()
+    {
+        $adminId = $this->saveAdminUser();
+        $this->saveAdminUserRole($adminId);
+    }
+
+    /**
+     * Uses the information in data[] to create the admin user.
+     *
+     * If the username already exists, it will update the record with information from data[]
+     * and set the is_active flag.
+     *
+     * @return int The admin user id
+     */
+    private function saveAdminUser()
     {
         $adminData = [
             'firstname' => $this->data[self::KEY_FIRST_NAME],
-            'lastname' => $this->data[self::KEY_LAST_NAME],
-            'username' => $this->data[self::KEY_USERNAME],
-            'password' => $this->generatePassword(),
-            'email' => $this->data[self::KEY_EMAIL],
-            'created' => date('Y-m-d H:i:s'),
-            'modified' => date('Y-m-d H:i:s'),
-            'extra' => serialize(null),
+            'lastname'  => $this->data[self::KEY_LAST_NAME],
+            'password'  => $this->generatePassword(),
             'is_active' => 1,
         ];
-        $this->setup->getConnection()->insert(
-            $this->setup->getTable('admin_user'),
-            $adminData,
-            true
+        $resultSet = $this->setup->getConnection()->query(
+            'SELECT user_id, username, email FROM ' . $this->setup->getTable('admin_user') . ' ' .
+            'WHERE username = :username OR email = :email',
+            ['username' => $this->data[self::KEY_USERNAME], 'email' => $this->data[self::KEY_EMAIL]]
         );
-        $adminId = $this->setup->getConnection()->getDriver()->getLastGeneratedValue();
 
-        $roles = [
-            0 => [
-                'parent_id' => 0,
-                'tree_level' => 1,
-                'sort_order' => 1,
-                'role_type' => 'G',
-                'user_id' => 0,
-                'user_type' => 2,
-                'role_name' => 'Administrators',
-            ],
-            1 => [
-                'parent_id' => 1,
+        if ($resultSet->count() > 0) {
+            // User exists, update
+            $this->validateUserMatches($resultSet->current()->username, $resultSet->current()->email);
+            $adminId = $resultSet->current()->user_id;
+            $adminData['modified'] = date('Y-m-d H:i:s');
+            $this->setup->getConnection()->update(
+                $this->setup->getTable('admin_user'),
+                $adminData,
+                $this->setup->getConnection()->quoteInto('username = ?', $this->data[self::KEY_USERNAME])
+            );
+        } else {
+            // User does not exist, create it
+            $adminData['username'] = $this->data[self::KEY_USERNAME];
+            $adminData['email'] = $this->data[self::KEY_EMAIL];
+            $adminData['extra'] = serialize(null);
+            $this->setup->getConnection()->insert(
+                $this->setup->getTable('admin_user'),
+                $adminData
+            );
+            $adminId = $this->setup->getConnection()->getDriver()->getLastGeneratedValue();
+        }
+        return $adminId;
+    }
+
+    /**
+     * Validates that the username and email both match the user.
+     *
+     * @param string $username Existing user's username
+     * @param string $email Existing user's email
+     * @return void
+     * @throws \Exception If the username and email do not both match data provided to install
+     */
+    private function validateUserMatches($username, $email)
+    {
+        if ((strcasecmp($email, $this->data[self::KEY_EMAIL]) == 0) &&
+            (strcasecmp($username, $this->data[self::KEY_USERNAME]) != 0)) {
+            // email matched but username did not
+            throw new \Exception(
+                'An existing user has the given email but different username. ' . self::KEY_USERNAME .
+                ' and '. self::KEY_EMAIL . ' both need to match an existing user or both be new.'
+            );
+        }
+        if ((strcasecmp($username, $this->data[self::KEY_USERNAME]) == 0) &&
+            (strcasecmp($email, $this->data[self::KEY_EMAIL]) != 0)) {
+            // username matched but email did not
+            throw new \Exception(
+                'An existing user has the given username but different email. ' . self::KEY_USERNAME .
+                ' and '. self::KEY_EMAIL . ' both need to match an existing user or both be new.'
+            );
+        }
+    }
+
+    /**
+     * Creates the admin user role if one does not exist.
+     *
+     * Do nothing if a role already exists for this user
+     *
+     * @param int $adminId User id of administrator to set role for
+     * @return void
+     */
+    private function saveAdminUserRole($adminId)
+    {
+        $resultSet = $this->setup->getConnection()->query(
+            'SELECT * FROM ' . $this->setup->getTable('authorization_role') . ' ' .
+            'WHERE user_id = :user_id',
+            ['user_id' => $adminId]
+        );
+        if ($resultSet->count() < 1) {
+            // No user role exists for this user id, create it
+            $adminRoleData = [
+                'parent_id'  => $this->retrieveAdministratorsRoleId(),
                 'tree_level' => 2,
-                'sort_order' => 0,
-                'role_type' => 'U',
-                'user_id' => $adminId,
-                'user_type' => 2,
-                'role_name' => $this->data[self::KEY_USERNAME],
-            ]
+                'role_type'  => User::ROLE_TYPE,
+                'user_id'    => $adminId,
+                'user_type'  => UserContextInterface::USER_TYPE_ADMIN,
+                'role_name'  => $this->data[self::KEY_USERNAME],
+            ];
+            $this->setup->getConnection()->insert($this->setup->getTable('authorization_role'), $adminRoleData);
+        }
+    }
+
+    /**
+     * Gets the "Administrators" role id, the special role created by data fixture in Authorization module.
+     *
+     * @return int The id of the Administrators role
+     * @throws \Exception If Administrators role not found or problem connecting with database.
+     */
+    private function retrieveAdministratorsRoleId()
+    {
+        // Get Administrators role id to use as parent_id
+        $administratorsRoleData = [
+            'parent_id'  => 0,
+            'tree_level' => 1,
+            'role_type' => Group::ROLE_TYPE,
+            'user_id' => 0,
+            'user_type' => UserContextInterface::USER_TYPE_ADMIN,
+            'role_name' => 'Administrators'
         ];
 
-        foreach ($roles as $role) {
-            $this->setup->getConnection()->insert($this->setup->getTable('authorization_role'), $role, true);
+        $resultSet = $this->setup->getConnection()->query(
+            'SELECT * FROM ' . $this->setup->getTable('authorization_role') . ' ' .
+            'WHERE parent_id = :parent_id AND tree_level = :tree_level AND role_type = :role_type AND ' .
+            'user_id = :user_id AND user_type = :user_type AND role_name = :role_name',
+            $administratorsRoleData
+        );
+        if ($resultSet->count() < 1) {
+            throw new \Exception('No Administrators role was found, data fixture needs to be run');
+        } else {
+            // Found at least one, use first
+            return $resultSet->current()->role_id;
         }
     }
 }
diff --git a/setup/module/Magento/Setup/src/Model/DirectoryListFactory.php b/setup/module/Magento/Setup/src/Model/DirectoryListFactory.php
new file mode 100644
index 0000000000000000000000000000000000000000..395253e50d726294987068299587e8d1ad5cb1a2
--- /dev/null
+++ b/setup/module/Magento/Setup/src/Model/DirectoryListFactory.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\Setup\Model;
+
+use Zend\ServiceManager\ServiceLocatorInterface;
+use Magento\Config\Config;
+use Magento\Config\ConfigFactory;
+use Magento\Framework\App\Filesystem\DirectoryList;
+
+class DirectoryListFactory
+{
+    /**
+     * Zend Framework's service locator
+     *
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator;
+
+    /**
+     * @var Config
+     */
+    protected $config;
+
+    /**
+     * Constructor
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     * @param ConfigFactory $configFactory
+     */
+    public function __construct(
+        ServiceLocatorInterface $serviceLocator,
+        ConfigFactory $configFactory
+    ) {
+        $this->serviceLocator = $serviceLocator;
+        $this->config = $configFactory->create();
+    }
+
+    /**
+     * Factory method for DirectoryList object
+     *
+     * @param array $config
+     * @return DirectoryList
+     */
+    public function create(array $config = array())
+    {
+        return new DirectoryList(
+            $this->config->getMagentoBasePath(),
+            $config
+        );
+    }
+}
diff --git a/setup/module/Magento/Setup/src/Model/FilePermissions.php b/setup/module/Magento/Setup/src/Model/FilePermissions.php
index ed28f139ba29f46d407380beda2a5d06d9ef6ac9..d57af0dec46f7be49e4b00e7155a448f87c9d32a 100644
--- a/setup/module/Magento/Setup/src/Model/FilePermissions.php
+++ b/setup/module/Magento/Setup/src/Model/FilePermissions.php
@@ -24,123 +24,196 @@
 
 namespace Magento\Setup\Model;
 
-use Magento\Config\Config;
-use Magento\Config\ConfigFactory;
-use Magento\Filesystem\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Framework\Filesystem;
 
 class FilePermissions
 {
+
     /**
-     * @var ConfigFactory
+     * @var Filesystem
      */
-    protected $configFactory;
+    protected $filesystem;
 
     /**
-     * @var Config
+     * @var DirectoryList
      */
-    protected $config;
+    protected $directoryList;
 
     /**
-     * @var Filesystem
+     * List of required writable directories for installation
+     *
+     * @var array
      */
-    protected $filesystem;
+    protected $installationWritableDirectories = [];
 
     /**
-     * List of required directories
+     * List of recommended non-writable directories for application
      *
      * @var array
      */
-    protected $required = [];
+    protected $applicationNonWritableDirectories = [];
 
     /**
-     * List of currently existed directories
+     * List of current writable directories for installation
      *
      * @var array
      */
-    protected $current = [];
+    protected $installationCurrentWritableDirectories = [];
 
     /**
-     * @param Filesystem $filesystem
-     * @param ConfigFactory $configFactory
+     * List of current non-writable directories for application
+     *
+     * @var array
+     */
+    protected $applicationCurrentNonWritableDirectories = [];
+
+    /**
+     * @param FilesystemFactory  $filesystemFactory
+     * @param DirectoryListFactory  $directoryListFactory
      */
     public function __construct(
-        Filesystem $filesystem,
-        ConfigFactory $configFactory
+        FilesystemFactory  $filesystemFactory,
+        DirectoryListFactory  $directoryListFactory
     ) {
-        $this->filesystem = $filesystem;
+        $this->filesystem = $filesystemFactory->create();
+        $this->directoryList = $directoryListFactory->create();
+    }
+
+    /**
+     * Retrieve list of required writable directories for installation
+     *
+     * @return array
+     */
+    public function getInstallationWritableDirectories()
+    {
+        if (!$this->installationWritableDirectories) {
+            $data = array(
+                DirectoryList::CONFIG,
+                DirectoryList::VAR_DIR,
+                DirectoryList::MEDIA,
+                DirectoryList::STATIC_VIEW
+            );
+            foreach ($data as $code) {
+                $this->installationWritableDirectories[$code] = $this->directoryList->getPath($code);
+            }
+        }
+        return array_values($this->installationWritableDirectories);
+    }
 
-        $this->configFactory = $configFactory;
-        $this->config = $this->configFactory->create();
+    /**
+     * Retrieve list of recommended non-writable directories for application
+     *
+     * @return array
+     */
+    public function getApplicationNonWritableDirectories()
+    {
+        if (!$this->applicationNonWritableDirectories) {
+            $data = array(
+                DirectoryList::CONFIG
+            );
+            foreach ($data as $code) {
+                $this->applicationNonWritableDirectories[$code] = $this->directoryList->getPath($code);
+            }
+        }
+        return array_values($this->applicationNonWritableDirectories);
     }
 
     /**
-     * Retrieve list of required directories
+     * Retrieve list of currently writable directories for installation
      *
+     * @param bool
      * @return array
      */
-    public function getRequired()
+    public function getInstallationCurrentWritableDirectories()
     {
-        if (!$this->required) {
-            foreach ($this->config->getMagentoFilePermissions() as $code => $config) {
-                if (isset($config['path'])) {
-                    $this->required[$code] = $config['path'];
+        if (!$this->installationCurrentWritableDirectories) {
+            foreach ($this->installationWritableDirectories as $code => $path) {
+                if ($this->isWritable($code)) {
+                    $this->installationCurrentWritableDirectories[] = $path;
                 }
             }
         }
-        return array_values($this->required);
+        return $this->installationCurrentWritableDirectories;
     }
 
     /**
-     * Retrieve list of currently existed directories
+     * Retrieve list of currently non-writable directories for application
      *
+     * @param bool
      * @return array
      */
-    public function getCurrent()
+    public function getApplicationCurrentNonWritableDirectories()
     {
-        if (!$this->current) {
-            foreach ($this->required as $code => $path) {
-                if (!$this->validate($code)) {
-                    continue;
+        if (!$this->applicationCurrentNonWritableDirectories) {
+            foreach ($this->applicationNonWritableDirectories as $code => $path) {
+                if ($this->isNonWritable($code)) {
+                    $this->applicationCurrentNonWritableDirectories[] = $path;
                 }
-                $this->current[$code] = $path;
             }
         }
-        return array_values($this->current);
+        return $this->applicationCurrentNonWritableDirectories;
     }
 
     /**
-     * Validate directory permissions by given directory code
+     * Checks if directory is writable by given directory code
      *
      * @param string $code
      * @return bool
      */
-    protected function validate($code)
+    protected function isWritable($code)
     {
         $directory = $this->filesystem->getDirectoryWrite($code);
-        if (!$directory->isExist()) {
-            return false;
-        }
-        if (!$directory->isDirectory()) {
-            return false;
-        }
-        if (!$directory->isReadable()) {
-            return false;
-        }
-        if (!$directory->isWritable()) {
+        return $this->isReadableDirectory($directory) && $directory->isWritable();
+    }
+
+    /**
+     * Checks if directory is non-writable by given directory code
+     *
+     * @param string $code
+     * @return bool
+     */
+    protected function isNonWritable($code)
+    {
+        $directory = $this->filesystem->getDirectoryWrite($code);
+        return $this->isReadableDirectory($directory) && !$directory->isWritable();
+    }
+
+    /**
+     * Checks if directory exists and is readable
+     *
+     * @param \Magento\Framework\Filesystem\Directory\WriteInterface $directory
+     * @return bool
+     */
+    protected function isReadableDirectory($directory)
+    {
+        if (!$directory->isExist() || !$directory->isDirectory() || !$directory->isReadable()) {
             return false;
         }
         return true;
     }
 
     /**
-     * Checks if has file permission or not
+     * Checks writable directories for installation
+     *
+     * @return array
+     */
+    public function getMissingWritableDirectoriesForInstallation()
+    {
+        $required = $this->getInstallationWritableDirectories();
+        $current = $this->getInstallationCurrentWritableDirectories();
+        return array_diff($required, $current);
+    }
+
+    /**
+     * Checks non-writable directories for application
      *
      * @return array
      */
-    public function checkPermission()
+    public function getUnnecessaryWritableDirectoriesForApplication()
     {
-        $required = $this->getRequired();
-        $current = $this->getCurrent();
+        $required = $this->getApplicationNonWritableDirectories();
+        $current = $this->getApplicationCurrentNonWritableDirectories();
         return array_diff($required, $current);
     }
 }
diff --git a/setup/module/Magento/Setup/src/Model/FilesystemFactory.php b/setup/module/Magento/Setup/src/Model/FilesystemFactory.php
new file mode 100644
index 0000000000000000000000000000000000000000..f9cd4df2b3319f976d9c9fe8f8f7eece250197e2
--- /dev/null
+++ b/setup/module/Magento/Setup/src/Model/FilesystemFactory.php
@@ -0,0 +1,66 @@
+<?php
+/**
+ * Magento
+ *
+ * NOTICE OF LICENSE
+ *
+ * This source file is subject to the Open Software License (OSL 3.0)
+ * that is bundled with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://opensource.org/licenses/osl-3.0.php
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@magentocommerce.com so we can send you a copy immediately.
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
+ * versions in the future. If you wish to customize Magento for your
+ * needs please refer to http://www.magentocommerce.com for more information.
+ *
+ * @copyright  Copyright (c) 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\Setup\Model;
+
+use Zend\ServiceManager\ServiceLocatorInterface;
+use Magento\Framework\Filesystem;
+use Magento\Framework\Filesystem\File\ReadFactory;
+
+class FilesystemFactory
+{
+    /**
+     * Zend Framework's service locator
+     *
+     * @var ServiceLocatorInterface
+     */
+    protected $serviceLocator;
+
+    /**
+     * Constructor
+     *
+     * @param ServiceLocatorInterface $serviceLocator
+     */
+    public function __construct(
+        ServiceLocatorInterface $serviceLocator
+    ) {
+        $this->serviceLocator = $serviceLocator;
+    }
+
+    /**
+     * Factory method for Filesystem object
+     *
+     * @param ReadFactory $fileReadFactory
+     * @return Filesystem
+     */
+    public function create(ReadFactory $fileReadFactory = null)
+    {
+        return new Filesystem(
+            $this->serviceLocator->get('Magento\Setup\Model\DirectoryListFactory')->create(),
+            $this->serviceLocator->get('Magento\Framework\Filesystem\Directory\ReadFactory'),
+            $this->serviceLocator->get('Magento\Framework\Filesystem\Directory\WriteFactory'),
+            $fileReadFactory
+        );
+    }
+}
diff --git a/setup/module/Magento/Setup/src/Model/Installer.php b/setup/module/Magento/Setup/src/Model/Installer.php
index daa309a00b49fe89db5ecca8b2cdd32f352e26f7..132957b42a237a54d604614c2107f2b4f71d1669 100644
--- a/setup/module/Magento/Setup/src/Model/Installer.php
+++ b/setup/module/Magento/Setup/src/Model/Installer.php
@@ -145,6 +145,13 @@ class Installer
      */
     private $progress;
 
+    /**
+     * Messages
+     *
+     * @var array
+     */
+    private $messages = array();
+
     /**
      * Constructor
      *
@@ -191,8 +198,8 @@ class Installer
      */
     public function install($request)
     {
+        $script[] = ['File permissions check...', 'checkInstallationFilePermissions', []];
         $script[] = ['Enabling Maintenance Mode:', 'setMaintenanceMode', [1]];
-        $script[] = ['File permissions check...', 'checkFilePermissions', []];
         $script[] = ['Installing deployment configuration...', 'installDeploymentConfig', [$request]];
         if (!empty($request[self::CLEANUP_DB])) {
             $script[] = ['Cleaning up database...', 'cleanupDb', [$request]];
@@ -210,6 +217,7 @@ class Installer
         $script[] = ['Installing admin user...', 'installAdminUser', [$request]];
         $script[] = ['Enabling caches:', 'enableCaches', []];
         $script[] = ['Disabling Maintenance Mode:', 'setMaintenanceMode', [0]];
+        $script[] = ['Post installation file permissions check...', 'checkApplicationFilePermissions', []];
 
         $total = count($script) + count($this->moduleList->getModules());
         $this->progress = new Installer\Progress($total, 0);
@@ -246,14 +254,14 @@ class Installer
     }
 
     /**
-     * Check permissions of directories that are expected to be writable
+     * Check permissions of directories that are expected to be writable for installation
      *
      * @return void
      * @throws \Exception
      */
-    public function checkFilePermissions()
+    public function checkInstallationFilePermissions()
     {
-        $results = $this->filePermissions->checkPermission();
+        $results = $this->filePermissions->getMissingWritableDirectoriesForInstallation();
         if ($results) {
             $errorMsg = 'Missing writing permissions to the following directories: ';
             foreach ($results as $result) {
@@ -263,6 +271,24 @@ class Installer
         }
     }
 
+    /**
+     * Check permissions of directories that are expected to be non-writable for application
+     *
+     * @return void
+     */
+    public function checkApplicationFilePermissions()
+    {
+        $results = $this->filePermissions->getUnnecessaryWritableDirectoriesForApplication();
+        if ($results) {
+            $errorMsg = 'Unnecessary writing permissions to the following directories: ';
+            foreach ($results as $result) {
+                $errorMsg .= '\'' . $result . '\' ';
+            }
+            $this->log->log($errorMsg);
+            $this->messages[] = $errorMsg;
+        }
+    }
+
     /**
      * Installs deployment configuration
      *
@@ -474,4 +500,14 @@ class Installer
         $adapter->query("DROP DATABASE IF EXISTS {$dbName}");
         $adapter->query("CREATE DATABASE IF NOT EXISTS {$dbName}");
     }
+
+    /**
+     * Return messages
+     *
+     * @return array
+     */
+    public function getMessages()
+    {
+        return $this->messages;
+    }
 }
diff --git a/setup/module/Magento/Setup/src/Module/Dir.php b/setup/module/Magento/Setup/src/Module/Dir.php
index 2857ca73435779b7c496729847e18636ce730cbf..0de4282ccee7e11862294aeee18d3c24492c9c99 100644
--- a/setup/module/Magento/Setup/src/Module/Dir.php
+++ b/setup/module/Magento/Setup/src/Module/Dir.php
@@ -25,8 +25,10 @@
  */
 namespace Magento\Setup\Module;
 
-use Magento\Filesystem\Directory\ReadInterface;
-use Magento\Filesystem\Filesystem;
+use Magento\Framework\Filesystem\Directory\ReadInterface;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Setup\Model\FilesystemFactory;
 
 class Dir
 {
@@ -38,11 +40,11 @@ class Dir
     protected $_modulesDirectory;
 
     /**
-     * @param Filesystem $filesystem
+     * @param FilesystemFactory $filesystemFactory
      */
-    public function __construct(Filesystem $filesystem)
+    public function __construct(FilesystemFactory $filesystemFactory)
     {
-        $this->_modulesDirectory = $filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem::MODULES_DIR);
+        $this->_modulesDirectory = $filesystemFactory->create()->getDirectoryRead(DirectoryList::MODULES);
     }
 
     /**
@@ -64,7 +66,6 @@ class Dir
         }
 
         $result = $this->_modulesDirectory->getAbsolutePath($path);
-
         return $result;
     }
 }
diff --git a/setup/module/Magento/Setup/src/Module/Setup.php b/setup/module/Magento/Setup/src/Module/Setup.php
index 90597ec98b6be66fa1694bf89c7762ac8896309e..29b5814c2492185acaca17ef7275d814c464f3b8 100644
--- a/setup/module/Magento/Setup/src/Module/Setup.php
+++ b/setup/module/Magento/Setup/src/Module/Setup.php
@@ -58,13 +58,6 @@ class Setup implements SetupInterface
      */
     protected $setupCache = array();
 
-    /**
-     * Filesystem instance
-     *
-     * @var \Magento\Filesystem\Filesystem
-     */
-    protected $filesystem;
-
     /**
      * Logger
      *
diff --git a/setup/module/Magento/Setup/src/Module/Setup/Config.php b/setup/module/Magento/Setup/src/Module/Setup/Config.php
index e754d3af8bcb2edf56e97ac5162155e5a9e1b8c4..4b29db95f8e4e5168ce33985517ec994de324262 100644
--- a/setup/module/Magento/Setup/src/Module/Setup/Config.php
+++ b/setup/module/Magento/Setup/src/Module/Setup/Config.php
@@ -24,8 +24,10 @@
 
 namespace Magento\Setup\Module\Setup;
 
-use Magento\Filesystem\Directory\Write;
-use Magento\Filesystem\Filesystem;
+use Magento\Framework\Filesystem\Directory\Write;
+use Magento\Framework\Filesystem;
+use Magento\Framework\App\Filesystem\DirectoryList;
+use Magento\Setup\Model\FilesystemFactory;
 
 /**
  * Deployment configuration model
@@ -91,15 +93,15 @@ class Config
     /**
      * Default Constructor
      *
-     * @param Filesystem $filesystem
+     * @param FilesystemFactory $fileSystemFactory
      * @param string[] $data
      */
     public function __construct(
-        Filesystem $filesystem,
+        FilesystemFactory $fileSystemFactory,
         $data = []
     ) {
-        $this->filesystem = $filesystem;
-        $this->configDirectory = $filesystem->getDirectoryWrite('etc');
+        $this->filesystem = $fileSystemFactory->create();
+        $this->configDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::CONFIG);
 
         if ($data) {
             $this->update($data);
@@ -169,11 +171,12 @@ class Config
         foreach ($this->data as $index => $value) {
             $contents = str_replace('{{' . $index . '}}', '<![CDATA[' . $value . ']]>', $contents);
         }
+
         if (preg_match('(\{\{.+?\}\})', $contents, $matches)) {
             throw new \Exception("Some of the keys have not been replaced in the template: {$matches[1]}");
         }
 
-        $this->configDirectory->writeFile(self::DEPLOYMENT_CONFIG_FILE, $contents, LOCK_EX);
+        $this->configDirectory->writeFile(self::DEPLOYMENT_CONFIG_FILE, $contents);
         $this->configDirectory->changePermissions(self::DEPLOYMENT_CONFIG_FILE, 0777);
     }
 
diff --git a/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php b/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php
index 8832d90447736f64eddce3ac0806990f70d200c9..751897ce831fd57dfa387bcd0aece57dbe6778d1 100644
--- a/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php
+++ b/setup/module/Magento/Setup/src/Module/Setup/ConfigFactory.php
@@ -48,7 +48,7 @@ class ConfigFactory
     public function create(array $data = [])
     {
         return new Config(
-            $this->serviceLocator->get('Magento\Filesystem\Filesystem'),
+            $this->serviceLocator->get('Magento\Setup\Model\FilesystemFactory'),
             $data
         );
     }
diff --git a/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml b/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml
index 9d7e6bb7fa7b9eaead3df0ae9b5bbeed73f00a2b..a624d1228643d14a9a771e5ee68ca2d6e0efce0f 100644
--- a/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml
+++ b/setup/module/Magento/Setup/view/magento/setup/readiness-check/progress.phtml
@@ -137,7 +137,7 @@
                 <span><?php echo $this->translate('File Permission Check'); ?></span>
                 <div class="rediness-check-info">
                     <p>
-                        <?php echo $this->translate('You meet {{permissions.data.current.length}} out of {{permissions.data.required.length}} file permission requirements.'); ?>
+                        <?php echo $this->translate('You meet {{permissions.data.current.length}} out of {{permissions.data.required.length}} writable file permission requirements.'); ?>
                         <a href="#" ng-click="updateOnExpand(permissions)">
                             <span ng-hide="permissions.expanded"><?php echo $this->translate('More detail'); ?></span>
                             <span ng-show="permissions.expanded"><?php echo $this->translate('Less detail'); ?></span>
@@ -147,7 +147,7 @@
                         <ul class="list-unstyled">
                             <li ng-repeat="name in permissions.data.required">
                                 <span class="glyphicon glyphicon-ok text-success"></span>
-                                <span><?php echo $this->translate('"{{name}}" directory permission.'); ?></span>
+                                <span><?php echo $this->translate('"{{name}}" writable directory permission.'); ?></span>
                             </li>
                         </ul>
                     </div>
@@ -175,7 +175,7 @@
                             <li ng-repeat="name in permissions.data.required" ng-switch="hasItem(permissions.data.current, name)">
                                 <span ng-switch-when="true" class="glyphicon glyphicon-ok text-success"></span>
                                 <span ng-switch-default class="glyphicon glyphicon-remove text-danger"></span>
-                                <span><?php echo $this->translate('"{{name}}" directory permission.'); ?></span>
+                                <span><?php echo $this->translate('"{{name}}" writable directory permission.'); ?></span>
                             </li>
                         </ul>
                     </div>
diff --git a/setup/module/Magento/Setup/view/magento/setup/success.phtml b/setup/module/Magento/Setup/view/magento/setup/success.phtml
index c4d0b078be3d35f99d5d3d06ba5f39898d54ab2c..518a5952dd79eee93474ed7e0a008074bc2b7a77 100644
--- a/setup/module/Magento/Setup/view/magento/setup/success.phtml
+++ b/setup/module/Magento/Setup/view/magento/setup/success.phtml
@@ -67,5 +67,6 @@
     </div>
 </div>
 <div class="text-center">
+    <div class="bold" ng-repeat="message in messages">{{message}}</div><br/>
     <a type="button" class="btn btn-primary" href="{{config.address.web}}{{config.address.admin}}"><?php echo $this->translate('Launch Magento Admin'); ?></a>
 </div>
\ No newline at end of file
diff --git a/setup/pub/magento/setup/install.js b/setup/pub/magento/setup/install.js
index 51910485e1486a222d2083c5684d9953552e623d..ab5e6694130bded657c93a217d64555a3bb78291 100644
--- a/setup/pub/magento/setup/install.js
+++ b/setup/pub/magento/setup/install.js
@@ -33,7 +33,9 @@ angular.module('install', ['ngStorage'])
         };
 
         $scope.checkProgress = function () {
-            $scope.displayProgress();
+            if ($scope.isInProgress) {
+                $scope.displayProgress();
+            }
             progress.get(function (response) {
                 var log = '';
                 response.data.console.forEach(function (message) {
@@ -68,6 +70,7 @@ angular.module('install', ['ngStorage'])
                 $scope.isInProgress = false;
                 if (response.success) {
                     $localStorage.config.encrypt.key = response.key;
+                    $localStorage.messages = response.messages;
                     $scope.nextState();
                 } else {
                     $scope.displayFailure();
diff --git a/setup/pub/magento/setup/success.js b/setup/pub/magento/setup/success.js
index c8792bb135d4b53891fd61d69b2a3260c06cb337..11010a4d512b0b2c96fe15db5b2aef5a62b338b7 100644
--- a/setup/pub/magento/setup/success.js
+++ b/setup/pub/magento/setup/success.js
@@ -27,4 +27,5 @@ angular.module('success', ['ngStorage'])
         $scope.db     = $localStorage.db;
         $scope.admin  = $localStorage.admin;
         $scope.config = $localStorage.config;
+        $scope.messages = $localStorage.messages;
     }]);
\ No newline at end of file