 
       # TOP OF COMPONENT VISIBLE
       # Try to keep it at or below the viewport, especially when scrolling up
-      console.log "\tTOP OF COMPONENT VISIBLE: #{k} >= #{docker.viewport.top} + #{v.jut_above} + #{y_stack}, #{if docker.scrolling_down then 'weak' else 'medium'}" if debug
+      console.log "\tTOP OF COMPONENT VISIBLE: #{k} >= #{dockingStation.viewport.top} + #{v.jut_above} + #{y_stack}, #{if dockingStation.scrolling_down then 'weak' else 'medium'}" if debug
       solver.addConstraint new c.Inequality \
         y_pos[k], \
         c.GEQ, \
-        docker.viewport.top + v.jut_above + y_stack, \
-        if docker.scrolling_down then c.Strength.weak else c.Strength.medium
+        dockingStation.viewport.top + v.jut_above + y_stack, \
+        if dockingStation.scrolling_down then c.Strength.weak else c.Strength.medium
       y_stack += v.height
 
       # BOTTOM OF COMPONENT VISIBLE
       # Try to keep the bottom above the viewport, especially when scrolling down
-      console.log "\tBOTTOM OF COMPONENT VISIBLE: #{k} + #{v.height} <= #{docker.viewport.top} + #{docker.viewport.height}, #{if docker.scrolling_down then 'medium' else 'weak'}" if debug
+      console.log "\tBOTTOM OF COMPONENT VISIBLE: #{k} + #{v.height} <= #{dockingStation.viewport.top} + #{dockingStation.viewport.height}, #{if dockingStation.scrolling_down then 'medium' else 'weak'}" if debug
       solver.addConstraint new c.Inequality \
         y_pos[k], \
         c.LEQ, \
-        docker.viewport.top + docker.viewport.height - v.height, \
-        if docker.scrolling_down then c.Strength.medium else c.Strength.weak
+        dockingStation.viewport.top + dockingStation.viewport.height - v.height, \
+        if dockingStation.scrolling_down then c.Strength.medium else c.Strength.weak
 
       # RELATIONAL
       for sv, j in sorted

      x = 0
    else
      # Fixed positioning is relative to the viewport, not the document
      y -= docker.viewport.top 

      # Adjust for horizontal scroll for fixed position elements because they don't 
      # move with the rest of the content (they're fixed to the viewport). 

        is_docked = false 
      else
        dimensions =  if fetch(v.key).docked
                        dockingStation.component_history[v.key].on_dock
                      else 
                        {height: v.height, jut_above: v.jut_above}

        is_docked = dockingStation.viewport.top + y_stack + dimensions.jut_above >= v.start

      if is_docked
        y_stack += dimensions.height
