Synchronisation Working

Synchronisation is now working.
there is a bug on shutdown, probably not cleaning up properly