removed module.exports
everything grouped into the pathToRegexp function