     factory jQuery, _, jQuery.hlf
 )(@, ($, _, hlf) ->
   
+  # It takes some more boilerplate to write the plugins. Any of this additional
+  # support API is put into a plugin specific namespace under `$.hlf`.
   hlf.tip =
-    # It takes some boilerplate to write the plugins. To namespace when
-    # extending any jQuery API, we use custom `toString` helpers. Plugin
-    # namespaces (under the root`$.hlf`) each have a `debug` flag for granular
-    # logging.
+    # To toggle debug logging for all instances of a plguin, use the `debug` flag.
     debug: off
+    # To namespace when extending any jQuery API, we use custom `toString` helpers.
     toString: _.memoize (context) ->
       switch context
         when 'event'  then '.hlf.tip'
         when 'data'   then 'hlf-tip'
         when 'class'  then 'js-tips'
         else 'hlf.tip'
+    # The plugin's default options is available as reference for values like sizes.
 
     # ❧
 
     # Tip Options
     # -----------
-    # NOTE: The plugin instance gets extended with the options.
+    #- NOTE: The plugin instance gets extended with the options.
     defaults: do (pre = 'js-tip-') ->
 
       # - `$viewport` is the element in which the tip must fit into. It is _not_
       #   the context, which stores the tip instance and by convention contains
       #   the triggers.
       $viewport: $ 'body'
-      # - `triggerContent` can be the name of the trigger element's attribute or a
-      #   function that provides custom content when given the trigger element.
-      triggerContent: null
+      # - `autoDirection` automatically changes the direction so the tip can
+      #   better fit inside the viewport.
+      autoDirection: on
       # - `cursorHeight` is the browser's cursor height. We need to know this to
       #   properly offset the tip to avoid cases of cursor-tip-stem overlap.
       cursorHeight: 12

    htmlOnRender: $.noop
    offsetOnTriggerMouseMove: (event, offset, $trigger) -> no

  # SnapTip API
  # -----------
  # With such a complete base API, extending it with an implementation with
  # snapping becomes almost trivial.
  class SnapTip extends Tip

    # Continue setting up `$tip` and other properties.
    init: ->
      super()
      # Infer `snap.toTrigger`.
      if @snap.toTrigger is off
        @snap.toTrigger = @snap.toXAxis is on or @snap.toYAxis is on
      # `_offsetStart` stores the original offset, which is used for snapping.
      @_offsetStart = null
      # Add snapping config as classes.
      @$tip.addClass(@classNames.snap[key]) for own key, active of @snap when active

    # `_moveToTrigger` is the main positioner. The `baseOffset` given is expected
    # to be the trigger offset.
    _moveToTrigger: ($trigger, baseOffset) -> # TODO: Still needs to support all the directions.
      #@debugLog baseOffset
      offset = $trigger.position()
      toTriggerOnly = @snap.toTrigger is on and @snap.toXAxis is off and @snap.toYAxis is off
      if @snap.toXAxis is on
        if @isDirection 'bottom', $trigger
          offset.top += $trigger.outerHeight()
        if @snap.toYAxis is off
          # Note arbitrary buffer offset.
          offset.left = baseOffset.left - @$tip.outerWidth() / 2
      if @snap.toYAxis is on
        if @isDirection 'right', $trigger
          offset.left += $trigger.outerWidth()
        if @snap.toXAxis is off
          offset.top = baseOffset.top - @$tip.outerHeight() / 2
      if toTriggerOnly is on
        if @isDirection 'bottom', $trigger
          offset.top += $trigger.outerHeight()
      offset

    # Extend `_bindTriggers` to get initial position for snapping. This is only
    # for snapping without snapping to the trigger, which is only what's
    # currently supported. See `afterShow` hook.
    _bindTriggers: ->
      super()
      selector = ".#{@classNames.trigger}"
      # Modify base binding.
      @$context.on @evt('truemouseleave'), selector, { selector },
        (event) => @_offsetStart = null

    # Extend `_positionToTrigger` to set `cursorHeight` to 0, since it won't
    # need to be factored in if we're snapping.
    _positionToTrigger: ($trigger, mouseEvent, cursorHeight=@cursorHeight) ->
      super $trigger, mouseEvent, 0

    # `onShow` and `afterShow` are implemented such that they make the tip
    # invisible while it's being positioned and then reveal it.
    onShow: (triggerChanged, event) ->
      if triggerChanged is yes
        @$tip.css 'visibility', 'hidden'
    afterShow: (triggerChanged, event) ->
      if triggerChanged is yes
        @$tip.css 'visibility', 'visible'

          visibility: 'visible'
        return result

    # ### Delegation to Subclass

    # These methods are hooks for custom functionality from subclasses. (Some are
    # set to no-ops becase they are given no arguments.)
    onShow: (triggerChanged, event) -> undefined
    onHide: $.noop
    afterShow: (triggerChanged, event) -> undefined
