Refactor + implement storage.sync