cleans up routes and regexs