Misc changes while adding local sync code