Moved callback to the correct place in router, coffee-ised code a bit.