Move sync fetches into pull code, add more tests