Remove dead code from bgsync.