Changes towards getting automatic syncing working