Factor out routes.coffee
Clean up scripts to conform to the new style