remove code incompatible with new requests and twisted libraries