 
 
   constructor: (schemas...) ->
-    @references = {}
+    @uris = {}
     @media_types = {}
     @tests = {}
     @unresolved = {}

    # Here, we treat non-JSON-pointer fragments (such as "#user") as aliases.
    if schema.id && schema.id.indexOf("#") == 0
      uri = URI.resolve scope, schema.id
      @register uri, schema

    if @test_type "object", schema

    if @tests[uri]
      validate: (data) =>
        valid: @tests[uri](data)
        errors: ["Error report not implemented"]
      toJSON: (args...) =>
        @uris[uri]
    else
      throw new Error "No schema found for '#{uri}'"

  find: (arg) ->
    if @test_type "string", arg
      uri = escape(arg)
      @uris[uri]
    else if media_type = arg.mediaType
      @media_types[media_type]
    else
