Split up auto snapshot code