 
     super options, data
 
-    @templates = {}
     @mainView.addSubView @stackEditor = new StackEditor { cssClass: 'initial' }
 
     @stackEditor.on Events.InitializeRequested, @bound 'initializeStack'

      do @openStackWizard
      return callback { message: 'No template provided' }

    @fetchStackTemplate templateId, (err, template) =>

      @stackEditor.unsetClass 'initial'



  reloadEditor: (templateId, stackId) ->

    @openEditor templateId, stackId, { reset: yes }


  fetchStackTemplate: (templateId, reset = no, callback) ->

    { storage } = kd.singletons.computeController

    if not reset and template = storage.templates.get templateId
      return callback null, template

    storage.templates.fetch templateId, null, reset

      .then (template) ->
        if template
          callback null, template
        else
          callback Errors.NotExists

        return template

      .catch (err) ->
        callback err



  initializeStack: (templateId) ->
