massive restructuring to use webRequest

Now uses less API permissions and reliably redirects!