Remove duplicate routes and remove trailing slashes