minor tweaks

Hi, Anirudh,
this is a really cool idea. I hope you don't mind if I made a few tweaks, e.g., replacing the lists via hashable sets for efficiency, and resetting `friends_online_old = []` every 30 iterations instead just only once at the 30th iterations. 
Please feel free to merge this pull request if you like the changes!

Best,
Sebastian