Add sync library, tests