Fixed some issues related to the logic
Replaced:
first_url_t = next(iter(self.tor_store))
first_url_nt = next(iter(self.non_store))
with:
first_url_t = list(self.tor_store.keys())[0]
first_url_nt = list(self.non_store.keys())[0]
and also fixed error like local variable referenced before assignment