      if (this.schema.properties[key] && this.schema.properties[key].title)
        labelText = this.schema.properties[key].title;
      else
-@@ -2884,19 +3023,21 @@
+@@ -2884,19 +3056,21 @@
  
      checkbox.checked = key in this.editors;
      checkbox.addEventListener('change',function() {

+      this.rootheaderText = document.createElement('span');
+      this.rootheaderText.textContent = this.getTitle();
+      this.title.appendChild(this.rootheaderText);
+      if(this.schema.type === 'array'){
+          var addItemIcon = document.createElement('button');
+          addItemIcon.type = 'button';
+          addItemIcon.style.marginTop = '4px';
+          addItemIcon.style.marginLeft = '4px';
+          addItemIcon.style.fontSize = '9px';
+          addItemIcon.title = 'Add Item';
+          addItemIcon.className = 'btn btn-mini json-editor-btn-plus';
+          var innerText = document.createElement('i');

-      this.collapsed = false;
-      this.toggle_button = this.getButton('','collapse','Collapse');
-      this.title_controls.appendChild(this.toggle_button);
+      var schemaPath = self.editor_holder.parentElement.getAttribute('data-schemapath').split('.');
+      if(schemaPath.length === 3){
+          self.editor_holder.parentElement.firstChild.setAttribute('style','border-bottom:1px solid #eeeeee;');
+      }else if(schemaPath.length >= 4){
+          self.editor_holder.parentElement.lastChild.firstChild.setAttribute('style','border-left: 1px dotted #e5e5e5;margin-left: 9px;');
+      }else if(schemaPath.length == 2){
+          self.editor_holder.parentElement.setAttribute('style','position: relative;padding-right:0px;padding-left:11px;');
+      }
+      if(this.schema.collapse && !clickAddItem){
+          this.toggle_button = this.getButton('','expand','Expand');
+          this.title_controls.appendChild(this.toggle_button);
