     d.yay = _.once d.resolve
     d.nay = _.once d.reject
     return d
-
+###*
+* This is a simple AmpersandState wrapper around a simple object
+* @class InstructionState
+###
 InstructionState = AmpState.extend {
     props: {
+        ###*
+        * This is the command that the instruction represents
+        * @property fn
+        ###
         fn: ['function', true]
+        ###*
+        * This is the time that the instruction was requested
+        * @property timestamp
+        ###
         timestamp: {
             type: 'number'
             required: true
             default: ()->
                 return Date.now()
         }
+        ###*
+        * This is the name of the instruction
+        * @property name
+        ###
         name: {
             type: 'string'
             required: true


module.exports = (stateName)->
    "use strict"
    scopeThis = @
    stateSettings = {}
    if stateName?
        stateSettings.name = _.uniqueId stateName

            fn: ()->
                return _.map @instructions.models, (instruction)->
                    if instruction.fn?
                        return instruction.single
                    return null
        }
    }
    ###*
    * Wrap all of the instructions with another function
    * @method wrap
    ###
    wrap: (wrapper)->
        unless _.isFunction wrapper
            throw new TypeError "Expected wrapper to be function."
        return _.map @instructions.models, (instruction)->
            if instruction.wrap?
                return instruction.wrap wrapper
            return null

    initialize: (attrs, opts)->
        if attrs.name?
            attrs.name = _.uniqueId attrs.name
