Refactor to use requests

and a with statement :D