Refactor account snapshot generation