Update coroute.js

Semi-working, before refactoring...