         pointer: schema.id || "#"
         scope: schema.id || "#"
 
-      # 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(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
 
     validate: (data) ->
       @validator("#").validate(data)

          schema
      else
        throw new Error "No schema found for '#{JSON.stringify(arg)}'"

    # Find a registered schema.
    #

      # them in the context, so the primary attribute handler can act
      # on them.
      context.modifiers = {}

      if (modifiers = Validator.modifiers[attribute])?
        for key in modifiers
          context.modifiers[key] = schema[key]

