exam: Some fixes in new sync logic
all: other changes from new sync

Add sha update in data base
Move getSha to storage
And other minor fixed