SyncToDB method extracted. Some code comments added