         else
           element.removeAttr('seamless')
 
-  Directives.directive 'currentStep', Array '$window', 'Mines', 'stepConfig', ($window, mines, conf) ->
-    restrict: 'C'
-    scope:
-      tool:     '='
-      step:     '='
-      fullSize: '='
-      onToggle: '&'
-      hasItems: '&'
-      has:      '&'
-      wants:    '&'
-      nextStep: '&'
-    template: """
-      <div class="panel-heading">
-        <i class="fa pull-right"
-           ng-click="onToggle()"
-           ng-class="{'fa-compress': fullSize, 'fa-expand': !fullSize}"></i>
-        {{tool.heading}}
-      </div>
+  Directives.directive 'iframeTool', Array '$window', 'Mines', 'stepConfig', (win, mines, conf) ->
+    restrict: 'E'
+    replace: true
+    template: """
       <div class="panel-body">
         <iframe is-seamless="tool.seamless" src="{{tool.src}}" width="100%">
       </div>
     """
     link: (scope, element, attrs) ->
-      element.addClass('panel panel-default')
       iframe = element.find('iframe')
 
-      do resize = -> iframe.css height: ng.element($window).height() * 0.85
-
-      $window.addEventListener 'resize', resize
+      do resize = -> iframe.css height: ng.element(win).height() * 0.85
+
+      win.addEventListener 'resize', resize
 
       channel = Channel.build
         window: iframe[0].contentWindow

          else
            init()

  Directives.directive 'filterTerm', ->
    restrict: 'AE'
    replace: true,


  toolCssLoaded = {}

  injectingLinker = (window, compile, injector) -> (scope, element, attrs) ->
    scope.$watch 'tool.controllerURI', ->
      if scope.tool

        if scope.tool.style and not toolCssLoaded[scope.tool.style]
          link = window.document.createElement('link')
          link.rel = 'stylesheet'
          link.href = scope.tool.style
          window.document.getElementsByTagName('head')[0].appendChild(link)
          toolCssLoaded[scope.tool.style] = true

        ctrl = window.location.origin + scope.tool.controllerURI
        tmpl = window.location.origin + scope.tool.templateURI

        require [ctrl, "text!#{ tmpl }"], (controller, template) ->

          injector.invoke controller, this, {'$scope': scope}

          element.html(template)
          compile(element.contents())(scope)

          scope.$apply()

  Directives.directive 'nativeTool', ($window, $compile, $injector) ->
    restrict: 'E'
    scope:
      tool: '=tool'
      actions: '=actions'
      state: '=state'
    link: injectingLinker $window, $compile, $injector

  Directives.directive 'angular-tool', Array ($window, $compile, $injector) ->
    restrict: 'E'
    link: injectingLinker $window, $compile, $injector

  Directives.directive 'nextStep', ($window, $compile, $injector) ->
    restrict: 'E'
