added route parameter to javascript, removed punycode library