Fixed redirects and enhanced JS.