Continued working on sync. Not done yet.