   cleanName:(name)->
     name
 
-  getConfigValue:(fullPath)->
-    atom.config.get @packageName+'.'+fullPath
-
-
-  parseStringChild:(name,obj)->
+  getConfigValue:(name,obj)->
+    fullPath = @packageName+@path+'.'+name
+    value = atom.config.get fullPath
+    if not value?
+      if obj?.default?
+        value = obj.default
+      else
+        value = atom.config.getDefault fullPath
+    value
+
+  getChildCleanName:(name,obj)->
+    cleanName = @cleanName name
     if obj.title?
       cleanName = obj.title
-    else
-      cleanName = @cleanName(name)
-    fullPath = @path+'.'+name
-    value = getConfigValue fullPath
+    cleanName
+
+  parseStringChild:(name,obj)->
+    cleanName = @getChildCleanName name,obj
+    value = @getConfigValue name,obj
+    console.log 'value',value
+    if not value?
+      value = ''
     str =
       "<div class='group'>
         <label for='#{name}'>#{cleanName}</label>



  activateTab:(index)->
    for i in [0..(@tabs.length-1)]
      do (i)=>
        if i==index
          @tabs[i].className='tab active'
        else
          @tabs[i].className = 'tab'

    for j in [0..(@tabsContent.length-1)]
      do (j)=>

    @html = ''
    @cleanPackageName = @cleanName(@packageName)
    @title = @cleanName+" settings"
    
    @buttons = {
      "Apply":(ev,popup)=> @applyConfig(ev,popup),
      "Close":(ev,popup)=> @close(ev,popup)
