Mostly working, need to fix redirects handling