       # them in the context, so the primary attribute handler can act
       # on them.
       context.modifiers = {}
-      if (modifiers = Validator.attributes[attribute]?.modifiers)
+
+      if (modifiers = Validator.modifiers[attribute])?
         for key in modifiers
           context.modifiers[key] = schema[key]
 

          if "$ref" == attribute
            @resolve_reference(context, schema, definition)
          else
            @_compile_references context.child(attribute), definition

    _compile_references: (context, schema) ->
      if @test_type "array", schema
        for definition, i in schema
          if @test_type "object", definition
            @compile_references context.child(i), definition

      else if @test_type("object", schema)
        @compile_references context, schema
      else
        # No action required.


    resolve_reference: (context, schema, definition) ->
      {scope, pointer} = context

          schema


    register: (uri, schema) ->
      @uris[uri] = schema
      # TODO: enforce uniqueness of types
      if (media_type = schema.mediaType)?
        if media_type != "application/json"
          @media_types[media_type] = schema


    compile_references: (context, schema) ->
      # Make an initial pass over the schema looking for $ref fields,
      # recording their targets for use in actual compilation.
      @_compile_references(context, schema)

      # We try a second time to resolve $ref values, because a schema may have
      # been defined after we initially tried to resolve a $ref.
      for ref, {scope, uri} of @unresolved
        if (found_schema = @resolve_uri(uri, scope))?
          delete @unresolved[ref]
          @register ref, found_schema
      if Object.keys(@unresolved).length > 0
        pointers = (uri for key, {uri} of @unresolved)
        throw new Error "Unresolvable $ref values: #{JSON.stringify pointers}"


    _compile_references: (context, schema) ->
      if schema == null
        culprit = context.pointer
        throw new Error "null is not a valid schema.  Culprit: '#{culprit}'"
