From 328ef8dff0a35ddfa94b72a0ac789636f0d05d9c Mon Sep 17 00:00:00 2001
From: mage2-team <mage2-team@magento.com>
Date: Fri, 24 Oct 2014 14:51:44 -0700
Subject: [PATCH] 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

---
 .travis.yml                                   |   1 -
 CHANGELOG.md                                  | 110 ++++
 app/code/Magento/AdminNotification/README.md  |   4 +
 .../Magento/AdminNotification/composer.json   |  10 +-
 app/code/Magento/Authorization/README.md      |   4 +
 app/code/Magento/Authorization/composer.json  |   6 +-
 app/code/Magento/Authorizenet/composer.json   |  18 +-
 .../Backend/App/Response/Http/FileFactory.php |   8 +-
 .../Backend/Block/Template/Context.php        |   4 +-
 .../Magento/Backend/Block/Widget/Context.php  |   4 +-
 .../Backend/Block/Widget/Grid/Export.php      |   4 +-
 .../Backend/Block/Widget/Grid/Extended.php    |   4 +-
 .../Controller/Adminhtml/System/Store.php     |  24 +-
 .../Model/Config/Backend/Admin/Robots.php     |   8 +-
 .../Backend/Model/Config/Backend/File.php     |  13 +-
 .../Backend/Model/Session/AdminConfig.php     |   5 +-
 app/code/Magento/Backend/README.md            |   4 +
 app/code/Magento/Backend/composer.json        |  34 +-
 .../Controller/Adminhtml/Index/Create.php     |  13 +-
 .../Controller/Adminhtml/Index/Download.php   |   4 +-
 .../Controller/Adminhtml/Index/Rollback.php   |  13 +-
 app/code/Magento/Backup/Helper/Data.php       |  40 +-
 app/code/Magento/Backup/Model/Backup.php      |  16 +-
 .../Magento/Backup/Model/Fs/Collection.php    |   8 +-
 app/code/Magento/Backup/Model/Observer.php    |   9 +-
 app/code/Magento/Backup/README.md             |   3 +
 app/code/Magento/Backup/composer.json         |  12 +-
 .../Magento/Bundle/Model/Product/Type.php     |   8 +-
 .../Sales/Order/Pdf/Items/Creditmemo.php      |   4 +-
 .../Model/Sales/Order/Pdf/Items/Invoice.php   |   4 +-
 .../Model/Sales/Order/Pdf/Items/Shipment.php  |   4 +-
 app/code/Magento/Bundle/composer.json         |  30 +-
 .../Magento/Captcha/Helper/Adminhtml/Data.php |   4 +-
 app/code/Magento/Captcha/Helper/Data.php      |  17 +-
 app/code/Magento/Captcha/Model/Cron.php       |   8 +-
 app/code/Magento/Captcha/composer.json        |  14 +-
 .../Magento/Catalog/Block/Product/Context.php |   4 +-
 .../Magento/Catalog/Block/Product/Gallery.php |   3 +-
 .../Adminhtml/Product/Gallery/Upload.php      |   6 +-
 .../Catalog/Helper/Product/Flat/Indexer.php   |   2 +-
 .../Catalog/Helper/Product/Options.php        |   8 +-
 .../Category/Attribute/Backend/Image.php      |  10 +-
 .../Catalog/Model/Layer/Filter/Price.php      |  16 -
 .../Model/Layer/Search/CollectionFilter.php   |  20 +-
 .../Catalog/Model/Layer/Search/Context.php    |  17 +-
 .../Model/Layer/Search/Filter/Attribute.php   |   2 +-
 .../Layer/Search/ItemCollectionProvider.php   |  20 +-
 app/code/Magento/Catalog/Model/Product.php    |   9 +-
 .../Model/Product/Attribute/Backend/Media.php |  11 +-
 .../Magento/Catalog/Model/Product/Image.php   |   7 +-
 .../Model/Product/Option/Type/File.php        |  16 +-
 .../Model/Product/Type/AbstractType.php       |  10 +-
 .../Catalog/Model/Resource/Category/Tree.php  |  12 +-
 .../Model/Resource/Layer/Filter/Price.php     |  36 --
 .../Product/Attribute/Backend/Image.php       |   9 +-
 .../Model/Resource/Product/Collection.php     |   6 +-
 .../V1/Data/Eav/Category/Info/Metadata.php    |   8 -
 .../Product/Attribute/Media/WriteService.php  |   5 +-
 app/code/Magento/Catalog/composer.json        |  49 +-
 app/code/Magento/Catalog/etc/adminhtml/di.xml |   5 -
 app/code/Magento/Catalog/etc/di.xml           |   7 +
 app/code/Magento/Catalog/etc/module.xml       |   1 -
 .../Model/Import/Product.php                  |  30 +-
 .../Model/Import/Uploader.php                 |   8 +-
 .../Magento/CatalogImportExport/composer.json |  20 +-
 .../Block/Stockqty/AbstractStockqty.php       |  15 +-
 .../Magento/CatalogInventory/composer.json    |  20 +-
 .../templates/stockqty/composite.phtml        |   4 +-
 .../frontend/templates/stockqty/default.phtml |   4 +-
 app/code/Magento/CatalogRule/composer.json    |  16 +-
 .../Magento/CatalogSearch/Block/Result.php    |   1 -
 .../Model/Adapter/Mysql/Field/Resolver.php    |  13 +-
 .../Adapter/Mysql/Filter/Preprocessor.php     | 144 +++++
 .../Magento/CatalogSearch/Model/Advanced.php  | 208 +++----
 .../Magento/CatalogSearch/Model/Fulltext.php  |  19 -
 .../Model/Indexer/Fulltext/Action/Full.php    |   5 +-
 .../Layer/Search/ItemCollectionProvider.php   |  46 +-
 .../Layer/Search/Plugin/CollectionFilter.php  |  65 ++
 .../Model/Layer/Search/StateKey.php           |   6 +-
 .../CatalogSearch/Model/Resource/Advanced.php |   3 +-
 .../Model/Resource/Advanced/Collection.php    | 149 ++---
 .../CatalogSearch/Model/Resource/Fulltext.php | 126 +---
 .../Model/Resource/Fulltext/Collection.php    |  73 ++-
 .../Model/Resource/Search/Collection.php      |   4 +-
 .../CatalogSearch/Model/Search/Catalog.php    |  21 +-
 .../Model/Search/RequestGenerator.php         |  83 ++-
 app/code/Magento/CatalogSearch/composer.json  |  24 +-
 .../CatalogSearch/etc/catalog_attributes.xml  |  30 +
 app/code/Magento/CatalogSearch/etc/di.xml     |  13 +-
 .../CatalogSearch/etc/search_request.xml      |  33 +-
 .../catalogsearch_setup/install-1.6.0.0.php   |  45 --
 .../Magento/CatalogUrlRewrite/composer.json   |  18 +-
 app/code/Magento/Centinel/composer.json       |  14 +-
 .../Checkout/Block/Onepage/Progress.php       |   2 +-
 .../Magento/Checkout/Controller/Onepage.php   |  13 +
 .../Checkout/Controller/Onepage/Review.php    |  16 +-
 .../Controller/Onepage/SaveBilling.php        |   1 +
 .../Controller/Onepage/SavePayment.php        |   5 +-
 .../Controller/Onepage/SaveShipping.php       |   1 +
 .../Controller/Onepage/SaveShippingMethod.php |   7 +-
 .../Magento/Checkout/Model/Type/Onepage.php   |  46 +-
 app/code/Magento/Checkout/README.md           |   3 +
 .../V1/Address/Billing/ReadService.php        |  24 +-
 .../Address/Billing/ReadServiceInterface.php  |  11 +-
 .../V1/Address/Billing/WriteService.php       |  44 +-
 .../Address/Billing/WriteServiceInterface.php |  17 +-
 .../Checkout/Service/V1/Address/Converter.php |  26 +-
 .../V1/Address/Shipping/ReadService.php       |  30 +-
 .../Address/Shipping/ReadServiceInterface.php |  11 +-
 .../V1/Address/Shipping/WriteService.php      |  32 +-
 .../Shipping/WriteServiceInterface.php        |  15 +-
 .../Checkout/Service/V1/Address/Validator.php |  20 +-
 .../Checkout/Service/V1/Cart/ReadService.php  |  58 +-
 .../Service/V1/Cart/ReadServiceInterface.php  |  28 +-
 .../Service/V1/Cart/TotalsService.php         |  33 +-
 .../V1/Cart/TotalsServiceInterface.php        |  12 +-
 .../Checkout/Service/V1/Cart/WriteService.php |  56 +-
 .../Service/V1/Cart/WriteServiceInterface.php |  23 +-
 .../Service/V1/Coupon/ReadService.php         |  18 +-
 .../V1/Coupon/ReadServiceInterface.php        |  10 +-
 .../Service/V1/Coupon/WriteService.php        |  23 +-
 .../V1/Coupon/WriteServiceInterface.php       |  21 +-
 .../Magento/Checkout/Service/V1/Data/Cart.php | 130 ++--
 .../Service/V1/Data/Cart/Address/Region.php   |  21 +-
 .../Checkout/Service/V1/Data/Cart/Coupon.php  |   9 +-
 .../Service/V1/Data/Cart/Customer.php         |   8 +-
 .../Checkout/Service/V1/Data/Cart/Item.php    |  47 +-
 .../Service/V1/Data/Cart/ShippingMethod.php   |  51 +-
 .../V1/Data/Cart/ShippingMethodConverter.php  |  18 +-
 .../Service/V1/Data/Cart/Totals/Item.php      | 129 ++--
 .../V1/Data/PaymentMethod/Converter.php       |  16 +-
 .../Checkout/Service/V1/Item/ReadService.php  |  20 +-
 .../Service/V1/Item/ReadServiceInterface.php  |  11 +-
 .../Checkout/Service/V1/Item/WriteService.php |  47 +-
 .../Service/V1/Item/WriteServiceInterface.php |  41 +-
 .../Service/V1/PaymentMethod/ReadService.php  |  34 +-
 .../V1/PaymentMethod/ReadServiceInterface.php |  20 +-
 .../Service/V1/PaymentMethod/WriteService.php |  25 +-
 .../PaymentMethod/WriteServiceInterface.php   |  16 +-
 .../Service/V1/ShippingMethod/ReadService.php |  41 +-
 .../ShippingMethod/ReadServiceInterface.php   |  25 +-
 .../V1/ShippingMethod/WriteService.php        |  24 +-
 .../ShippingMethod/WriteServiceInterface.php  |  20 +-
 app/code/Magento/Checkout/composer.json       |  36 +-
 .../frontend/templates/onepage/payment.phtml  |   2 +-
 .../templates/onepage/shipping_method.phtml   |   4 +-
 .../frontend/web/js/opc-checkout-method.js    |  30 +-
 app/code/Magento/CheckoutAgreements/README.md |   3 +
 .../Service/V1/Agreement/ReadService.php      |  29 +-
 .../V1/Agreement/ReadServiceInterface.php     |   7 +-
 .../Service/V1/Data/Agreement.php             |  58 +-
 .../Service/V1/Data/AgreementBuilder.php      |  30 +-
 .../Magento/CheckoutAgreements/composer.json  |  10 +-
 .../Adminhtml/Wysiwyg/Images/DeleteFiles.php  |   8 +-
 .../Magento/Cms/Helper/Wysiwyg/Images.php     |   8 +-
 .../Cms/Model/Wysiwyg/Images/Storage.php      |   7 +-
 .../Wysiwyg/Images/Storage/Collection.php     |  10 +-
 app/code/Magento/Cms/composer.json            |  20 +-
 app/code/Magento/CmsUrlRewrite/composer.json  |   8 +-
 .../ConfigurableImportExport/composer.json    |  14 +-
 .../Model/Product/Type/Configurable.php       |   4 +-
 .../Magento/ConfigurableProduct/composer.json |  28 +-
 app/code/Magento/Contact/composer.json        |  12 +-
 app/code/Magento/Core/App/Media.php           |   9 +-
 app/code/Magento/Core/Helper/File/Media.php   |  10 +-
 .../Core/Helper/File/Storage/Database.php     |  15 +-
 app/code/Magento/Core/Model/App/Emulation.php | 151 ++---
 .../Model/Asset/Plugin/CleanMergedJsCss.php   |  10 +-
 app/code/Magento/Core/Model/File/Storage.php  |  11 +-
 .../Core/Model/File/Storage/Config.php        |   7 +-
 .../Model/File/Storage/Synchronization.php    |   7 +-
 app/code/Magento/Core/Model/Layout/Merge.php  |   9 +-
 .../Core/Model/Layout/Update/Validator.php    |  10 +-
 app/code/Magento/Core/Model/Observer.php      |   4 +-
 .../Core/Model/Resource/File/Storage/File.php |  18 +-
 .../Magento/Core/Model/Theme/Collection.php   |   3 +-
 .../Magento/Core/Model/Theme/Image/Path.php   |   7 +-
 .../Magento/Core/Model/Theme/Registration.php |   5 +-
 app/code/Magento/Core/composer.json           |  16 +-
 app/code/Magento/Core/etc/config.xml          |  72 ---
 app/code/Magento/Core/etc/di.xml              |   1 +
 app/code/Magento/Core/etc/frontend/di.xml     |   2 +-
 app/code/Magento/Cron/Model/Observer.php      |   4 +-
 app/code/Magento/Cron/README.md               |   2 +
 app/code/Magento/Cron/composer.json           |   8 +-
 app/code/Magento/CurrencySymbol/README.md     |  16 +
 app/code/Magento/CurrencySymbol/composer.json |  14 +-
 .../Controller/Adminhtml/Index/Viewfile.php   |   9 +-
 .../Customer/Model/Metadata/Form/File.php     |  34 +-
 .../Service/V1/CustomerAccountService.php     |   6 +-
 .../V1/CustomerAddressServiceInterface.php    |   2 +-
 app/code/Magento/Customer/composer.json       |  36 +-
 .../Controller/Adminhtml/Index/ExportCsv.php  |   4 +-
 .../Controller/Adminhtml/Index/ExportXml.php  |   4 +-
 .../CustomerImportExport/composer.json        |  16 +-
 .../Editor/Tools/Controls/Configuration.php   |  10 +-
 .../Model/Editor/Tools/Controls/Factory.php   |  10 +-
 .../Tools/QuickStyles/ImageUploader.php       |  10 +-
 app/code/Magento/DesignEditor/composer.json   |  14 +-
 app/code/Magento/Dhl/Model/Carrier.php        |   7 +-
 app/code/Magento/Dhl/composer.json            |  22 +-
 app/code/Magento/Directory/README.md          |   5 +
 app/code/Magento/Directory/composer.json      |  10 +-
 .../Magento/Downloadable/Helper/Download.php  |  11 +-
 app/code/Magento/Downloadable/Helper/File.php |  10 +-
 .../Downloadable/Model/Product/Type.php       |   4 +-
 .../Sales/Order/Pdf/Items/AbstractItems.php   |   4 +-
 .../Sales/Order/Pdf/Items/Creditmemo.php      |   4 +-
 .../Model/Sales/Order/Pdf/Items/Invoice.php   |   4 +-
 .../Service/V1/Data/FileContentUploader.php   |   8 +-
 app/code/Magento/Downloadable/composer.json   |  34 +-
 .../Magento/Eav/Model/Attribute/Data/File.php |   7 +-
 .../Eav/Model/Entity/Setup/Context.php        |   4 +-
 app/code/Magento/Eav/README.md                |   2 +
 app/code/Magento/Eav/composer.json            |  12 +-
 .../Magento/Email/Model/AbstractTemplate.php  |  15 +-
 .../Magento/Email/Model/BackendTemplate.php   |   4 +-
 app/code/Magento/Email/Model/Template.php     |  11 +-
 .../Model/Template/Config/FileResolver.php    |  13 +-
 app/code/Magento/Email/README.md              |   4 +
 app/code/Magento/Email/composer.json          |  12 +-
 app/code/Magento/Fedex/composer.json          |  18 +-
 app/code/Magento/GiftMessage/README.md        |   1 +
 .../GiftMessage/Service/V1/Data/Message.php   |  39 +-
 .../GiftMessage/Service/V1/ReadService.php    |  42 +-
 .../Service/V1/ReadServiceInterface.php       |  21 +-
 .../GiftMessage/Service/V1/WriteService.php   |  65 +-
 .../Service/V1/WriteServiceInterface.php      |  37 +-
 app/code/Magento/GiftMessage/composer.json    |  22 +-
 app/code/Magento/GoogleAdwords/composer.json  |   8 +-
 .../Magento/GoogleAnalytics/composer.json     |   8 +-
 .../Magento/GoogleOptimizer/composer.json     |  14 +-
 app/code/Magento/GoogleShopping/composer.json |  20 +-
 .../Magento/GroupedImportExport/composer.json |  14 +-
 .../Model/Product/Type/Grouped.php            |   4 +-
 app/code/Magento/GroupedProduct/composer.json |  24 +-
 .../Controller/Adminhtml/Export/Export.php    |   4 +-
 .../Controller/Adminhtml/Import/Validate.php  |   6 +-
 .../ImportExport/Model/AbstractModel.php      |   8 +-
 .../Magento/ImportExport/Model/Export.php     |   4 +-
 .../Model/Export/Adapter/AbstractAdapter.php  |   9 +-
 .../Magento/ImportExport/Model/Import.php     |   9 +-
 app/code/Magento/ImportExport/composer.json   |  14 +-
 app/code/Magento/Indexer/App/Indexer.php      |   3 +-
 app/code/Magento/Indexer/Model/Shell.php      |   4 +-
 app/code/Magento/Indexer/composer.json        |   8 +-
 app/code/Magento/Install/App/Console.php      |   7 +-
 app/code/Magento/Install/Block/Download.php   |   4 +-
 app/code/Magento/Install/Model/Config.php     |   8 +-
 .../Install/Model/Installer/Config.php        |  23 +-
 .../Install/Model/Installer/Filesystem.php    |  10 +-
 .../Magento/Install/Model/Uninstaller.php     |   9 +-
 app/code/Magento/Install/composer.json        |  14 +-
 app/code/Magento/Integration/README.md        |   6 +
 app/code/Magento/Integration/composer.json    |  16 +-
 .../Magento/LayeredNavigation/composer.json   |   8 +-
 app/code/Magento/Log/Model/Shell.php          |   4 +-
 app/code/Magento/Log/Model/Visitor.php        |  29 +
 app/code/Magento/Log/README.md                |   2 +
 app/code/Magento/Log/composer.json            |  14 +-
 app/code/Magento/Msrp/composer.json           |  24 +-
 app/code/Magento/Multishipping/README.md      |   2 +
 app/code/Magento/Multishipping/composer.json  |  20 +-
 .../Adminhtml/Subscriber/ExportCsv.php        |   3 +-
 .../Adminhtml/Subscriber/ExportXml.php        |   3 +-
 app/code/Magento/Newsletter/composer.json     |  22 +-
 .../Magento/OfflinePayments/composer.json     |   6 +-
 .../System/Config/ExportTablerates.php        |   3 +-
 .../Model/Resource/Carrier/Tablerate.php      |  11 +-
 .../Magento/OfflineShipping/composer.json     |  20 +-
 app/code/Magento/Ogone/composer.json          |  12 +-
 .../PageCache/ExportVarnishConfig.php         |   4 +-
 app/code/Magento/PageCache/Model/Config.php   |   7 +-
 app/code/Magento/PageCache/README.md          |   4 +
 app/code/Magento/PageCache/composer.json      |   8 +-
 .../PayPalRecurringPayment/composer.json      |  16 +-
 app/code/Magento/Payment/Helper/Data.php      |  86 ++-
 app/code/Magento/Payment/composer.json        |  14 +-
 .../Adminhtml/Settlement/Details/Form.php     |   4 +-
 app/code/Magento/Paypal/Block/Iframe.php      |   5 +-
 app/code/Magento/Paypal/Helper/Data.php       |  13 +-
 app/code/Magento/Paypal/Model/Cert.php        |   7 +-
 app/code/Magento/Paypal/Model/Payflowlink.php | 135 +---
 .../Paypal/Model/Payment/Transaction.php      | 271 ---------
 .../Paypal/Model/Report/Settlement.php        |   9 +-
 .../Paypal/Model/Report/Settlement/Row.php    | 264 ++++----
 .../Model/Resource/Payment/Transaction.php    | 118 ----
 .../Payment/Transaction/Collection.php        |  96 ---
 .../Model/System/Config/Backend/Cert.php      |   9 +-
 app/code/Magento/Paypal/composer.json         |  30 +-
 .../Persistent/Model/Persistent/Config.php    |   8 +-
 app/code/Magento/Persistent/README.md         |   5 +
 app/code/Magento/Persistent/composer.json     |  16 +-
 app/code/Magento/ProductAlert/Model/Email.php |   4 +-
 app/code/Magento/ProductAlert/composer.json   |  12 +-
 .../Observer/CheckoutManagerObserver.php      |  21 +-
 .../Magento/RecurringPayment/composer.json    |  26 +-
 .../Adminhtml/Index/ExportSearchCsv.php       |   3 +-
 .../Adminhtml/Index/ExportSearchExcel.php     |   3 +-
 .../Report/Customer/ExportAccountsCsv.php     |   3 +-
 .../Report/Customer/ExportAccountsExcel.php   |   3 +-
 .../Report/Customer/ExportOrdersCsv.php       |   3 +-
 .../Report/Customer/ExportOrdersExcel.php     |   3 +-
 .../Report/Customer/ExportTotalsCsv.php       |   3 +-
 .../Report/Customer/ExportTotalsExcel.php     |   3 +-
 .../Report/Product/ExportLowstockCsv.php      |   3 +-
 .../Report/Product/ExportLowstockExcel.php    |   3 +-
 .../Report/Product/ExportSoldCsv.php          |   3 +-
 .../Report/Product/ExportSoldExcel.php        |   3 +-
 .../Report/Product/ExportViewedCsv.php        |   3 +-
 .../Report/Product/ExportViewedExcel.php      |   3 +-
 .../Report/Review/ExportCustomerCsv.php       |   3 +-
 .../Report/Review/ExportCustomerExcel.php     |   3 +-
 .../Report/Review/ExportProductCsv.php        |   3 +-
 .../Report/Review/ExportProductDetailCsv.php  |   3 +-
 .../Review/ExportProductDetailExcel.php       |   3 +-
 .../Report/Review/ExportProductExcel.php      |   3 +-
 .../Report/Sales/ExportBestsellersCsv.php     |   3 +-
 .../Report/Sales/ExportBestsellersExcel.php   |   3 +-
 .../Report/Sales/ExportCouponsCsv.php         |   3 +-
 .../Report/Sales/ExportCouponsExcel.php       |   3 +-
 .../Report/Sales/ExportInvoicedCsv.php        |   3 +-
 .../Report/Sales/ExportInvoicedExcel.php      |   3 +-
 .../Report/Sales/ExportRefundedCsv.php        |   3 +-
 .../Report/Sales/ExportRefundedExcel.php      |   3 +-
 .../Adminhtml/Report/Sales/ExportSalesCsv.php |   3 +-
 .../Report/Sales/ExportSalesExcel.php         |   3 +-
 .../Report/Sales/ExportShippingCsv.php        |   3 +-
 .../Report/Sales/ExportShippingExcel.php      |   3 +-
 .../Adminhtml/Report/Sales/ExportTaxCsv.php   |   3 +-
 .../Adminhtml/Report/Sales/ExportTaxExcel.php |   3 +-
 .../Report/Shopcart/ExportAbandonedCsv.php    |   3 +-
 .../Report/Shopcart/ExportAbandonedExcel.php  |   3 +-
 .../Report/Shopcart/ExportProductCsv.php      |   3 +-
 .../Report/Shopcart/ExportProductExcel.php    |   3 +-
 .../Report/Product/Viewed/Collection.php      |   2 +-
 app/code/Magento/Reports/composer.json        |  36 +-
 .../Magento/RequireJs/Model/FileManager.php   |  11 +-
 app/code/Magento/RequireJs/composer.json      |   4 +-
 app/code/Magento/Review/composer.json         |  22 +-
 app/code/Magento/Rss/composer.json            |   8 +-
 app/code/Magento/Rule/composer.json           |  12 +-
 .../AbstractCreditmemo/Pdfcreditmemos.php     |   3 +-
 .../AbstractCreditmemo/PrintAction.php        |   3 +-
 .../Adminhtml/Creditmemo/ExportCsv.php        |   3 +-
 .../Adminhtml/Creditmemo/ExportExcel.php      |   3 +-
 .../Invoice/AbstractInvoice/Pdfinvoices.php   |   3 +-
 .../Invoice/AbstractInvoice/PrintAction.php   |   3 +-
 .../Adminhtml/Invoice/ExportCsv.php           |   3 +-
 .../Adminhtml/Invoice/ExportExcel.php         |   3 +-
 .../Controller/Adminhtml/Order/ExportCsv.php  |   3 +-
 .../Adminhtml/Order/ExportExcel.php           |   3 +-
 .../Adminhtml/Order/Pdfcreditmemos.php        |   3 +-
 .../Controller/Adminhtml/Order/Pdfdocs.php    |   3 +-
 .../Adminhtml/Order/Pdfinvoices.php           |   3 +-
 .../Adminhtml/Order/Pdfshipments.php          |   3 +-
 .../AbstractShipment/Pdfshipments.php         |   3 +-
 .../Shipment/AbstractShipment/PrintAction.php |   3 +-
 .../Adminhtml/Shipment/ExportCsv.php          |   3 +-
 .../Adminhtml/Shipment/ExportExcel.php        |   3 +-
 app/code/Magento/Sales/Model/Download.php     |  10 +-
 app/code/Magento/Sales/Model/Order.php        |  18 -
 .../Sales/Model/Order/Pdf/AbstractPdf.php     |  10 +-
 .../Sales/Model/Order/Pdf/Creditmemo.php      |   4 +-
 .../Magento/Sales/Model/Order/Pdf/Invoice.php |   4 +-
 .../Model/Order/Pdf/Items/AbstractItems.php   |   8 +-
 .../Items/Creditmemo/DefaultCreditmemo.php    |   4 +-
 .../Pdf/Items/Invoice/DefaultInvoice.php      |   4 +-
 .../Pdf/Items/Shipment/DefaultShipment.php    |   4 +-
 .../Sales/Model/Order/Pdf/Shipment.php        |   4 +-
 .../Quote/Address/Total/AbstractTotal.php     |  18 -
 app/code/Magento/Sales/Model/Quote/Item.php   |   1 +
 app/code/Magento/Sales/README.md              |  19 +
 app/code/Magento/Sales/composer.json          |  44 +-
 .../Promo/Quote/ExportCouponsCsv.php          |   4 +-
 .../Promo/Quote/ExportCouponsXml.php          |   4 +-
 .../Model/Resource/Report/Collection.php      |   4 +-
 app/code/Magento/SalesRule/README.md          |   2 +
 app/code/Magento/SalesRule/composer.json      |  34 +-
 .../Magento/Search/Model}/AdapterFactory.php  |   7 +-
 app/code/Magento/Search/Model/Query.php       |  24 -
 .../Magento/Search/Model/QueryFactory.php     |  29 +-
 .../Magento/Search/Model/Resource/Helper.php  |  19 +-
 .../Magento/Search/Model/Resource/Query.php   | 108 ++--
 .../Model/Resource/Query/Collection.php       |   2 +-
 .../Magento/Search/Model}/SearchEngine.php    |  11 +-
 app/code/Magento/Search/composer.json         |   9 +-
 app/code/Magento/Search/etc/config.xml        |  34 ++
 app/code/Magento/Search/etc/di.xml            |   6 +
 app/code/Magento/Search/etc/module.xml        |   1 -
 .../sql/search_setup/install-1.6.0.0.php      |   3 +
 app/code/Magento/Sendfriend/composer.json     |  14 +-
 .../Order/Shipment/MassPrintShippingLabel.php |   3 +-
 .../Adminhtml/Order/Shipment/PrintLabel.php   |   3 +-
 .../Adminhtml/Order/Shipment/PrintPackage.php |   3 +-
 .../Shipping/Model/Order/Pdf/Packaging.php    |   4 +-
 .../Model/Shipping/LabelGenerator.php         |   9 +-
 app/code/Magento/Shipping/composer.json       |  26 +-
 .../Block/Adminhtml/Grid/Renderer/Link.php    |  10 +-
 .../Controller/Adminhtml/Sitemap/Delete.php   |   5 +-
 .../Controller/Adminhtml/Sitemap/Save.php     |   5 +-
 app/code/Magento/Sitemap/Model/Sitemap.php    |   8 +-
 app/code/Magento/Sitemap/composer.json        |  18 +-
 app/code/Magento/Store/Model/Storage/Db.php   |  49 +-
 app/code/Magento/Store/Model/Store.php        |  17 +-
 app/code/Magento/Store/Model/StoreManager.php |  22 +-
 app/code/Magento/Store/README.md              |   4 +
 app/code/Magento/Store/composer.json          |  10 +-
 .../Sales/Total/Quote/CommonTaxCollector.php  |  18 +
 .../Tax/Model/Sales/Total/Quote/Tax.php       |   4 +-
 app/code/Magento/Tax/README.md                |  33 +-
 app/code/Magento/Tax/composer.json            |  28 +-
 .../view/frontend/templates/order/tax.phtml   |   2 +-
 .../Controller/Adminhtml/Rate/ExportCsv.php   |   3 +-
 .../Controller/Adminhtml/Rate/ExportPost.php  |   3 +-
 .../Controller/Adminhtml/Rate/ExportXml.php   |   3 +-
 .../Magento/TaxImportExport/composer.json     |  12 +-
 .../Adminhtml/System/Design/Theme.php         |   6 +-
 .../System/Design/Theme/DownloadCss.php       |   5 +-
 .../System/Design/Theme/DownloadCustomCss.php |   3 +-
 .../Design/Wysiwyg/Files/PreviewImage.php     |   3 +-
 app/code/Magento/Theme/Helper/Storage.php     |  10 +-
 app/code/Magento/Theme/Model/CopyService.php  |   7 +-
 .../Magento/Theme/Model/Favicon/Favicon.php   |   8 +-
 .../Model/Layout/Config/SchemaLocator.php     |   7 +-
 .../Magento/Theme/Model/Uploader/Service.php  |   9 +-
 .../Magento/Theme/Model/Wysiwyg/Storage.php   |   8 +-
 app/code/Magento/Theme/composer.json          |  16 +-
 app/code/Magento/Theme/etc/di.xml             |   2 +-
 app/code/Magento/Translation/composer.json    |  10 +-
 app/code/Magento/Ui/composer.json             |   8 +-
 app/code/Magento/Ups/composer.json            |  18 +-
 app/code/Magento/UrlRewrite/composer.json     |  18 +-
 app/code/Magento/User/README.md               |   5 +
 app/code/Magento/User/composer.json           |  14 +-
 app/code/Magento/Usps/composer.json           |  18 +-
 .../Webapi/Controller/ErrorProcessor.php      |   9 +-
 app/code/Magento/Webapi/Controller/Rest.php   |  14 +-
 .../Rest/Response/DataObjectConverter.php     | 112 ++++
 .../Controller/ServiceArgsSerializer.php      |  38 +-
 .../Controller/Soap/Request/Handler.php       |  31 +-
 app/code/Magento/Webapi/Model/Config.php      |  65 +-
 .../Config/ClassReflector/TypeProcessor.php   |   8 +-
 .../Webapi/Model/DataObjectProcessor.php      | 314 ++++++++++
 app/code/Magento/Webapi/Model/Soap/Config.php |   7 +-
 app/code/Magento/Webapi/README.md             |   5 +
 app/code/Magento/Webapi/composer.json         |  16 +-
 .../Weee/Block/Item/Price/Renderer.php        |  34 +-
 app/code/Magento/Weee/Helper/Data.php         |  33 +-
 app/code/Magento/Weee/Model/Config.php        |   4 +-
 app/code/Magento/Weee/Model/Observer.php      |  22 +-
 app/code/Magento/Weee/Model/Tax.php           |  18 +-
 .../Magento/Weee/Model/Total/Quote/Weee.php   |  19 +-
 .../Weee/Model/Total/Quote/WeeeTax.php        |   2 +-
 app/code/Magento/Weee/README.md               |  26 +-
 app/code/Magento/Weee/composer.json           |  24 +-
 .../Widget/Model/Config/FileResolver.php      |  10 +-
 .../Magento/Widget/Model/Widget/Instance.php  |   8 +-
 app/code/Magento/Widget/composer.json         |  14 +-
 .../Controller/Index/DownloadCustomOption.php |  10 +-
 app/code/Magento/Wishlist/composer.json       |  32 +-
 .../adminhtml/Magento/backend/composer.json   |   4 +-
 .../adminhtml/Magento/backend/theme.xml       |   2 +-
 .../frontend/Magento/blank/composer.json      |   4 +-
 app/design/frontend/Magento/blank/theme.xml   |   2 +-
 .../frontend/Magento/plushe/composer.json     |   6 +-
 app/design/frontend/Magento/plushe/theme.xml  |   2 +-
 app/design/install/Magento/basic/theme.xml    |   2 +-
 app/etc/di.xml                                |   8 +-
 app/i18n/magento/de_de/composer.json          |   4 +-
 app/i18n/magento/en_us/composer.json          |   4 +-
 app/i18n/magento/es_es/composer.json          |   4 +-
 app/i18n/magento/fr_fr/composer.json          |   4 +-
 app/i18n/magento/nl_nl/composer.json          |   4 +-
 app/i18n/magento/pt_br/composer.json          |   4 +-
 app/i18n/magento/zh_cn/composer.json          |   4 +-
 composer.json                                 |   2 +-
 .../lib/Mtf/ObjectManagerFactory.php          |   8 +-
 .../Backend/Test/Block/Widget/Grid.php        |  34 ++
 .../Adminhtml/Product/Composite/Configure.php |  87 +++
 .../Adminhtml/Product/Composite/Configure.xml |  50 ++
 ...ProductInCustomerWishlistOnBackendGrid.php |  59 ++
 .../Bundle/Test/Fixture/BundleProduct.xml     |   2 +-
 .../Fixture/BundleProduct/CheckoutData.php    |   4 +-
 .../Test/Page/Adminhtml/CustomerIndexEdit.xml |  36 ++
 .../Test/Page/Adminhtml/OrderCreateIndex.xml  |  36 ++
 .../Magento/Bundle/Test/etc/constraint.xml    |   3 +
 .../Test/Block/AbstractConfigureBlock.php     | 131 ++++
 .../Adminhtml/Product/Composite/Configure.php |  79 +--
 .../Adminhtml/Product/Composite/Configure.xml |  30 +
 .../Catalog/Test/Block/Product/Price.php      |  36 ++
 .../Catalog/Test/Block/Product/View.php       | 128 ++--
 .../Test/Block/Product/View/CustomOptions.php |   2 +-
 ...sertAddedProductAttributeOnProductForm.php |   3 +-
 ...tAttributeAbsenceInSearchOnProductForm.php |   3 +-
 .../Constraint/AssertProductTemplateForm.php  |   3 +-
 ...ssertProductTemplateGroupOnProductForm.php |   4 +-
 .../AssertProductTemplateOnProductForm.php    |   4 +-
 .../Catalog/Test/Fixture/Cart/Item.php        |   4 +-
 .../Test/Fixture/CatalogProductSimple.php     |  11 +
 .../Test/Fixture/CatalogProductSimple.xml     |   6 +-
 .../CatalogProductSimple/CheckoutData.php     |  12 +-
 .../GroupPriceOptions.php                     |   7 +
 .../Test/Fixture/CatalogProductVirtual.xml    |   1 -
 .../CatalogProductVirtual/CheckoutData.php    |   7 +-
 .../Handler/CatalogProductSimple/Curl.php     |  19 +-
 .../Page/Category/CatalogCategoryView.xml     |   2 +-
 .../Test/Repository/CatalogProductSimple.php  | 192 ++++++
 .../DeleteCategoryEntityTest/test.csv         |   2 +-
 .../UpdateCategoryEntityTest/test.csv         |   2 +-
 .../Product/ManageProductsStockTest.php       | 120 ++++
 .../Product/ManageProductsStockTest/test.csv  |   2 +
 .../Product/UpdateSimpleProductEntityTest.php |  14 +-
 .../UpdateSimpleProductEntityTest/test.csv    |   8 +
 .../testUpdate.csv                            |   7 -
 .../app/Magento/Checkout/Test/Block/Cart.php  |  20 +-
 .../Test/Block/Cart/AbstractCartItem.php      |  18 +-
 .../Checkout/Test/Block/Cart/CartItem.php     |  75 ++-
 .../Checkout/Test/Block/Cart/Totals.php       | 115 +++-
 ...AssertAddedProductToCartSuccessMessage.php |  73 +++
 .../Constraint/AssertProductIsNotEditable.php |  69 +++
 .../AssertProductPresentInShoppingCart.php    |  70 +++
 .../AssertProductQtyInShoppingCart.php        |   6 +-
 .../Magento/Checkout/Test/etc/constraint.xml  |  12 +
 .../Test/Block/Adminhtml/AgreementGrid.php    |  59 ++
 .../Block/Agreement/Edit/AgreementsForm.php   |  14 +-
 .../Block/Agreement/Edit/AgreementsForm.xml   |  43 ++
 .../Test/Block/Onepage/AgreementReview.php    |  90 +++
 .../AssertTermsAbsentOnCheckout.php           | 115 ++++
 .../Test/Constraint/AssertTermsInGrid.php     |  69 +++
 .../Test/Constraint/AssertTermsOnCheckout.php | 132 ++++
 .../AssertTermsSuccessSaveMessage.php         |  72 +++
 .../Test/Fixture/CheckoutAgreement.php        | 157 +++++
 .../Test/Fixture/CheckoutAgreement.xml        |  92 +++
 .../Test/Fixture/CheckoutAgreement/Stores.php | 123 ++++
 .../CheckoutAgreementInterface.php            |  35 ++
 .../Test/Handler/CheckoutAgreement/Curl.php   | 106 ++++
 .../Adminhtml/CheckoutAgreementIndex.xml}     |  20 +-
 .../Page/Adminhtml/CheckoutAgreementNew.xml   |  39 ++
 .../Test/Page/CheckoutOnepage.xml             |  34 ++
 .../Test/Repository/CheckoutAgreement.php     |  74 +++
 .../Test/TestCase/CreateTermEntityTest.php    | 109 ++++
 .../TestCase/CreateTermEntityTest/test.csv    |   5 +
 .../Test/TestCase/UpdateTermEntityTest.php    | 114 ++++
 .../TestCase/UpdateTermEntityTest/test.csv    |   4 +
 .../TestStep/DeleteAllTermsEntityStep.php     |  78 +++
 .../Test/etc/constraint.xml                   |  39 ++
 .../CheckoutAgreements/Test/etc/curl/di.xml   |  28 +
 .../CheckoutAgreements/Test/etc/fixture.xml   |  32 +
 .../CheckoutAgreements/Test/etc/page.xml      |  37 ++
 .../Adminhtml/Product/Composite/Configure.php |  73 +++
 .../Adminhtml/Product/Composite/Configure.xml |  35 ++
 ...ProductInCustomerWishlistOnBackendGrid.php |  61 ++
 .../Fixture/ConfigurableProductInjectable.xml |   2 +-
 .../CheckoutData.php                          |  13 +-
 .../ConfigurableAttributesData.php            |  74 ++-
 .../Test/Page/Adminhtml/CustomerIndexEdit.xml |  36 ++
 .../Test/Page/Adminhtml/OrderCreateIndex.xml  |  36 ++
 .../ConfigurableProductInjectable.php         |  36 ++
 .../Test/etc/constraint.xml                   |   3 +
 .../Test/Handler/CustomerInjectable/Curl.php  |   6 +-
 .../Test/Page/Adminhtml/CustomerIndexEdit.xml |   5 +
 .../Test/Repository/AddressInjectable.php     |  31 +
 .../Test/Repository/CustomerInjectable.php    |  11 +
 .../TestStep/LoginCustomerOnFrontendStep.php  |   1 +
 .../Magento/Customer/Test/etc/constraint.xml  |   5 -
 .../Adminhtml/Product/Composite/Configure.php |  73 +++
 .../Adminhtml/Product/Composite/Configure.xml |  35 ++
 .../Test/Block/Catalog/Product/View/Links.php |   6 +-
 ...ProductInCustomerWishlistOnBackendGrid.php |  61 ++
 .../Downloadable/Test/Fixture/Cart/Item.php   |  24 +-
 .../CheckoutData.php                          |   1 -
 .../Test/Page/Adminhtml/CustomerIndexEdit.xml |  36 ++
 .../Test/Page/Adminhtml/OrderCreateIndex.xml  |  36 ++
 .../Downloadable/Test/etc/constraint.xml      |   3 +
 .../Adminhtml/Product/Composite/Configure.php |  72 +++
 .../Adminhtml/Product/Composite/Configure.xml |  33 +
 .../Test/Block/Catalog/Product/View.php       |   1 -
 .../Test/Block/Checkout/Cart/CartItem.php     |   7 +-
 ...ProductInCustomerWishlistOnBackendGrid.php |  74 +++
 ...AssertGroupedProductInItemsOrderedGrid.php | 115 ++++
 .../GroupedProduct/Test/Fixture/Cart/Item.php |  11 +-
 .../Test/Page/Adminhtml/CustomerIndexEdit.xml |  36 ++
 .../Test/Page/Adminhtml/OrderCreateIndex.xml  |  36 ++
 .../GroupedProduct/Test/etc/constraint.xml    |   6 +
 .../AbstractAssertSalesReportResult.php       |   2 +-
 .../AssertAbandonedCartCustomerInfoResult.php |   2 +-
 .../AssertBestsellerReportResult.php          |   2 +-
 .../Constraint/AssertOrderedProductResult.php |   2 +-
 .../Test/Page/Adminhtml/Bestsellers.xml       |  49 ++
 .../Tax/Test/Block/Adminhtml/Rule/Grid.php    |  20 -
 ...stractAssertTaxWithCrossBorderApplying.php | 216 +++++++
 .../AssertTaxRuleIsAppliedToAllPrices.php     | 238 ++++++++
 .../AssertTaxWithCrossBorderApplied.php}      |  48 +-
 .../AssertTaxWithCrossBorderNotApplied.php    |  57 +-
 .../Magento/Tax/Test/Handler/TaxRate/Curl.php |   1 +
 .../Magento/Tax/Test/Repository/TaxRate.php   |  48 ++
 .../Magento/Tax/Test/Repository/TaxRule.php   |  50 ++
 .../Tax/Test/TestCase/TaxCalculationTest.php  | 244 ++++++++
 .../Test/TestCase/TaxCalculationTest/test.csv |  11 +
 .../Test/TestCase/TaxWithCrossBorderTest.php  | 229 +++++++
 .../TestCase/TaxWithCrossBorderTest/test.csv  |   6 +
 .../app/Magento/Tax/Test/etc/constraint.xml   |  13 +-
 .../Block/Adminhtml/Catalog/Category/Grid.php |   3 -
 .../Block/Adminhtml/Catalog/Category/Tree.php |  17 +-
 .../Adminhtml/Catalog/Edit/UrlRewriteForm.php |   8 +-
 .../Adminhtml/Catalog/Edit/UrlRewriteForm.xml |   4 +
 .../AssertUrlRewriteCategoryNotInGrid.php     |  70 +++
 .../AssertUrlRewriteCustomRedirect.php        |   2 +-
 .../AssertUrlRewriteCustomSearchRedirect.php  |   2 +-
 .../AssertUrlRewriteProductRedirect.php       |   2 +-
 .../AssertUrlRewriteUpdatedProductInGrid.php  |  88 +++
 .../UrlRewrite/Test/Fixture/UrlRewrite.php    |  25 +-
 .../UrlRewrite/Test/Fixture/UrlRewrite.xml    |   7 +
 .../UrlRewrite/{IdPath.php => TargetPath.php} |  12 +-
 .../Test/Handler/UrlRewrite/Curl.php          |   2 +-
 .../Test/Page/Adminhtml/UrlRewriteEdit.xml    |   2 +-
 .../CreateCategoryRewriteEntityTest.php       |   5 +-
 .../CreateCategoryRewriteEntityTest/test.csv  |   4 +
 .../testCreateCategoryRewrite.csv             |   4 -
 .../CreateCustomUrlRewriteEntityTest.php      |   1 -
 .../CreateCustomUrlRewriteEntityTest/test.csv |  10 +-
 .../CreateProductUrlRewriteEntityTest.php     |   6 +-
 .../test.csv                                  |   4 +
 .../testProductUrlRewrite.csv                 |   4 -
 .../DeleteCategoryUrlRewriteEntityTest.php    |   4 +-
 .../test.csv                                  |   3 +
 .../testDeleteCategoryUrlRewrite.csv          |   3 -
 .../DeleteProductUrlRewriteEntityTest.php     |   2 +-
 ...stDeleteProductUrlRewrite.csv => test.csv} |   2 +-
 .../UpdateCategoryUrlRewriteEntityTest.php    |   2 +-
 .../UpdateCustomUrlRewriteEntityTest.php      |   6 +-
 .../UpdateCustomUrlRewriteEntityTest/test.csv |   6 +-
 .../UpdateProductUrlRewriteEntityTest.php     |   8 +-
 ...stUpdateProductUrlRewrite.csv => test.csv} |   2 +-
 .../UrlRewrite/Test/etc/constraint.xml        |   6 +
 .../Customer/Edit/Tab/Wishlist/Grid.php       |  94 ++-
 .../Wishlist/Test/Block/Customer/Wishlist.php |   2 +-
 .../Block/Customer/Wishlist/Items/Product.php |  39 +-
 ...sertAddProductToWishlistSuccessMessage.php |   2 +-
 ...ertMoveProductToWishlistSuccessMessage.php |  74 +++
 ...php => AssertProductDetailsInWishlist.php} |  43 +-
 ...ProductInCustomerWishlistOnBackendGrid.php | 115 ++++
 .../AssertProductIsPresentInWishlist.php      |   2 +-
 ...nFrontend.php => AbstractWishlistTest.php} |  38 +-
 .../AddProductToWishlistEntityTest.php        | 115 +---
 .../AddProductToWishlistEntityTest/test.csv   |   4 +-
 ...CartFromCustomerWishlistOnFrontendTest.php |  14 +-
 .../test.csv                                  |   2 +-
 ...ProductInCustomerWishlistOnBackendTest.php | 103 ++++
 .../test.csv                                  |   6 +
 ...roductInCustomerWishlistOnFrontendTest.php |  86 +++
 .../test.csv                                  |   6 +
 ...oductFromCustomerWishlistOnBackendTest.php | 128 +---
 ...leteProductsFromWishlistOnFrontendTest.php |   2 +-
 ...eProductFromShoppingCartToWishlistTest.php | 105 ++++
 .../test.csv                                  |   7 +
 .../Test/TestCase/ShareWishlistEntityTest.php |   4 +-
 ...ProductInCustomerWishlistOnBackendTest.php |  95 +++
 .../test.csv                                  |   6 +
 .../TestStep/AddProductsToWishlistStep.php    | 100 +++
 .../Magento/Wishlist/Test/etc/constraint.xml  |  10 +-
 dev/tests/functional/utils/bootstrap.php      |   6 +-
 .../Magento/TestFramework/App/Filesystem.php  |  72 +++
 .../Magento/TestFramework/Application.php     |  70 +--
 .../TestFramework/ObjectManagerFactory.php    |  41 +-
 .../TestCase/AbstractConfigFiles.php          |  15 +-
 .../Magento/Test/ApplicationTest.php          |  18 +-
 .../Magento/Test/Helper/BootstrapTest.php     |   9 +-
 .../Magento/Test/ObjectManagerTest.php        |   8 -
 .../testsuite/Magento/Test/RequestTest.php    |   2 +-
 .../Test/TestCase/ControllerAbstractTest.php  |   2 +-
 .../Backend/Block/System/Config/FormTest.php  |   5 +-
 .../Block/Widget/Grid/MassactionTest.php      |   6 +-
 .../Magento/Backend/Block/Widget/GridTest.php |   2 +-
 .../Controller/Adminhtml/UrlRewriteTest.php   |  58 --
 .../Model/Config/Backend/Admin/RobotsTest.php |   6 +-
 .../Backend/Model/_files/no_robots_txt.php    |   5 +-
 .../Backend/Model/_files/robots_txt.php       |   6 +-
 .../Magento/Catalog/Helper/ImageTest.php      |  10 +-
 .../Product/Attribute/Backend/MediaTest.php   |  10 +-
 .../Model/Product/Type/AbstractTest.php       |   2 +-
 .../Catalog/Model/ProductGettersTest.php      |   6 +-
 .../Magento/Catalog/Model/ProductTest.php     |  10 +-
 .../Catalog/Service/V1/FileResolverStub.php   |   4 +-
 .../Magento/Catalog/_files/product_image.php  |   6 +-
 .../Catalog/_files/product_image_rollback.php |   5 +-
 .../Catalog/controllers/_files/products.php   |   6 +-
 .../Model/Export/ProductTest.php              |   2 +-
 .../Model/Import/ProductTest.php              |  63 +-
 .../product_to_import_invalid_weight.csv      |   5 +
 .../Model/Indexer/FulltextTest.php            |  96 +--
 .../Model/Search/CatalogTest.php              |   0
 .../CatalogSearch/_files/indexer_fulltext.php |  52 +-
 .../Checkout/Controller/OnepageTest.php       |  29 +-
 .../Magento/Cms/Helper/Wysiwyg/ImagesTest.php |  14 +-
 .../Cms/Model/Wysiwyg/Images/StorageTest.php  |   7 +-
 .../Magento/Core/Model/App/EmulationTest.php  |   8 +-
 .../Magento/Core/Model/File/StorageTest.php   |  12 +-
 .../Magento/Core/Model/ObserverTest.php       |   2 +-
 .../Core/Model/Theme/CollectionTest.php       |  12 +-
 .../Core/Model/Theme/RegistrationTest.php     |   7 +-
 .../Magento/Core/Model/View/DesignTest.php    |  31 +-
 .../Core/Model/_files/design/themes.php       |   7 +-
 .../Customer/Service/V1/FileResolverStub.php  |   4 +-
 .../Model/Import/AddressTest.php              |  10 +-
 .../Model/Import/CustomerCompositeTest.php    |   8 +-
 .../Model/Import/CustomerTest.php             |   5 +-
 .../Model/Config/QuickStylesTest.php          |   6 +-
 .../Tools/Controls/ConfigurationTest.php      |  15 +-
 .../Model/_files/design/themes.php            |   7 +-
 .../Magento/Directory/Model/ObserverTest.php  |  16 -
 .../Email/Model/Template/FilterTest.php       |   7 +-
 .../Magento/Email/Model/TemplateTest.php      |  20 +-
 .../Magento/Email/Model/_files/themes.php     |   7 +-
 .../Magento/Framework/App/FilesystemTest.php  |  53 --
 .../Magento/Framework/Code/GeneratorTest.php  |   5 +-
 .../Filesystem/Directory/ReadTest.php         |  11 +-
 .../Filesystem/Directory/WriteTest.php        |  10 +-
 .../Framework/Filesystem/File/ReadTest.php    |   4 +-
 .../Framework/Filesystem/FilesystemTest.php   |  22 +-
 .../Framework/Image/Adapter/InterfaceTest.php |  13 +-
 .../Less/File/Collector/AggregatedTest.php    |  27 +-
 .../Magento/Framework/Less/_files/themes.php  |   7 +-
 .../Object/Copy/Config/ReaderTest.php         |  12 +-
 .../Search/Adapter/Mysql/AdapterTest.php      |  65 +-
 .../Adapter/Mysql/Builder/Query/MatchTest.php |   4 +-
 .../Framework/Search/_files/requests.xml      |  45 +-
 .../Magento/Framework/Session/ConfigTest.php  |  12 +-
 .../Design/FileResolution/FallbackTest.php    |   8 +-
 .../View/Element/AbstractBlockTest.php        |  15 -
 .../Magento/Framework/View/FileSystemTest.php |   7 +-
 .../Framework/View/Utility/LayoutTest.php     |   7 +-
 .../_files/fallback/themes_registration.php   |   7 +-
 .../Model/Import/EntityAbstractTest.php       |   6 +-
 .../Magento/Install/Model/ConfigTest.php      |  12 +-
 .../Model/Persistent/ConfigTest.php           |  10 +-
 .../Report/Product/Viewed/CollectionTest.php  |  85 +++
 .../Email/Sender/CreditmemoSenderTest.php     |  10 -
 .../Order/Email/Sender/InvoiceSenderTest.php  |  10 -
 .../Order/Email/Sender/OrderSenderTest.php    |  10 -
 .../Order/Email/Sender/ShipmentSenderTest.php |  17 -
 .../Model/Resource/Report/CollectionTest.php  |  60 ++
 .../Sitemap/_files/sitemap_products.php       |  11 +-
 .../Magento/Store/Model/StoreTest.php         |   9 +-
 .../Integrity/Modular/AclConfigFilesTest.php  |  13 +-
 .../Modular/BlockInstantiationTest.php        |   7 +-
 .../Integrity/Modular/DiConfigFilesTest.php   |   8 +-
 .../Modular/EavAttributesConfigFilesTest.php  |   8 +-
 .../Modular/ExportConfigFilesTest.php         |   8 +-
 .../Modular/ImportConfigFilesTest.php         |   8 +-
 .../Modular/IndexerConfigFilesTest.php        |  24 +-
 .../Modular/MviewConfigFilesTest.php          |  13 +-
 .../Modular/ProductOptionsConfigFilesTest.php |   8 +-
 .../Modular/ProductTypesConfigFilesTest.php   |   8 +-
 .../Modular/ResourcesConfigFilesTest.php      |   8 +-
 .../Modular/SystemConfigFilesTest.php         |   7 +-
 .../Modular/ThemeConfigFilesTest.php          |   4 +-
 .../Integrity/Modular/ViewConfigFilesTest.php |  13 +-
 .../Test/Integrity/Theme/XmlFilesTest.php     |  20 +-
 .../Tools/Layout/Reference/ProcessorTest.php  |   7 +-
 .../System/Design/ThemeControllerTest.php     |  71 +--
 .../Theme/Model/Wysiwyg/StorageTest.php       | 173 ------
 .../Wysiwyg/_files/theme/image/some_image.jpg | Bin 9201 -> 0 bytes
 .../Magento/Widget/Model/Config/DataTest.php  |  36 +-
 .../Widget/Model/Config/FileResolverTest.php  |  38 +-
 .../Widget/Model/Config/ReaderTest.php        |  38 +-
 .../Magento/TestFramework/Application.php     |   6 +-
 .../TestFramework/Helper/Categories.php       |   4 +-
 .../TestFramework/Performance/Bootstrap.php   |   4 +-
 .../Test/Performance/BootstrapTest.php        |   5 +-
 .../Magento/TestFramework/Utility/Files.php   |   3 +-
 .../Integrity/_files/blacklist/namespace.txt  |   1 +
 .../Magento/Test/Legacy/ObsoleteCodeTest.php  |   2 +-
 .../Test/Legacy/_files/obsolete_classes.php   |  11 +-
 .../Test/Legacy/_files/obsolete_constants.php |  90 ++-
 .../Test/Legacy/_files/obsolete_methods.php   |   2 +-
 .../Legacy/_files/obsolete_properties.php     |   2 +-
 .../Php/_files/phpcpd/blacklist/common.txt    |   1 +
 .../Php/_files/phpcs/blacklist/common.txt     |   2 -
 .../Magento/Test/Block/Adminhtml.php          |   2 +-
 .../Matcher/MethodInvokedAtIndex.php          |  13 +
 .../Backend/Model/Session/AdminConfigTest.php |  19 +-
 .../Magento/Backup/Helper/DataTest.php        |  64 +-
 .../Backup/Model/Fs/CollectionTest.php        |   2 +-
 .../Magento/Bundle/Model/Product/TypeTest.php | 575 +++++++++++++++++-
 .../Captcha/Helper/Adminhtml/DataTest.php     |   2 +-
 .../Magento/Captcha/Helper/DataTest.php       |  33 +-
 .../Magento/Captcha/Model/CronTest.php        |   2 +-
 .../Adminhtml/Product/Attribute/GridTest.php  |   2 +-
 .../Layer/Search/CollectionFilterTest.php     |  37 +-
 .../Magento/Catalog/Model/ObserverTest.php    |   2 +-
 .../Product/Attribute/Backend/MediaTest.php   |   2 +-
 .../Catalog/Model/Product/ImageTest.php       |   7 +-
 .../Catalog/Model/Product/Type/SimpleTest.php |   2 +-
 .../Model/Product/Type/VirtualTest.php        |   2 +-
 .../Model/Resource/Category/TreeTest.php      |  74 +++
 .../Attribute/Media/WriteServiceTest.php      |   7 +-
 .../Block/Stockqty/DefaultStockqtyTest.php    |  44 ++
 .../Initializer/StockItemTest.php             | 248 ++++++++
 .../Model/Stock/ItemRegistryTest.php          | 121 ++++
 .../CatalogInventory/Model/Stock/ItemTest.php |  73 ++-
 .../CatalogInventory/Model/StockTest.php      | 106 +++-
 .../Indexer/Fulltext/Action/FullTest.php      |   2 +-
 .../Model/Search/RequestGeneratorTest.php     |  13 +-
 .../Controller/Onepage/SaveBillingTest.php    |  24 +-
 .../Controller/Onepage/SaveShippingTest.php   |  22 +-
 .../Checkout/Model/Type/OnepageTest.php       |   3 +-
 .../Cms/Model/Wysiwyg/Images/StorageTest.php  |   8 +-
 .../Model/Product/Type/ConfigurableTest.php   |   2 +-
 .../testsuite/Magento/Core/App/MediaTest.php  |  21 +-
 .../Magento/Core/Helper/File/MediaTest.php    |   6 +-
 .../Core/Helper/File/Storage/DatabaseTest.php | 128 ++--
 .../Magento/Core/Model/App/EmulationTest.php  | 139 +++--
 .../Asset/Plugin/CleanMergedJsCssTest.php     |   8 +-
 .../Core/Model/File/Storage/ConfigTest.php    |   6 +-
 .../File/Storage/SynchronizationTest.php      |   6 +-
 .../Magento/Core/Model/Layout/MergeTest.php   |   2 +-
 .../Model/Layout/Update/ValidatorTest.php     |   6 +-
 .../Core/Model/Resource/Db/AbstractTest.php   |   2 +-
 .../Model/Resource/File/Storage/FileTest.php  |   8 +-
 .../Core/Model/Theme/Image/PathTest.php       |   6 +-
 .../Customer/Model/Metadata/Form/FileTest.php | 109 +++-
 .../Model/Metadata/Form/ImageTest.php         |   3 +-
 .../Service/V1/CustomerAccountServiceTest.php |  42 +-
 .../Controller/Varien/Router/StandardTest.php |   8 +-
 .../Magento/Dhl/Model/CarrierTest.php         |   2 +-
 .../Magento/Directory/Model/ObserverTest.php  |   2 +-
 .../Downloadable/Helper/DownloadTest.php      |   7 +-
 .../Downloadable/Model/Product/TypeTest.php   |   2 +-
 .../Eav/Model/Attribute/Data/FileTest.php     |   2 +-
 .../Eav/Model/Attribute/Data/ImageTest.php    |   2 +-
 .../Block/Adminhtml/Template/EditTest.php     |  33 +-
 .../Magento/Email/Model/TemplateTest.php      |   2 +-
 .../Arguments/FileResolver/PrimaryTest.php    |   6 +-
 .../Framework/App/Arguments/LoaderTest.php    |   8 +-
 .../Magento/Framework/App/BootstrapTest.php   |  44 +-
 .../App/Cache/Frontend/FactoryTest.php        |  21 +-
 .../Framework/App/Config/FileResolverTest.php |   8 +-
 .../App/Config/Initial/ReaderTest.php         |   2 +-
 .../DirectoryList/ConfigurationTest.php       | 118 ----
 .../DirectoryList/VerificationTest.php        | 234 -------
 .../App/Filesystem/DirectoryListTest.php      |  51 ++
 .../Magento/Framework/App/FilesystemTest.php  |  92 ---
 .../Magento/Framework/App/HttpTest.php        | 162 +++--
 .../Framework/App/Language/DictionaryTest.php |   6 +-
 .../Framework/App/MaintenanceModeTest.php     |   2 +-
 .../App/ObjectManager/ConfigLoaderTest.php    |  25 +-
 .../App/ObjectManagerFactoryTest.php          |   4 +-
 .../Framework/App/Request/HttpTest.php        |  14 +-
 .../App/Response/Http/FileFactoryTest.php     |   2 +-
 .../App/Route/ConfigInterface/ProxyTest.php   |  85 +++
 .../App/View/Asset/PublisherTest.php          |  11 +-
 .../Deployment/Version/Storage/FileTest.php   |   2 +-
 .../Magento/Framework/Backup/MediaTest.php    |  40 +-
 .../Magento/Framework/Backup/NomediaTest.php  |  14 +-
 .../Magento/Framework/Backup/SnapshotTest.php |   2 +-
 .../Framework/Backup/_files/app_dirs.php      |   2 +-
 .../Backup/_files/app_dirs_rollback.php       |  31 +-
 .../Magento/Framework/Code/GeneratorTest.php  |   2 +-
 .../Filesystem/Directory/ReadTest.php         |   4 +-
 .../Filesystem/Directory/WriteTest.php        |   2 +-
 .../Filesystem/DirectoryListTest.php          | 168 ++---
 .../Filesystem/DriverFactoryTest.php          |  73 ---
 .../Framework/Filesystem/DriverPoolTest.php   |  59 ++
 .../Filesystem/File/ReadFactoryTest.php       |  66 +-
 .../Filesystem/File/WriteFactoryTest.php      |  73 +--
 .../Filesystem/WrapperFactoryTest.php         |  63 --
 .../Magento/Framework/FilesystemTest.php      |  27 +-
 .../Framework/Image/Adapter/AbstractTest.php  |   2 +-
 .../Image/Adapter/ImageMagickTest.php         |   2 +-
 .../Less/File/Collector/LibraryTest.php       |  11 +-
 .../Framework/Less/FileGeneratorTest.php      |   6 +-
 .../Magento/Framework/LoggerTest.php          |   5 +-
 .../Model/AbstractExtensibleModelTest.php     | 197 ++++++
 .../Framework/Model/AbstractModelTest.php     |   2 +
 .../Module/Declaration/FileResolverTest.php   |   7 +-
 .../Declaration/Reader/FilesystemTest.php     |   7 +-
 .../Framework/Module/Dir/ReaderTest.php       |   7 +-
 .../Magento/Framework/Module/DirTest.php      |   4 +-
 .../Framework/Module/Setup/MigrationTest.php  |   8 +-
 .../Framework/Mview/Config/ReaderTest.php     |   8 +-
 .../Object/Copy/Config/SchemaLocatorTest.php  |  27 +-
 .../Config/Reader/DomFactoryTest.php          |  66 ++
 .../Framework/RequireJs/ConfigTest.php        |   6 +-
 .../Adapter/Mysql/Builder/Query/MatchTest.php |  17 +-
 .../Adapter/Mysql/Filter/BuilderTest.php      | 178 +++---
 .../Search/Adapter/Mysql/ScoreBuilderTest.php |   5 +-
 .../Code/Generator/DataBuilderTest.php        | 149 +++++
 .../Generator/_files/ExtensibleSample.php     |  51 +-
 .../_files/ExtensibleSampleDataBuilder.txt    |  53 ++
 .../_files/ExtensibleSampleInterface.php      |  33 +-
 .../Magento/Framework/Session/ConfigTest.php  |   9 +-
 .../Magento/Framework/TranslateTest.php       |   6 +-
 .../Framework/View/Asset/MergeServiceTest.php |   2 +-
 .../View/Asset/MergeStrategy/ChecksumTest.php |   8 +-
 .../View/Asset/MergeStrategy/DirectTest.php   |   5 +-
 .../Asset/MergeStrategy/FileExistsTest.php    |   6 +-
 .../Framework/View/Asset/MinifiedTest.php     |  12 +-
 .../Framework/View/Asset/SourceTest.php       |  22 +-
 .../Magento/Framework/View/ConfigTest.php     |   7 +-
 .../View/Design/Fallback/RulePoolTest.php     | 120 ++--
 .../Fallback/Resolver/AlternativeTest.php     |   8 +-
 .../Fallback/Resolver/SimpleTest.php          |   6 +-
 .../Theme/Customization/AbstractFileTest.php  |   8 +-
 .../Design/Theme/Customization/PathTest.php   |   2 +-
 .../View/Design/Theme/Image/UploaderTest.php  |   2 +-
 .../Framework/View/Design/Theme/ImageTest.php |  10 +-
 .../Framework/View/Element/TemplateTest.php   |  83 ++-
 .../View/File/Collector/BaseTest.php          |   6 +-
 .../View/File/Collector/Override/BaseTest.php |   5 +-
 .../Collector/Override/ThemeModularTest.php   |   6 +-
 .../View/File/Collector/ThemeModularTest.php  |   5 +-
 .../View/File/Collector/ThemeTest.php         |   4 +-
 .../Model/Product/Type/GroupedTest.php        |   2 +-
 .../Magento/ImportExport/Model/ExportTest.php |   2 +-
 .../Model/Import/Source/CsvTest.php           |   4 +-
 .../testsuite/Magento/Log/Model/ShellTest.php |   2 +-
 .../Magento/Log/Model/VisitorTest.php         |  21 +-
 .../PageCache/ExportVarnishConfigTest.php     |   4 +-
 .../Magento/PageCache/Model/ConfigTest.php    |   6 +-
 .../Magento/Payment/Helper/DataTest.php       | 223 +++++--
 .../Magento/Paypal/Helper/DataTest.php        |  21 -
 .../Model/Report/Settlement/RowTest.php       | 133 ++++
 .../Observer/CheckoutManagerObserverTest.php  |  69 ++-
 .../RequireJs/Model/FileManagerTest.php       |   8 +-
 .../Magento/Sales/Model/DownloadTest.php      |   8 +-
 .../Sales/Model/Order/Pdf/AbstractTest.php    |   2 +-
 .../Sales/Model/Order/Pdf/InvoiceTest.php     |   2 +-
 .../Magento/Sales/Model/OrderTest.php         |  31 -
 .../Magento/Sales/Model/Quote/ItemTest.php    |  20 +-
 .../Magento/SalesRule/Model/ValidatorTest.php |   9 +-
 .../Model}/AdapterFactoryTest.php             |   6 +-
 .../Model}/SearchEngineTest.php               |   8 +-
 .../Order/Shipment/PrintPackageTest.php       |   4 +-
 .../Magento/Sitemap/Model/SitemapTest.php     |   4 +-
 .../Magento/Store/Model/Storage/DbTest.php    |  47 ++
 .../Theme/Block/Html/Header/LogoTest.php      |   2 +-
 .../Magento/Theme/Helper/StorageTest.php      |   4 +-
 .../Magento/Theme/Model/CopyServiceTest.php   |   6 +-
 .../Theme/Model/Uploader/ServiceTest.php      |   4 +-
 .../Theme/Model/Wysiwyg/StorageTest.php       |   4 +-
 .../Webapi/Controller/ErrorProcessorTest.php  |   2 +-
 .../Magento/Webapi/Controller/RestTest.php    |  14 +
 .../Controller/Soap/Request/HandlerTest.php   |  17 +-
 .../Webapi/Model/DataObjectProcessorTest.php  |  65 ++
 .../Webapi/Model/Files/TestDataInterface.php  |  36 ++
 .../Webapi/Model/Files/TestDataObject.php     |  48 ++
 .../Magento/Webapi/Model/Soap/ConfigTest.php  |   2 +-
 .../Widget/Model/Widget/InstanceTest.php      |   2 +-
 dev/tools/Magento/Tools/View/Deployer.php     |   9 +-
 dev/tools/Magento/Tools/View/deploy.php       |   5 +-
 .../Magento/Tools/classmap/fs_generator.php   | 151 +++--
 .../Magento/ToolkitFramework/Application.php  |  10 +-
 .../Framework/Api/AttributeInterface.php      |  24 +-
 .../Api/ExtensibleDataBuilderInterface.php    |  36 +-
 .../Framework/Api/ExtensibleDataInterface.php |  46 ++
 .../Magento/Framework/App/AbstractShell.php   |   8 +-
 .../App/Arguments/FileResolver/Primary.php    |   8 +-
 .../Framework/App/Arguments/Loader.php        |   4 +-
 .../Magento/Framework/App/Bootstrap.php       | 100 ++-
 .../Framework/App/Cache/Frontend/Factory.php  |  19 +-
 .../Magento/Framework/App/Cache/README.md     |   7 +
 .../Framework/App/Config/FileResolver.php     |   8 +-
 .../Magento/Framework/App/Filesystem.php      | 148 -----
 .../App/Filesystem/DirectoryList.php          | 190 ++++--
 .../DirectoryList/Configuration.php           |  91 ---
 .../Filesystem/DirectoryList/Verification.php | 114 ----
 .../Framework/App/Filesystem/README.md        |   2 +
 lib/internal/Magento/Framework/App/Http.php   |  29 +-
 .../Framework/App/Language/Dictionary.php     |   5 +-
 .../Magento/Framework/App/MaintenanceMode.php |   6 +-
 .../App/ObjectManager/ConfigLoader.php        |  30 +-
 .../Framework/App/ObjectManagerFactory.php    |  78 +--
 .../Magento/Framework/App/PageCache/README.md |   3 +
 lib/internal/Magento/Framework/App/README.md  |  30 +-
 .../Magento/Framework/App/Request/Http.php    |   4 +-
 .../App/Response/Http/FileFactory.php         |  10 +-
 .../App/Route/ConfigInterface/Proxy.php       | 156 +++++
 .../Framework/App/View/Asset/Publisher.php    |  13 +-
 .../View/Deployment/Version/Storage/File.php  |   4 +-
 .../Magento/Framework/AppInterface.php        |   2 +-
 .../Magento/Framework/Archive/README.md       |   4 +
 .../Magento/Framework/Backup/Media.php        |   6 +-
 .../Magento/Framework/Backup/README.md        |   1 +
 .../Magento/Framework/Backup/Snapshot.php     |  26 +-
 .../Magento/Framework/Convert/README.md       |   6 +
 .../Framework/DB/Adapter/Pdo/Mysql.php        |   5 +-
 .../Magento/Framework/Encryption/README.md    |   1 +
 lib/internal/Magento/Framework/File/README.md |   7 +
 .../Magento/Framework/File/Uploader.php       |   4 +-
 lib/internal/Magento/Framework/Filesystem.php |  70 +--
 .../Framework/Filesystem/Directory/Read.php   |  36 +-
 .../Filesystem/Directory/ReadFactory.php      |  34 +-
 .../Filesystem/Directory/ReadInterface.php    |   8 +-
 .../Framework/Filesystem/Directory/Write.php  |  40 +-
 .../Filesystem/Directory/WriteFactory.php     |  35 +-
 .../Framework/Filesystem/DirectoryList.php    | 243 ++++----
 .../Framework/Filesystem/DriverFactory.php    |  68 ---
 .../Framework/Filesystem/DriverPool.php       | 103 ++++
 .../Framework/Filesystem/File/ReadFactory.php |  25 +-
 .../Filesystem/File/WriteFactory.php          |  24 +-
 .../Magento/Framework/Filesystem/README.md    |   3 +
 .../Framework/Filesystem/WrapperInterface.php | 171 ------
 lib/internal/Magento/Framework/Flag/README.md |   1 +
 .../Image/Adapter/AbstractAdapter.php         |  10 +-
 .../Magento/Framework/Image/README.md         |   6 +
 .../Framework/Less/File/Collector/Library.php |   7 +-
 .../Magento/Framework/Less/FileGenerator.php  |   7 +-
 lib/internal/Magento/Framework/Logger.php     |  10 +-
 lib/internal/Magento/Framework/Math/README.md |   1 +
 .../Model/AbstractExtensibleModel.php         | 191 ++++++
 .../Magento/Framework/Model/AbstractModel.php |   3 +-
 .../Model/Resource/Type/Db/Pdo/Mysql.php      |   6 +-
 .../Module/Declaration/Converter/Dom.php      |   5 +-
 .../Module/Declaration/FileIterator.php       |   5 +-
 .../Module/Declaration/FileResolver.php       |   9 +-
 lib/internal/Magento/Framework/Module/Dir.php |   5 +-
 .../Magento/Framework/Module/Dir/Reader.php   |   5 +-
 .../Magento/Framework/Module/Setup.php        |   8 +-
 .../Framework/Module/Setup/Context.php        |   8 +-
 .../Framework/Module/Setup/Migration.php      |   4 +-
 .../Framework/Mview/Config/SchemaLocator.php  |   4 +-
 .../Object/Copy/Config/SchemaLocator.php      |  12 +-
 .../Config/Reader/DomFactory.php              |  71 +++
 .../ObjectManager/DefinitionFactory.php       |   3 +
 .../Magento/Framework/Option/README.md        |   1 +
 .../Magento/Framework/Profiler/README.md      |   8 +
 .../Magento/Framework/RequireJs/Config.php    |   9 +-
 .../Config/File/Collector/Aggregated.php      |   7 +-
 .../Search/Adapter/Mysql/Field/Resolver.php   |  15 +-
 .../Adapter/Mysql/Field/ResolverInterface.php |  35 ++
 .../Search/Adapter/Mysql/Filter/Builder.php   |  97 ++-
 .../Adapter/Mysql/Filter/Preprocessor.php     |  51 ++
 .../Mysql/Filter/PreprocessorInterface.php    |  37 ++
 .../Framework/Search/Adapter/Mysql/Mapper.php |  27 +-
 .../Adapter/Mysql/Query/Builder/Match.php     |  21 +-
 .../Search/Adapter/Mysql/ScoreBuilder.php     |   6 +-
 .../Framework/Search/Request/Binder.php       |  15 +-
 .../Framework/Search/Request/Cleaner.php      |   7 +-
 .../Service/Code/Generator/Builder.php        |   2 +-
 .../Service/Code/Generator/DataBuilder.php    | 193 ++++++
 .../Service/Config/MetadataConfig.php         |  35 +-
 .../Service/Data/AbstractExtensibleObject.php |   8 +-
 .../Framework/Service/Data/AttributeValue.php |   9 +-
 .../Service/Data/ExtensibleDataBuilder.php    |  95 +++
 .../Service/Data/MetadataServiceInterface.php |   2 +-
 .../Service/SimpleDataObjectConverter.php     |  56 +-
 .../Magento/Framework/Session/Config.php      |  16 +-
 .../Magento/Framework/Shell/README.md         |   3 +
 .../Magento/Framework/Stdlib/README.md        |   2 +
 lib/internal/Magento/Framework/Translate.php  |  12 +-
 .../Translate/Locale/Resolver/Plugin.php      |   2 +-
 .../Magento/Framework/Validator/README.md     |   1 +
 .../View/Asset/File/FallbackContext.php       |   4 +-
 .../Framework/View/Asset/MergeService.php     |  10 +-
 .../View/Asset/MergeStrategy/Checksum.php     |  12 +-
 .../View/Asset/MergeStrategy/Direct.php       |   9 +-
 .../View/Asset/MergeStrategy/FileExists.php   |  10 +-
 .../Magento/Framework/View/Asset/Merged.php   |   4 +-
 .../Magento/Framework/View/Asset/Minified.php |  19 +-
 .../Framework/View/Asset/Repository.php       |   7 +-
 .../Magento/Framework/View/Asset/Source.php   |  15 +-
 .../Magento/Framework/View/Config.php         |   7 +-
 .../View/Design/Fallback/RulePool.php         |  19 +-
 .../Fallback/Resolver/Alternative.php         |   2 +-
 .../Fallback/Resolver/Simple.php              |   5 +-
 .../Theme/Customization/AbstractFile.php      |  10 +-
 .../View/Design/Theme/Customization/Path.php  |  12 +-
 .../Framework/View/Design/Theme/Image.php     |  11 +-
 .../View/Design/Theme/Image/Uploader.php      |   6 +-
 .../Framework/View/Element/Template.php       |  11 +-
 .../View/Element/Template/Context.php         |   8 +-
 .../Framework/View/File/Collector/Base.php    |   5 +-
 .../View/File/Collector/Override/Base.php     |   5 +-
 .../File/Collector/Override/ThemeModular.php  |   5 +-
 .../Framework/View/File/Collector/Theme.php   |   5 +-
 .../View/File/Collector/ThemeModular.php      |   5 +-
 lib/internal/Magento/Framework/composer.json  |   2 +-
 pub/errors/processorFactory.php               |   6 +-
 pub/index.php                                 |  13 +-
 setup/composer.json                           |   2 +-
 setup/config/application.config.php           |   1 -
 setup/config/autoload/global.php              |   6 -
 setup/module/Magento/Config/src/Config.php    |  10 -
 .../Magento/Filesystem/src/Directory/Read.php | 138 -----
 .../Filesystem/src/Directory/Write.php        |  75 ---
 .../Magento/Filesystem/src/DirectoryList.php  | 118 ----
 .../Filesystem/src/Driver/DriverInterface.php |  82 ---
 .../Magento/Filesystem/src/Driver/File.php    | 162 -----
 .../Magento/Filesystem/src/Filesystem.php     | 105 ----
 .../src/Controller/ConsoleController.php      |   5 +-
 .../Data/FilePermissionsController.php        |   6 +-
 .../Controller/Install/StartController.php    |   1 +
 .../src/Framework/DB/Adapter/Pdo/Mysql.php    |  11 +-
 .../Magento/Setup/src/Model/AdminAccount.php  | 166 ++++-
 .../Setup/src/Model/DirectoryListFactory.php  |  73 +++
 .../Setup/src/Model/FilePermissions.php       | 175 ++++--
 .../Setup/src/Model/FilesystemFactory.php     |  66 ++
 .../Magento/Setup/src/Model/Installer.php     |  44 +-
 setup/module/Magento/Setup/src/Module/Dir.php |  13 +-
 .../module/Magento/Setup/src/Module/Setup.php |   7 -
 .../Magento/Setup/src/Module/Setup/Config.php |  17 +-
 .../Setup/src/Module/Setup/ConfigFactory.php  |   2 +-
 .../setup/readiness-check/progress.phtml      |   6 +-
 .../Setup/view/magento/setup/success.phtml    |   1 +
 setup/pub/magento/setup/install.js            |   5 +-
 setup/pub/magento/setup/success.js            |   1 +
 1108 files changed, 18762 insertions(+), 9589 deletions(-)
 create mode 100644 app/code/Magento/AdminNotification/README.md
 create mode 100644 app/code/Magento/Authorization/README.md
 create mode 100644 app/code/Magento/Backend/README.md
 create mode 100644 app/code/Magento/Backup/README.md
 rename app/code/Magento/{CatalogSearch => Catalog}/Model/Layer/Search/CollectionFilter.php (84%)
 rename setup/module/Magento/Filesystem/src/Directory/WriteFactory.php => app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Field/Resolver.php (78%)
 create mode 100644 app/code/Magento/CatalogSearch/Model/Adapter/Mysql/Filter/Preprocessor.php
 rename lib/internal/Magento/Framework/Filesystem/WrapperFactory.php => app/code/Magento/CatalogSearch/Model/Layer/Search/ItemCollectionProvider.php (52%)
 create mode 100644 app/code/Magento/CatalogSearch/Model/Layer/Search/Plugin/CollectionFilter.php
 create mode 100644 app/code/Magento/CatalogSearch/etc/catalog_attributes.xml
 create mode 100644 app/code/Magento/Checkout/README.md
 create mode 100644 app/code/Magento/CheckoutAgreements/README.md
 create mode 100644 app/code/Magento/Cron/README.md
 create mode 100644 app/code/Magento/CurrencySymbol/README.md
 create mode 100644 app/code/Magento/Directory/README.md
 create mode 100644 app/code/Magento/Eav/README.md
 create mode 100644 app/code/Magento/Email/README.md
 create mode 100644 app/code/Magento/GiftMessage/README.md
 create mode 100644 app/code/Magento/Integration/README.md
 create mode 100644 app/code/Magento/Log/README.md
 create mode 100644 app/code/Magento/Multishipping/README.md
 create mode 100644 app/code/Magento/PageCache/README.md
 delete mode 100644 app/code/Magento/Paypal/Model/Payment/Transaction.php
 delete mode 100644 app/code/Magento/Paypal/Model/Resource/Payment/Transaction.php
 delete mode 100644 app/code/Magento/Paypal/Model/Resource/Payment/Transaction/Collection.php
 create mode 100644 app/code/Magento/Persistent/README.md
 create mode 100644 app/code/Magento/Sales/README.md
 create mode 100644 app/code/Magento/SalesRule/README.md
 rename {lib/internal/Magento/Framework/Search => app/code/Magento/Search/Model}/AdapterFactory.php (96%)
 rename {lib/internal/Magento/Framework/Search => app/code/Magento/Search/Model}/SearchEngine.php (84%)
 create mode 100644 app/code/Magento/Search/etc/config.xml
 create mode 100644 app/code/Magento/Store/README.md
 create mode 100644 app/code/Magento/User/README.md
 create mode 100644 app/code/Magento/Webapi/Controller/Rest/Response/DataObjectConverter.php
 create mode 100644 app/code/Magento/Webapi/Model/DataObjectProcessor.php
 create mode 100644 app/code/Magento/Webapi/README.md
 create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Block/Adminhtml/Product/Composite/Configure.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Constraint/AssertBundleProductInCustomerWishlistOnBackendGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/CustomerIndexEdit.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Bundle/Test/Page/Adminhtml/OrderCreateIndex.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Block/AbstractConfigureBlock.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Composite/Configure.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ManageProductsStockTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/test.csv
 delete mode 100644 dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/UpdateSimpleProductEntityTest/testUpdate.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertAddedProductToCartSuccessMessage.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductIsNotEditable.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertProductPresentInShoppingCart.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/AgreementGrid.php
 rename setup/module/Magento/Filesystem/src/FilesystemException.php => dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.php (81%)
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit/AgreementsForm.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Block/Onepage/AgreementReview.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsAbsentOnCheckout.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsInGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsOnCheckout.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Constraint/AssertTermsSuccessSaveMessage.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Fixture/CheckoutAgreement/Stores.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/CheckoutAgreementInterface.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Handler/CheckoutAgreement/Curl.php
 rename dev/tests/functional/tests/app/Magento/{UrlRewrite/Test/Page/Adminhtml/UrlRewriteIndex.xml => CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementIndex.xml} (81%)
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/Adminhtml/CheckoutAgreementNew.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Page/CheckoutOnepage.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/Repository/CheckoutAgreement.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/CreateTermEntityTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestCase/UpdateTermEntityTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/TestStep/DeleteAllTermsEntityStep.php
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/constraint.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/fixture.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/page.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.php
 create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertConfigurableProductInCustomerWishlistOnBackendGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Page/Adminhtml/OrderCreateIndex.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Block/Adminhtml/Product/Composite/Configure.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Constraint/AssertDownloadableProductInCustomerWishlistOnBackendGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/CustomerIndexEdit.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Downloadable/Test/Page/Adminhtml/OrderCreateIndex.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.php
 create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Block/Adminhtml/Product/Composite/Configure.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInCustomerWishlistOnBackendGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Constraint/AssertGroupedProductInItemsOrderedGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/CustomerIndexEdit.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/GroupedProduct/Test/Page/Adminhtml/OrderCreateIndex.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Reports/Test/Page/Adminhtml/Bestsellers.xml
 create mode 100644 dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AbstractAssertTaxWithCrossBorderApplying.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxRuleIsAppliedToAllPrices.php
 rename dev/tests/{integration/framework/Magento/TestFramework/App/Filesystem/DirectoryList.php => functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderApplied.php} (52%)
 rename setup/module/Magento/Filesystem/src/Directory/ReadInterface.php => dev/tests/functional/tests/app/Magento/Tax/Test/Constraint/AssertTaxWithCrossBorderNotApplied.php (52%)
 create mode 100644 dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxCalculationTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Tax/Test/TestCase/TaxWithCrossBorderTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteCategoryNotInGrid.php
 create mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Constraint/AssertUrlRewriteUpdatedProductInGrid.php
 rename dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Fixture/UrlRewrite/{IdPath.php => TargetPath.php} (93%)
 create mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/test.csv
 delete mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateCategoryRewriteEntityTest/testCreateCategoryRewrite.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/test.csv
 delete mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/CreateProductUrlRewriteEntityTest/testProductUrlRewrite.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/test.csv
 delete mode 100644 dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteCategoryUrlRewriteEntityTest/testDeleteCategoryUrlRewrite.csv
 rename dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/DeleteProductUrlRewriteEntityTest/{testDeleteProductUrlRewrite.csv => test.csv} (67%)
 rename dev/tests/functional/tests/app/Magento/UrlRewrite/Test/TestCase/UpdateProductUrlRewriteEntityTest/{testUpdateProductUrlRewrite.csv => test.csv} (57%)
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertMoveProductToWishlistSuccessMessage.php
 rename dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/{AssertBundleProductDetailsInWishlist.php => AssertProductDetailsInWishlist.php} (60%)
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/Constraint/AssertProductInCustomerWishlistOnBackendGrid.php
 rename dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/{AbstractWishlistOnFrontend.php => AbstractWishlistTest.php} (82%)
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnBackendTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ConfigureProductInCustomerWishlistOnFrontendTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/MoveProductFromShoppingCartToWishlistTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest.php
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestCase/ViewProductInCustomerWishlistOnBackendTest/test.csv
 create mode 100644 dev/tests/functional/tests/app/Magento/Wishlist/Test/TestStep/AddProductsToWishlistStep.php
 create mode 100644 dev/tests/integration/framework/Magento/TestFramework/App/Filesystem.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/UrlRewriteTest.php
 create mode 100644 dev/tests/integration/testsuite/Magento/CatalogImportExport/Model/Import/_files/product_to_import_invalid_weight.csv
 rename {app/code => dev/tests/integration/testsuite}/Magento/CatalogSearch/Model/Search/CatalogTest.php (100%)
 delete mode 100644 dev/tests/integration/testsuite/Magento/Framework/App/FilesystemTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php
 delete mode 100644 dev/tests/integration/testsuite/Magento/Theme/Model/Wysiwyg/_files/theme/image/some_image.jpg
 create mode 100644 dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/Initializer/StockItemTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/CatalogInventory/Model/Stock/ItemRegistryTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/ConfigurationTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryList/VerificationTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/App/Filesystem/DirectoryListTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Framework/App/FilesystemTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/App/Route/ConfigInterface/ProxyTest.php
 rename app/code/Magento/Checkout/Controller/Onepage/Progress.php => dev/tests/unit/testsuite/Magento/Framework/Backup/_files/app_dirs_rollback.php (68%)
 delete mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverFactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/DriverPoolTest.php
 delete mode 100644 dev/tests/unit/testsuite/Magento/Framework/Filesystem/WrapperFactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Model/AbstractExtensibleModelTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomFactoryTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/DataBuilderTest.php
 rename setup/module/Magento/Filesystem/config/di.config.php => dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSample.php (55%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleDataBuilder.txt
 rename setup/module/Magento/Filesystem/Module.php => dev/tests/unit/testsuite/Magento/Framework/Service/Code/Generator/_files/ExtensibleSampleInterface.php (66%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Paypal/Model/Report/Settlement/RowTest.php
 rename dev/tests/unit/testsuite/Magento/{Framework/Search => Search/Model}/AdapterFactoryTest.php (94%)
 rename dev/tests/unit/testsuite/Magento/{Framework/Search => Search/Model}/SearchEngineTest.php (91%)
 create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/DataObjectProcessorTest.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataInterface.php
 create mode 100644 dev/tests/unit/testsuite/Magento/Webapi/Model/Files/TestDataObject.php
 rename dev/tests/unit/testsuite/Magento/Framework/Filesystem/Stub/Wrapper.php => lib/internal/Magento/Framework/Api/AttributeInterface.php (75%)
 rename setup/module/Magento/Filesystem/src/Directory/WriteInterface.php => lib/internal/Magento/Framework/Api/ExtensibleDataBuilderInterface.php (56%)
 create mode 100644 lib/internal/Magento/Framework/Api/ExtensibleDataInterface.php
 create mode 100644 lib/internal/Magento/Framework/App/Cache/README.md
 delete mode 100644 lib/internal/Magento/Framework/App/Filesystem.php
 delete mode 100644 lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Configuration.php
 delete mode 100644 lib/internal/Magento/Framework/App/Filesystem/DirectoryList/Verification.php
 create mode 100644 lib/internal/Magento/Framework/App/Filesystem/README.md
 create mode 100644 lib/internal/Magento/Framework/App/PageCache/README.md
 create mode 100644 lib/internal/Magento/Framework/App/Route/ConfigInterface/Proxy.php
 create mode 100644 lib/internal/Magento/Framework/Archive/README.md
 create mode 100644 lib/internal/Magento/Framework/Backup/README.md
 create mode 100644 lib/internal/Magento/Framework/Convert/README.md
 create mode 100644 lib/internal/Magento/Framework/Encryption/README.md
 create mode 100644 lib/internal/Magento/Framework/File/README.md
 delete mode 100644 lib/internal/Magento/Framework/Filesystem/DriverFactory.php
 create mode 100644 lib/internal/Magento/Framework/Filesystem/DriverPool.php
 create mode 100644 lib/internal/Magento/Framework/Filesystem/README.md
 delete mode 100644 lib/internal/Magento/Framework/Filesystem/WrapperInterface.php
 create mode 100644 lib/internal/Magento/Framework/Flag/README.md
 create mode 100644 lib/internal/Magento/Framework/Image/README.md
 create mode 100644 lib/internal/Magento/Framework/Math/README.md
 create mode 100644 lib/internal/Magento/Framework/Model/AbstractExtensibleModel.php
 create mode 100644 lib/internal/Magento/Framework/ObjectManager/Config/Reader/DomFactory.php
 create mode 100644 lib/internal/Magento/Framework/Option/README.md
 create mode 100644 lib/internal/Magento/Framework/Profiler/README.md
 rename setup/module/Magento/Filesystem/src/Directory/ReadFactory.php => lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/Resolver.php (77%)
 create mode 100644 lib/internal/Magento/Framework/Search/Adapter/Mysql/Field/ResolverInterface.php
 create mode 100644 lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/Preprocessor.php
 create mode 100644 lib/internal/Magento/Framework/Search/Adapter/Mysql/Filter/PreprocessorInterface.php
 create mode 100644 lib/internal/Magento/Framework/Service/Code/Generator/DataBuilder.php
 create mode 100644 lib/internal/Magento/Framework/Service/Data/ExtensibleDataBuilder.php
 create mode 100644 lib/internal/Magento/Framework/Shell/README.md
 create mode 100644 lib/internal/Magento/Framework/Stdlib/README.md
 create mode 100644 lib/internal/Magento/Framework/Validator/README.md
 delete mode 100644 setup/module/Magento/Filesystem/src/Directory/Read.php
 delete mode 100644 setup/module/Magento/Filesystem/src/Directory/Write.php
 delete mode 100644 setup/module/Magento/Filesystem/src/DirectoryList.php
 delete mode 100644 setup/module/Magento/Filesystem/src/Driver/DriverInterface.php
 delete mode 100644 setup/module/Magento/Filesystem/src/Driver/File.php
 delete mode 100644 setup/module/Magento/Filesystem/src/Filesystem.php
 create mode 100644 setup/module/Magento/Setup/src/Model/DirectoryListFactory.php
 create mode 100644 setup/module/Magento/Setup/src/Model/FilesystemFactory.php

diff --git a/.travis.yml b/.travis.yml
index ea1c267b481..31c7946798c 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 89394c5c2cc..da0af54df5b 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 00000000000..c74d794fcce
--- /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 3d75489db0b..5e226f33c31 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 00000000000..02c42b61f78
--- /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 9801a83ab4a..4a865d68354 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 aa4c04928f9..e24e4b0d690 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 4fc7c899765..74bab81f41e 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 656b3931b13..017fff482d2 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 9596a04f3e3..29c0b21cacb 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 16312478bb6..ab1d22bfc92 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 97d9ecbe19f..687d493904f 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 ffd1a9df18f..1416a260cd0 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 b49f3a99614..7612bc3734a 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 fc34b881e72..12cffc5be8a 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 614fb677d30..fff8c358482 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 00000000000..385ca0f9176
--- /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 d1acaa1ece5..efb4d4cfa36 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 388baac9c82..1f121546b67 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 6a41d6c42b3..fcd84fe0cca 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 94c7927e5c1..08b01ed3a9f 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 4b38d04e4f3..c260073c2fb 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 a3c64cabe04..c16e5261213 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 b93d7125ef4..683ff7945e5 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 df14190b718..43687e619b9 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 00000000000..661f8a5d6dd
--- /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 88026055c8f..8f5754f8e07 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 c1d30c9cf4c..bccf84b173c 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 4d7f57e5e92..cbb823a8a8a 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 c12f8df0c5a..4b9122d25ce 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 51d2c4c6274..90953b101aa 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 bab8976e127..d0e94cec88d 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 7e5ffa62633..4f13ca720f0 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 f7ed3ae927f..d77c820d3ca 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 4ac212eefae..66bae56e6c8 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 aeb2b865eac..e31b4b16776 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 ae4512a6651..30911032871 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 d303bad8442..89d2c357b36 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 c306c980058..eee14a3d7da 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 a63a8c46757..4456b5b7b90 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 b0d5f60a434..e50b4ea3904 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 c3b6de54970..313507ef63b 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 48c850836f0..9fd739a5bb4 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 e6c5f4f169d..1a2a476e822 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 b1d5e1fbd21..c75345d496a 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 bad9f768c13..9e44a1685b6 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 04b8edf9b46..b4e2ebb56f3 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 5ac4bd524d1..3474930ad77 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 5c0b8788978..183594e8200 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 a926fdae786..971026714d2 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 298b5c23d4e..092edb9b293 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 865a7f2ee4f..9b00dd49a2e 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 c87b776ff12..79bf34f7002 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 98361f06b2f..594f0d7f552 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 ced577ac55d..4fc18afeaa1 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 ffc76618132..ecd76ffd110 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 b9924e9aa67..ce74fbf6b6d 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 0c80699b6dd..7471901226f 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 46b90630be5..c15d2d0ceea 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 59df420f658..97cc6699fa1 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 d330ebfb2fb..7c56db0754c 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 9b76a57f286..916a5eaf8a3 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 7bef8186538..17653dfb665 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 04dc6c2090f..789ddeecac7 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 4ab9afd21f5..b2ee4d908e2 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 6577cdf072b..59e31b7cc4a 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 ddf712742d1..50a2ad72f26 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 cbb3aaf919c..7eb2c87066d 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 573ee3909e1..e2df54013b9 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 8c490dcd71f..5539ac7e891 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 ed26a122ac8..e6bd320e760 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 63bca606476..932632895f5 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 00000000000..6e077c36cee
--- /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 98f994a5ba2..82dceefabe6 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 f26ec04423e..571d46e9d03 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 d0360c88f00..8af2e3822a6 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 0ea1ee1c91a..f578ed787fe 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 00000000000..a42f362d3bf
--- /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 84c42753ec3..9dd24ff3dec 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 007cebc8321..e5b794a91a4 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 15da583d816..e914b79a8a4 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 ac0c24b79b6..99d339cacce 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 5ba27c635f0..37a0e51de34 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 333f72508f4..815bde46c4f 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 ecffab8fd6e..5d0beab48cd 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 2ad1ef807b1..7acd5c9050c 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 349226343a4..c3226e3cb96 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 00000000000..eff16b15c93
--- /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 a354a4153f4..52a3239ecf4 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 b23b1bb90db..d94de239c61 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 89b2b8fe34f..b593ecfe741 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 0d2e305b3df..836601c0fe4 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 4c0895517e9..259048544ab 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 a82c21b96c1..632afb43eab 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 46ad4629866..42005283eef 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 f7980d9b277..31c5c5b75dd 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 4a2b61c66fb..bb29d155048 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 854562b517b..b94c6112f90 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 d17414f82ff..29f4829bdda 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 9558349a0a1..8d95e6edabe 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 6c353ca06c6..c9890bc9eec 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 00000000000..d395d3f0776
--- /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 83e1f7de5f3..f47d8862767 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 690cfd7c30f..8e0b0d1c7f8 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 1ca53780b30..9691eec44e9 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 406c6860684..1fd21b2bf6c 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 c3abebefd74..b1202eb98fe 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 1427051831a..47c0c465ef0 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 d657f9c0201..79984acc482 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 cfc2a33425d..82ae00681ed 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 caa591b0362..e2c2a5c9371 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 6390f90e3b5..3bef151f61c 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 3ee84d162de..3a5885f7cde 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 4a1ca0823b8..90ee6e54e6e 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 afea3b33104..2e44c33c8bd 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 ff5eb7aea60..2e4a62059ea 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 f537f5d8042..733bd5eaa79 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 e643df26347..14c9dae7f12 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 f170475d9f2..343640c2242 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 b6d24ef3a31..9c775f722af 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 509219fcc20..e0ac9919693 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 8f2ca64d084..c38590aa332 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 eb12589071c..aac85942d9e 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 78124a81bba..3f11e19f1bf 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 b2b38079320..5b4c401d48d 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 05712a19a0e..0a2357fec14 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 0e252acd74c..e74a7b4c5ee 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 b6650cd14a7..7975c482fe8 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 adeadd88a3f..f5473768f43 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 2124e00c6b8..d81f628688a 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 ab448fbae0b..f3ec1b2658b 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 5c858a79074..30f4b5b7887 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 2a3d580d252..a94a3dbc9a2 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 c421182ac3f..3cb79d5b15c 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 6dbe55e16dc..6a17c3675e4 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 20b45310af2..712a1399d94 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 4447057cfa7..2a6005dde74 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 48212c9196a..be815921f52 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 7e3d641fddd..169688caf2b 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 5c965a3b485..cf914a488e7 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 2543f3f3d90..7b18759555c 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 1f42987f194..c372b11df16 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 cc0ccbe38e5..52a642e8787 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 ee3e19a4a97..5f1c4458e09 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 d798a79f5b2..fef6185f701 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 66387563d75..2c8b582e642 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 8e770c6c8a2..432232f104a 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 00000000000..3d31bffd1b5
--- /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 25bb597d6a2..730e486ff1c 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 2274a7ed767..70d3430f77e 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 6dda06c3561..882a708d045 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 1d5412faf40..eee32b41b62 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 9c098f0588b..921322bda8b 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 c6751601562..f6f5dc84506 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 c8b0aa35b4e..e8526277175 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 40d09c13574..049b90baebc 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 93e4a99c14a..8f4bf045826 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 ede920d029c..d021717c894 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 bb657fd5f35..6c63a63f593 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 ab3de4e54aa..2caf5e96352 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 6b78393236a..80347684aef 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 23985f8e513..b536fcfea12 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 ced09c56822..93c08d22d69 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 0a8868324d5..1f40c727c61 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 91364a87384..6dddf4ddb0b 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 3f479431463..ec65327bb64 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 b0ff91b2808..eabbb30c291 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 9f3308d7224..4dbe5206737 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 13ee674b96b..158e90bbe5e 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 1d8445a6804..160f67486c9 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 3fc0cd77a15..a3cb28bd6b6 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 e4b938d3a48..cbb006b9c3e 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 bc0735adaa8..0c1fcb0afc3 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 43c3053c391..ffe475b85f3 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 665b8fa943d..001863e86b1 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 e490c611df3..c77d0fa0929 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 1651d4aca47..2639da6165e 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 7d45405e2ae..e1d3b05d5e0 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 79b3331b3d2..695029dc137 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 ebd6b27a17c..5b40d0f1669 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 27c7dedf903..ef5a8494570 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 6f6749c94da..6d8bbe5f89a 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 85e2a284bf3..aab865c8b3b 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 00000000000..0e9e37ff8db
--- /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 e8822a751d0..53d46e89796 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 00000000000..aa65b869b3c
--- /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 ee5d01bed4f..953c93c3365 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 77e16668710..d3f647ad217 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 0a7c45533c2..a1de7918903 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 899114e148a..1fd4eb9f235 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 71b4d069ed9..25295d5f97a 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 f2300866397..94c4dc96e2d 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 f8dd56d5e66..fc7862020e7 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 db0ce66754b..e75aafcb8e6 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 e31874c11ec..364a34ece0f 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 0e0bc2ff8f8..9b906a17bd7 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 d4ecf8c0db1..02cd4d0424d 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 f8b05238f42..0d4e34f0ca4 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 fae72900d3f..393c9acaffa 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 72e086e8620..74e13e17db3 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 62a121220d0..f08d5176930 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 00000000000..6faa14b7b8a
--- /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 a6e05bcc522..90f5c107c09 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 e93c41183f0..a9325045229 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 6740279c37e..b32ada6a116 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 e9c082f7858..12e411ab661 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 179fc32c120..c35a1e8fa9f 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 b0c0d9f5216..3f9736b32ac 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 f7aecd4512c..8c98f0d923e 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 57ff82e322d..f6c55fa2e0a 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 8c6f527aef4..be2ab99cc77 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 f4edf6532b2..fe197266f61 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 b94d962e579..39ddc67088b 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 00000000000..6710044ac6c
--- /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 60ad78880a4..82a538e9635 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 f216daea288..106e249f281 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 d1461537582..df63f8e50fa 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 41cce270d9a..d68ab721a2a 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 590e0b27342..1d500aa4845 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 00000000000..b1fb93053d8
--- /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 6d50da97432..1549a791c0b 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 bb05a80c683..fecb102ae3b 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 00000000000..7cc52a2f7cd
--- /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 59202b9844d..e351e8df156 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 152f05f061e..85d3f515860 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 0ff7a879bac..58a3c7bcb1d 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 b603464d644..8f32a889e1b 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 3c5f17304fe..5c47d48a746 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 a8874b7adc9..2f11b383ee6 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 16feb6d641a..b0991ae3b4a 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 b7019fc7880..a3c047e0519 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 e69eeb805ea..2b1c7d83207 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 49053185f44..b099630b9d5 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 73f91ed761a..d30281c7729 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 b4e77702c70..b9db093d79e 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 c938f3e4555..09b353c8326 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 c6bc35cf35d..ac5ef756db9 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 1e8f33681f4..339c4e8c2bb 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 5b462258648..0f8178a709b 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 aa6d25a9e50..f157d656949 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 d2451cea910..4524228d97d 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 aa3b560b680..ade0deb9174 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 a5d8e062ae6..0905015002e 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 f84527f37f3..d5c9766df18 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 c3ae9859d41..d687c487d4c 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 6636bc52c35..a7011031a7b 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 37ecc5abf20..18073a55788 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 85cbd6e21ab..45b259d6740 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 3ce4e3283dd..edde8e3bdaf 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 a8940519f1e..5176dd7b6f6 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 69534670555..0a5554f6fdd 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 2af58797e3f..1b10a831c09 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 2e2a0f33021..68903158c40 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 00000000000..2e4ebb5bf55
--- /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 8cdd5069e80..68c297e7be7 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 a657286e691..96aa757a73d 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 f3120fea330..9f35fc1fe73 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 ae58e1f0658..915a77c20f6 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 00000000000..28fa82899ce
--- /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 476ac89353c..dd51872c27b 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 bfeb9c52ac1..393cf94bcb9 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 00000000000..207416a0945
--- /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 7feeefd3abf..2afe71ca06b 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 264b8c16f0c..bb09c007d39 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 ac4a4f970fc..780750ce480 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 b65ce76e915..91cd02eaba6 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 9ac8c14f47a..1296d8eb4db 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 4a8cea06b6e..a6da0678113 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 57b8b45a522..e2f7f0b1d13 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 f86e484363a..7e76bd9cad1 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 2dd0962186c..4c0e0a5e85f 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 5816ddbd41d..3bb5161d658 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 a137df12e57..9c340443d98 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 00000000000..1b109926fd9
--- /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 1ee2ef856d9..a7436ff4386 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 a26aa7f6470..469fa538aaf 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 1dc29b8dccd..f4e6db4ef45 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 094f7143eef..21703f3a7c3 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 af66433aba8..a0174e2caf8 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 7d6559dbf5a..2d78245680d 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 7e2233f6dae..3d8c74953bd 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 b27fa9b4b6f..cb6c4e3e0e2 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 48605cadf2c..74ef84603eb 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 06f0db749d1..00000000000
--- 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 131ed0774d7..5be8d99ef96 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 dade863f7cf..d37d74f0736 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 cf14fce0b95..00000000000
--- 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 5e8fe675756..00000000000
--- 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 57abe8c5fcb..c7d871fb2c8 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 dadd399fed5..d729bdac674 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 bce11404666..b8d389a8f4e 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 00000000000..7f6e8b3d0e9
--- /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 4b00a96a16e..c00d7821a1b 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 4877cafbb6d..53fb25d782b 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 dc6fa62014d..6fcaf9d53f0 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 b655c0287a8..05e884fda71 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 8b0bf5a41a6..8b43ed52901 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 5fd4c864669..b55a4afce36 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 abf2cf1b9a5..5222b81fb37 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 e42698872c9..4bca57ee4ed 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 daf72b3ebf9..3e85564cbb4 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 b6e31473540..921210b5132 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 d8d083a1f78..d0eff51659c 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 11674d03e74..a070ed2fa16 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 dcc59b3f24c..1b8027909ea 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 a05b6e7fa34..c5131fc0180 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 63d39bcbaf6..407dde8f021 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 d272676b990..10e9e61613d 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 2f65a5e33ca..5432f27b2c0 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 005a12ab957..45cfc9ea4b6 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 c397944f033..9a616bdf274 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 19da1836eee..dd41de73b78 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 f6abf2458b2..5cdb569f2b5 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 0349563635d..2b9b1ae2739 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 036316d46fe..d82690fce68 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 9776446793e..81b583e6f9a 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 5b586573591..51d089bdc3a 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 1bdf29faffa..b855b99f143 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 1f1043b2deb..894bea9b036 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 d81476ac913..1ff05faecf0 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 5e18f05d5ea..73da450f987 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 083950a4c15..9ccd180aa1e 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 390c9c9b8b0..495d4988b9f 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 45cabd7b88b..7fc2713ff1f 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 a4c2df9c4b2..9423bbe2dda 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 75c1e64f7dd..80c3ab5846a 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 3d1417a7717..f9ad8e92396 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 950d54e8f53..83a42d66c12 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 ae09cbb8eff..ee11ead8696 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 a03f0ff1066..aa4eeb67b35 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 a68d066a8d7..373ba48ebaa 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 d3f518bbd75..3d273b887fc 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 051450cc8c8..1a31281fd71 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 761b1e89b6a..c223d2e9689 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 432b5a5588a..0b9ebb76df0 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 95c713cf2b0..f2a88f11291 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 80278009cef..3f4f88a41fb 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 d412c33b44f..158830fa262 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 90077ab2b20..2d9694c18af 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 a53815a2311..64d8b592d43 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 27c62bd5907..34ba3cb190d 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 48e6984797a..448c87f7b46 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 590e3e81556..46bfe72cab3 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 fa8e77a8031..99f7f7c2a3b 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 7de7150e602..6ccc89e61f5 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 0d50acc3067..771e3c854be 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 eeaee956e26..3e8267c794c 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 cae54d456a4..733d3ba18b2 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 5e7dbaee069..91741dc208a 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 3f80b7abb59..5d7c9fc78a1 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 6c3d97c8a23..3714622c6ad 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 cad39211128..6a718b9d256 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 33c6f6b5e34..1962d4440bc 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 451454184fd..de37ce5a0bb 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 aa64ce9146b..6c103c73bbc 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 b5c28bceb75..2bbc5eceaa7 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 11b79cd31fe..4ea6b9bdee7 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 db8f296fcca..2993d623b86 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 7e4b653c54c..10c8c4cde93 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 e5dcb79e6b4..bfbeade3300 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 e4c7a5508dd..0c3bb1413ca 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 2fdf5c29c15..c08bd2305e7 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 68c63ee63d3..7f405ed549a 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 28430cc641c..a72824e9ee5 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 2221b251087..56303418044 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 2ae59f42080..180e0ce458e 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 fcc3c04b4c8..51e51653825 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 f7b82edb798..94bfa6f980f 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 e4369d0d99d..934771be0a9 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 f6362aea335..23ee9c19df1 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 8db62816739..2f4722981e2 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 ce285efe13a..ce0c5cc9328 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 00000000000..69068f5bfc5
--- /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 6f08f6dcf96..a13bc1fea58 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 cccd4fe1a1b..527b6a18f57 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 3229084369b..2d183599535 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 9e20e45ad6c..05aeedaa89c 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 00000000000..88fb4e2acd4
--- /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 363b60b1db4..6cce4de8ff6 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 3540caf6280..6570702eceb 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 a73a1f0b37d..5bdf1aebb81 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 7a8c3d61362..0ef499cdc57 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 07ca65b8ad0..9cdb6bd24a2 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 23fdeba483e..e3bbade41e2 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 81a7ea3a71d..6c3bb69b121 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 6fee0377130..ac0713d4187 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 430437277ef..c155cfc008a 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 00000000000..1a712f39fb4
--- /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 e62186fc9d0..f352247bb3a 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 1b9192004bf..d1ba5b13f80 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 fa266837603..dc72c579abc 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 c163bf514e2..d2026c84fdd 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 764bce4d25d..7a474590033 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 f0ca7adc66b..c88c0fe14d7 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 149ecef4d19..37de81fa153 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 19ff4bf44a4..b72f69942a1 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 a723d6df8cc..262895eb50d 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 1a2090b2d66..6eff5fb3b84 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 cabbee65dec..821ba449ca0 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 2d1c25ac838..5cde11d3546 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 f7a5909ced6..7707cb93c5d 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 49850bc6a97..36182126fbb 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 e18f63819dd..78bdfbe9be6 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 111554471a3..26060925153 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 798a0d19d25..70132280dd5 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 6ab4d20352c..da09bf2c17f 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 00000000000..877dd4a3cab
--- /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 2b1fd964817..a9a392271ae 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 af3eff5a727..159c354a0be 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 fec4df73dbd..055a9ee65fc 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 7950a108970..f449b1c6c6c 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 751bb8361df..d1ec4f8766c 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 a73333e0c8e..ae970975d12 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 83fb8675254..179d760a809 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 5f6481da900..5a5b33101a1 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 19a3a4f7b9a..7fa082a253b 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 c36f859dc82..4869de1a5cd 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 522ee680896..45d6ec1032c 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 7d4816d5b44..d26022a49c3 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 9440c098570..d35b2916283 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 f2ccce01d65..7a6c405b397 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 98ada5862cc..68d8194f6a0 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 a5058ffedc6..c167924bbc6 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 bcf5b496ca1..fedf4026864 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 1d3350dc01e..4f9caf569bd 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 09386c0da92..acdb79cbb3c 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 132ffa1d5e1..dbb327e2a9a 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 94fa4dc1459..08c4a580d3e 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 8d9285d8e08..93644313573 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 7f5f3eddee1..3b75c0d8e27 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 c8cf4d2ee27..1e674987613 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 3f23befedde..bb6c52f7e06 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 399b6157ea8..3946a9f2ae4 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 00000000000..afce8e3cb9c
--- /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 07b6273e679..e56f90a71f9 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 664270d7e52..4720de63b18 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 0e90195ea51..28182fdb83c 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 af6fe32e749..56a19d27bb1 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 00000000000..5b8db14e58c
--- /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 8ab2e781126..c0a91eb2dc4 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 89bb7ea0686..6e59823cdbd 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 260da516f1f..065fcea3c77 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 84c029afdab..e71a9a49f17 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 00000000000..33c56024594
--- /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 2857b810b61..f8a109e797c 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 00000000000..26f7ad9f09e
--- /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 8a945dd19d1..a3f63e1b46d 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 d3ace4045b0..3111d16dd80 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 fd61ec10a11..7fb3729b99b 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 e832c4940b5..568083e4055 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 6a887bb730e..2bdbd0203da 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 a523978089f..664502c7239 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 b2b5a985747..e6a83cade6f 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 1552118f942..4ead20764ac 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 baa8bbf95ba..3fda5bbc12b 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 47638113a82..77e4d7ee441 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 4f9ef44a50f..a742b0f280f 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 5887285b1b9..582a39d26ae 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 ba81cbdab95..ee31ea45b45 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 9227ca996c8..021dd7eea29 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 ca7ed601047..1e26e1d4793 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 63fa35ed956..2cece03aef0 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 de93b622831..ffc2c17d010 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 e4f07c27fa9..0587e31ff58 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 253ad49461b..bef4c22e8cc 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 3277ffd526e..414a86f35d5 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 1bcaa3cd2ac..d3863710ee8 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 80a2a4efda1..1af71cdef8d 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 07f4a8f5bba..a77cb7c628f 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 9c4992e1db6..7edb862a4cd 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 0b621cc2341..720bbf2ee72 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 e9ba06bc09d..c88686b4d7d 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 78e17ebd457..adee97fc7b0 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 1d4f58e6dec..de4c770dc60 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 acf248feedb..ce14b41eec2 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 4852b48a899..694f1f684bd 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 a1c75d0a375..218249b198d 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 ba02099344b..08d789294b3 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 ecaa287d4ed..6a3dc743dfb 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 00000000000..826a7d5a142
--- /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 00000000000..51e1191a5fc
--- /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 00000000000..07daa9e5bb2
--- /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 446c8c679c2..6a7e3892b49 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 7467f1d2bd0..7a49920da14 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 00000000000..e054635317c
--- /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 00000000000..7b2533af134
--- /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 b5cd0377572..f3f31ade99e 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 00000000000..a7a227b0ce8
--- /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 cf7b8faf942..95a4d8736fa 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 00000000000..7e592d4b75d
--- /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 b1a3c5c52d1..db7bd7297e1 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 ea5dadf6dbb..aa7f5516ee4 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 709ec32bc36..745ebf96358 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 7544902d30f..36c16cc0bb5 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 0d780437103..23352e23d38 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 5a8a6b80c4d..b2fdd0dc5f3 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 690e7d2045a..c777c6b493e 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 3c902550d6d..53274b90183 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 ea2967a46fa..d79baaab3ff 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 94d22714463..357fe6c9172 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 ce01bc394d0..228348ab7e9 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 8c6b6e98232..2f56ec5b943 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 f1c1639040e..6764e6185b1 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 d3e4f7ade69..d1dc9198058 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 89095fbc193..2f14aef0681 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 09b71b1168c..2b1b5b38dd5 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 6fea5f301b1..bc2fd6057cd 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 f42af6bc004..2e052c113e0 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 8f02c0a6472..a4833dc45d0 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 712790b6378..0be231009dd 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 00000000000..c69d4fbf25b
--- /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 00000000000..550c34dec21
--- /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 bdd82444458..45498b8313b 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 00000000000..95db56c64bb
--- /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 26fb9198a5c..00000000000
--- 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 018a42b6c05..671e2d53970 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 bbb3face4db..c7cc450d371 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 01b0d7a87ee..169854ace95 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 64f5c607393..90e20f54fc9 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 00000000000..b264dd3daa0
--- /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 00000000000..f2ed2d75c05
--- /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 00000000000..5c2d17f6ca1
--- /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 690367d7954..7414ae04374 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 5e1462297e1..c954f35e537 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 00000000000..5372505307a
--- /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 4dff3de719c..aaa98e64f84 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 00000000000..74eefc137f2
--- /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 00000000000..d189c8d00d1
--- /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 00000000000..a7c3f2be698
--- /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 00000000000..f8a80c7b3db
--- /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 00000000000..6e69cad7f44
--- /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 00000000000..10d50064dc1
--- /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 00000000000..e6f21ecdcf8
--- /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 00000000000..3753d28b41f
--- /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 00000000000..d98e1c21949
--- /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 00000000000..9c6cdca3c80
--- /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 00000000000..0c5164158db
--- /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 6747e249752..2b9b84a476c 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 00000000000..a3d10a2565f
--- /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 00000000000..ebef49638ab
--- /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 00000000000..e18fde696c5
--- /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 00000000000..fc1b89572cb
--- /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 00000000000..94adb80e4ae
--- /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 00000000000..6232a24f02b
--- /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 00000000000..7911ad0d081
--- /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 00000000000..91c7067f770
--- /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 00000000000..0625ce00faf
--- /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 00000000000..bc21743fe9a
--- /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 00000000000..15e9ccb4e72
--- /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 00000000000..f8371f64da1
--- /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 00000000000..2fa86b083de
--- /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 00000000000..0345a141792
--- /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 00000000000..21ad00b660e
--- /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 ca37435b5ab..0e0e344f393 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 6ee26d3486c..cf5789fef46 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 c38fe3940ca..ed17c18f973 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 00000000000..80eaaea6f96
--- /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 00000000000..e5dd37663e3
--- /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 958b4227b08..ceda29abf33 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 83557c27bca..96743be520f 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 eae09259a1c..23a9c6d24c4 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 903c8a5a4fc..d2b022d3505 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 025f97c0311..6a7fdebf86c 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 ba8c863d01e..ecad86d3f0e 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 1e23a248d8f..37a06d318ef 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 7899c1d0513..05e6f9547f0 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 00000000000..6735a01277f
--- /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 00000000000..f1da967f0f0
--- /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 b55efa62251..0e8648a3668 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 00000000000..b9b43db00e0
--- /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 bc9dc5a2a2c..146a2c019fb 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 e67019c0a49..89be5bfa577 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 00000000000..03df667bcce
--- /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 00000000000..d55c5d7ec32
--- /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 2e24ac40083..c403b1933a3 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 00000000000..78bf0deed74
--- /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 00000000000..ef923db9687
--- /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 432ba599957..9ab8111b139 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 774c3fa7be8..7a4a3bae189 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 00000000000..c74c6efb5ce
--- /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 00000000000..5b940aef244
--- /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 4451da99307..b24f799210d 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 00000000000..12528296994
--- /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 00000000000..bb08966dd3a
--- /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 ee4fcf2cb0c..4cb89ca9587 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 51efabb92ce..c9b4dd9b7d9 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 4c7787a3421..7e9048023a4 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 1bda5bb5e91..4be59b9b379 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 e19cf575183..5fb436aa0ab 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 00000000000..60c537110ec
--- /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 80f115c17cd..5d795c7b264 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 00000000000..a0433ba7160
--- /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 00000000000..f65ee32d299
--- /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 f306379b4f7..16fbafb47d6 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 9aad45fe513..f0903da42bb 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 7590ec78972..04e05f9ec12 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 c6dca29436e..48561b2d978 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 e006d07610c..9d365e24cb5 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 00000000000..4dc749e739e
--- /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 00000000000..3c6255166ee
--- /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 00000000000..5a10f2a8f89
--- /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 00000000000..225adeebd03
--- /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 38f3260709d..11fe79bd092 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 6e2ec59b8a9..5cb43421f26 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 6bfad738887..01c4af142b0 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 cec8de81e55..99f8eaf8936 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 68067a0b9ad..aa65f8c30a1 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 00000000000..1643c2f6b74
--- /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 7a1dd11246d..80b88007908 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 2944bfa47c7..01a95fa1da6 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 1b0e0ab5543..9ebdfeeb7fe 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 00000000000..f69a323e7e8
--- /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 dfa48c422a7..693e65973a0 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 1f91f13f2d6..de5d92962d4 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 9c0905a2456..e30522717a1 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 92c8e9956e4..334a4c05bba 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 a125fae6947..6fba60eec24 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 0b511d59707..ea5932ba4e7 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 00000000000..1ef6daada4d
--- /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 1d4ab32a0f0..00000000000
--- 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 5edc2e13e79..2ab9255ac52 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 d5e9c7b1679..680e08b0def 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 d582f2986c0..854ccc25b4b 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 00000000000..e4e693bf043
--- /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 fdfce8c0919..00000000000
--- 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 bc4565ec807..bc82db52d87 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 00000000000..1df1c16a9b8
--- /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 1f9003b2a5f..00000000000
--- 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 1951b270cf9..abb1134863b 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 4a6a2d83666..d5b350c7679 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 ddcba54e68e..0bae2353e79 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 19cd6d6c6ad..dcee34fbdaa 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 c9014c79ec4..cb82ccd2b46 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 4053cb1c002..75f69da737e 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 8c5250503db..5baa25f7f6c 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 2ee0efd91ba..db3f6387a87 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 d6a2795732a..160362b9e35 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 cd36571276d..5cbafa4a683 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 b11f0a3d560..7e148cb7130 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 bba7f2e90f6..8713215bc0e 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 00000000000..54b3e13b653
--- /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 6acd6c80e2f..2180f8cceb3 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 00000000000..66f506e61fd
--- /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 2628e40b9e1..deff5cc550f 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 65e05ac75bc..6ff171b17dd 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 4317988f091..2ac44ee759c 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 a8d0b3b26f9..92def772d1f 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 7398ee2c6d7..e41e009f833 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 b40743fd363..471cd7123f1 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 00000000000..054b5e3b297
--- /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 00000000000..740881766b8
--- /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 00000000000..e57e3a27546
--- /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 00000000000..7b192fe4280
--- /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 e856c74d5c9..9a86948f2dd 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 82731761118..8ce4d6ae2da 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 00000000000..c6270fb6661
--- /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 00000000000..d330b2779a6
--- /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 a2b41e6afab..5fd6ded0abe 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 00000000000..84e330c3bb4
--- /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 00000000000..740881766b8
--- /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 00000000000..7f87b02424a
--- /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 a5bba6d8aea..2769df12994 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 789fc0399c7..b7647311f5d 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 00000000000..ced86951709
--- /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 fc8a5f50ecb..efca4bf48e1 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 21cc7371364..e0ab8a1f019 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 cc407facec0..711f6ae10b4 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 1f4598fdf26..025835bff63 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 932cd99ccd8..9bbbc91222b 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 c9a00748ae5..8b6e197723f 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 b4fb5187b5e..1fb504a4ca3 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 a554a38b2e8..66d3f4b9fc0 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 24f9e51e008..b8a687e7d44 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 36815fc06f9..9de65b0df1b 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 2e90624cc54..a88d575a9cb 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 40d98f02c2f..00000000000
--- 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 52539c4ba5a..1b2007d2392 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 cde4b79d46f..a841528a49c 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 54b934ff142..ceae419a665 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 fb3748e4951..85d8d2d374d 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 ed577d8355e..d8f4429a83b 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 3e5f2ac1b22..d123affbf99 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 f70efba036a..4f6fdddb931 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 ce6fc4da174..ad414b25ed8 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 5f58f07e187..4a22ae2980e 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 a433616ce80..3773ec2c475 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 60f087209d3..09ec81540db 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 b7b19ccb7be..1ba1c880b7a 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 d7536203fd4..d36c37daca5 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 d58d379f966..637dc75c3fb 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 00000000000..02b5c012bee
--- /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 0c519efde67..5e7f0a3543e 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 be6ff88532f..e4c65bc79e0 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 98c6a3e760e..852514da1bd 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 3df51f368b8..df88334ac03 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 e725dd5f6b1..24a1b5303bc 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 16e7bfd7675..c4f10222e07 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 7c5696182a5..9af2cfe9634 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 74f9dd71b7f..a927d5d9905 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 03fc64e9744..943cc821035 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 59c3fc76ba4..cc6a700df23 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 77409fe8521..20ab2c48ae0 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 dcc166c8b53..f86fff3eab1 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 f93865f29cc..35599dfadd7 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 ccd5242e48b..8b4a21df371 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 accd9b15f33..34dc709e608 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 de5c454cb7a..1b31bbb5a3c 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 e9d0b37bc12..04ec999b9ff 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 e4adc60b44f..061795101f1 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 708eb9d70a3..48bd1788564 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 22584342409..39fb83deec2 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 97ef0078169..b75b9344efb 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 57e9706eeac..8e32e53fc31 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 8134a59d48e..3607fe30507 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 f3a996c6b96..00000000000
--- 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 4d01f176f0c..60ca4058fac 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 181b02609d7..5002b827bde 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 48486e0944d..d192c7dfaad 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 ac23dc92334..a66673e60ca 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 2d8a0d7680c..46e9cf01313 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 26c1d13ef20..a6daa08cbfe 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 b1521038be9..adbd2df7ec6 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 c46b987ee8a..042ff90f2c0 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 3882e6e8553..736c49f510e 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 29b4c0399b4..cadca8190c3 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 1b2fd46eb11..3c6c9e96e50 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 5b5a4830449..81100b7bb0f 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 ed805f46072..0be59a27b0d 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 0d333666c75..c5ed93e81d5 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 af52dd526e2..6f3297b43e2 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 396e7cd5830..1bc199f3a75 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 d4cbe125573..ff02b1ab00d 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 f430c0d241f..0c5ee6f23a4 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 00654ac07f6..814a1fa75de 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 381cac90271..8627021412d 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 4f1421d9dca..a564c86109d 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 11139983e9f..3dbaf45d1c4 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 36179a42b36..888d002eb96 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 098dc8cea27..af088999f5a 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 9d42a96fcd1..594cccbc2d0 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 a2866de33df..6aa0efffe66 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 c657f71b12d..8f855558094 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 270e6437921..324447bc821 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 9bff9bed2a4..409164110e1 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 45866a5ab8a..95f91094d47 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 67001f2fa01..e16b02017de 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 92633bf7b34..af0397c25f7 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 392200648ff..edbf6e89c1f 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 6359d6de2a6..199d093c792 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 9ad888949d8..14e595c901d 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 b790bacf408..bd0b0a58038 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 6ccf80aac87..020f3a97f36 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 0ce4d0d27f7..aaae6304c65 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 e74971fa165..f12845ce40d 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 37477773fe8..9364d5a8577 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 c0539f789b7..3ef219c5cdc 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 b791b54d2f0..8b6abf95da6 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 54a8d2ccd12..4d53ee64bdc 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 1674bc05cc4..5836b28a0c2 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 535e083a156..8963cc68b92 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 1f5ce7dd72f..2a43d912dfd 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 a862372b3e4..00000000000
--- 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
GIT binary patch
literal 0
HcmV?d00001

literal 9201
zcmbW6cTf~Tw6AAbV97|7oD~odktC9poDl@v1wm2Lvg9mD5Jb|FljMxBAZf`tOOh;0
z&N*jE7vH^gU)B5T-Fv3HYHIrQ)bE>~?$c-H_RsA+a8E@+SpfinK!C~J0o-l_WOB}?
zaCZO%U;_Z4b$4kBcnM&EK>x~r85jrr&v3D^!8j0H2;^VI!zaYY!y~|hKnREl2ndPp
z41!NWN=!uZ@BH6Q{&oM?>#h*tLGb>0{Lk#R86d+0x`A#mhz-CZ1A)mvx9tEk0Dy4r
z0RA!jmw~Xr*f_X%k_ZUz94hbK$p?e6?!@9?-$8-A?%DxtG8}SN0a;uM?ROA1d&;Mu
zBQx;WUzD~`y&Br*5Pa|8hfhF#pN5w1!9z|i?ngqxBBIa4p1+inS5Q<^R?*RYt*3AB
z25S1@qnWvdrIn+Tvx}>nyNCamfWWUo--4r}V`Agt6B3g$v$At?^YRORl$BRhqN}QF
zYFpddJ370%dwva%jE;>@{F%foEG{jttgfwZY#tmQ9iN<@onQR@#{~kw|B3bAWd9Er
z*&P?w-56j){&9h@T<<EF3>$}40GC`=8}iPcg6-*NJjxf58Ko`w?1HcMsopyb5m0jo
zEj&2*hxUKS{{O)I{#RuG4fcPzFaQx4bT@clGC&%*4%#;lblRxrx9+!YcO2LpXQCR>
zysE7`7!_zP+QT(|a0>+PWcahOMnNl?buU?-$aQ?19}Z>~V0e3fcyeIMjI-%sgqyL-
z;MJ!_M`VKz;mHW=<<zoG8;V1p5Pm<ARZJp4Qa0yTK%XLKK*gT~TeK5ro{)5)Q@deh
zA>hGqQb4`8L%OEX&b2P6I3->2vE_X!=ZjAxE3ytE`^8BV562Epa&CbynrbmC2*cE?
zB<Ic|PJ3HgGjM2l%*6?rbqJAMMamyKF)i+U`~gl?(IIA1lNt5gxwsg<gfz1a9drg$
z3iWhcZ0#^?j_{*pwv8sMriYl;Za1to>3uT2Ib=)4lQUN#`@25IgJCqnIHW*r*M;p=
z!pz^(8Nd70E2_0<<(yHmL`rXp5n91hv%kAS{;eL?$sziWBsXDU>Nbk8BreAfQy%B@
zW!}q}?ebH6mN`UNM!BCG*Z$f1;<%rCKR2;iq_0Tw@5uPI^}Xe|I1T^d<oNePL?cme
zs<A@k9(NnJ(Lueo^uZ&pP`&-)<d7rSGvk814m(?#URG|p<9_zHDJnKJUo<Wj@4P#a
z_?D>#wq;KYeLSN02`nABCoRqyk6syC1+IJ%h%R;O&WYE#lz5LfuqvtaPs)RRbe!QA
zw4Ilz)-1*F1p9Vz(I<11>S<(N+mV2KnlI#8CT%@(PVE+WvP?8&5im)aN;#a>d8vO&
zn<GUrqHDh0SHp-&q3ShMUG1Ktbi!T|5<c402_?_Z<G9qm^AB4>5?lU0hc3#YO%y;E
z4eJF`taG$iqK?>N)~2z4hhAutn3=js9mCx8#xX-xf)r6aA4_nfL2FKZ($HlIM*CX;
z?-uY!nPN-!E;Be&l>pRQ-@j+xxQITA*8KvX>gF{S?7MJT=SG)Rwk57Tll|rYhB|wC
zb#(*XDW;_fReJnk;vq*gW4-55b2@R*UU;d4=5*j=$uJ7z@00QsoOpSwR-LsC@X6uX
z5jKIdpmoa$(bnIDaK}XYy`OtB^rFubO0n>~-Rb=-;H6npJA93%20Jdbd<C>eoY4nt
zAue>D-d=5Hip$(vGW7Q}PiZ7B28?Q2awn&~>Kpp<tXMB(_Y6*lC5PaJnVuQHJw~!>
z5e{q51Yn&~$y&H&b3H|dj)$`MrJ>e;3ym~S-K6Fvl6pQJ6=?9KPqS+jJ*RUX&yN$h
zPMTYdt>)zdL$?g5EtjXlhMA5_JZgn#v6UrK3OQyvGGr898veYJ=Ma3D2*DKNKb3w&
zUkSirZ?BUC?d^QrZUJXYbUdG{py7Z^XOk0MFS=HAd%~4Lp`O2i%_zlc{_qusH4Oz=
z-2xUpg=#OZA~ITz^QJcgH)V0ESrxIzg)pUc5ilq+K0|0L<(>87A>S=9ek@f1DzX3J
z6(!9!cWtg9b^K>95Q&KHJJf^C=7v~{KJBq<dnOTKiJm~1lhxMtihGUPssMk`^&;Bz
z-v$hhalhlV#~)T4F_!YPFr7r&y4Z5S3$ubKc9BrroX0g%qrax|>_;d;KWsmY=V6+7
zE$7Bl><cQl3lR_k5}M$y>ao;aZCf)u*|xjKl+EjlMqgx02v7n|WVUJQ`>`E4HMr(2
zyw8Jq*t;gyUhI3WgkOG>5gVMz^cAd!@NCSIq3de3IR+zsbj_jQ?T4FOHpR(BJl&9z
z;h$Hy>SuwdJ=@QJ1S>sk#8BTP`n}pdDB9lJngUmie*rfRNeAVy`UcKQwZ>M835!t2
z<&(3v`0SB-eBPbXWg8!U8p)5-z&&gjB6|wcP9!CooBgYWjdH#I{#{kAKJ0AzL}y(x
zKWXif*cEtK8{r`SK%tzNOa%R)?t8|~{Bdr_{Zr*j^?^5ku7W)LH!ZL}cEr3tJm`t6
zkvow({{3N0cg83sl0VPt8{)%gj;OvI2YW=*>|dQKRn#w+MMCF|buKJ}-3Q~zhpd$v
zPoA4jY$@5!E_9&s{${i|&TVN`tm#f!TGg??^wT`buBoAe(yKa@2wtB;@`inR)!na?
z1II_!600MdY9$Lw?3w&Bz8w{3GjOj<ZYI{zu`Hcc2@<EfLapui(naqh8V1<}TlxXx
zSLlSAI>ccWS6<V2+@!G{?x(7$`?I=|kG@VWk23G*e|SXV678>P`EcSvr)QzuJgF5>
zT}50{^SX~3eGBkIP~5em=G!iwj~w>4UMJp+%Ev~<hKZSP5=&H<X~WHr2Cjtsd><g>
zg*q;Uf07EN@krZQwi+Bi>nj5ZcQweo;sc4+92F<eQ>|HM!-UJ3;Y}vH?yuAFhxGn<
zl^uLexcU`C-?U?UT-W+8Sc(ktQj1>4v-5B}=9}iPyh5Lo0td_y5h8H-F->X=h<^(9
zHrkZSZ=7`Z7NFwzTdvGD2`&CJ<+qp_IevLf(2Wx&b!m<gA5`b_?zJI`e$ry?z=fqZ
zI-z1*KA9h7wvcd|9knS*47vs0IIM-93ey_YOGv#hn^E5Q{Yu^<4*#^SZB^W%)RoOw
z(9_ZW)Rtg+))*N0GsSGWCojL0O_vu~Y-5xB63c|;W_?hF3p7hyeHZHDWh$qF5bQn2
z;MCXxXE$30D3rJq85^{>_r{wt#;TFAva(Day%imK^-{Rh@sXt-+}7G*@354qF@}X+
za(LswD{0gwvD%z*qpRolPIGtEuEy8mUmj&{E<FkP@EQoaScf9c56j;nb;%OLM4gS-
zVF0x~D#q5;P4t)d;+fQOuQNhrp?LTEy{<D^=}(vtrKXBicwKJ0HUsm1o;b19N(dQo
zGC1wj0#w4Aw7sAs08{Wz$lat1s+N)ie^71dI?!`zSfWbli1nSJJE*r$`qeZxJ}k{f
zeZ+XDDj#h6Y9eZwzZ3&njqD4V!~AHozYeofrFhVnjC}pW;=qD>YHGFaU9!igk?kDn
zA^P5?lafBuao@+2O1$skby>Cg3!tquXw*2ZuzNsz`vrVJQzhi(&uIO`;yp(qfy4A$
zfc6;mY!UHxp2H-kHaX2+hH5#`%W59+3cWE_r&Gcowj5$^C6d07@Vd7*w>|-iA>w=)
z{P9u|0h#0t+)!$Z+>)WnN#4*Vgq!v4oCWQ@lJohQ!O2=|oa&JjkY!5%6*)P2{BdoX
z0FeQ+pgUbF^lFz30}Ox4zlQe?#+=~IDCa?^MDn<+>z;ja`0;6sM;GzBf2?H++tbe{
z<T}ZtS30QJC2*45bvx6Sms!-XmPQ;ga;Uwb(HNnjhv}oZx8Qrjt}MBC`Z;`f#>XXZ
zkA!=ojQF8+S*xq+6Z#-ZKnXX|8a<xnbm+CpSTMxl@t`T8uf*XN2q$J`-bX^ClrGg~
z?iYmWSa0K$eV;;iy30$q&*TH;r7$~NeiBuOA0BC~akFEUs?m}?ljIKg8^@Wy@P)sn
zt}ZQW%%5enx%sVgA<+B#k^m(Lc|d?O;VJG&hZR?9%9%c3k?W~I>bMXRA}-?+O5Jtf
zC=aMF$RqF8;v7`u^za99QWU(%eqGx!u*P{l^)9wg6d|#jCBzoQZRFygew2~eM#-AR
z1wFQzOnT+Y`(fV#O9{a?l69#*^my+~_fTHm((-g1URNe(vQO%h^PGos%++wFDxUnf
z>)_Roo)WbT<?wN->j2;*oatfsry<G@yaFU%(sXOiNHX<B?v6_I`n;xw;K`5FM=?Fc
z{pMy*KZl<V;Qt8R+ZIRdBuErXncc*IG9(WT(krW0=l8c8Hrt<eWGKdQovA$=WYM$6
ztJP>t?|0_Ec@EDRuE$w!=C6E1vRjD9P_-mObsWZ(ZMJLoR$)c=Q1%uem>Uu@$mMf&
zY2v!fs0HunU^WUJnK7JFx&p;ocd?<Mnfcy=f=NY)|CS6E7&UzwKFp*f0oJIk6SYRi
z`Qwq$AXTi(P*Z#<#nhBymXh8Tg<izIpI~b0;?5B+>5#c;#XLDa>&^{kKSiiAln-~t
z{@X+QBhx5i7K;jMa?}1ApSK~}7g`$wk4uaxq<NT4WyoQ2aqBk4KL@5eQM#DEO(NUk
zXF+x$m|{h|@v&kXWGs=7J>=k3k-w2wJq)9`Gwdr+-y>YukS=7$x>mNBoqB!33!CDW
zd+AH*Fy_56z9*s=QsHF2+csWcD2HLc5b+;~+5d2yj&D{61NcylmIm+sc#Mp%uTxJi
zs(y37sA0?RaY$v>(s)p7?<dZG3%rfHe~%MW^7Jq|VQCNwjFw^zv%A~nq%@5cI%i^N
zh2JDCx=ax`ICvX+kb3xQ#%xhYcJ$KhEO!1Dza%KLVTQ)Mqzgi1txYlI`qHT-olL}i
z&q5>jGdEZER$!{?KYShZ{|*Zu8IqZsWwXpT9njfVt8@3G@=1A<C7NcW{Cov&*rt6x
zx=Ah0PE$J~1-=>%X&m&0EbI|Xt1JyxM*yG=c|g3mG=;x)yh=2yFR=`Zslj7B6V{m7
z@9gCAqCQ{JJ2rZMTcjji*43l0G@ldB;Fvmw;vL>PlY&0%wfM{M&R&L)CB9wIT620z
zag@m~IiA#Q17VfHrW0tpr}NmBs1J?)jCSIcMm>iGj8JT!HrJ!tB72xsfFtJnv&1~c
zHR!4bxvm`DVpD@EnZ>mX)_rnSg52{A+j-|@_L*><dSA)5QjBE7mekNV%b6>$?7PcK
z&L|7;a6NuT%f~GF{8`ec`Yh?Y>bCCuKKz(HlJ59j<V~gNmE^Y*1U_dPA%V&KL02VQ
znWK@VR>t3&dq{KU$^xXKS|T+a#Fw?knfr)QM>m+uyPpsz%=^g4qu{)xQ@~On<QeGQ
z^yj%Np5So_S&neFuyXd3mJJ#Dzg3~ZU8j6v_Uv}s>XvR|i$hLlW>U_}U-Os28-{We
zVbpB9F9*4rcjaAtNO(OP9;)`1;Tpz58UUM@7JQ;JZ$(rO+4l^X9+JPE?Q#{QSyH3Y
z>4ZDnt>`tOXV@LsUP#(v*DgWjLMyz4!<{TctY_Wngw#@;2*)!AFjbKv{WXsn;rdA>
zHCjcY^sGl3Wfw2{{S-P`AOJdwoE|$DR@iS1LVX}tWx4q2m}UiRGg%y0QvU|dNL=<9
zrD8~V+71M)RRx{FnK#15imBp^PYef-jC#(rd`KG%%F3yK*_4zv)R3hurW1MTVI)OX
zY;1lGa`u&;4Ho3<DU7D=h(bPS?*m&%8E)YiFI62uBgP2+KKhKm1o;!{C?j6`n_bFz
zCjWzUVieuW5<_<@Y90ez4NaA%2ZPCJAIc%`tOftx0w;xn8i_Wv)<uoGBxj78<CRPX
z$1tBqb7%23BBFLU0Bfx}kH~nNSI<H=qcj1QV)_n=L~o*k3}gA$o`xUSv4L9jy`v@>
zF}9SCHY_vlZVE@gxVMskj)N9eO@bMt*~50<5PAO41tV9P+PL)#mxAzm$J9|R(0r~B
z#kxqHes2|$<I)jYC29<hc!ODf(ZtPOQ*@V${cPMHL!pA-OQ}A&VNDvZjTKt&s4S+_
zTliir6~n?>+i3KZzZ`ZoB2CoRpiG8ri{uyI{kSn_A<R|;#mV|87q5B6nNpGDm1(fJ
zyS18F%YEYnT5Np6HrQSjug~r%nDXP((Rew+sD!cjarmF#_Ng~xpSsBT)<SJ<ib?)t
zMff&_y>Dn4Uqv)MsP{Z*76NUj0{n}7Bshj$2x`334x8CIugbXL-|wZqAQy|I0VCnP
z026eD;iCxJ04Gtw;%LYu>b_UoiA}Z^1pmO}+UZjvT-CnTER;t|{I5Q5JWnQO*Z%uA
zF)+&M7NE&SwjDJqaMUD1-rA|#$8l~SRQAt3y#=t6fF`TX0YP`iv$S3Q2G=H%^l0M|
ziHq>=_g=Hp`pHnGi6h~@3o?FIQkCPhz%uEeyPfNWmcm8zJedqVf}@eW=8^vg!r2<*
zZ=yTS1ux-NbuYMR8MjL6YvC7hm@$d!E{H`Z9C=>lQL8@Fkn_WzJ)Nix1-#dEypHq3
zV?HY*s=-Pvx&B7jt#Glz>{@#{retPBFkQzivZ(o1Wu$0D#O`}toS;(k0xVez;xk_-
zND|8b*f_2Jhfi<`3?o${7UwbrtfejdkixI>GFDan?q4<|W_T<$mOjWIWP?r@kfpuM
z`YglH6}-y~9UG%q{;UAHS^uFgm`LyklU#CD!G69u7jA=5H{#u)ba!ie#t0W#U2sZ>
zo1Li|m~;PX1*|)<)tXTMW`63fdx5;>L6{g3O!P&c#gj<s?n-V!TF!^cdAtu-U$cOF
zsD2wve&KU>Q-1cVARTX;S8qmrXT-r>%knoAjpDAW5jR0bkos6TH`Hx9x>vpI{Vb+E
zoTR62v-F+_n$aWan@(iQJk`HwMB?_YRmS(;Cr}diEkI7Sw%>jl#}1g<Gk5e;g5WLh
zgqnz97^ujF*v!M{j+jci0ZEE8)a6tn1dR5wLViZv0t<}$IX}=3YNH=z`;ba*=}C%i
zckSG_t-e0dxJbv751v}w-RV^l1COWSWQ-ab&Pe@f`Bf~f;^{(~UsGMf_Dm<Dv0^z`
z-F_4~17mH*K1nA{lVYnLy|Q$tyV;#FM3xALK6WjwK+|h0&=zVgCV#I-xWf^LKWe7C
zwhS~~&;m5`^ts-&`QW+6`(>7INdxKa9we#Z+G_A*94_u3CgL9zf7sYDyaigHEe+R`
z5tSs`aC8DY9ZrQNaf!7JCfm~icbn)wZxI+@?A3iyUbO&O-QtJTH={lk8Y=S4vPQ05
z=@X4?RZ;Uhp>nkPnCeJDtKLc)c?2_Y>M_WJTcfx`_7IiDkOn<r4$x<|+`oiQap4)`
zTrSp!YCLAA9-j}I*c1Ll+HyhO)kaJN_8j;#v(W)Kz510T#kVujm)L}?F229`>)}@)
zkm;)7bFe?A0iPvAmOhusxz}sjrR4c}|Gly?mYO>8WdXlnE^uNfwsEDA*V36zB`?RO
z%%GiTzUeY(=tpL`Ra#TEIIHYo2}<eX^LB5j_b!Gt`cC9#DzWQ?5Z7XuXW>V1j+IbO
zcV)TuPrG5)qCKo>_ZtR3Ouy1R)=c4tUZ%K4`LeylYO{0_!mfD2Y`EX-)LB&7RsSD7
zHHYF*!fx!Ur-z^&sLws9B;niMo70sMcE+%G9hbS6uZO1BVxhoRJ&;f%s_(|jE>1C#
zv=KLXV)C(CN|*2mhw-{F;oSBXpb%fJslH%Q8n|DxTD!sF<%mynn66Q?%Y{YGF}^HN
zY+ChJP?;li7adm^^!GmFW}6{>GIX+dXei-0N6$#oyC3U61^RUPUsAMIX~9;Nb6U)I
zlTR~?&gX78-qO@Yy?RjNiQOenyKa$=-^d_?@Z`32c8!mQ5X{z~+z`uS#l-D%yh?)p
z8@k?1w?O+u8~RKqtdxa=^etRZ=V6^4l^_GzU83^>S1(2xrCF-b>vX&%%rWx4Ko9fh
z-TeZ_O;|`^%{zq6lLmY$k@IaVSi2xQ1BDDTzo+5%OX<#u2*toSMKMXG)t}PKRJQf8
z?#AiDH3t?xAKcEg%r915IY>3&Nna8&;ok;Sy?$GO?>3}*pCyQ?rg!4zf25}H<Og?D
zz6m`dk94N5rs}^UC`afwM+^!~k((fY)gBRU9c?35zDYj<4vaBuilg<WHl@YAPQJwL
zCeFp=?)8g&DDU-!?meTu9WgtO1Lw*L1{_~*aFg&_ngyNHi)RWSZK~4=5zk7i4p}d9
zZ0H*D=0oi_yb0WwO^(WU2&e7eGDH(U2D68aC_V9#|CG0VVZyqvR#n9;@__?<oK8}P
z>62@+tRK*1g`wQzJJ+FS(5mX>oo}Wzkl+)ZPq<?o6n&aeVypG#rvY<6&I3nDqbP$&
z#D7C5A3m>dF}+|#BGpFY$@etNp{JMquTwRJqww5}7uiyTn%;+O?;q}pSpla_fHHO3
z{5iX?O-ggmrfi3eye(50?gd_yySQ`5hbz7+b)FV`l|PmVM5L`%2&cJnv(@=szHUm;
z${ZOgZmQkbqDCU&3{ZF6|2f9c%gs&TH9OXDp!aZ8!hrMp$~TG?NRx1XMV>)2&IN1e
zdtY(eKwivj@xeoKyhYA%&}v=cvVI3De<zTwIxT=>#!6v$F5vK+8MF3V-vyxr&uU*w
z*veo7pcm1V-OLtblXBj@Jj9^AKHjMyzMD-0+ycaJf@dYE+1Wjhq^(rNaXx#G**Ppl
z<TU_}H;)6@_8a<V?$T-Eyz_92LMf3-BmK5BodFkE@v~#GyCl|)f!Id|-F%p?mP`VH
zj@9T0WzJ5qdXPU#^V2nSvznd#gV2uZKOaX^Xc|8T)hf(K-@U5Ixv8n@)wl}tk>e>0
z+*w`qzDG?O%et!=NiJK54~c)xqQvEW-OnJ8-NBWBozFdQY|B~kaMhj|nDI|>Mj86X
z%6Tc_^VfyvY>SGc?3TRo;v6zcB_-5Tm#Ts)Q|ua4kb^OVaoc#K;7>SDoikjH7Bd}r
z{u@HE&!Sx9DTyZNK<I`p`6=*JR-4sCz+hPUDP6Sr$BZOXZE>cWBN5ra{N?La?!2-N
zd~(&9QW+-DrLIPt6fe3e=;o}Owrji|gO8hbzyC<>%FiQsugU6IU2xH;cy&$?irdu)
zA9(MDS{rcCl--cIkMbF6(-frU@XTm{&-s|cM8`bua~ug63>yYWt6Xe86m^e!88i{g
zRC%npJw0sI2yxPk5{^&yxEp8dy9phD^G>6B<E`SQYU$kvBEMg=L;;5}0#w_JFSZdo
z0LJ^Eg!VcwSDoLuESNtL!&?1U3zDMD`N#CoR6O~F9VOlW+_{dTFZ}r#mDVp_(EFD?
zoGKCBuhm8l1rCFOzl00K`Amd<tMhAsiNI-b`0UsT?cL9bNPc-q;&-0(=;wK#=i^M#
zl%2p{htn>ykTGAPT7RSgaI5O{5!5|s?M%G)rTO(<zvld2fPN|q3qzY#Uh;ltgUDGc
z_5Ir6fe82ENAsoYxs~-f!>t{-Op1&UkOi1teZMl#AMt8V^EEu4{!Q~m=?MyCRVxR}
zzF3QnOtrJ>nrtc^Eq}cAbtBbY&cofJam1lLa)1j9g-%&1sHu4-DI*l|Mk<dr)uET%
z5vi?DT)4U9*`Cewo8-8Ve)9{P_b%QA=cpD$a_PIvxP+KJIT@wE67g^6J$dy5Tuxhp
z87PLINcR2nBrdEuzxS%lgfLkfQKbv)zk1bZq>9miYu^m8ZH4sRX)3#VVBIIGF$p-c
zCyiEB9@6GkuOQ`x<Y>vt4K&m296k}qez3U(e7L7*mI)F~5DJ=44U6DgvuSK1Sq~`@
z-`vs(Qnklm);=5pC!7sp@7`!mE?j2qRT?Bc`Ng+$&fMM_)6SborXZ>`=N4W8dL7FP
z3S@2g?x$$=x{6Nj!THlFV~<LzOv`nnZcFC$UG9j<-M*33<b26>aA%W+v~N;;xbXUw
zESy7)&HvXSy*Sci-%DS)W~c-s`C?Y}#aAp*nwjI0swhbP_x_k#1(Nx!97kia8*)o&
z>deDpzIOh5tY$J`Zzs^<{Zwa#KfYabj)NX&K9hxu3JF3wneMr>2P+q<^SC=5cFa_b
zAUHE=qI@>F6*VlJ<FjhnEl}^p^EG&-!t!@#Kh-efRD9se9T{e8mHl-)DaQ9EPY;z_
zgD>Wm&cZ8hfqQP@R6osQ7ejfHvG8$gjC>Y%%ZoR(VKcMJL7jMtE4RRGkr%US^=K|G
zmw9#KAR%3xsSJgj9`7J)8~89h+ncIseh_QZhpdEtdx$E)PA%#KpQ{i4EnucxdGYEN
zFnS7w<#AJZ7JE4me^Q8Em{NZ<E3QiD<cBxNTNri=K!IQTqyfc3KEy9gb`ye#J3RDS
z90lE}(|w<r6$%Qp_<_Rhl=8}Q(`b|eH(&+n1gNsMGi~A#X<AAepRyZwyCZ29k})fB
zx8wEDsCy&Q?2?v0UnWm$_T1dFz-sLG-w|afxGbEFfJ$X0a<H<zwcpZX_um=Wi{>GB
z^j8*m9@?m8QuMNz3k$2vYHOt{XkH`xAc?^%Q@VUAlxsez)UM;;E=o%W1v~yQXj|#>
zXQjEa0H+*uBSc##$m9s8(PB(7uS;mFN9ws9g?uaW0I)n@u#f$4sx?Agn$Hii2DOJ(
z9?x1Ql9dQ+E}X+lh^BfUOOz&)c2*uvI3j2az8)3?QGI!3TtnFYK2FQ5U4RH@)2eSc
z5ib}Jm=1np2xAFmjh9sVfmM``0KVZG{r!zz(?otE>b{2Lym`f|RZcu2D*J*vOzkLK
zQ+`i|%A}klarN(KRpRouN*^N-$e)D*+3_5`Y_XwExJj;7<nO!<Isko(*;B8=*id^_
zha!%9%?%3pR6?O2BVLlnYPSe;1o6fw((<u~Yvus@ao~4AfJ~f%SPND2mFjiMu`$h?
zUXhNkuVbk7w40?hQ65}hFGbiU$u+JV2e{d){-io(-vV_QUn%JR{q2$hcq(hEq>5Pu
z`g5Zt!J1o1h6M5ck;cAraEG~d+^;O0?rG!Ms>LdJ6>s~6^sku0In^ph4&~NUnsmGe
z$V&yUQhQ2M$d;-EU*)^6sqP&H)!6U3WWeV^yB2o5i}*CxOD94gqeVJv7^Rs)CKvUX
zM32<PGC|o-RLq+Qo7fu4NZ1Y&q6G&j!-Z8ZQh4tumzMtsw4uaDe3g^1BRgF55>)5N
zzVAOCJ36OaCPn7)8|O_XLV29>Li>5rn`QvkDz*+SQX!1QW+%K-S9xu1%1tx9{X`v*
z<$@_mR8Kr*!avU7i))?kUZ&LqUMDQUxXzx;v93d&<#yn`T<h&+uFds*;t8WmBbYIq
zHU$IRe~0uW;8=6#R-11UI4r}T6L4W6{X8vmt(a)hy43=iYtMAHpg#M_mTa;_qVx&-
z$~y8?0`$`y2jfVS8(mlNY@0mG#n^iDtc^&l3Hd}MGxwG})eF*d^@<8M_hPXdvWg+*
zFsI%LOS&b32HX*ON`Nz5XhuF1?((7pksD>qxbY$Al~?tWoz7iT+4-DG8J2L(<F&>S
zxm2NH>wAKRyO9^2voYE-g#4jG)!OFOH4BaFc=BxLz3L6(VH3L(DRt_UT3GT+UQe&l
zIXz*Dh`c2BgU)!4MLe6Q9^|@1@&NCw@CYx5MMvibeF4TTmz36$T8ZORZse4&NGeyR
zFNY7!MxDe(apT)I%WPvB%PQ4X`UtjL!0xUq+xeW@Xn04BKxeXDgFN9<7+3#ti=8a9
zJ35Ig9du=xZJ@*!zFl83XPKwEM9kJ4n7W-vzq_Ec8q5WPgj7^d3`FfA)dP{|YC?6@
np5wLc%7ZgvnZZEsforf(KddeOiL3*_BHH(5H}ftLx}E$F(rca@

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 d2a842a3912..9078c06e319 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 206bbda0696..26435f1a522 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 4d210aeb1c8..69f09478b7c 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 9f59a6b7bc2..715af60f745 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 b648f5a0af6..2894c20df09 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 bceec3ed950..af4bef6112f 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 3e784f15ba6..7ae65442839 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 16754a80c17..c8a7566b549 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 6f8558945e1..ffd698a1a01 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 3f2e8d2e562..c52ea4e4276 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 3e502d68244..b048cfee769 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 cd32bee8bb1..fa293631ed8 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 9e6c4b2ccbd..8a856de5d7b 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 82d74438a61..57eaad47bc3 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 97cdd137383..50021cff7bc 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 161f90ea133..641a2ad0bf8 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 219eeed8959..87e6684388e 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 9db81b74118..aa90b7bc62d 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 8981053b69a..b25f8f8f46a 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 6bd995785c4..d57096506c5 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 c20d46c881d..53a564c3c0f 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 7638498dcc2..8cfcdebf179 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 eb2e2704d0a..cd19f44dc68 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 1387a7b54fb..009152742e7 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 c7345f5eeb9..d5ed490467d 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 bbd92f9de0b..c92654598ff 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 243ccaa7581..21222774767 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 4856d5b8fa9..df0933c4236 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 1250a1a6254..990e88abbe3 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 09819abf92b..554a07a3c42 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 ddd8449744a..68eaf284a81 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 26072ee0a50..f26a96b7008 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 b6c1f554ceb..792d954bfa6 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 9db763c4780..f820e3cdf33 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 64c482a5b10..3c281d7131d 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 00000000000..27221df4a20
--- /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 00000000000..08bb5d51ff5
--- /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 884e9acce54..81bec55dad8 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 20b00923a81..72b245309b3 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 7b40da2041f..d3be6038f56 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 62e269492ad..6d1a69a41c2 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 f43b11caec1..2b382943d89 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 57e1c81197d..29a728c2384 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 17d9a4bdd58..83be2df63c1 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 0f4a85d6b0e..163b432c200 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 189639f8ab2..3cd8b291b6b 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 b9cee5eb4bc..c0f71fb49c4 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 b974bc56950..79db7f85166 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 89daad349df..1f1d627147b 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 3511ddf0ad5..c383b45528f 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 e06b5b5adac..4d4cc4ccc01 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 05e198b2d05..98dbb5dc928 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 877baf80c99..697e69fdfb1 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 71e4e879d07..6ddd1b58cb9 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 fae5f317b3c..2443511890c 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 03ff17ab58e..e2bb9dcf3e8 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 cc1773480cc..3378d6dc404 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 ed51bee30b8..a09654ac12b 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 7386b33efe2..616bed3b731 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 0c49de7cde1..06745b50825 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 71be3818d05..67091b05057 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 21ab170383f..23167c55174 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 cc12e3777d0..f1cb48345db 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 c7d0bc37a9c..6551864a841 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 f7e4cd0e1b0..2761896f8f5 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 e41128aaaa9..fb9ca8a259c 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 eea20cd373b..d5a32a6dc5d 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 f605dc45eca..0e7cafb292f 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 4e42620bbe5..6f5cca5f43a 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 24194c974bb..af2f59c37e6 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 fac3dd4178d..bdc8d40d05d 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 20b3192aa1f..735bf4c2bfb 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 2b3c4397377..7718bf0924f 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 2a6886527ae..2bddd1c7e73 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 6c647a1f0d1..4ca0160841a 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 50752518f77..decf0bacfb0 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 4473f51b93f..00000000000
--- 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 ef893a633d0..00000000000
--- 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 00000000000..72c443b10dc
--- /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 a0a868f23f5..00000000000
--- 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 8deeb7f74a7..790e3fa7a77 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 0ba2fab53d1..37c46ed165a 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 31f77f1d04a..eb987458329 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 d5307398d51..7584186813d 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 561461936f6..ada0f7c18cf 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 f2382261466..d6709c7f3d2 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 04640c4775f..3b0f9f2a945 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 00000000000..933e0d80fba
--- /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 2e4d1b73758..3529f1ce6e3 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 a43ffa83b78..8db243909a8 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 7ea99ba9d5a..5722775e584 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 b7381a0a0df..853769f53fe 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 80e756d1df0..e43808d5b2f 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 cf06fa3abe8..023f62db84e 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 77cc210ae39..bb3ec04b8aa 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 0e8990bd2b3..e5ddefbf8e9 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 3b6cd9e33bc..2149e59d0ef 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 b1c4bb7ff7b..fd058af0cdf 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 a7c9b1efc03..97d992cbd50 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 6c053cb02a2..00000000000
--- 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 00000000000..9880f30d58a
--- /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 9675955d79c..8100f3e5015 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 ad0db2b3f1c..574f868dfb4 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 a54272b76d4..00000000000
--- 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 b5e5ca617a8..1a81eb3faff 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 1d03fe3ac1f..7ed09109596 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 d0bac85dfc3..e72262d1adf 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 0caee1dab7e..015f0382297 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 4bfb1ce61ac..93b55c6410e 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 4bb5fed7538..64f4d1c6479 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 00000000000..88def1f34ab
--- /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 abce177ec60..29d916c2745 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 dcba394b0c7..6b7e524902d 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 52f19ed5882..729d6079a0c 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 15fd1965cb4..7f5722d065f 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 c9a5f02e1f9..3704c21245b 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 3a72b40b8f3..ffd87dcf717 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 8bd2585e948..0ca4c386dea 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 945a6f623c2..fefc99e96b0 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 00000000000..40fd92d06da
--- /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 92b49789943..1ee8f927ce6 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 66c7601bb16..e0642ecb660 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 adbd5ce90be..f6cc1fb2872 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 73e066efbbd..c50679a70e3 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 00000000000..3ee9d291f3c
--- /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 f41fd100237..ec8d8f28dd3 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 00000000000..a01defa3a7b
--- /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 fa65d5da760..4046f9f351b 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 bb1e9132c80..00eee19fa4b 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 9c6296ef00d..74a32cb3e52 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 a32ac508192..352919491eb 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 007cc337fb8..7017317589b 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 38aa0f56f91..7825191180e 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 c060df9ea21..2de92896005 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 d9f26b91400..e1747f8aee2 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 96d75f9928c..d76c19792d7 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 81ec3b6d814..02aa263f667 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 f02f39d5e5f..67dc6c39e90 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 49e394df6e2..c09ad59515e 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 4a3ddeebb9f..d0191ddbdf2 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 9cdd1942798..8401fb232b8 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 6977d88a90b..3029a1bb4f8 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 c9cea67987e..eb66059c8fa 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 8fb588b0140..1c6f511e0f3 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 2e293bd7650..a0bd575d04b 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 19bde27a256..ba3029d1a96 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 ceb41484248..80bbcbbb370 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 e75ffb95e46..12e7faa71c6 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 f4c468b43a3..992d65bc294 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 2bd0fe28b29..b16e3f6c5c0 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 9f4f2a1e1fe..d6e77e5663f 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 a0157688d73..2f1a7ab1199 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 38be21da4cc..af8a3d3c752 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 f3008688034..80604e89d89 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 ea5565936be..50f951eaa3e 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 edf8939a6de..291494e0c84 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 09d714b9f05..703a0e7db06 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 c1ac9481ec4..49f7da2a14f 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 737a7aaf9d1..1c7d05f21eb 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 00000000000..6cdef6a9f2d
--- /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 557cde30ee8..22172db18f6 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 4a345655c69..afb191e0e9b 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 13a3e8e474c..3cb95863368 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 e2df8df0b73..c5d888f19e3 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 34f8172365c..5eccdbf2007 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 3a112d361b0..24a947e2be6 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 c679f53cb3c..9a9d6f84c59 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 80651335dd6..fc0dcccbd77 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 e1632324707..2cfbd972ea0 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 2089b8da4ee..5a7b324cf22 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 3424b10accd..c78207c4d27 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 b916433e8a4..8a35609ae7c 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 4b264695e01..0221d4523c0 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 e6302c509d1..3627a68540f 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 52e3a1e7f61..5cc272cfdbe 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 4454c45d87d..918201269da 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 08f9ed0aad2..aa32871755d 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 70ecf4554c2..218f33944ce 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 c16b6c0f3cc..40328c44690 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 680ddc7fe1c..60a7e22a6b2 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 25f780582dd..8cb3d2286f4 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 00000000000..bf82cc4a2f1
--- /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 00000000000..e45e842930f
--- /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 00000000000..70786f57a37
--- /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 7c703764140..ba9edd8a1e0 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 5785a936212..fd9367055a5 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 19a6314980a..2db6fbe0718 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 741fd25f77e..10a6c88aefd 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 edcd9498e7e..6b37bc5e001 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 78343e70782..cbaf3b9e39a 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 2036587c3f8..277417ab284 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 e952d2d35b8..981fbadac50 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 00000000000..f9c6d5f88c7
--- /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 9a0730f858b..06f336a1084 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 3e722c9d065..78b79104d1b 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 0188574158e..edb980bb7dc 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 3e1e88961bc..86b601cf4ed 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 284779365e1..38998521099 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 00000000000..4f6964d150f
--- /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 1d9559abeda..5a7ec4996a7 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 7f2e54059dc..00000000000
--- 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 bb23e7cb07d..c3536495b13 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 918642ed2b5..00000000000
--- 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 90fd518e9ac..00000000000
--- 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 00000000000..a327d740489
--- /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 c20801d4c1b..e1dedf7043d 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 622a01adc67..43e3142bb97 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 92107be0019..eed50d83212 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 6be9ce7382a..0809ae39148 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 7bd5ccebdc5..9e326b4451f 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 00000000000..f2fb4fd5acf
--- /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 6d56530498a..87665be4842 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 b3423de5f1a..87a52f5cc7d 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 34e75ec86b0..404274009b2 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 00000000000..0d88852e588
--- /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 37b49184c24..65cfd40d55e 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 02b6d14ffa8..e93ee8eca9e 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 6880c2c9546..887e9b7b820 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 00000000000..4fa38a201db
--- /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 5e2efbf5cf1..41c5ac65853 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 00000000000..e3785a3025e
--- /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 36b57327572..af2c46529e6 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 00000000000..97d2ba36256
--- /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 f5b64b944fd..e0767ebff68 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 00000000000..a2bc6aa0f67
--- /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 00000000000..ca5f3168cf5
--- /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 13b008e2484..b74861c1d66 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 c2c17f8430d..ce775fdf69d 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 24ec02db57b..9f04342ba84 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 512ac6eab99..d2e4dd27d20 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 6d42100c24d..77c42abea28 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 d69771f6a89..69bcb65a44f 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 24451d6167a..ff0caa61128 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 d25e898f880..0da123241e9 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 5bba7d23c0b..00000000000
--- 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 00000000000..5d20a4070a5
--- /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 c3cef19a6cf..2c536f18e7b 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 4414be7ea5b..1b7207a2f96 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 00000000000..81eb838a279
--- /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 687a6c4757c..00000000000
--- 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 00000000000..6d4aeff0422
--- /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 84f8b355189..2a7407a8dc5 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 00000000000..00e5e78b30c
--- /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 87fb0db4835..d2287281d75 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 e9c7793caa0..1702dc2d319 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 9b34ce3512b..e9664e80ab8 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 00000000000..d7b31ad3765
--- /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 00000000000..e426c624796
--- /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 19548711190..85c2f209213 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 d64cce206b8..21585168dce 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 02fcca1f218..c7b5a454099 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 05fb8b7542e..e89dc8393a9 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 07fba50d640..ab38bf83d43 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 964197f80cb..9d148e924c7 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 db88b5c0d6b..ce9d4111cb2 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 bd4c35dd6d8..bf5e06c4641 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 96c350f5a69..3a84122fb34 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 87f106bbad8..cf1831e8327 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 ed13030d2fe..a87490124f2 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 35ed5b9017c..8ebd74414c2 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 00000000000..ce7bd28cfbc
--- /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 1a5335a836e..e408f8e207f 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 00000000000..689cc2023de
--- /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 00000000000..c83756b934f
--- /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 e8b5be8027d..1e390d13681 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 7223ee8f4bc..e6e3f57e1b8 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 638c4ddd641..c48cb4402ff 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 00000000000..88af227dd0f
--- /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 aa665eb216e..14452ae4ecc 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 00000000000..6d6f623d937
--- /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 00000000000..38e302eeb0e
--- /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 26ba3aa6f22..1e0dddbeb57 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 04c347d8dec..e20e041e26a 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 554d2a0768d..5026bac57db 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 776b5ef2bb1..c4b90e0a560 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 b2e26b76f81..099a30ebf18 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 757058e48d0..3d19dfd98bf 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 00000000000..fd49284c1ae
--- /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 972541d4a7e..5b767cb1783 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 d05cb43c860..d73065cb9d7 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 aeddbaeb9b2..ec5d17fe0a1 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 00000000000..b665e1ac2ab
--- /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 9c619623a0f..6939d501a2c 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 d1e4ec78535..c3e0c01aa8a 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 0e3e3e9d266..26b3687598e 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 00000000000..5bfb194e609
--- /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 00000000000..4f077657cf8
--- /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 1bc59d06352..21c49a4c5e3 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 3b867de1b2c..95ecd50d716 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 00000000000..f6921dc264d
--- /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 4101639e3e9..ca5f6568e7a 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 250064eed64..8f5c233f09f 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 826eba61e15..5e9a7255341 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 0b0f7797e3c..60bfc81a1bf 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 7294fa3d7c4..95b4f7b028a 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 1593b47b47a..6e432ec8abc 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 a7c9a8078ff..1b6d80c3053 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 0c99415c885..e588e438475 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 35824fc6af3..cf348dc9950 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 4550ec84ed4..97af4d8e4d3 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 c33f0e176ea..6e86aaa17cb 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 3a208e0e9b8..e4aa989e964 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 e4bf3c390bb..91e8233500e 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 2a772aeea53..c9d0c328285 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 d26ebcfb434..21bd8d8df79 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 dfd36776e0a..327464e8437 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 0c33e6e2702..3bf72d26a0b 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 549aee5ab82..a49b7624a34 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 c7c344ff156..5f4b1ca5499 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 0b75f079a92..ed51fd1c566 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 6cad3524786..7d85311a197 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 403c259c84b..620ee923b4d 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 b8ac9c03325..917686ecf15 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 b7272c78b4b..39a8ceae483 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 24101895903..27e1482ca9b 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 290fafb42d5..abd81b8e779 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 a140566bbe1..ae331544107 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 0de23fc2c2f..887e92408ea 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 46e588b0b70..e60400759ec 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 25c82bad048..54e90d7edb2 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 4ff55abc4af..326071a1216 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 84cd7a198b4..00000000000
--- 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 593a128f789..00000000000
--- 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 fec504358fc..00000000000
--- 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 68448963696..00000000000
--- 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 0221aa567c3..00000000000
--- 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 3d4b51c0e1a..00000000000
--- 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 4bc41436f3e..696d3b4e566 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 6135ab9765c..79933d79823 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 6a2fab062c6..ee3c10a6a44 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 75d6f635fed..2fcc49bb11c 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 d67c3b38138..a7640ae756d 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 00000000000..395253e50d7
--- /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 ed28f139ba2..d57af0dec46 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 00000000000..f9cd4df2b33
--- /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 daa309a00b4..132957b42a2 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 2857ca73435..0de4282ccee 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 90597ec98b6..29b5814c249 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 e754d3af8bc..4b29db95f8e 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 8832d904477..751897ce831 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 9d7e6bb7fa7..a624d122864 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 c4d0b078be3..518a5952dd7 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 51910485e14..ab5e6694130 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 c8792bb135d..11010a4d512 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
-- 
GitLab