small refactor of networking code. Https seems to work. But there might be a small bug in requests that does not allow for https verification. Or I fucked up my certs... :)