Refactor snapshot process