Cleaning up DiffSyncHandler and adding JS tests.