Change the synch.py script to make it usable as a module