Changed sync routines to work with new protocol