Reworked snapshot code to allow for backups.
Merge branch 'test' into dev