clean-up and sync