First attempt to sync, minor changes to script