diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java
index 9c7f286..f714eff 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/TempJavaRpcCommandFragmentFiles.java
@@ -29,7 +29,9 @@
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.findRpcInput;
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.findRpcOutput;
 import static org.onosproject.yang.compiler.translator.tojava.utils.JavaFileGenerator.generateRpcCommand;
+import static org.onosproject.yang.compiler.translator.tojava.utils.JavaIdentifierSyntax.createPackage;
 import static org.onosproject.yang.compiler.translator.tojava.utils.MethodClassTypes.CLASS_TYPE;
+import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getImportString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getOverRideString;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.getVariableDeclaration;
 import static org.onosproject.yang.compiler.translator.tojava.utils.StringGenerator.multiAttrMethodSignature;
@@ -43,14 +45,17 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.COMMAND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CREATE_DATA_NODE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.CREATE_MODEL;
-import static org.onosproject.yang.compiler.utils.UtilConstants.DATA_NODE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_CAPS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_MODEL_OBJECT_DATA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.DEFAULT_RESOURCE_DATA;
 import static org.onosproject.yang.compiler.utils.UtilConstants.DYNAMIC_CONFIG_SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EIGHT_SPACE_INDENTATION;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EQUAL;
 import static org.onosproject.yang.compiler.utils.UtilConstants.FOUR_SPACE_INDENTATION;
 import static org.onosproject.yang.compiler.utils.UtilConstants.INT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_CONVERTER;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_OBJECT_DATA;
+import static org.onosproject.yang.compiler.utils.UtilConstants.MODEL_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.NEW;
 import static org.onosproject.yang.compiler.utils.UtilConstants.NEW_LINE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.NULL;
@@ -60,12 +65,14 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.PRIVATE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.PUBLIC;
 import static org.onosproject.yang.compiler.utils.UtilConstants.QUOTES;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RESOURCE_DATA;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RESOURCE_ID;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RETURN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_EXTENDED_COMMAND;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_INPUT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_OUTPUT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.RPC_SUCCESS;
+import static org.onosproject.yang.compiler.utils.UtilConstants.RUNTIME_PKG;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SEMI_COLON;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SERVICE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.SIXTEEN_SPACE_INDENTATION;
@@ -105,10 +112,17 @@
     private static final String VAR_INPUT_OBJECT = "inputObject";
     private static final String VAR_OUTPUT_OBJECT = "outputObject";
     private static final String RPC_RESPONSE = "rpcResponse";
-    private static final String VAR_DATA_NODE = "dataNode";
+    private static final String VAR_INPUT_MO = "inputMo";
+    private static final String VAR_OUTPUT_MO = "outputMo";
+    private static final String VAR_INPUT_DATA = "inputData";
+    private static final String VAR_OUTPUT_DATA = "outputData";
+    private static final String BUILDER_METHOD = "builder";
+    private static final String ADD_DATA_NODE = "addDataNode";
+    private static final String ADD_MODEL_OBJECT = "addModelObject";
+    private static final String VAR_RESOURCE_ID = "resourceId";
 
     @Override
-    public void generateJavaFile(int fileType, YangNode curNode) {
+    public void generateJavaFile(int fileType, YangNode curNode) throws IOException {
         JavaImportData importData = ((JavaCodeGeneratorInfo) curNode)
                 .getTempJavaCodeFragmentFiles().getRpcCommandTempFiles()
                 .getJavaImportData();
@@ -117,6 +131,7 @@
                 curNode.getParent().getJavaClassNameOrBuiltInType(), null));
         String className = getCapitalCase(getCamelCase(
                 curNode.getJavaClassNameOrBuiltInType(), null) + COMMAND);
+        createPackage(curNode);
 
         // add RPC input import
         YangNode inputNode = findRpcInput(curNode);
@@ -140,8 +155,6 @@
             outputImport.setPkgInfo(outputNode.getJavaPackage());
             outputImport.setClassInfo(getCapitalCase(getCamelCase(
                     outputNode.getJavaClassNameOrBuiltInType(), null)));
-            importData.addImportInfo(outputImport, className,
-                                     curNode.getJavaPackage());
 
             JavaQualifiedTypeInfoTranslator defaultOutput = new
                     JavaQualifiedTypeInfoTranslator();
@@ -152,6 +165,7 @@
                                  null)));
             importData.addImportInfo(defaultOutput, className,
                                      curNode.getJavaPackage());
+
         }
 
         // add application service import
@@ -179,15 +193,23 @@
         imports.add(importData.getImportForRpcInput());
         imports.add(importData.getImportForRpcOutput());
         imports.add(importData.getImportForDynamicStoreService());
-        imports.add(importData.getImportForDataNode());
+        if (inputNode != null || outputNode != null) {
+            imports.add(getImportString(MODEL_PKG, RESOURCE_DATA));
+            imports.add(getImportString(MODEL_PKG, MODEL_OBJECT_DATA));
+        }
+        if (inputNode != null) {
+            imports.add(getImportString(RUNTIME_PKG, DEFAULT_RESOURCE_DATA));
+        }
+        if (outputNode != null) {
+            imports.add(getImportString(MODEL_PKG, DEFAULT_MODEL_OBJECT_DATA));
+        }
         imports.add(importData.getImportForRpcSuccess());
-
         try {
             rpcCommandClassTempFileHandle = getJavaFileHandle(className);
             generateRpcCommand(rpcCommandClassTempFileHandle, curNode, imports);
         } catch (IOException e) {
             throw new TranslatorException(
-                    "Failed to generate code for RPC command" + curNode.getName());
+                    "Failed to generate code for RPC command " + curNode.getName());
         }
     }
 
@@ -376,15 +398,14 @@
         StringBuilder builder = new StringBuilder();
         YangNode inputNode = findRpcInput(node);
         if (inputNode != null) {
-            String inputName = getCapitalCase(getCamelCase(
-                    inputNode.getJavaClassNameOrBuiltInType(), null));
-            builder.append(EIGHT_SPACE_INDENTATION).append(inputName).append(SPACE)
-                    .append(VAR_INPUT_OBJECT).append(SPACE).append(EQUAL).append(SPACE)
+            // build resource data
+            builder.append(buildResourceData())
+                    .append(EIGHT_SPACE_INDENTATION).append(MODEL_OBJECT_DATA).append(SPACE)
+                    .append(VAR_INPUT_MO).append(SPACE).append(EQUAL).append(SPACE)
                     .append(VAR_MODEL_CONVERTER).append(PERIOD)
                     .append(CREATE_MODEL).append(OPEN_PARENTHESIS)
-                    .append(VAR_RPC_INPUT).append(PERIOD).append(VAR_INPUT)
-                    .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
-                    .append(CLOSE_PARENTHESIS).append(SEMI_COLON).append(NEW_LINE);
+                    .append(VAR_INPUT_DATA).append(CLOSE_PARENTHESIS)
+                    .append(SEMI_COLON).append(NEW_LINE);
         }
         return builder.toString();
     }
@@ -398,15 +419,13 @@
         StringBuilder builder = new StringBuilder();
         YangNode outputNode = findRpcOutput(node);
         if (outputNode != null) {
-            String outputName = getCapitalCase(getCamelCase(
-                    outputNode.getJavaClassNameOrBuiltInType(), null));
-            builder.append(EIGHT_SPACE_INDENTATION).append(DATA_NODE).append(SPACE)
-                    .append(VAR_DATA_NODE).append(SPACE).append(EQUAL)
-                    .append(SPACE).append(VAR_MODEL_CONVERTER).append(PERIOD)
+            // create model object data
+            builder.append(buildModelObjectData());
+            builder.append(EIGHT_SPACE_INDENTATION).append(RESOURCE_DATA)
+                    .append(SPACE).append(VAR_OUTPUT_DATA).append(SPACE)
+                    .append(EQUAL).append(SPACE).append(VAR_MODEL_CONVERTER).append(PERIOD)
                     .append(CREATE_DATA_NODE).append(OPEN_PARENTHESIS)
-                    .append(OPEN_PARENTHESIS).append(DEFAULT_CAPS)
-                    .append(outputName).append(CLOSE_PARENTHESIS).append(SPACE)
-                    .append(VAR_OUTPUT_OBJECT).append(CLOSE_PARENTHESIS)
+                    .append(VAR_OUTPUT_MO).append(CLOSE_PARENTHESIS)
                     .append(SEMI_COLON).append(NEW_LINE);
         }
         return builder.toString();
@@ -431,23 +450,27 @@
         }
 
         if (inputNode != null && outputNode != null) {
-            builder.append(EIGHT_SPACE_INDENTATION).append(outputName)
-                    .append(SPACE).append(VAR_OUTPUT_OBJECT).append(SPACE)
-                    .append(EQUAL).append(SPACE).append(appService)
-                    .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
-                    .append(VAR_INPUT_OBJECT).append(CLOSE_PARENTHESIS)
+            builder.append(getInputObject(inputNode));
+            builder.append(EIGHT_SPACE_INDENTATION).append(DEFAULT_CAPS)
+                    .append(outputName).append(SPACE).append(VAR_OUTPUT_OBJECT)
+                    .append(SPACE).append(EQUAL).append(SPACE).append(OPEN_PARENTHESIS)
+                    .append(DEFAULT_CAPS).append(outputName).append(CLOSE_PARENTHESIS)
+                    .append(SPACE).append(appService).append(PERIOD).append(rpc)
+                    .append(OPEN_PARENTHESIS).append(VAR_INPUT_OBJECT).append(CLOSE_PARENTHESIS)
                     .append(SEMI_COLON).append(NEW_LINE);
         } else if (inputNode != null && outputNode == null) {
+            builder.append(getInputObject(inputNode));
             builder.append(EIGHT_SPACE_INDENTATION).append(appService)
                     .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
                     .append(VAR_INPUT_OBJECT).append(CLOSE_PARENTHESIS)
                     .append(SEMI_COLON).append(NEW_LINE);
         } else if (inputNode == null && outputNode != null) {
-            builder.append(EIGHT_SPACE_INDENTATION).append(outputName)
-                    .append(SPACE).append(VAR_OUTPUT_OBJECT).append(SPACE)
-                    .append(EQUAL).append(SPACE).append(appService)
-                    .append(PERIOD).append(rpc).append(OPEN_PARENTHESIS)
-                    .append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+            builder.append(EIGHT_SPACE_INDENTATION).append(DEFAULT_CAPS)
+                    .append(outputName).append(SPACE).append(VAR_OUTPUT_OBJECT)
+                    .append(SPACE).append(EQUAL).append(SPACE).append(OPEN_PARENTHESIS)
+                    .append(DEFAULT_CAPS).append(outputName).append(CLOSE_PARENTHESIS)
+                    .append(SPACE).append(appService).append(PERIOD).append(rpc)
+                    .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS).append(SEMI_COLON)
                     .append(NEW_LINE);
         } else {
             builder.append(EIGHT_SPACE_INDENTATION).append(appService)
@@ -466,7 +489,7 @@
      */
     private static String createRpcOutputString(YangNode node) {
         YangNode outputNode = findRpcOutput(node);
-        String dataNode = VAR_DATA_NODE;
+        String dataNode = "outputData.dataNodes().get(0)";
         if (outputNode == null) {
             dataNode = NULL;
         }
@@ -495,4 +518,75 @@
         return builder.toString();
     }
 
+
+    /**
+     * Returns create resource data string.
+     *
+     * @return create resource data string
+     */
+    private static String buildResourceData() {
+        StringBuilder builder = new StringBuilder();
+        builder.append(EIGHT_SPACE_INDENTATION).append(RESOURCE_DATA)
+                .append(SPACE).append(VAR_INPUT_DATA).append(SPACE).append(EQUAL)
+                .append(SPACE).append(DEFAULT_RESOURCE_DATA).append(PERIOD)
+                .append(BUILDER_METHOD).append(OPEN_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(NEW_LINE)
+                .append(SIXTEEN_SPACE_INDENTATION).append(PERIOD)
+                .append(VAR_RESOURCE_ID).append(OPEN_PARENTHESIS)
+                .append(GET_RESOURCE_ID).append(OPEN_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(NEW_LINE).append(SIXTEEN_SPACE_INDENTATION).append(PERIOD)
+                .append(ADD_DATA_NODE).append(OPEN_PARENTHESIS)
+                .append(VAR_RPC_INPUT).append(PERIOD).append(VAR_INPUT)
+                .append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(PERIOD)
+                .append(BUILD).append(OPEN_PARENTHESIS).append(CLOSE_PARENTHESIS)
+                .append(SEMI_COLON).append(NEW_LINE);
+        return builder.toString();
+    }
+
+
+    /**
+     * Returns input object string.
+     *
+     * @param inputNode YANG RPC input node
+     * @return input object string
+     */
+    private static String getInputObject(YangNode inputNode) {
+        StringBuilder builder = new StringBuilder();
+        if (inputNode != null) {
+            String inputName = getCapitalCase(getCamelCase(
+                    inputNode.getJavaClassNameOrBuiltInType(), null));
+            String modelObject = "inputMo.modelObjects().get(0)";
+            return builder.append(EIGHT_SPACE_INDENTATION).append(inputName)
+                    .append(SPACE).append(VAR_INPUT_OBJECT)
+                    .append(SPACE).append(EQUAL).append(SPACE)
+                    .append(OPEN_PARENTHESIS).append(OPEN_PARENTHESIS)
+                    .append(inputName).append(CLOSE_PARENTHESIS).append(SPACE)
+                    .append(modelObject).append(CLOSE_PARENTHESIS)
+                    .append(SEMI_COLON).append(NEW_LINE).toString();
+        }
+        return null;
+    }
+
+    /**
+     * Returns model object data creation string.
+     *
+     * @return model object data string
+     */
+    private static String buildModelObjectData() {
+        StringBuilder builder = new StringBuilder();
+        return builder.append(EIGHT_SPACE_INDENTATION).append(MODEL_OBJECT_DATA)
+                .append(SPACE).append(VAR_OUTPUT_MO).append(SPACE).append(EQUAL)
+                .append(SPACE).append(DEFAULT_MODEL_OBJECT_DATA).append(PERIOD)
+                .append(BUILDER_METHOD).append(OPEN_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(NEW_LINE)
+                .append(SIXTEEN_SPACE_INDENTATION).append(PERIOD)
+                .append(ADD_MODEL_OBJECT).append(OPEN_PARENTHESIS)
+                .append(VAR_OUTPUT_OBJECT).append(CLOSE_PARENTHESIS)
+                .append(PERIOD).append(BUILD).append(OPEN_PARENTHESIS)
+                .append(CLOSE_PARENTHESIS).append(SEMI_COLON)
+                .append(NEW_LINE).toString();
+    }
+
 }
diff --git a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
index 215cac8..f2095e7 100644
--- a/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
+++ b/compiler/base/utils/src/main/java/org/onosproject/yang/compiler/utils/UtilConstants.java
@@ -1825,6 +1825,11 @@
     public static final String MODEL_PKG = "org.onosproject.yang.model";
 
     /**
+     * Static attribute for runtime import package.
+     */
+    public static final String RUNTIME_PKG = "org.onosproject.yang.runtime";
+
+    /**
      * Static attribute for RPC execution status import package.
      */
     public static final String RPC_OUTPUT_STATUS_PKG = "org.onosproject.config" +
@@ -1951,22 +1956,19 @@
             "capable of invoking the appropriate RPC command's execute method";
 
     public static final String RUNNABLE = "Runnable";
-
     public static final String RUN = "run";
-
     public static final String BUILDER = "Builder";
-
     public static final String BUILD = "build";
-
     public static final String ADD_BRANCH_POINT_SCHEMA = "addBranchPointSchema";
-
     public static final String CREATE_MODEL = "createModel";
-
     public static final String CREATE_DATA_NODE = "createDataNode";
-
     public static final String MULTI_INSTANCE_OBJECT = "MultiInstanceObject";
-
     public static final String KEY_INFO = "KeyInfo";
+    public static final String RESOURCE_DATA = "ResourceData";
+    public static final String DEFAULT_RESOURCE_DATA = "DefaultResourceData";
+    public static final String MODEL_OBJECT_DATA = "ModelObjectData";
+    public static final String DEFAULT_MODEL_OBJECT_DATA =
+            "DefaultModelObjectData";
 
     // No instantiation.
     private UtilConstants() {
diff --git a/model/src/main/java/org/onosproject/yang/model/DefaultModelObjectData.java b/model/src/main/java/org/onosproject/yang/model/DefaultModelObjectData.java
index a56f9c6..a1b5774 100644
--- a/model/src/main/java/org/onosproject/yang/model/DefaultModelObjectData.java
+++ b/model/src/main/java/org/onosproject/yang/model/DefaultModelObjectData.java
@@ -79,7 +79,7 @@
         }
 
         @Override
-        public Builder identifer(ModelObjectId id) {
+        public Builder identifier(ModelObjectId id) {
             identifier = id;
             return this;
         }
diff --git a/model/src/main/java/org/onosproject/yang/model/ModelObjectData.java b/model/src/main/java/org/onosproject/yang/model/ModelObjectData.java
index d4b0e1a..ec76697 100644
--- a/model/src/main/java/org/onosproject/yang/model/ModelObjectData.java
+++ b/model/src/main/java/org/onosproject/yang/model/ModelObjectData.java
@@ -62,7 +62,7 @@
          * @param id identifier
          * @return builder
          */
-        Builder identifer(ModelObjectId id);
+        Builder identifier(ModelObjectId id);
 
         /**
          * Builds an instance of model object data.
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYobBuilder.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYobBuilder.java
index fa0e804..1388548 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYobBuilder.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYobBuilder.java
@@ -18,6 +18,7 @@
 
 import org.onosproject.yang.compiler.datamodel.YangLeaf;
 import org.onosproject.yang.compiler.datamodel.YangLeafList;
+import org.onosproject.yang.compiler.datamodel.YangRpc;
 import org.onosproject.yang.compiler.datamodel.YangSchemaNode;
 import org.onosproject.yang.model.DataNode;
 import org.onosproject.yang.model.DefaultModelObjectData;
@@ -84,7 +85,7 @@
                 }
             }
         }
-        return builder.identifer(id).build();
+        return builder.identifier(id).build();
     }
 
     /**
@@ -118,6 +119,13 @@
                                                       sId.namespace()));
                     }
 
+                    if (schemaNode instanceof YangRpc) {
+                        // RPC resource id need not be converted to model
+                        // object id.
+                        lastIndexNode = schemaNode;
+                        return null;
+                    }
+
                     if (key instanceof ListKey) {
                         midb = handleListKey(midb, registry, schemaNode, key);
                     } else if (key instanceof LeafListKey) {
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java
index 1e43f47..49fa058 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/YobUtils.java
@@ -560,8 +560,7 @@
      */
     static LeafIdentifier getLeafIdentifier(SchemaId id,
                                             YangSchemaNode leafHolder,
-                                            DefaultYangModelRegistry
-                                                    reg) {
+                                            DefaultYangModelRegistry reg) {
         String qualName = getQualifiedDefaultClass(leafHolder);
         ClassLoader classLoader = getClassLoader(leafHolder, reg);
         try {
@@ -760,6 +759,7 @@
      * @param midb       model object identifier
      * @param reg        model registry
      * @param schemaNode leaf schema node
+     * @param key        leaf list node key
      * @return model object id builder
      */
     static ModelObjectId.Builder handleLeafListKey(
@@ -835,6 +835,7 @@
      *
      * @param midb       model object identifier builder
      * @param reg        model registry
+     * @param key        leaf node key
      * @param schemaNode YANG schema node
      * @return model object builder with single instance node
      */
diff --git a/runtime/src/test/java/org/onosproject/yang/runtime/impl/DataTreeContextSwitchTest.java b/runtime/src/test/java/org/onosproject/yang/runtime/impl/DataTreeContextSwitchTest.java
index 0e6a5ba..a998ab0 100644
--- a/runtime/src/test/java/org/onosproject/yang/runtime/impl/DataTreeContextSwitchTest.java
+++ b/runtime/src/test/java/org/onosproject/yang/runtime/impl/DataTreeContextSwitchTest.java
@@ -185,7 +185,7 @@
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(lateNight);
         mid = ModelObjectId.builder().addChild(DefaultYtbFood.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
         rscData = treeBuilder.getResourceData(data.build());
 
         nameSpace = "yms:test:ytb:simple:choice:case";
@@ -455,7 +455,7 @@
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(augCont2);
         mid = ModelObjectId.builder().addChild(DefaultCont1.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
         rscData = treeBuilder.getResourceData(data.build());
 
         nameSpace = "yms:test:ytb:simple:augment";
@@ -537,7 +537,7 @@
         mid = ModelObjectId.builder().addChild(DefaultCont1.class)
                 .addChild(DefaultCont2.class).build();
 
-        data.identifer(mid);
+        data.identifier(mid);
         rscData = treeBuilder.getResourceData(data.build());
 
         nameSpace = "yms:test:ytb:simple:augment";
@@ -597,7 +597,7 @@
                 .addChild(DefaultCont2.class)
                 .addChild(DefaultCont1s.class).build();
 
-        data.identifer(mid);
+        data.identifier(mid);
         rscData = treeBuilder.getResourceData(data.build());
 
         nameSpace = "yms:test:ytb:simple:augment";
@@ -706,7 +706,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
@@ -749,7 +749,7 @@
         setUp();
 
         data = new DefaultModelObjectData.Builder();
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class)
                                .addChild(DefaultOnlyContainer.class).build());
 
@@ -799,7 +799,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
@@ -863,7 +863,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
@@ -943,7 +943,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
@@ -1051,7 +1051,7 @@
         DefaultContainerList con = new DefaultContainerList();
         con.listLeaf(list);
 
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class)
                                .addChild(DefaultContainerList.class).build());
 
@@ -1129,7 +1129,7 @@
         data = new DefaultModelObjectData.Builder();
         ListLeafKeys key = new ListLeafKeys();
         key.name("key leaf");
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class)
                                .addChild(DefaultContainerList.class)
                                .addChild(DefaultListLeaf.class, key).build());
@@ -1207,7 +1207,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
@@ -1274,7 +1274,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
@@ -1332,7 +1332,7 @@
 
         data = new DefaultModelObjectData.Builder();
         data.addModelObject(con);
-        data.identifer(ModelObjectId.builder()
+        data.identifier(ModelObjectId.builder()
                                .addChild(DefaultFirstLevel.class).build());
 
         // Builds YANG tree in YTB.
diff --git a/runtime/src/test/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilderTest.java b/runtime/src/test/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilderTest.java
index 24a217e..945af8d 100644
--- a/runtime/src/test/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilderTest.java
+++ b/runtime/src/test/java/org/onosproject/yang/runtime/impl/DefaultDataTreeBuilderTest.java
@@ -373,7 +373,7 @@
         mid = ModelObjectId.builder()
                 .addChild(DefaultModKey.class, keyKeys).build();
 
-        data.identifer(mid);
+        data.identifier(mid);
         rscData = treeBuilder.getResourceData(data.build());
 
         id = rscData.resourceId();
@@ -440,7 +440,7 @@
                 .addChild(DefaultModKey.class, keyKeys)
                 .addChild(ModKey.LeafIdentifier.TYPES).build();
 
-        data.identifer(mid);
+        data.identifier(mid);
         rscData = treeBuilder.getResourceData(data.build());
 
         id = rscData.resourceId();
@@ -621,7 +621,7 @@
 
         // Builds YANG tree in YTB.
         mid = ModelObjectId.builder().addChild(DefaultSched.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
 
         rscData = treeBuilder.getResourceData(data.build());
 
@@ -864,7 +864,7 @@
         data = new DefaultModelObjectData.Builder();
         mid = ModelObjectId.builder()
                 .addChild(DefaultTestNotification.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
 
         registry = ut.reg;
         DefaultDataTreeBuilder builder = new DefaultDataTreeBuilder(registry);
@@ -901,7 +901,7 @@
         data = new DefaultModelObjectData.Builder();
         mid = ModelObjectId.builder()
                 .addChild(DefaultTestNotification.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
         data.addModelObject(new DefaultTestContainer());
 
         registry = ut.reg;
@@ -945,7 +945,7 @@
         data = new DefaultModelObjectData.Builder();
         mid = ModelObjectId.builder()
                 .addChild(DefaultTestInput.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
 
         registry = ut.reg;
         DefaultDataTreeBuilder builder = new DefaultDataTreeBuilder(registry);
@@ -986,7 +986,7 @@
         data = new DefaultModelObjectData.Builder();
         mid = ModelObjectId.builder()
                 .addChild(DefaultTestInput.class).build();
-        data.identifer(mid);
+        data.identifier(mid);
         data.addModelObject(new org.onosproject.yang.runtime.mockclass
                 .testmodule.testrpc.testinput.DefaultTestContainer());
 
diff --git a/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DataNodeJsonVisitor.java b/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DataNodeJsonVisitor.java
index cc0e2ee..a943c66 100644
--- a/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DataNodeJsonVisitor.java
+++ b/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DataNodeJsonVisitor.java
@@ -35,6 +35,8 @@
 
     /**
      * Creates an instance of data node JSON visitor.
+     *
+     * @param jb json builder
      */
     public DataNodeJsonVisitor(JsonBuilder jb) {
         jsonBuilder = jb;
diff --git a/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonWalker.java b/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonWalker.java
index eaa4bdf..2ad2a74 100644
--- a/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonWalker.java
+++ b/serializers/json/src/main/java/org/onosproject/yang/serializers/json/DefaultJsonWalker.java
@@ -42,6 +42,8 @@
 
     /**
      * Creates an instance of JSON object node walker.
+     *
+     * @param db data node builder
      */
     public DefaultJsonWalker(DataNode.Builder db) {
         dataNodeBuilder = db;
