[IMP]Improve logic of synchronization, removed record from localstorage once it has been sycnronized because we are going to reload the server data, improved to_delete logic, pass [2, id, false] for delete command