diff --git a/openecomp-ui/src/nfvo-components/input/validation/Form.jsx b/openecomp-ui/src/nfvo-components/input/validation/Form.jsx
index 62fc29a..b5db67c 100644
--- a/openecomp-ui/src/nfvo-components/input/validation/Form.jsx
+++ b/openecomp-ui/src/nfvo-components/input/validation/Form.jsx
@@ -70,8 +70,8 @@
         return (
             <form
                 {...formProps}
-                ref={form => (this.form = form)}
-                onSubmit={event => this.handleFormValidation(event)}>
+                ref={this.setFormRef}
+                onSubmit={this.handleFormValidation}>
                 <div className="validation-form-content">
                     <fieldset disabled={isReadOnlyMode}>{children}</fieldset>
                 </div>
@@ -80,7 +80,7 @@
                         labledButtons={labledButtons}
                         submitButtonText={submitButtonText}
                         cancelButtonText={cancelButtonText}
-                        ref={buttons => (this.buttons = buttons)}
+                        ref={this.setButtonsRef}
                         isReadOnlyMode={isReadOnlyMode}
                     />
                 )}
@@ -88,14 +88,19 @@
         );
     }
 
-    handleFormValidation(event) {
+    handleFormValidation = event => {
         event.preventDefault();
         if (this.props.onValidateForm && !this.props.formReady) {
             return this.props.onValidateForm();
         } else {
             return this.handleFormSubmit(event);
         }
-    }
+    };
+
+    setButtonsRef = buttons => (this.buttons = buttons);
+
+    setFormRef = form => (this.form = form);
+
     handleFormSubmit(event) {
         if (event) {
             event.preventDefault();
@@ -128,7 +133,10 @@
                 this.props.onValidityChanged(this.props.isValid);
             }
         }
-        if (this.props.formReady) {
+        if (
+            this.props.formReady &&
+            this.props.formReady !== prevProps.formReady
+        ) {
             // if form validation succeeded -> continue with submit
             this.handleFormSubmit();
         }
diff --git a/openecomp-ui/src/nfvo-components/loader/LoaderReducer.js b/openecomp-ui/src/nfvo-components/loader/LoaderReducer.js
index 1d0f679..3f9eb17 100644
--- a/openecomp-ui/src/nfvo-components/loader/LoaderReducer.js
+++ b/openecomp-ui/src/nfvo-components/loader/LoaderReducer.js
@@ -26,13 +26,6 @@
             fetchingRequests++;
             newArray = state.currentlyFetching.slice();
             newArray.splice(0, 0, action.url);
-            if (DEBUG) {
-                console.log('Loader SEND REQUEST url: ' + action.url);
-                console.log(
-                    'Loader SEND REQUEST number of fetching requests: ' +
-                        fetchingRequests
-                );
-            }
             return {
                 fetchingRequests: fetchingRequests,
                 currentlyFetching: newArray,
@@ -44,13 +37,6 @@
             newArray = state.currentlyFetching.filter(item => {
                 return item !== action.url;
             });
-            if (DEBUG) {
-                console.log('Loader RECEIVE_RESPONSE url: ' + action.url);
-                console.log(
-                    'Loader RECEIVE_RESPONSE: number of fetching requests: ' +
-                        fetchingRequests
-                );
-            }
             return {
                 currentlyFetching: newArray,
                 fetchingRequests: fetchingRequests,
diff --git a/openecomp-ui/src/nfvo-components/modal/Modal.jsx b/openecomp-ui/src/nfvo-components/modal/Modal.jsx
index cfd7575..2f70a6a 100644
--- a/openecomp-ui/src/nfvo-components/modal/Modal.jsx
+++ b/openecomp-ui/src/nfvo-components/modal/Modal.jsx
@@ -1,22 +1,22 @@
-/*!
- * 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 ReactDOM from 'react-dom';
 import BootstrapModal from 'react-bootstrap/lib/Modal.js';
-
+import { isEqual } from 'lodash';
 let nextModalId = 0;
 
 export default class Modal extends React.Component {
@@ -47,6 +47,18 @@
                 )
             );
         }
+
+        componentWillUnmount() {
+            let element = ReactDOM.findDOMNode(this);
+
+            ['wheel', 'mousewheel', 'DOMMouseScroll', 'click'].forEach(
+                eventType => element.removeEventListener(eventType)
+            );
+        }
+
+        shouldComponentUpdate(nextProps) {
+            return !isEqual(this.props, nextProps);
+        }
     };
 
     componentWillMount() {
diff --git a/openecomp-ui/src/nfvo-utils/RestAPIUtil.js b/openecomp-ui/src/nfvo-utils/RestAPIUtil.js
index 6be5db7..a8b40d3 100644
--- a/openecomp-ui/src/nfvo-utils/RestAPIUtil.js
+++ b/openecomp-ui/src/nfvo-utils/RestAPIUtil.js
@@ -79,10 +79,6 @@
 
 class RestAPIUtil {
     handleRequest(url, type, options = {}, data) {
-        if (DEBUG) {
-            console.log('axios --> Making REST call (' + type + '): ' + url);
-        }
-
         applySecurity(options, data);
 
         // TODO see ig necessary or in transformrequest funtion
diff --git a/openecomp-ui/src/nfvo-utils/json/JSONSchema.js b/openecomp-ui/src/nfvo-utils/json/JSONSchema.js
index 53d288f..028d82f 100644
--- a/openecomp-ui/src/nfvo-utils/json/JSONSchema.js
+++ b/openecomp-ui/src/nfvo-utils/json/JSONSchema.js
@@ -110,7 +110,7 @@
             if (items && items.length > 0) {
                 let values = items
                     .filter(value => value)
-                    .map(value => ({ enum: value, title: value }));
+                    .map(value => ({ enum: value, title: value.toString() }));
                 enumResult = values;
             }
         }
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/NICCreation/NICCreationView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/NICCreation/NICCreationView.jsx
index 88525c0..6789ba4 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/NICCreation/NICCreationView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/NICCreation/NICCreationView.jsx
@@ -1,17 +1,17 @@
-/*!
- * 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 PropTypes from 'prop-types';
@@ -20,6 +20,7 @@
 import Form from 'nfvo-components/input/validation/Form.jsx';
 import GridSection from 'nfvo-components/grid/GridSection.jsx';
 import GridItem from 'nfvo-components/grid/GridItem.jsx';
+import isEqual from 'lodash/isEqual.js';
 
 const NICPropType = PropTypes.shape({
     id: PropTypes.string,
@@ -35,14 +36,25 @@
         onSubmit: PropTypes.func.isRequired,
         onCancel: PropTypes.func.isRequired
     };
-
+    shouldComponentUpdate(nextProps) {
+        let res = true;
+        const { data, isFormValid, formReady, genericFieldInfo } = this.props;
+        if (
+            isEqual(data, nextProps.data) &&
+            isEqual(isFormValid, nextProps.isFormValid) &&
+            formReady === nextProps.formReady &&
+            isEqual(genericFieldInfo, nextProps.genericFieldInfo)
+        ) {
+            res = false;
+        }
+        return res;
+    }
     render() {
         let {
             data = {},
             onDataChanged,
             genericFieldInfo,
             isFormValid,
-            onValidateForm,
             formReady
         } = this.props;
         let { name, description, networkDescription } = data;
@@ -50,16 +62,15 @@
             <div>
                 {genericFieldInfo && (
                     <Form
-                        ref={form => (this.form = form)}
                         hasButtons={true}
-                        onSubmit={() => this.submit()}
+                        onSubmit={this.submit}
                         submitButtonText={
                             data.id ? i18n('Save') : i18n('Create')
                         }
-                        onReset={() => this.props.onCancel()}
+                        onReset={this.cancel}
                         labledButtons={true}
                         isValid={isFormValid}
-                        onValidateForm={() => onValidateForm()}
+                        onValidateForm={this.validate}
                         formReady={formReady}>
                         <GridSection hasLastColSet>
                             <GridItem colSpan={4} lastColInRow>
@@ -148,10 +159,18 @@
         );
     }
 
-    submit() {
+    submit = () => {
         const { data: nic, componentId } = this.props;
         this.props.onSubmit({ nic, componentId });
-    }
+    };
+
+    validate = () => {
+        this.props.onValidateForm();
+    };
+
+    cancel = () => {
+        this.props.onCancel();
+    };
 }
 
 export default NICCreationView;
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/NameAndPurpose.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/NameAndPurpose.jsx
index 5a89239..634b43f 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/NameAndPurpose.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/network/nicEditorComponents/NameAndPurpose.jsx
@@ -1,17 +1,17 @@
-/*!
- * 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 PropTypes from 'prop-types';
@@ -25,8 +25,7 @@
     genericFieldInfo,
     isReadOnlyMode,
     name,
-    description,
-    isManual
+    description
 }) => {
     return (
         <GridSection hastLastColSet>
@@ -35,7 +34,7 @@
                     label={i18n('Name')}
                     value={name}
                     data-test-id="nic-name"
-                    disabled={!isManual}
+                    disabled={true}
                     isRequired={true}
                     onChange={name => onDataChanged({ name })}
                     isValid={genericFieldInfo['name'].isValid}
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/storage/SoftwareProductComponentStorageView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/storage/SoftwareProductComponentStorageView.jsx
index ac7e4a8..653e0ac 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/storage/SoftwareProductComponentStorageView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/storage/SoftwareProductComponentStorageView.jsx
@@ -1,17 +1,17 @@
-/*!
- * 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 PropTypes from 'prop-types';
@@ -161,7 +161,9 @@
                         'storage/snapshotBackup/snapshotFrequency': snapshotFrequency
                     })
                 }
-                label={i18n('Backup Storage Size (GB)')}
+                label={i18n(
+                    'ComponentQuestionnaire/storage/snapshotBackup/snapshotFrequency'
+                )}
                 type="number"
                 isValid={
                     qgenericFieldInfo[
