Update sync.py

added the ability to remember people and fixed a lot of the code