 			routeReq.write ctx.request.body
 		routeReq.end()
 
+###
+# Finds the channels that match the request in ctx.request and routes
+# the request to all routes within those channels. It updates the
+# response of the context object to reflect the response recieved from the
+# route that is marked as 'primary'.
+#
+# Accepts (ctx, next) where ctx is a [Koa](http://koajs.com/) context
+# object and next is a callback that is called once the route marked as
+# primary has returned an the ctx.response object has been updated to
+# reflect the response from that route.
+###
 exports.route = (ctx, next) ->
 	routes = []
 

			else
				done()

exports.removeChannel = (channelName, done) ->
	getCollection (collection) ->
		collection.remove {name: channelName}, (err, numberOfRemoveDocs) ->

			else
				return done()

###
# Gets all channel currently registered.
# 
# Accepts (done) where done is a callback that will be called with (err, items)
# err will contain an error object if an error occurs otherwise items will
# contain an array fo Channel objects.
###
exports.getChannels = (done) ->
	getCollection (collection) ->
		collection.find().toArray (err, items) ->
