Converted routes from coffeescript into javascript