Simplifying the snapshot code.