diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
index 0fc64b3..c5cf292 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/OnboardView.jsx
@@ -16,9 +16,7 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 import OnboardingCatalogView from './onboardingCatalog/OnboardingCatalogView.jsx';
-import OnboardingCatalogViewWithFilter from './onboardingCatalog/OnboardingCatalogViewWithFilter.jsx';
 import WorkspaceView from './workspace/WorkspaceView.jsx';
-import WorkspaceViewWithFilter from './workspace/WorkspaceViewWithFilter.jsx';
 import { tabsMapping } from './OnboardConstants.js';
 import i18n from 'nfvo-utils/i18n/i18n.js';
 import classnames from 'classnames';
@@ -27,8 +25,6 @@
 import { catalogItemTypes } from './onboardingCatalog/OnboardingCatalogConstants.js';
 import NotificationsView from 'sdc-app/onboarding/userNotifications/NotificationsView.jsx';
 import Filter from 'sdc-app/onboarding/onboard/filter/Filter.jsx';
-import featureToggle from 'sdc-app/features/featureToggle.js';
-import { featureToggleNames } from 'sdc-app/features/FeaturesConstants.js';
 const OnboardHeaderTabs = ({ onTabClick, activeTab }) => (
     <div className="onboard-header-tabs">
         <div
@@ -50,16 +46,6 @@
     </div>
 );
 
-const ToggledOnboardingCatalogView = featureToggle(featureToggleNames.FILTER)({
-    OnComp: OnboardingCatalogViewWithFilter,
-    OffComp: OnboardingCatalogView
-});
-
-const ToggledWorkspaceView = featureToggle(featureToggleNames.FILTER)({
-    OnComp: WorkspaceViewWithFilter,
-    OffComp: WorkspaceView
-});
-
 const OnboardHeader = ({ onSearch, activeTab, onTabClick, searchValue }) => (
     <div className="onboard-header">
         <OnboardHeaderTabs activeTab={activeTab} onTabClick={onTabClick} />
@@ -98,11 +84,11 @@
     renderViewByTab(activeTab) {
         switch (activeTab) {
             case tabsMapping.WORKSPACE:
-                return <ToggledWorkspaceView {...this.props} />;
+                return <WorkspaceView {...this.props} />;
             case tabsMapping.CATALOG:
-                return <ToggledOnboardingCatalogView {...this.props} />;
+                return <OnboardingCatalogView {...this.props} />;
             default:
-                return <ToggledWorkspaceView {...this.props} />;
+                return <WorkspaceView {...this.props} />;
         }
     }
 
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx
index a00357c..dadbbfd 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/filter/Filter.jsx
@@ -17,8 +17,6 @@
 import { connect } from 'react-redux';
 import React from 'react';
 import PropTypes from 'prop-types';
-import featureToggle from 'sdc-app/features/featureToggle.js';
-import { featureToggleNames } from 'sdc-app/features/FeaturesConstants.js';
 import { tabsMapping as onboardTabsMapping } from '../OnboardConstants.js';
 import { actionTypes } from './FilterConstants.js';
 
@@ -69,10 +67,4 @@
     activeTab: PropTypes.number
 };
 
-export default featureToggle(featureToggleNames.FILTER)(
-    connect(mapStateToProps, mapActionsToProps)(Filter)
-);
-
-export const ConnectedFilter = connect(mapStateToProps, mapActionsToProps)(
-    Filter
-);
+export default connect(mapStateToProps, mapActionsToProps)(Filter);
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
index a416d36..86c437d 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogView.jsx
@@ -15,64 +15,12 @@
  */
 import React from 'react';
 import i18n from 'nfvo-utils/i18n/i18n.js';
-import classnames from 'classnames';
 import DetailsCatalogView from 'sdc-app/onboarding/onboard/DetailsCatalogView.jsx';
 import VendorCatalogView from './VendorCatalogView.jsx';
 import { tabsMapping } from './OnboardingCatalogConstants.js';
 import { tabsMapping as WCTabsMapping } from 'sdc-app/onboarding/onboard/OnboardConstants.js';
-import featureToggle from 'sdc-app/features/featureToggle.js';
-import { featureToggleNames } from 'sdc-app/features/FeaturesConstants.js';
 
-const Separator = () => <div className="tab-separator" />;
-
-const Tab = ({ onTabPress, title, dataTestId, activeTab, tabMapping }) => (
-    <div
-        className={classnames('catalog-header-tab', {
-            active: activeTab === tabMapping
-        })}
-        onClick={() => onTabPress(tabMapping)}
-        data-test-id={dataTestId}>
-        {title}
-    </div>
-);
-
-const ArchiveTab = featureToggle(featureToggleNames.ARCHIVE_ITEM)(Tab);
-const ArchiveTabSeparator = featureToggle(featureToggleNames.ARCHIVE_ITEM)(
-    Separator
-);
-
-const CatalogHeaderTabs = props => (
-    <div className="catalog-header-tabs">
-        <Tab
-            {...props}
-            title={i18n('ACTIVE')}
-            dataTestId="catalog-all-tab"
-            tabMapping={tabsMapping.ACTIVE}
-        />
-        <Separator />
-        <Tab
-            {...props}
-            title={i18n('BY VENDOR')}
-            dataTestId="catalog-header-tab"
-            tabMapping={tabsMapping.BY_VENDOR}
-        />
-        <ArchiveTabSeparator />
-        <ArchiveTab
-            {...props}
-            title={i18n('ARCHIVE')}
-            dataTestId="catalog-archive-tab"
-            tabMapping={tabsMapping.ARCHIVE}
-        />
-    </div>
-);
-
-const CatalogHeader = ({ activeTab, onTabPress }) => (
-    <div className="catalog-header">
-        <CatalogHeaderTabs activeTab={activeTab} onTabPress={onTabPress} />
-    </div>
-);
-
-const FilterCatalogHeader = () => (
+const CatalogHeader = () => (
     <div className="catalog-header">
         <div className="catalog-header-tabs">
             <div className="catalog-header-tab active">
@@ -82,19 +30,11 @@
     </div>
 );
 
-const FeaturedCatalogHeader = featureToggle(featureToggleNames.FILTER)({
-    OnComp: FilterCatalogHeader,
-    OffComp: CatalogHeader
-});
-
 class OnboardingCatalogView extends React.Component {
     renderViewByTab(activeTab) {
         const {
-            finalizedLicenseModelList: licenseModelList,
-            fullLicenseModelList,
             users,
             vspOverlay,
-            finalizedSoftwareProductList: softwareProductList,
             onSelectLicenseModel,
             onSelectSoftwareProduct,
             onAddLicenseModelClick,
@@ -104,16 +44,17 @@
             selectedVendor,
             searchValue,
             onMigrate,
-            archivedSoftwareProductList,
-            archivedLicenseModelList
+            filteredItems
         } = this.props;
 
+        const { vlmList, vspList } = filteredItems;
+
         switch (activeTab) {
             case tabsMapping.ARCHIVE:
                 return (
                     <DetailsCatalogView
-                        VLMList={archivedLicenseModelList}
-                        VSPList={archivedSoftwareProductList}
+                        VLMList={vlmList}
+                        VSPList={vspList}
                         users={users}
                         onSelectVLM={(item, users) =>
                             onSelectLicenseModel(
@@ -136,8 +77,8 @@
             case tabsMapping.ACTIVE:
                 return (
                     <DetailsCatalogView
-                        VLMList={licenseModelList}
-                        VSPList={softwareProductList}
+                        VLMList={vlmList}
+                        VSPList={vspList}
                         users={users}
                         onAddVLM={onAddLicenseModelClick}
                         onAddVSP={onAddSoftwareProductClick}
@@ -163,7 +104,7 @@
             default:
                 return (
                     <VendorCatalogView
-                        licenseModelList={fullLicenseModelList}
+                        licenseModelList={vlmList}
                         users={users}
                         onAddVSP={onAddSoftwareProductClick}
                         onAddVLM={onAddLicenseModelClick}
@@ -193,23 +134,10 @@
     }
 
     render() {
-        const {
-            selectedVendor,
-            catalogActiveTab: activeTab,
-            onCatalogTabClick,
-            onSearch,
-            searchValue
-        } = this.props;
+        const { selectedVendor, catalogActiveTab: activeTab } = this.props;
         return (
             <div className="catalog-wrapper">
-                {!selectedVendor && (
-                    <FeaturedCatalogHeader
-                        onSearch={event => onSearch(event.target.value)}
-                        activeTab={activeTab}
-                        onTabPress={tab => onCatalogTabClick(tab)}
-                        searchValue={searchValue}
-                    />
-                )}
+                {!selectedVendor && <CatalogHeader />}
                 {this.renderViewByTab(activeTab)}
             </div>
         );
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogViewWithFilter.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogViewWithFilter.jsx
deleted file mode 100644
index 86c437d..0000000
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/OnboardingCatalogViewWithFilter.jsx
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright © 2016-2018 European Support Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import React from 'react';
-import i18n from 'nfvo-utils/i18n/i18n.js';
-import DetailsCatalogView from 'sdc-app/onboarding/onboard/DetailsCatalogView.jsx';
-import VendorCatalogView from './VendorCatalogView.jsx';
-import { tabsMapping } from './OnboardingCatalogConstants.js';
-import { tabsMapping as WCTabsMapping } from 'sdc-app/onboarding/onboard/OnboardConstants.js';
-
-const CatalogHeader = () => (
-    <div className="catalog-header">
-        <div className="catalog-header-tabs">
-            <div className="catalog-header-tab active">
-                {i18n('ONBOARD CATALOG')}
-            </div>
-        </div>
-    </div>
-);
-
-class OnboardingCatalogView extends React.Component {
-    renderViewByTab(activeTab) {
-        const {
-            users,
-            vspOverlay,
-            onSelectLicenseModel,
-            onSelectSoftwareProduct,
-            onAddLicenseModelClick,
-            onAddSoftwareProductClick,
-            onVspOverlayChange,
-            onVendorSelect,
-            selectedVendor,
-            searchValue,
-            onMigrate,
-            filteredItems
-        } = this.props;
-
-        const { vlmList, vspList } = filteredItems;
-
-        switch (activeTab) {
-            case tabsMapping.ARCHIVE:
-                return (
-                    <DetailsCatalogView
-                        VLMList={vlmList}
-                        VSPList={vspList}
-                        users={users}
-                        onSelectVLM={(item, users) =>
-                            onSelectLicenseModel(
-                                item,
-                                users,
-                                WCTabsMapping.CATALOG
-                            )
-                        }
-                        onSelectVSP={(item, users) =>
-                            onSelectSoftwareProduct(
-                                item,
-                                users,
-                                WCTabsMapping.CATALOG
-                            )
-                        }
-                        filter={searchValue}
-                        onMigrate={onMigrate}
-                    />
-                );
-            case tabsMapping.ACTIVE:
-                return (
-                    <DetailsCatalogView
-                        VLMList={vlmList}
-                        VSPList={vspList}
-                        users={users}
-                        onAddVLM={onAddLicenseModelClick}
-                        onAddVSP={onAddSoftwareProductClick}
-                        onSelectVLM={(item, users) =>
-                            onSelectLicenseModel(
-                                item,
-                                users,
-                                WCTabsMapping.CATALOG
-                            )
-                        }
-                        onSelectVSP={(item, users) =>
-                            onSelectSoftwareProduct(
-                                item,
-                                users,
-                                WCTabsMapping.CATALOG
-                            )
-                        }
-                        filter={searchValue}
-                        onMigrate={onMigrate}
-                    />
-                );
-            case tabsMapping.BY_VENDOR:
-            default:
-                return (
-                    <VendorCatalogView
-                        licenseModelList={vlmList}
-                        users={users}
-                        onAddVSP={onAddSoftwareProductClick}
-                        onAddVLM={onAddLicenseModelClick}
-                        onSelectVSP={(item, users) =>
-                            onSelectSoftwareProduct(
-                                item,
-                                users,
-                                WCTabsMapping.CATALOG
-                            )
-                        }
-                        onSelectVLM={(item, users) =>
-                            onSelectLicenseModel(
-                                item,
-                                users,
-                                WCTabsMapping.CATALOG
-                            )
-                        }
-                        vspOverlay={vspOverlay}
-                        onVendorSelect={onVendorSelect}
-                        selectedVendor={selectedVendor}
-                        onVspOverlayChange={onVspOverlayChange}
-                        onMigrate={onMigrate}
-                        filter={searchValue}
-                    />
-                );
-        }
-    }
-
-    render() {
-        const { selectedVendor, catalogActiveTab: activeTab } = this.props;
-        return (
-            <div className="catalog-wrapper">
-                {!selectedVendor && <CatalogHeader />}
-                {this.renderViewByTab(activeTab)}
-            </div>
-        );
-    }
-}
-
-export default OnboardingCatalogView;
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx
index aec8e9b..fda47ef 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/onboardingCatalog/VendorItem.jsx
@@ -68,9 +68,9 @@
                             onClick={e => this.handleVspCountClick(e)}
                             data-test-id="catalog-vsp-count"
                             disabled={!softwareProductList.length}>
-                            {i18n('{length} VSPs', {
-                                length: softwareProductList.length
-                            })}
+                            {`${softwareProductList.length.toString()} ${i18n(
+                                'VSPs'
+                            )}`}
                         </Button>
                         {shouldShowOverlay &&
                             softwareProductList.length > 0 && (
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx
index 2f17867..bef88df 100644
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceView.jsx
@@ -1,34 +1,35 @@
-/*!
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+/*
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing
- * permissions and limitations under the License.
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 import React from 'react';
 import DetailsCatalogView from '../DetailsCatalogView.jsx';
 import i18n from 'nfvo-utils/i18n/i18n.js';
 import { tabsMapping } from 'sdc-app/onboarding/onboard/OnboardConstants.js';
+import { tabsMapping as catalogTabsMappping } from '../onboardingCatalog/OnboardingCatalogConstants.js';
 
 const WorkspaceView = props => {
     let {
-        licenseModelList,
-        softwareProductList,
         onAddLicenseModelClick,
         users,
         onAddSoftwareProductClick,
         onSelectLicenseModel,
         onSelectSoftwareProduct,
         searchValue,
-        onMigrate
+        onMigrate,
+        catalogActiveTab,
+        filteredItems: { vspList, vlmList }
     } = props;
 
     return (
@@ -37,11 +38,19 @@
                 {i18n('WORKSPACE')}
             </div>
             <DetailsCatalogView
-                VLMList={licenseModelList}
-                VSPList={softwareProductList}
+                VLMList={vlmList}
+                VSPList={vspList}
                 users={users}
-                onAddVLM={onAddLicenseModelClick}
-                onAddVSP={onAddSoftwareProductClick}
+                onAddVLM={
+                    catalogActiveTab === catalogTabsMappping.ACTIVE
+                        ? onAddLicenseModelClick
+                        : undefined
+                }
+                onAddVSP={
+                    catalogActiveTab === catalogTabsMappping.ACTIVE
+                        ? onAddSoftwareProductClick
+                        : undefined
+                }
                 onSelectVLM={(item, users) =>
                     onSelectLicenseModel(item, users, tabsMapping.WORKSPACE)
                 }
diff --git a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceViewWithFilter.jsx b/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceViewWithFilter.jsx
deleted file mode 100644
index bef88df..0000000
--- a/openecomp-ui/src/sdc-app/onboarding/onboard/workspace/WorkspaceViewWithFilter.jsx
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright © 2016-2018 European Support Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import React from 'react';
-import DetailsCatalogView from '../DetailsCatalogView.jsx';
-import i18n from 'nfvo-utils/i18n/i18n.js';
-import { tabsMapping } from 'sdc-app/onboarding/onboard/OnboardConstants.js';
-import { tabsMapping as catalogTabsMappping } from '../onboardingCatalog/OnboardingCatalogConstants.js';
-
-const WorkspaceView = props => {
-    let {
-        onAddLicenseModelClick,
-        users,
-        onAddSoftwareProductClick,
-        onSelectLicenseModel,
-        onSelectSoftwareProduct,
-        searchValue,
-        onMigrate,
-        catalogActiveTab,
-        filteredItems: { vspList, vlmList }
-    } = props;
-
-    return (
-        <div className="catalog-wrapper workspace-view">
-            <div className="catalog-header workspace-header">
-                {i18n('WORKSPACE')}
-            </div>
-            <DetailsCatalogView
-                VLMList={vlmList}
-                VSPList={vspList}
-                users={users}
-                onAddVLM={
-                    catalogActiveTab === catalogTabsMappping.ACTIVE
-                        ? onAddLicenseModelClick
-                        : undefined
-                }
-                onAddVSP={
-                    catalogActiveTab === catalogTabsMappping.ACTIVE
-                        ? onAddSoftwareProductClick
-                        : undefined
-                }
-                onSelectVLM={(item, users) =>
-                    onSelectLicenseModel(item, users, tabsMapping.WORKSPACE)
-                }
-                onSelectVSP={(item, users) =>
-                    onSelectSoftwareProduct(item, users, tabsMapping.WORKSPACE)
-                }
-                onMigrate={onMigrate}
-                filter={searchValue}
-            />
-        </div>
-    );
-};
-
-export default WorkspaceView;
