diff --git a/ui-react/src/LoopUI.js b/ui-react/src/LoopUI.js
index 6522cc3..1079921 100644
--- a/ui-react/src/LoopUI.js
+++ b/ui-react/src/LoopUI.js
@@ -40,8 +40,6 @@
 import CreateLoopModal from './components/dialogs/Loop/CreateLoopModal';
 import OpenLoopModal from './components/dialogs/Loop/OpenLoopModal';
 import ModifyLoopModal from './components/dialogs/Loop/ModifyLoopModal';
-import OperationalPolicyModal from './components/dialogs/OperationalPolicy/OperationalPolicyModal';
-import ConfigurationPolicyModal from './components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal';
 import PolicyModal from './components/dialogs/Policy/PolicyModal';
 import LoopPropertiesModal from './components/dialogs/Loop/LoopPropertiesModal';
 import UserInfoModal from './components/dialogs/UserInfoModal';
@@ -268,10 +266,7 @@
 				<Route path="/viewToscaPolicyModal" render={(routeProps) => (<ViewToscaPolicyModal {...routeProps} />)} />
 				<Route path="/ViewLoopTemplatesModal" render={(routeProps) => (<ViewLoopTemplatesModal {...routeProps} />)} />
 				<Route path="/ManageDictionaries" render={(routeProps) => (<ManageDictionaries {...routeProps} />)} />
-				<Route path="/operationalPolicyModal"
-					render={(routeProps) => (<OperationalPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop} updateLoopFunction={this.updateLoopCache} showSucAlert={this.showSucAlert} showFailAlert={this.showFailAlert}/>)} />
 				<Route path="/policyModal/:policyInstanceType/:policyName" render={(routeProps) => (<PolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} />
-				<Route path="/configurationPolicyModal/:policyName" render={(routeProps) => (<ConfigurationPolicyModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} />
 				<Route path="/createLoop" render={(routeProps) => (<CreateLoopModal {...routeProps} loadLoopFunction={this.loadLoop} />)} />
 				<Route path="/openLoop" render={(routeProps) => (<OpenLoopModal {...routeProps} loadLoopFunction={this.loadLoop} />)} />
 				<Route path="/loopProperties" render={(routeProps) => (<LoopPropertiesModal {...routeProps} loopCache={this.getLoopCache()} loadLoopFunction={this.loadLoop}/>)} />
diff --git a/ui-react/src/__snapshots__/LoopUI.test.js.snap b/ui-react/src/__snapshots__/LoopUI.test.js.snap
index d8b2e7b..958e77a 100644
--- a/ui-react/src/__snapshots__/LoopUI.test.js.snap
+++ b/ui-react/src/__snapshots__/LoopUI.test.js.snap
@@ -21,18 +21,10 @@
     render={[Function]}
   />
   <Route
-    path="/operationalPolicyModal"
-    render={[Function]}
-  />
-  <Route
     path="/policyModal/:policyInstanceType/:policyName"
     render={[Function]}
   />
   <Route
-    path="/configurationPolicyModal/:policyName"
-    render={[Function]}
-  />
-  <Route
     path="/createLoop"
     render={[Function]}
   />
diff --git a/ui-react/src/__snapshots__/OnapClamp.test.js.snap b/ui-react/src/__snapshots__/OnapClamp.test.js.snap
index 39b5445..a06f1ed 100644
--- a/ui-react/src/__snapshots__/OnapClamp.test.js.snap
+++ b/ui-react/src/__snapshots__/OnapClamp.test.js.snap
@@ -48,18 +48,10 @@
       render={[Function]}
     />
     <Route
-      path="/operationalPolicyModal"
-      render={[Function]}
-    />
-    <Route
       path="/policyModal/:policyInstanceType/:policyName"
       render={[Function]}
     />
     <Route
-      path="/configurationPolicyModal/:policyName"
-      render={[Function]}
-    />
-    <Route
       path="/createLoop"
       render={[Function]}
     />
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
deleted file mode 100644
index 3ff1ebe..0000000
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-import React from 'react'
-import Button from 'react-bootstrap/Button';
-import Modal from 'react-bootstrap/Modal';
-import styled from 'styled-components';
-import LoopService from '../../../api/LoopService';
-import JSONEditor from '@json-editor/json-editor';
-
-const ModalStyled = styled(Modal)`
-	background-color: transparent;
-`
-
-export default class ConfigurationPolicyModal extends React.Component {
-
-	state = {
-		show: true,
-		loopCache: this.props.loopCache,
-		jsonEditor: null,
-		policyName: this.props.match.params.policyName
-	};
-
-	constructor(props, context) {
-		super(props, context);
-		this.handleClose = this.handleClose.bind(this);
-		this.handleSave = this.handleSave.bind(this);
-		this.renderJsonEditor = this.renderJsonEditor.bind(this);
-	}
-
-	handleSave() {
-		var errors = this.state.jsonEditor.validate();
-		var editorData = this.state.jsonEditor.getValue();
-
-		if (errors.length !== 0) {
-			console.error("Errors detected during config policy data validation ", errors);
-			this.setState({ show: false });
-			this.props.history.push('/');
-		}
-		else {
-			console.info("NO validation errors found in config policy data");
-			this.state.loopCache.updateMicroServiceProperties(this.state.policyName, editorData[0]);
-			LoopService.setMicroServiceProperties(this.state.loopCache.getLoopName(), this.state.loopCache.getMicroServiceForName(this.state.policyName)).then(resp => {
-				this.setState({ show: false });
-				this.props.history.push('/');
-				this.props.loadLoopFunction(this.state.loopCache.getLoopName());
-			});
-		}
-	}
-
-	handleClose() {
-		this.setState({ show: false });
-		this.props.history.push('/');
-	}
-
-	componentDidMount() {
-		this.renderJsonEditor();
-	}
-
-	renderJsonEditor() {
-		console.debug("Rendering ConfigurationPolicyModal ", this.state.policyName);
-		var toscaModel = this.state.loopCache.getMicroServiceJsonRepresentationForName(this.state.policyName);
-		if (toscaModel == null) {
-			return;
-		}
-		var editorData = this.state.loopCache.getMicroServicePropertiesForName(this.state.policyName);
-
-		this.setState({
-			jsonEditor: new JSONEditor(document.getElementById("editor"),
-				{
-				    schema: toscaModel,
-				    startval: editorData,
-				    theme: 'bootstrap4',
-                    object_layout: 'grid',
-                    disable_properties: true,
-                    disable_edit_json: false,
-                    disable_array_reorder: true,
-                    disable_array_delete_last_row: true,
-                    disable_array_delete_all_rows: false,
-                    show_errors: 'always'
-				 })
-		})
-	}
-
-	render() {
-		return (
-			<ModalStyled size="xl" show={this.state.show} onHide={this.handleClose} backdrop="static" keyboard={false} >
-				<Modal.Header closeButton>
-					<Modal.Title>Configuration policies</Modal.Title>
-				</Modal.Header>
-				<Modal.Body>
-					<div id="editor" />
-
-				</Modal.Body>
-				<Modal.Footer>
-					<Button variant="secondary" onClick={this.handleClose}>
-						Close
-	            </Button>
-					<Button variant="primary" onClick={this.handleSave}>
-						Save Changes
-	            </Button>
-				</Modal.Footer>
-			</ModalStyled>
-
-		);
-	}
-}
\ No newline at end of file
diff --git a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js b/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
deleted file mode 100644
index a19c18c..0000000
--- a/ui-react/src/components/dialogs/ConfigurationPolicy/ConfigurationPolicyModal.test.js
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-import React from 'react';
-import { mount } from 'enzyme';
-import ConfigurationPolicyModal from './ConfigurationPolicyModal';
-import LoopCache from '../../../api/LoopCache';
-
-describe('Verify ConfigurationPolicyModal', () => {
-    beforeEach(() => {
-        fetch.resetMocks();
-        fetch.mockImplementation(() => {
-            return Promise.resolve({
-                ok: true,
-                status: 200,
-                text: () => "OK"
-            });
-        });
-    })
-    const loopCache = new LoopCache({
-            "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca",
-            "microServicePolicies": [{
-                "name": "TCA_h2NMX_v1_0_ResourceInstanceName1_tca",
-                "modelType": "onap.policies.monitoring.cdap.tca.hi.lo.app",
-                "properties": {"domain": "measurementsForVfScaling"},
-                "shared": false,
-                "jsonRepresentation": {"schema": {}}
-        }]
-    });
-    const historyMock = { push: jest.fn() };
-    const matchMock = { params:{ policyName: "TCA_h2NMX_v1_0_ResourceInstanceName1_tca" } } 
-    const flushPromises = () => new Promise(setImmediate);
-	
-    it('Test handleClose', () => {
-      const handleClose = jest.spyOn(ConfigurationPolicyModal.prototype,'handleClose');
-      const component = mount(<ConfigurationPolicyModal history={historyMock} loopCache={loopCache} match={matchMock}/>)
-
-      component.find('[variant="secondary"]').prop('onClick')();
-
-      expect(handleClose).toHaveBeenCalledTimes(1);
-      expect(component.state('show')).toEqual(false);
-      expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
-    });
-
-    it('Test handleSave', async () => {
-        const loadLoopFunction = jest.fn();
-        const handleSave = jest.spyOn(ConfigurationPolicyModal.prototype,'handleSave');
-        const component = mount(<ConfigurationPolicyModal history={historyMock} match={matchMock} loopCache={loopCache} loadLoopFunction={loadLoopFunction}/>)
-
-        component.find('[variant="primary"]').prop('onClick')();
-        await flushPromises();
-        component.update();
-
-        expect(handleSave).toHaveBeenCalledTimes(1);
-        expect(component.state('show')).toEqual(false);
-        expect(component.state('policyName')).toEqual("TCA_h2NMX_v1_0_ResourceInstanceName1_tca");
-        expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
-    });
-});
\ No newline at end of file
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
deleted file mode 100644
index 77dce16..0000000
--- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.js
+++ /dev/null
@@ -1,173 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-
-import React from 'react'
-import Button from 'react-bootstrap/Button';
-import Modal from 'react-bootstrap/Modal';
-import styled from 'styled-components';
-import LoopCache from '../../../api/LoopCache';
-import LoopService from '../../../api/LoopService';
-import JSONEditor from '@json-editor/json-editor';
-
-const ModalStyled = styled(Modal)`
-	background-color: transparent;
-`
-
-export default class OperationalPolicyModal extends React.Component {
-
-	state = {
-		show: true,
-		loopCache: this.props.loopCache,
-		jsonEditor: null
-	};
-
-	constructor(props, context) {
-		super(props, context);
-		this.handleClose = this.handleClose.bind(this);
-		this.handleSave = this.handleSave.bind(this);
-		this.renderJsonEditor = this.renderJsonEditor.bind(this);
-		this.handleRefresh = this.handleRefresh.bind(this);
-		this.setDefaultJsonEditorOptions();
-	}
-
-	handleSave() {
-		var errors = this.state.jsonEditor.validate();
-		var editorData = this.state.jsonEditor.getValue();
-
-		if (errors.length !== 0) {
-			console.error("Errors detected during config policy data validation ", errors);
-			this.props.showFailAlert(errors);
-		}
-		else {
-			console.info("NO validation errors found in config policy data");
-			this.state.loopCache.updateOperationalPolicyProperties(editorData);
-			LoopService.setOperationalPolicyProperties(this.state.loopCache.getLoopName(), this.state.loopCache.getOperationalPolicies()).then(resp => {
-				this.setState({ show: false });
-				this.props.history.push('/');
-				this.props.loadLoopFunction(this.state.loopCache.getLoopName());
-			});
-		}
-	}
-
-	handleClose() {
-		this.setState({ show: false });
-		this.props.history.push('/');
-	}
-
-	componentDidMount() {
-		this.renderJsonEditor();
-	}
-
-	setDefaultJsonEditorOptions() {
-		JSONEditor.defaults.themes.myBootstrap4 = JSONEditor.defaults.themes.bootstrap4.extend({
-			getTab: function(text,tabId) {
-				var liel = document.createElement('li');
-				liel.classList.add('nav-item');
-				var ael = document.createElement("a");
-				ael.classList.add("nav-link");
-				ael.setAttribute("style",'padding:10px;max-width:160px;');
-				ael.setAttribute("href", "#" + tabId);
-				ael.setAttribute('data-toggle', 'tab');
-				text.setAttribute("style",'word-wrap:break-word;');
-				ael.appendChild(text);
-				liel.appendChild(ael);
-				return liel;
-			}
-		});
-	}
-
-	renderJsonEditor() {
-		console.debug("Rendering OperationalPolicyModal");
-		var schema_json = this.state.loopCache.getOperationalPolicyJsonSchema();
-		
-		if (schema_json == null) {
-			console.error("NO Operational policy schema found");
-			return;
-		}
-		var operationalPoliciesData = this.state.loopCache.getOperationalPoliciesNoJsonSchema();
-
-		this.setState({
-				jsonEditor: new JSONEditor(document.getElementById("editor"),
-					{
-					    schema: schema_json.schema,
-					    startval: operationalPoliciesData,
-					    theme: 'myBootstrap4',
-                        object_layout: 'grid',
-                        disable_properties: true,
-                        disable_edit_json: false,
-                        disable_array_reorder: true,
-                        disable_array_delete_last_row: true,
-                        disable_array_delete_all_rows: false,
-                        array_controls_top: true,
-                        show_errors: 'always',
-                        keep_oneof_values: false,
-                        collapsed:true
-					})
-			})
-	}
-
-	handleRefresh() {
-		LoopService.refreshOperationalPolicyJson(this.state.loopCache.getLoopName(), this.state.loopCache.getOperationalPolicies()[0]).then(data => {
-			var newLoopCache =  new LoopCache(data);
-			var schema_json = newLoopCache.getOperationalPolicyJsonSchema();
-			var operationalPoliciesData = newLoopCache.getOperationalPoliciesNoJsonSchema();
-			document.getElementById("editor").innerHTML = "";
-			this.setState({
-				loopCache: newLoopCache,
-				jsonEditor: new JSONEditor(document.getElementById("editor"),
-					{ schema: schema_json.schema, startval: operationalPoliciesData })
-			})
-			this.props.updateLoopFunction(data);
-			
-		})
-		.catch(error => {
-			console.error("Error while refreshing the Operational Policy Json Representation");
-		});
-	}
-
-	render() {
-		return (
-			<ModalStyled size="xl" show={this.state.show} onHide={this.handleClose} backdrop="static" keyboard={false} >
-				<Modal.Header closeButton>
-					<Modal.Title>Operational policies</Modal.Title>
-				</Modal.Header>
-				<Modal.Body>
-					<div id="editor" />
-
-				</Modal.Body>
-				<Modal.Footer>
-					<Button variant="secondary" onClick={this.handleClose}>
-						Close
-					</Button>
-					<Button variant="secondary" onClick={this.handleRefresh}>
-						Refresh
-					</Button>
-					<Button variant="primary" onClick={this.handleSave}>
-						Save Changes
-					</Button>
-				</Modal.Footer>
-			</ModalStyled>
-
-		);
-	}
-}
\ No newline at end of file
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js b/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js
deleted file mode 100644
index 4c11ce5..0000000
--- a/ui-react/src/components/dialogs/OperationalPolicy/OperationalPolicyModal.test.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights
- *                             reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END============================================
- * ===================================================================
- *
- */
-import React from 'react';
-import { mount } from 'enzyme';
-import OperationalPolicyModal from './OperationalPolicyModal';
-import LoopCache from '../../../api/LoopCache';
-
-describe('Verify OperationalPolicyModal', () => {
-    beforeEach(() => {
-        fetch.resetMocks();
-        fetch.mockImplementation(() => {
-            return Promise.resolve({
-                ok: true,
-                status: 200,
-                text: () => "OK"
-            });
-        });
-    })
-    const loopCache = new LoopCache({
-            "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca",
-            "operationalPolicies": [{
-                "name": "OPERATIONAL_h2NMX_v1_0_ResourceInstanceName1_tca",
-                "configurationsJson": {
-                    "operational_policy": {
-                        "controlLoop": {},
-                        "policies": []
-                    }
-                },
-                "jsonRepresentation" : {"schema": {}}
-             }]
-    });
-    const historyMock = { push: jest.fn() };
-    const flushPromises = () => new Promise(setImmediate);
-
-    it('Test handleClose', () => {
-      const handleClose = jest.spyOn(OperationalPolicyModal.prototype,'handleClose');
-      const component = mount(<OperationalPolicyModal history={historyMock} loopCache={loopCache}/>)
-
-      component.find('[variant="secondary"]').get(0).props.onClick();
-
-      expect(handleClose).toHaveBeenCalledTimes(1);
-      expect(component.state('show')).toEqual(false);
-      expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
-    });
-
-    it('Test handleSave', async () => {
-        const loadLoopFunction = jest.fn();
-        const handleSave = jest.spyOn(OperationalPolicyModal.prototype,'handleSave');
-        const component = mount(<OperationalPolicyModal history={historyMock} 
-                          loopCache={loopCache} loadLoopFunction={loadLoopFunction} />)
-
-        component.find('[variant="primary"]').prop('onClick')();
-        await flushPromises();
-        component.update();
-
-        expect(handleSave).toHaveBeenCalledTimes(1);
-        expect(component.state('show')).toEqual(false);
-        expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
-    });
-
-    it('Test handleRefresh', async () => {
-        const updateLoopFunction = jest.fn();
-        const handleRefresh = jest.spyOn(OperationalPolicyModal.prototype,'handleRefresh');
-        const component = mount(<OperationalPolicyModal loopCache={loopCache} updateLoopFunction={updateLoopFunction} />)
-
-        component.find('[variant="secondary"]').get(1).props.onClick();
-        await flushPromises();
-        component.update();
-
-        expect(handleRefresh).toHaveBeenCalledTimes(1);
-        expect(component.state('show')).toEqual(true);
-    });
-});
\ No newline at end of file
diff --git a/ui-react/src/components/dialogs/OperationalPolicy/template.json b/ui-react/src/components/dialogs/OperationalPolicy/template.json
deleted file mode 100644
index 7c9dc0c..0000000
--- a/ui-react/src/components/dialogs/OperationalPolicy/template.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
-	"operationalPolicies": [
-		{
-			"name": "OPERATIONAL_LOOP_NAME",
-			"configurationsJson": {
-				"operational_policy": {
-					"controlLoop": {
-						"trigger_policy": "new",
-						"timeout": "0",
-						"abatement": "false",
-						"controlLoopName": "LOOP_h2NMX_v1_0_ResourceInstanceName1_tca"
-					},
-					"policies": [
-						{
-							"id": "new",
-							"recipe": "",
-							"retry": "0",
-							"timeout": "0",
-							"actor": "",
-							"payload": "",
-							"success": "",
-							"failure": "",
-							"failure_timeout": "",
-							"failure_retries": "",
-							"failure_exception": "",
-							"failure_guard": "",
-							"target": {
-								"type": "VM",
-								"resourceID": ""
-							}
-						}
-					]
-				}
-			}
-		}
-	]
-}
\ No newline at end of file
