 		cb: type: "function"
 	_priv.native.write cb
 
-Gitteh.Reference = Reference = (repo, nativeRef) ->
+###*
+ * @class
+ * A Reference is a named pointer to a {@link Commit} object. That is, refs are
+ * the DNS of Git-land. References can either be direct or symbolic. Direct 
+ * references point to the object id of a commit. Symbolic refs point to other
+ * references.
+ * @property {String} name
+ * @property {Boolean} direct true if Reference points directly to an object id.
+ * @property {Boolean} packed true if Reference is in a packfile
+ * @property {String} target object id reference points to, or another reference
+ * name if not a direct reference.
+ * @property {Repository} repository the {@link Repository} that owns this ref.
+ * @see Repository#reference
+ * @see Repository#createReference
+###
+Reference = Gitteh.Reference = (repo, nativeRef) ->
 	_priv = createPrivate @
 	_priv.native = nativeRef
 	immutable(@, nativeRef)

	index = new Index nativeRepo.index
	immutable(@, {index}).set "index"
	return @
Repository.prototype.exists = ->
	_priv = getPrivate @
	[oid, cb] = args
		oid: type: "oid"
		cb: type: "function"
	_priv.native.exists oid, cb
Repository.prototype.object = ->
	_priv = getPrivate @
	[oid, type, cb] = args

			else undefined
		return cb new TypeError("Unexpected object type") if clazz is undefined
		return cb null, new clazz @, object

###*
 * Fetches a {@link Blob} object from the repository. This is a stricter
 * variant of {@link #object} - an error will be thrown if object isnt a blob.
 * @param {String} oid id of blob to be fetched.
 * @param {Function} cb called when blob has been fetched.
 * @see #object
###
Repository.prototype.blob = (oid, cb) -> @object oid, "blob", cb

###*
 * Fetches a {@link Commit} object from the repository. This is a stricter
 * variant of {@link #object} - an error will be thrown if object isnt a commit.
 * @param {String} oid id of commit to be fetched.
 * @param {Function} cb called when commit has been fetched.
 * @see #object
###
Repository.prototype.commit = (oid, cb) -> @object oid, "commit", cb

###*
 * Fetches a {@link Tag} object from the repository. This is a stricter
 * variant of {@link #object} - an error will be thrown if object isnt a tag.
 * @param {String} oid id of tag to be fetched.
 * @param {Function} cb called when tag has been fetched.
 * @see #object
###
Repository.prototype.tag = (oid, cb) -> @object oid, "tag", cb

###*
 * Fetches a {@link Tree} object from the repository. This is a stricter
 * variant of {@link #object} - an error will be thrown if object isnt a tree.
 * @param {String} oid id of tree to be fetched.
 * @param {Function} cb called when tree has been fetched.
 * @see #object
###
Repository.prototype.tree = (oid, cb) -> @object oid, "tree", cb

###*
 * Fetches a {@link Reference} object from the repository. This is a stricter 
 * variant of {@link #object} - an error will be thrown if object isnt a ref.
 * @param {String} oid id of reference to be fetched.
 * @param {Function} cb called when reference has been fetched.
 * @see #object
###
Repository.prototype.reference = ->
	_priv = getPrivate @
	[name, resolve, cb] = args
