Move update of TargetSnapshot into new method TargetSnapshot.update()
Refactor duplicate code