Finished the autosync functionality