diff --git a/extra/sql/bulkload/create-tables.sql b/extra/sql/bulkload/create-tables.sql
index 6d490c3..93c80cb 100644
--- a/extra/sql/bulkload/create-tables.sql
+++ b/extra/sql/bulkload/create-tables.sql
@@ -16,7 +16,7 @@
 
     create table loops (
        name varchar(255) not null,
-        blueprint_yaml varchar(255) not null,
+        blueprint_yaml MEDIUMTEXT not null,
         dcae_blueprint_id varchar(255),
         dcae_deployment_id varchar(255),
         dcae_deployment_status_url varchar(255),
@@ -36,7 +36,7 @@
     create table micro_service_policies (
        name varchar(255) not null,
         json_representation json not null,
-        policy_tosca varchar(255) not null,
+        policy_tosca MEDIUMTEXT not null,
         properties json,
         shared bit not null,
         primary key (name)
diff --git a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
index 784d95e..8a172ab 100644
--- a/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
+++ b/src/main/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
@@ -82,13 +82,15 @@
         this.cldsDao = cldsDao;
     }
 
-    @SuppressWarnings("unchecked")
     public String parseToscaYaml(String yamlString) {
 
         Yaml yaml = new Yaml();
-        LinkedHashMap<String, Object> loadedYaml = (LinkedHashMap<String, Object>) yaml.load(yamlString);
-        LinkedHashMap<String, Object> nodeTypes = new LinkedHashMap<String, Object>();
-        LinkedHashMap<String, Object> dataNodes = new LinkedHashMap<String, Object>();
+        LinkedHashMap<String, Object> loadedYaml = yaml.load(yamlString);
+        if (loadedYaml == null) {
+            return "";
+        }
+        LinkedHashMap<String, Object> nodeTypes = new LinkedHashMap<>();
+        LinkedHashMap<String, Object> dataNodes = new LinkedHashMap<>();
         JSONObject jsonEditorObject = new JSONObject();
         JSONObject jsonParentObject = new JSONObject();
         JSONObject jsonTempObject = new JSONObject();
diff --git a/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java b/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java
index 9627445..6e12f29 100644
--- a/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java
+++ b/src/main/java/org/onap/clamp/loop/CsarInstallerImpl.java
@@ -33,7 +33,6 @@
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Optional;
 
 import org.json.simple.parser.ParseException;
 import org.onap.clamp.clds.client.DcaeInventoryServices;
@@ -53,6 +52,7 @@
 import org.onap.sdc.tosca.parser.enums.SdcTypes;
 import org.onap.sdc.toscaparser.api.NodeTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import org.yaml.snakeyaml.Yaml;
 
@@ -71,63 +71,40 @@
     public static final String MODEL_NAME_PREFIX = "Loop_";
 
     @Autowired
-    protected LoopsRepository loopRepository;
+    LoopsRepository loopRepository;
 
     @Autowired
-    private BlueprintParser blueprintParser;
+    BlueprintParser blueprintParser;
 
     @Autowired
-    private ChainGenerator chainGenerator;
+    ChainGenerator chainGenerator;
 
     @Autowired
     DcaeInventoryServices dcaeInventoryService;
 
-    @Autowired
-    public void CsarInstallerImpl(LoopsRepository loopRepository, BlueprintParser blueprintParser,
-        ChainGenerator chainGenerator, DcaeInventoryServices dcaeInventoryService) {
-        this.loopRepository = loopRepository;
-        this.blueprintParser = blueprintParser;
-        this.chainGenerator = chainGenerator;
-        this.dcaeInventoryService = dcaeInventoryService;
-    }
-
     @Override
     public boolean isCsarAlreadyDeployed(CsarHandler csar) throws SdcArtifactInstallerException {
         boolean alreadyInstalled = true;
         for (Entry<String, BlueprintArtifact> blueprint : csar.getMapOfBlueprints().entrySet()) {
             alreadyInstalled = alreadyInstalled
-                && loopRepository.existsById(buildModelName(csar, blueprint.getValue()));
+                && loopRepository.existsById(Loop.generateLoopName(csar.getSdcNotification().getServiceName(),
+                    csar.getSdcNotification().getServiceVersion(),
+                    blueprint.getValue().getResourceAttached().getResourceInstanceName(),
+                    blueprint.getValue().getBlueprintArtifactName()));
         }
         return alreadyInstalled;
     }
 
-    public static String buildModelName(CsarHandler csar, BlueprintArtifact artifact) {
-
-        return (MODEL_NAME_PREFIX + "_" + csar.getSdcCsarHelper().getServiceMetadata().getValue("name") + "_v"
-            + csar.getSdcNotification().getServiceVersion() + "_"
-            + artifact.getResourceAttached().getResourceInstanceName().replaceAll(" ", "") + "_"
-            + artifact.getBlueprintArtifactName().replace(".yaml", "")).replace('.', '_');
-    }
-
-    public static String buildOperationalPolicyName(CsarHandler csar, BlueprintArtifact artifact) {
-
-        return (MODEL_NAME_PREFIX + "_" + csar.getSdcCsarHelper().getServiceMetadata().getValue("name") + "_v"
-            + csar.getSdcNotification().getServiceVersion() + "_"
-            + artifact.getResourceAttached().getResourceInstanceName().replaceAll(" ", "") + "_"
-            + artifact.getBlueprintArtifactName().replace(".yaml", "")).replace('.', '_');
-    }
-
     @Override
-    @Transactional
+    @Transactional(propagation = Propagation.REQUIRED)
     public void installTheCsar(CsarHandler csar)
         throws SdcArtifactInstallerException, InterruptedException, PolicyModelException {
         try {
             logger.info("Installing the CSAR " + csar.getFilePath());
             for (Entry<String, BlueprintArtifact> blueprint : csar.getMapOfBlueprints().entrySet()) {
                 logger.info("Processing blueprint " + blueprint.getValue().getBlueprintArtifactName());
-                createLoopFromBlueprint(csar, blueprint.getValue());
+                loopRepository.save(createLoopFromBlueprint(csar, blueprint.getValue()));
             }
-            createPolicyModel(csar);
             logger.info("Successfully installed the CSAR " + csar.getFilePath());
         } catch (IOException e) {
             throw new SdcArtifactInstallerException("Exception caught during the Csar installation in database", e);
@@ -136,15 +113,6 @@
         }
     }
 
-    private void createPolicyModel(CsarHandler csar) throws PolicyModelException {
-        try {
-            Optional<String> policyModelYaml = csar.getPolicyModelYaml();
-            // save policy model into the database
-        } catch (IOException e) {
-            throw new PolicyModelException("TransformerException when decoding the YamlText", e);
-        }
-    }
-
     private Loop createLoopFromBlueprint(CsarHandler csar, BlueprintArtifact blueprintArtifact)
         throws IOException, ParseException, InterruptedException {
         Loop newLoop = new Loop();
@@ -154,15 +122,8 @@
             blueprintArtifact.getResourceAttached().getResourceInstanceName(),
             blueprintArtifact.getBlueprintArtifactName()));
         newLoop.setLastComputedState(LoopState.DESIGN);
-        for (MicroService microService : blueprintParser.getMicroServices(blueprintArtifact.getDcaeBlueprint())) {
-            newLoop.getMicroServicePolicies().add(new MicroServicePolicy(microService.getName(),
-                csar.getPolicyModelYaml().orElse(""), false, new JsonObject(), new HashSet<>(Arrays.asList(newLoop))));
-        }
-        newLoop.setOperationalPolicies(
-            new HashSet<>(Arrays.asList(new OperationalPolicy(Policy.generatePolicyName("OPERATIONAL",
-                csar.getSdcNotification().getServiceName(), csar.getSdcNotification().getServiceVersion(),
-                blueprintArtifact.getResourceAttached().getResourceInstanceName(),
-                blueprintArtifact.getBlueprintArtifactName()), newLoop, new JsonObject()))));
+        newLoop.setMicroServicePolicies(createMicroServicePolicies(csar, blueprintArtifact, newLoop));
+        newLoop.setOperationalPolicies(createOperationalPolicies(csar, blueprintArtifact, newLoop));
         // Set SVG XML computed
         // newLoop.setSvgRepresentation(svgRepresentation);
         newLoop.setGlobalPropertiesJson(createGlobalPropertiesJson(csar, blueprintArtifact));
@@ -172,6 +133,24 @@
         return newLoop;
     }
 
+    private HashSet<OperationalPolicy> createOperationalPolicies(CsarHandler csar, BlueprintArtifact blueprintArtifact,
+        Loop newLoop) {
+        return new HashSet<>(Arrays.asList(new OperationalPolicy(Policy.generatePolicyName("OPERATIONAL",
+            csar.getSdcNotification().getServiceName(), csar.getSdcNotification().getServiceVersion(),
+            blueprintArtifact.getResourceAttached().getResourceInstanceName(),
+            blueprintArtifact.getBlueprintArtifactName()), newLoop, new JsonObject())));
+    }
+
+    private HashSet<MicroServicePolicy> createMicroServicePolicies(CsarHandler csar,
+        BlueprintArtifact blueprintArtifact, Loop newLoop) throws IOException {
+        HashSet<MicroServicePolicy> newSet = new HashSet<>();
+        for (MicroService microService : blueprintParser.getMicroServices(blueprintArtifact.getDcaeBlueprint())) {
+            newSet.add(new MicroServicePolicy(microService.getName(), csar.getPolicyModelYaml().orElse(""), false,
+                new HashSet<>(Arrays.asList(newLoop))));
+        }
+        return newSet;
+    }
+
     private JsonObject createGlobalPropertiesJson(CsarHandler csar, BlueprintArtifact blueprintArtifact) {
         JsonObject globalProperties = new JsonObject();
         globalProperties.add("dcaeDeployParameters", getAllBlueprintParametersInJson(blueprintArtifact));
diff --git a/src/main/java/org/onap/clamp/loop/Loop.java b/src/main/java/org/onap/clamp/loop/Loop.java
index cc7f180..a4cd86d 100644
--- a/src/main/java/org/onap/clamp/loop/Loop.java
+++ b/src/main/java/org/onap/clamp/loop/Loop.java
@@ -91,7 +91,7 @@
     @Column(columnDefinition = "json", name = "model_properties_json")
     private JsonObject modelPropertiesJson;
 
-    @Column(nullable = false, name = "blueprint_yaml")
+    @Column(columnDefinition = "MEDIUMTEXT", nullable = false, name = "blueprint_yaml")
     private String blueprint;
 
     @Expose
diff --git a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
index 7ebe0ed..857a3d7 100644
--- a/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
+++ b/src/main/java/org/onap/clamp/policy/microservice/MicroServicePolicy.java
@@ -39,6 +39,8 @@
 import org.hibernate.annotations.Type;
 import org.hibernate.annotations.TypeDef;
 import org.hibernate.annotations.TypeDefs;
+import org.onap.clamp.clds.tosca.ToscaYamlToJsonConvertor;
+import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.dao.model.jsontype.StringJsonUserType;
 import org.onap.clamp.loop.Loop;
 import org.onap.clamp.policy.Policy;
@@ -66,7 +68,7 @@
     @Column(name = "shared", nullable = false)
     private Boolean shared;
 
-    @Column(name = "policy_tosca", nullable = false)
+    @Column(columnDefinition = "MEDIUMTEXT", name = "policy_tosca", nullable = false)
     private String policyTosca;
 
     @Expose
@@ -81,13 +83,22 @@
         // serialization
     }
 
+    public MicroServicePolicy(String name, String policyTosca, Boolean shared, Set<Loop> usedByLoops) {
+        this.name = name;
+        this.policyTosca = policyTosca;
+        this.shared = shared;
+        this.jsonRepresentation = JsonUtils.GSON_JPA_MODEL
+            .fromJson(new ToscaYamlToJsonConvertor(null).parseToscaYaml(policyTosca), JsonObject.class);
+        this.usedByLoops = usedByLoops;
+    }
+
     public MicroServicePolicy(String name, String policyTosca, Boolean shared, JsonObject jsonRepresentation,
         Set<Loop> usedByLoops) {
         this.name = name;
         this.policyTosca = policyTosca;
         this.shared = shared;
-        this.jsonRepresentation = jsonRepresentation;
         this.usedByLoops = usedByLoops;
+        this.jsonRepresentation = jsonRepresentation;
     }
 
     @Override
diff --git a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
index ce8a493..d3a823f 100644
--- a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java
@@ -30,6 +30,7 @@
 import static org.junit.Assert.fail;
 
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -68,7 +69,6 @@
 @ActiveProfiles(profiles = "clamp-default,clamp-default-user,clamp-sdc-controller")
 public class CsarInstallerItCase {
 
-    private static final String CSAR_ARTIFACT_NAME = "testArtifact.csar";
     private static final String INVARIANT_SERVICE_UUID = "4cc5b45a-1f63-4194-8100-cd8e14248c92";
     private static final String INVARIANT_RESOURCE1_UUID = "07e266fc-49ab-4cd7-8378-ca4676f1b9ec";
     private static final String INVARIANT_RESOURCE2_UUID = "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad";
@@ -89,7 +89,8 @@
         blueprintMap.put("resourceid", blueprintArtifact);
         Mockito.when(csarHandler.getMapOfBlueprints()).thenReturn(blueprintMap);
         Mockito.when(blueprintArtifact.getDcaeBlueprint()).thenReturn(
-            IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/not-recognized.yaml")));
+            IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/not-recognized.yaml"),
+                StandardCharsets.UTF_8));
         csarInstaller.installTheCsar(csarHandler);
         fail("Should have raised an SdcArtifactInstallerException");
     }
@@ -164,16 +165,17 @@
         csarInstaller.installTheCsar(csar);
         CldsModel cldsModel1 = verifyClosedLoopModelLoadedInDb(csar, "tca.yaml");
         JSONAssert.assertEquals(
-            IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca.json")),
+            IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca.json"),
+                StandardCharsets.UTF_8),
             cldsModel1.getPropText(), true);
         CldsModel cldsModel2 = verifyClosedLoopModelLoadedInDb(csar, "tca_2.yaml");
-        JSONAssert.assertEquals(
-            IOUtils
-                .toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca-2.json")),
-            cldsModel2.getPropText(), true);
+        JSONAssert.assertEquals(IOUtils.toString(
+            ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca-2.json"),
+            StandardCharsets.UTF_8), cldsModel2.getPropText(), true);
         CldsModel cldsModel3 = verifyClosedLoopModelLoadedInDb(csar, "tca_3.yaml");
         JSONAssert.assertEquals(
-            IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca.json")),
+            IOUtils.toString(ResourceFileUtil.getResourceAsStream("example/sdc/blueprint-dcae/prop-text-for-tca.json"),
+                StandardCharsets.UTF_8),
             cldsModel3.getPropText(), true);
     }
 
diff --git a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
index 544c8ca..e008874 100644
--- a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
+++ b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
@@ -161,7 +161,7 @@
         CsarHandler csar = new CsarHandler(buildFakeSdcNotification(), "test-controller", "/tmp/csar-handler-tests");
         csar.save(buildFakeSdcResut());
         String policyModelYaml = csar.getPolicyModelYaml().get();
-        assertTrue(policyModelYaml.contains("tosca_simple_yaml_1_1"));
+        assertTrue(policyModelYaml.contains("tosca_simple_yaml_1_0_0"));
     }
 
     @Test
diff --git a/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java b/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java
index 6bfee4c..d1a4bdc 100644
--- a/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java
+++ b/src/test/java/org/onap/clamp/loop/CsarInstallerItCase.java
@@ -23,8 +23,7 @@
 
 package org.onap.clamp.loop;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -33,6 +32,8 @@
 import java.util.Map;
 import java.util.Optional;
 
+import javax.transaction.Transactional;
+
 import org.apache.commons.lang3.RandomStringUtils;
 import org.json.JSONException;
 import org.junit.Test;
@@ -62,7 +63,7 @@
 @ActiveProfiles(profiles = "clamp-default,clamp-default-user,clamp-sdc-controller-new")
 public class CsarInstallerItCase {
 
-    private static final String CSAR_ARTIFACT_NAME = "testArtifact.csar";
+    private static final String CSAR_ARTIFACT_NAME = "example/sdc/service-Simsfoimap0112.csar";
     private static final String INVARIANT_SERVICE_UUID = "4cc5b45a-1f63-4194-8100-cd8e14248c92";
     private static final String INVARIANT_RESOURCE1_UUID = "07e266fc-49ab-4cd7-8378-ca4676f1b9ec";
     private static final String INVARIANT_RESOURCE2_UUID = "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad";
@@ -70,6 +71,9 @@
     private static final String RESOURCE_INSTANCE_NAME_RESOURCE2 = "ResourceInstanceName2";
 
     @Autowired
+    private LoopsRepository loopsRepo;
+
+    @Autowired
     private CsarInstaller csarInstaller;
 
     private BlueprintArtifact buildFakeBuildprintArtifact(String instanceName, String invariantResourceUuid,
@@ -113,10 +117,6 @@
             "example/sdc/blueprint-dcae/tca_3.yaml", "tca_3.yaml", INVARIANT_SERVICE_UUID);
         blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact);
 
-        SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance();
-        ISdcCsarHelper sdcHelper = factory.getSdcCsarHelper(Thread.currentThread().getContextClassLoader()
-            .getResource("example/sdc/service-Simsfoimap0112.csar").getFile());
-
         // Build fake csarhandler
         Mockito.when(csarHandler.getSdcNotification()).thenReturn(notificationData);
         // Build fake csar Helper
@@ -125,28 +125,54 @@
         Mockito.when(data.getValue("name")).thenReturn(generatedName);
         Mockito.when(notificationData.getServiceName()).thenReturn(generatedName);
         Mockito.when(csarHelper.getServiceMetadata()).thenReturn(data);
+
+        // Create helper based on real csar to test policy yaml and global properties
+        // set
+        SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance();
+        ISdcCsarHelper sdcHelper = factory
+            .getSdcCsarHelper(Thread.currentThread().getContextClassLoader().getResource(CSAR_ARTIFACT_NAME).getFile());
         Mockito.when(csarHandler.getSdcCsarHelper()).thenReturn(sdcHelper);
+
         // Mockito.when(csarHandler.getSdcCsarHelper()).thenReturn(csarHelper);
-        Mockito.when(csarHandler.getPolicyModelYaml()).thenReturn(Optional.ofNullable(""));
+        Mockito.when(csarHandler.getPolicyModelYaml())
+            .thenReturn(Optional.ofNullable(ResourceFileUtil.getResourceAsString("tosca/tca-policy-test.yaml")));
         return csarHandler;
     }
 
+    @Test
+    @Transactional
     public void testIsCsarAlreadyDeployedTca() throws SdcArtifactInstallerException, SdcToscaParserException,
         CsarHandlerException, IOException, InterruptedException, PolicyModelException {
         String generatedName = RandomStringUtils.randomAlphanumeric(5);
         CsarHandler csarHandler = buildFakeCsarHandler(generatedName);
-        assertFalse(csarInstaller.isCsarAlreadyDeployed(csarHandler));
+        assertThat(csarInstaller.isCsarAlreadyDeployed(csarHandler)).isFalse();
         csarInstaller.installTheCsar(csarHandler);
-        assertTrue(csarInstaller.isCsarAlreadyDeployed(csarHandler));
+        assertThat(csarInstaller.isCsarAlreadyDeployed(csarHandler)).isTrue();
     }
 
     @Test
+    @Transactional
     public void testInstallTheCsarTca() throws SdcArtifactInstallerException, SdcToscaParserException,
         CsarHandlerException, IOException, JSONException, InterruptedException, PolicyModelException {
         String generatedName = RandomStringUtils.randomAlphanumeric(5);
         CsarHandler csar = buildFakeCsarHandler(generatedName);
         csarInstaller.installTheCsar(csar);
+        assertThat(loopsRepo
+            .existsById(Loop.generateLoopName(generatedName, "1.0", RESOURCE_INSTANCE_NAME_RESOURCE1, "tca.yaml")))
+                .isTrue();
+        assertThat(loopsRepo
+            .existsById(Loop.generateLoopName(generatedName, "1.0", RESOURCE_INSTANCE_NAME_RESOURCE1, "tca_3.yaml")))
+                .isTrue();
+        assertThat(loopsRepo
+            .existsById(Loop.generateLoopName(generatedName, "1.0", RESOURCE_INSTANCE_NAME_RESOURCE2, "tca_2.yaml")))
+                .isTrue();
+        // Verify now that policy and json representation, global properties are well
+        // set
+        Loop loop = loopsRepo
+            .findById(Loop.generateLoopName(generatedName, "1.0", RESOURCE_INSTANCE_NAME_RESOURCE1, "tca.yaml")).get();
 
+        assertThat(loop.getModelPropertiesJson().get("serviceDetails")).isNotNull();
+        assertThat(loop.getModelPropertiesJson().get("resourceDetails")).isNotNull();
     }
 
 }
diff --git a/src/test/resources/example/sdc/service-Simsfoimap0112.csar b/src/test/resources/example/sdc/service-Simsfoimap0112.csar
index ea0e44a..8c16d31 100644
--- a/src/test/resources/example/sdc/service-Simsfoimap0112.csar
+++ b/src/test/resources/example/sdc/service-Simsfoimap0112.csar
Binary files differ
