diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js b/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js
index 1e289f5..c3c55df 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/constants/parameterConstants.js
@@ -50,7 +50,6 @@
 		LESS_OR_EQUAL: "less_or_equal",
 		DISPLAY_NAME: "displayName",
 		CHECKBOX:'checkbox',
-		FILE:'file'
-		
+		FILE:'file'		
     };
-})())
+})());
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js
index 4562a9d..47fa269 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/statusDialogController.js
@@ -87,7 +87,7 @@
 
 	$scope.userParameterChanged = function(id) {
 		StatusService.updateUserParameterList(id, $scope.userProvidedControl);
-	}
+	};
 
     /*$scope.submit = function() {
 
@@ -140,9 +140,7 @@
 		$scope.isSubmitEnabled = false;
 		$scope.isCancelEnabled = false;
 		
-	}
-
-
+	};
     
     $scope.handleInitialResponse = function(response) {
 		try {
@@ -165,7 +163,7 @@
 		} catch (error) {
 			$scope.showContentError(error);
 		}
-	}
+	};
     
 	/* $scope.setVnfProvStatus = function(vnfId, targetProvStatus) {
 		
@@ -193,7 +191,7 @@
 		$scope.isDialogVisible = false;
 		$scope.popup.isVisible = false;
 		runCallback(false);
-	}
+	};
 
 	var runCallback = function(response) {
 		if (angular.isFunction(callbackFunction)) {
@@ -203,7 +201,7 @@
 				instanceId : response.instanceId
 			});
 		}
-	}
+	};
    
 	var showSuccess = function(summary, details) {
 		var message = summary;
@@ -213,7 +211,7 @@
 		$scope.isSpinnerVisible = false;
 		$scope.isSuccessVisible = true;
 		$scope.success = message;
-	    }
+	    };
 		
     var showError = function(summary, details) {
 	var message = summary;
@@ -223,8 +221,8 @@
 	$scope.isSpinnerVisible = false;
 	$scope.isErrorVisible = true;
 	$scope.error = message;
-    }
-}
+    };
+};
 
 appDS2.controller("statusDialogController", [ "COMPONENT", "FIELD", "$scope", "$http", "$timeout",
 	"$log", "MsoService", "StatusService", "DataService", "PropertyService", "UtilityService",
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.controller.test.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.controller.test.js
index deefca7..3397179 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.controller.test.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/change-management-manual-tasks-controller/change-management-manual-tasks.controller.test.js
@@ -102,7 +102,7 @@
         // when
         return $controller.__test_only__.loadAvailableTasks('anything')
         .then(() => {
-            expect($controller.manualTasks).toBeUndefined()
+            expect($controller.manualTasks).toBeUndefined();
         });
     });
 
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
index d9bc828..528d3d5 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js
@@ -97,7 +97,7 @@
                 .catch(function (error) {
                     $log.error(error);
                     vm.errorMsg = err;
-                })
+                });      
         };
 
         var registerVNFNamesWatcher = function () {
@@ -252,16 +252,16 @@
                             source: vnf.availableVersions[0].requestInfo.source,
                             suppressRollback: vnf.availableVersions[0].requestInfo.suppressRollback,
                             requestorId: vnf.availableVersions[0].requestInfo.requestorId
-                        }
+                        };
 
                         if(workflowType=='Update'){
                             requestParametersData = {
                                 usePreload: vnf.availableVersions[0].requestParameters.usePreload
-                            }
+                            };
                         }else if(workflowType=="Replace"){
                             requestParametersData = {
                                 rebuildVolumeGroups: vnf.availableVersions[0].requestParameters.usePreload
-                            }
+                            };
                         }else if(workflowType=="VNF In Place Software Update"){
                             var payloadObj = {
                                 'existing_software_version':vm.getInternalWorkFlowParameter(workflowType, 'text', 'Existing software version').value,
@@ -270,11 +270,11 @@
                             };
                             requestParametersData = {
                                 payload: JSON.stringify(payloadObj)
-                            }
+                            };
                         }else if(workflowType=="VNF Config Update"){
                             requestParametersData = {
                                 payload: vm.getInternalWorkFlowParameter("VNF Config Update", "FILE", "Attach configuration file").value
-                            }
+                            };
                         }else if(workflowType=="VNF Scale Out"){
                             if(!moduleToScale) return null;
 
@@ -282,12 +282,12 @@
                                 requestParametersData = {
                                     userParams: moduleToScale.userParams
                                     //,usePreload: true
-                                }
+                                };
                             }else{
                                 requestParametersData = {
                                     userParams: []
                                     //,usePreload: false
-                                }
+                                };
                             }
                         }
                         $log.info('SchedulerWidgetCtrl:extractChangeManagementCallbackDataStr info:: workflowType '+ workflowType);
@@ -301,11 +301,11 @@
                         };
                         requestParametersData = {
                             payload: JSON.stringify(payloadObj)
-                        }
+                        };
                     }else if(workflowType=="VNF Config Update"){
                         requestParametersData = {
                             payload: vm.getInternalWorkFlowParameter("VNF Config Update", "FILE", "Attach configuration file").value
-                        }
+                        };
                     }
 
                     var data;
@@ -525,7 +525,7 @@
                                 const nodeType = vnfsData[i]['node-type'];
                                 if (nodeType === "generic-vnf") {
                                     if (_.find(vnfsData[i]['related-to'], function (node) {
-                                        return node['node-type'] === 'vserver'
+                                        return node['node-type'] === 'vserver';
                                     }) !== undefined) {
                                         vm.vnfs.push(vnfsData[i]);
                                     }
@@ -551,7 +551,7 @@
                         });
 
                         _.forEach(filteredVnfs, function (vnf) {
-                            vm.vnfTypes.push(vnf.properties['nf-role'])
+                            vm.vnfTypes.push(vnf.properties['nf-role']);
                         });
                     }
                 }
@@ -600,7 +600,7 @@
 
                         vm.fromVNFVersions = _.uniqBy(fromVNFVersions, 'value');
                     }
-                })
+                });
             }
         };
 
@@ -724,7 +724,7 @@
                     .then(vm.loadLocalWorkFlowsParameters)
                     .then(function () {
                         vm.workflows = vm.localWorkflows;
-                    })
+                    });
             }
         };
 
@@ -780,7 +780,7 @@
             let parameters = [];
             workflow.workflowInputParameters
                 .filter( function (param) {
-                    return param.soPayloadLocation === "userParams"
+                    return param.soPayloadLocation === "userParams";
                 })
                 .forEach(function (param) {
                         let workflowParams = vm.repackAttributes(param);
@@ -809,27 +809,27 @@
                 soFieldName: workflowParam.soFieldName,
                 maxLength: '500',
                 pattern: '.*'
-            }
+            };
         };
 
         vm.getRemoteWorkFlowParameters = function (workflow) {
             if (workflow && vm.remoteWorkflowsParameters.has(workflow)) {
-                return vm.remoteWorkflowsParameters.get(workflow)
+                return vm.remoteWorkflowsParameters.get(workflow);
             }
             return [];
         };
 
         vm.hasPatternError = function(form, itemName){
             return form[itemName].$error.pattern;
-        }
+        };
 
         vm.hasAsyncFnError = function(form, itemName){
             return form[itemName].$error.validateAsyncFn;
-        }
+        };
 
         vm.getIdFor = function(type, id, name){
             return "internal-workflow-parameter-" + type + "-" + id + "-" + (name ? name.split(' ').join('-').toLowerCase() : "");
-        }
+        };
 
         vm.getInternalWorkFlowParameters = function (workflow, type) {
             if (workflow && vm.localWorkflowsParameters.has(workflow) && vm.localWorkflowsParameters.get(workflow).filter(parameter => parameter.type==type) != []) {
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.test.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.test.js
index b11070a..675c1b7 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.test.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.test.js
@@ -359,7 +359,7 @@
   });
 
   test('Verify get remote workflow should call internal service for params when workflow is native', () =>{
-      let getWorkflowsStub = Promise.resolve({"data": {"workflows": ["workflow 0"]}})
+      let getWorkflowsStub = Promise.resolve({"data": {"workflows": ["workflow 0"]}});
       let getLocalWorkflowsParametersStub = Promise.resolve({"data":{
               "parameterDefinitions": [
                   {
