Reworked snapshot code to allow for backups.