Made sync tool more generic