 
 		sendRequestToRoutes ctx, routes, next
 
+###
+# The [Koa](http://koajs.com/) middleware function that enables the
+# router to work with the Koa framework. CoffeeScript does not support
+# ES6 generators yet so this function has to be passed through as pure
+# Javascript.
+#
+# Use with: app.use(router.koaMiddleware)
+###
 exports.koaMiddleware = `function *routeMiddleware(next) {
-		console.log("Starting routing");
 		var route = Q.denodeify(exports.route);
 		yield route(this);
 		yield next;

				else
					return done new Error "Cannot add a channel with a name that is alreay in use"

exports.getChannel = (channelName, done) ->
	getCollection (collection) ->
		collection.findOne {name: channelName}, (err, item) ->

exports.Channel.prototype.toString = ->
	return "<Channel: " + this.name + ">"
	
###
# Adds a number of channels to the router at once.
# 
# Accepts (channels, done) where channels is an array of Channel objects and
# done is a callabck that will be called once the channels have been saved or
# it will be called with an Error object if an error occurs.
###
exports.setChannels = (channels, done) ->
	getCollection (collection) ->

