Fixed redirects, removed code that wasn't working