fixed the url redirects and cleaned up debug stuff