code: function mapTargets(target,mappedAttrs,vm)
        {
          /* attaches viewmodel to wrapper */
          target.kb_viewmodel = vm;
          
          /* map nodes with their bindings */
          var maps = mappedAttrs.maps = mappedAttrs.map(mappedAttrs.wrapper);
  
          mappedAttrs.wrapper.kb_maps = maps;
          
          /* loops through maps: {key:[map,map],key2:[map,map]} */
          Object.keys(maps).forEach(function(key){
            maps[key].forEach(function(map){
              switch(map.type)
              {
                case 'for':
                  /* connects viewmodel and then loop creates components for converting and deletes original map*/
                  map.connect(vm).createloop();
                break;
                case 'component':
                  /* connects viewmodel updates value and then deletes map as it won't be used again */
                  map.connect(vm).unsync();
                break;
                case 'node':
                  map.connect(vm).replaceNode();
                break;
                default:
                  /* standard data connection and value set */
                  map.connect(vm);
                break;
              }
            })
          });
          
          mappedAttrs.wrapper.kb_viewmodel.onFinish.call(mappedAttrs.wrapper.kb_viewmodel,mappedAttrs.wrapper);
          if(mappedAttrs.wrapper.kb_viewmodel.onGlobalFinish)
          {
            mappedAttrs.wrapper.kb_viewmodel.onGlobalFinish.call(mappedAttrs.wrapper.kb_viewmodel,mappedAttrs.wrapper);
          }
          if(mappedAttrs.wrapper.kb_viewmodel.onNodeFinish)
          {
            mappedAttrs.wrapper.kb_viewmodel.onNodeFinish.call(mappedAttrs.wrapper.kb_viewmodel,mappedAttrs.wrapper);
          }
        }
docs: /* in charge of connecting the viewmodel up to the allocated maps