Clean up syncing logic, and body swap / setting of ids, and change  to be function