cleaning up storage while syncing and preparing for implementation of sync-state saving