Snapshot code cleanup