Better tests for syncing, better handling of existing links